CN113642288B - Picture and text typesetting method and device - Google Patents

Picture and text typesetting method and device Download PDF

Info

Publication number
CN113642288B
CN113642288B CN202110922828.2A CN202110922828A CN113642288B CN 113642288 B CN113642288 B CN 113642288B CN 202110922828 A CN202110922828 A CN 202110922828A CN 113642288 B CN113642288 B CN 113642288B
Authority
CN
China
Prior art keywords
typesetting
typeset
column
space
residual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110922828.2A
Other languages
Chinese (zh)
Other versions
CN113642288A (en
Inventor
黄荣军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN202110922828.2A priority Critical patent/CN113642288B/en
Publication of CN113642288A publication Critical patent/CN113642288A/en
Application granted granted Critical
Publication of CN113642288B publication Critical patent/CN113642288B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application relates to a picture and text typesetting method and a picture and text typesetting device. The method comprises the following steps: acquiring content to be typeset; dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column; and readjusting the proportion of each column according to the initial typesetting result, and performing secondary typesetting on the initial typesetting result. According to the method and the device, the situation of insufficient or excessive space distribution is effectively avoided through typesetting twice, typesetting effect is improved, labor cost and time are greatly saved, and image-text typesetting efficiency is improved.

Description

Picture and text typesetting method and device
Technical Field
The present application relates generally to the field of computer technology. More particularly, the present application relates to a method and apparatus for typesetting graphics.
Background
At present, the poster design generally relates to the condition of graphic and text mixed arrangement, in the prior art, an area to be typeset is randomly segmented, then pictures and/or characters to be typeset are randomly placed in the segments, and finally the content and the layout of each segment are manually adjusted to obtain the required poster design. However, in the prior art, the arbitrary column division mode is easy to have the result of insufficient space allocation or excessive space allocation, so that in order to obtain a better typesetting effect, a designer is required to spend a great deal of time and effort for adjustment, and the efficiency is low.
Based on the above technical problems, the present application is specifically proposed.
Disclosure of Invention
In order to at least partially solve the technical problems mentioned in the background art, the scheme of the application provides a picture and text typesetting method and device.
According to a first aspect of the present application, the present application provides a method for typesetting graphics, where the method includes: acquiring content to be typeset; dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column; and readjusting the proportion of each column according to the initial typesetting result, and performing secondary typesetting on the initial typesetting result.
Optionally, partitioning the typesetting area according to the content to be typeset, and performing initial typesetting on the content to be typeset in each partition includes: grouping the contents to be typeset according to a preset grouping rule; dividing columns of the typesetting areas according to preset proportions; placing the grouped contents to be typeset in each column according to a preset typesetting rule; and adjusting the content to be typeset in each column to adapt to the space of each column.
Optionally, the grouping the content to be typeset according to a preset grouping rule includes: and dividing the content to be typeset into a plurality of groups of characters to be typeset and/or a plurality of groups of pictures to be typeset according to the rule that the characters and the pictures are respectively grouped.
Optionally, the placing the grouped content to be typeset in each column according to a preset typesetting rule includes: placing the characters to be typeset in a larger column; or placing the picture to be typeset in a larger column.
Optionally, the adjusting the content to be typeset in each column to adapt to the space of each column includes: and adjusting the size of the characters to be typeset in each column according to the character grade, and/or scaling the pictures to be typeset in each column to enable the pictures to be typeset to be matched with the space of each column.
Optionally, the readjusting the proportion of each column according to the initial typesetting result, and performing the secondary typesetting on the initial typesetting result includes: detecting the residual space of each column; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space.
Optionally, the step of performing the residual space allocation according to a preset allocation rule after merging the residual spaces obtained by the detection includes: merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; or merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column where the characters to be typeset or the pictures to be typeset are located.
Optionally, the image-text typesetting method further includes: and finally typesetting the result of the secondary typesetting.
Optionally, the final typesetting of the secondary typesetting result includes: detecting the residual space of each column again after the secondary typesetting; merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; and adjusting the content to be typeset in each column to adapt to the space of each column.
Optionally, the image-text typesetting method further includes: detecting spatial abnormality of the primary typesetting and/or the secondary typesetting results; repairing the detected spatial abnormality.
According to a second aspect of the present application, the present application provides an image-text typesetting device, where the device includes: the acquisition module is used for acquiring the content to be typeset; the typesetting module is used for typesetting the contents to be typeset, and comprises the steps of dividing the typesetting area into columns according to the contents to be typeset, performing primary typesetting on the contents to be typeset in each column, readjusting the proportion of each column according to the primary typesetting result, and performing secondary typesetting on the primary typesetting result.
Optionally, the typesetting module is configured to divide the typesetting area into columns in the following manner, and perform initial typesetting on the content to be typeset in each column: grouping the contents to be typeset according to a preset grouping rule; dividing columns of the typesetting areas according to preset proportions; placing the grouped contents to be typeset in each column according to a preset typesetting rule; and adjusting the content to be typeset in each column to adapt to the space of each column.
Optionally, the typesetting module is configured to readjust the proportions of the columns in the following manner, and perform secondary typesetting on the primary typesetting result: detecting the residual space of each column; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space.
Optionally, the typesetting module is further configured to perform final typesetting on the result of the second typesetting.
Optionally, the typesetting module is configured to perform final typesetting on the result of the secondary typesetting in the following manner: detecting the residual space of each column again after the secondary typesetting; merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; and adjusting the content to be typeset in each column to adapt to the space of each column.
Optionally, the image-text typesetting device further includes: the space abnormality detection module is used for detecting space abnormality of the primary typesetting and/or the secondary typesetting results; and the repair module is used for repairing the detected space abnormality.
According to a third aspect of the present application, the present application provides an electronic device, where the device includes a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the above-mentioned image-text typesetting method of the present application is implemented.
According to a fourth aspect of the present application, there is provided a computer readable storage medium, wherein the storage medium stores a computer program, which when executed, implements the above-mentioned image-text typesetting method of the present application.
The image-text typesetting method and the image-text typesetting device effectively avoid the condition of insufficient or excessive space distribution through twice typesetting, improve typesetting effect, greatly save labor cost and time and improve image-text typesetting efficiency. In addition, the method and the device further distribute the residual space after the secondary typesetting through final typesetting, so that the typesetting effect is further improved; and the space abnormality is repaired by space abnormality detection, so that a good typesetting effect is further ensured.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a flow chart illustrating a method of typesetting text according to one embodiment of the present application;
fig. 2 is a schematic block diagram illustrating a teletext arrangement according to an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Specific embodiments of the present application are described in detail below with reference to the accompanying drawings.
In one embodiment of the present application, a method for typesetting text is provided, as shown in fig. 1, and the method includes the following steps S101 to S103. Step S101: acquiring content to be typeset; step S102: dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column; step S103: and readjusting the proportion of each column according to the initial typesetting result, and performing secondary typesetting on the initial typesetting result.
The image-text typesetting method and the image-text typesetting device effectively avoid the condition of insufficient or excessive space distribution through twice typesetting, improve typesetting effect, greatly save labor cost and time and improve image-text typesetting efficiency.
In step S101, contents to be typeset are acquired.
According to the embodiment of the application, in order to perform graphic typesetting, firstly, the content to be typeset should be acquired. The content to be typeset may be obtained through any suitable means, for example, from a gallery, a document, a web page, or uploaded or input by an operator, etc. The content to be typeset can comprise characters to be typeset and/or pictures to be typeset, wherein the pictures to be typeset comprise the keying to be typeset and/or the block diagram to be typeset.
In step S102, the typesetting areas are divided according to the contents to be typeset, and the contents to be typeset are primarily typeset in each division.
As a preferred embodiment, the initial typesetting of the content to be typeset includes: grouping the contents to be typeset according to a preset grouping rule; dividing the typesetting area into columns according to a preset proportion; placing the grouped contents to be typeset in each column according to a preset typesetting rule; and adjusting the content to be typeset in each column to adapt to the space of each column. Wherein, the grouping the content to be typeset according to the preset grouping rule includes: dividing the content to be typeset into a plurality of groups of characters to be typeset and/or a plurality of groups of pictures to be typeset according to the rule that the characters and the pictures are respectively grouped; the step of placing the grouped contents to be typeset in each column according to a preset typesetting rule comprises the following steps: placing the characters to be typeset in a larger column; or placing the picture to be typeset in a larger column.
It should be noted that, as used herein, the term "plurality of groups" includes one or more groups.
As a specific embodiment, the initial typesetting of the content to be typeset includes:
dividing the content to be typeset into a plurality of groups of characters to be typeset and/or a plurality of groups of pictures to be typeset according to the rule that the characters and the pictures are respectively grouped, wherein the pictures to be typeset comprise a keying drawing to be typeset and/or a block diagram to be typeset;
dividing the typesetting area into columns according to the number of grouping groups, wherein the proportion of each column can be preset according to actual requirements, for example: the columns can be equally divided or divided according to other unequal proportions; the columns refer to columns of the same level only, but the application is also applicable to multi-level columns, and the columns of different levels are not mutually interfered;
placing the groups of characters to be typeset and/or the pictures to be typeset obtained by grouping into columns according to actual needs, for example: the characters to be typeset can be randomly placed or placed in a larger column, wherein the characters to be typeset with the title are placed in the largest column, or the pictures to be typeset are placed in the larger column;
the size of the characters to be typeset in each column is adjusted according to the character grade, so that the characters are matched with the space of each column, wherein the character grade can be set according to actual needs or input by an operator, for example, the characters to be typeset can be divided into three grades of titles, subtitles and other texts, and the adjustment mode can also be set according to actual needs, for example: the size coefficient can be set according to the character grade, the size coefficient is multiplied with the number of characters to be typeset of the grade to obtain the space proportion occupied by the characters to be typeset of the grade, finally, the space occupied by the characters to be typeset of different grades is obtained through calculation according to the space proportion occupied by the characters to be typeset of different grades, and the sizes of the characters to be typeset of different grades are adjusted according to the space proportion occupied by the characters to be typeset of different grades, so that the space of each character to be typeset of different grades is matched with the space of each column; and/or scaling the pictures to be typeset according to the column space, so that the pictures to be typeset are matched with the space of the column where the pictures to be typeset are located.
In step S103, the proportions of the columns are readjusted according to the initial typesetting result, and the secondary typesetting is performed on the initial typesetting result.
As a preferred embodiment, the secondary typesetting of the primary typesetting result includes: detecting the residual space of each column; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space. The step of carrying out the residual space distribution according to a preset distribution rule after combining the residual spaces obtained by detection comprises the following steps: merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; or merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column where the characters to be typeset or the pictures to be typeset are located. The preset allocation rule can be set according to actual needs.
As a specific embodiment, performing the secondary typesetting on the primary typesetting result includes:
the remaining space detection is performed in the column direction, for example: if the column dividing direction is the vertical direction, the residual space detection is only performed in the vertical direction, in general, after the preliminary typesetting in step 102, the column dividing of the preliminary typesetting block diagram will not have residual space, and the column dividing of the preliminary typesetting text and/or the preliminary typesetting pattern may have residual space;
the residual spaces obtained through detection are combined and then distributed according to a preset distribution rule, and specifically, if the proportion of the columns is equal, the residual spaces obtained through detection are combined and then distributed to each column evenly; if the column proportion is other preset proportion and the characters to be typeset are placed in the larger columns, merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column where the characters to be typeset are located; if the proportion of the columns is other preset proportion, and the pictures to be typeset are placed in the larger columns, merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column where the pictures to be typeset are located;
the content to be typeset in the relevant columns after the residual space allocation is adjusted to be matched with the column space, and the specific adjustment mode is the adjustment mode described in the initial typesetting and is not repeated here.
As a preferred embodiment, the graphic typesetting method further includes: and finally typesetting the result of the secondary typesetting.
Preferably, the final typesetting of the result of the secondary typesetting includes: detecting the residual space of each column again after the secondary typesetting; merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; and adjusting the content to be typeset in each column to adapt to the space of each column. The method for detecting the remaining space and the method for adjusting the content to be typeset in the preferred embodiment are the same as described above, and will not be repeated here.
As a preferred embodiment, the graphic typesetting method further includes: detecting spatial abnormality of the primary typesetting and/or the secondary typesetting results; repairing the detected spatial abnormality.
Specifically, detecting characters to be typeset and column space where the characters to be typeset are located after primary typesetting and/or secondary typesetting, and if the characters to be typeset are compressed to the minimum word size and overflow the column where the characters to be typeset are located, properly increasing the column size to enable the characters to be typeset to be completely displayed in the column; detecting a to-be-typeset keying and a column space where the to-be-typeset keying is located after primary typesetting and/or secondary typesetting, and if the residual space area of the column is larger than the element area of the to-be-typeset keying, properly adjusting the column size to enable the residual space area of the column to be smaller than the element area of the to-be-typeset keying; detecting the block diagram to be typeset after primary typesetting and/or secondary typesetting, and if the aspect ratio of the block diagram to be typeset is abnormal, properly adjusting the size of the column to enable the aspect ratio of the block diagram to be typeset to accord with a preset proportion range; after the detected columns with the space abnormality are repaired, space adaptation adjustment is performed on the contents to be typeset in other columns, and the adjustment mode is the same as above, and is not repeated here.
It will be appreciated by those skilled in the art that the spatial anomaly detection and repair may be performed after the primary typesetting and/or the secondary typesetting, may be performed after the final typesetting, or may be performed after each typesetting, and is not particularly limited herein.
According to the embodiment of the application, the typesetting results with better effects are obtained through automatic column division and multiple typesetting, and the image-text typesetting efficiency is effectively improved.
In another embodiment of the present application, an image-text typesetting device is provided. The apparatus is for performing the steps of the embodiment of the text-to-text typesetting method described above in connection with fig. 1.
As shown in fig. 2, the apparatus 100 includes an obtaining module 101 and a typesetting module 102, where the obtaining module 101 is configured to obtain content to be typeset; the typesetting module 102 is configured to typeset the content to be typeset, including partitioning a typesetting region according to the content to be typeset, performing primary typesetting on the content to be typeset in each partition, readjusting the proportion of each partition according to the primary typesetting result, and performing secondary typesetting on the primary typesetting result.
As a preferred embodiment, the typesetting module 102 is configured to column the typesetting area, and perform initial typesetting on the content to be typeset in each column in the following manner: grouping the contents to be typeset according to a preset grouping rule; dividing the typesetting area into columns according to a preset proportion; placing the grouped contents to be typeset in each column according to a preset typesetting rule; and adjusting the content to be typeset in each column to adapt to the space of each column. The typesetting module 102 is further configured to readjust the proportions of the columns in the following manner, and perform secondary typesetting on the primary typesetting result: detecting the residual space of each column; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space.
As a preferred embodiment, the layout module 102 is also used for final layout of the results of the secondary layout.
Preferably, the typesetting module 102 is configured to perform final typesetting on the result of the secondary typesetting in the following manner: detecting the residual space of each column again after the secondary typesetting; merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; and adjusting the content to be typeset in each column to adapt to the space of each column.
As a preferred embodiment, the image-text typesetting device of this embodiment further includes: the space abnormality detection module is used for detecting space abnormality of the primary typesetting and/or the secondary typesetting results; the repair module is used for repairing the detected space abnormality.
It will be appreciated that, with respect to the image typesetting apparatus in the embodiment described above with reference to fig. 2, the specific manner in which the respective modules perform the operations has been described in detail in connection with the example of the image typesetting method described in fig. 1, and will not be described in detail herein.
In another embodiment of the present application, there is also provided an electronic device, where the device includes a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: acquiring content to be typeset; dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column; and readjusting the proportion of each column according to the initial typesetting result, and performing secondary typesetting on the initial typesetting result.
It will be appreciated that the steps implemented when the processor executes the computer program are substantially identical to the implementation of the steps in the above method, and the specific manner has been described in detail in the embodiments of the method for typesetting, which will not be explained in detail here.
In another embodiment of the present application, there is provided a computer readable storage medium storing a computer program which, when executed, performs the steps of: acquiring content to be typeset; dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column; and readjusting the proportion of each column according to the initial typesetting result, and performing secondary typesetting on the initial typesetting result.
It will be appreciated that the steps implemented when the processor executes the computer program are substantially identical to the implementation of the steps in the above method, and the specific manner has been described in detail in the embodiments of the method for typesetting, which will not be explained in detail here.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
It should be understood that the terms "first" and "second", and the like in the claims, specification and drawings of this application, are used for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising," when used in the specification and claims of this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only, and is not intended to be limiting of the application. As used in the specification and claims of this application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the present specification and claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.

Claims (17)

1. A method of typesetting text, wherein the method comprises:
acquiring content to be typeset;
dividing columns of the typesetting areas according to the contents to be typeset, and primarily typesetting the contents to be typeset in each column;
readjusting the proportion of each column according to the primary typesetting result, and performing secondary typesetting on the primary typesetting result;
wherein, the secondary typesetting of the primary typesetting result comprises the following steps: detecting the residual space in the column dividing direction; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; adjusting the content to be typeset in the columns after the distribution of the residual space;
detecting spatial abnormality of the primary typesetting and/or the secondary typesetting results;
repairing the detected spatial abnormality;
detecting characters to be typeset and column space thereof after primary typesetting and/or secondary typesetting, and if the characters to be typeset are compressed to the minimum word size and overflow the column where the characters to be typeset are located, increasing the column size to enable the characters to be typeset to be completely displayed in the column; detecting a to-be-typeset keying and a column space where the to-be-typeset keying is located after primary typesetting and/or secondary typesetting, and if the residual space area of the column is larger than the element area of the to-be-typeset keying, adjusting the column size to enable the residual space area of the column to be smaller than the element area of the to-be-typeset keying; detecting the block diagram to be typeset after primary typesetting and/or secondary typesetting, and if the aspect ratio of the block diagram to be typeset is abnormal, adjusting the size of the column to enable the aspect ratio of the block diagram to be typeset to accord with a preset proportion range; after repairing the detected column with the space abnormality, the space correspondence adjustment is carried out on the contents to be typeset in other columns.
2. A method of typesetting according to claim 1, wherein the partitioning the typesetting area according to the content to be typeset and initially typesetting the content to be typeset in each partition includes:
grouping the contents to be typeset according to a preset grouping rule;
dividing columns of the typesetting areas according to preset proportions;
placing the grouped contents to be typeset in each column according to a preset typesetting rule;
and adjusting the content to be typeset in each column to adapt to the space of each column.
3. A method of typesetting according to claim 2, wherein said grouping the content to be typeset according to a preset grouping rule comprises:
and dividing the content to be typeset into a plurality of groups of characters to be typeset and/or a plurality of groups of pictures to be typeset according to the rule that the characters and the pictures are respectively grouped.
4. A method of typesetting according to claim 3, wherein the placing the grouped content to be typeset in each column according to a preset typesetting rule comprises:
placing the characters to be typeset in a larger column; or,
and placing the pictures to be typeset in a larger column.
5. A method of typesetting according to claim 4, wherein readjusting the proportions of the columns according to the primary typesetting result, and performing the secondary typesetting on the primary typesetting result comprises:
detecting the residual space of each column;
the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule;
and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space.
6. A text-to-text typesetting method as claimed in claim 5, wherein said allocating the remaining space according to a preset allocation rule after merging the remaining spaces obtained by the detection comprises:
merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column; or,
and merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column where the characters to be typeset or the pictures to be typeset are located.
7. A method of typesetting text according to any one of claims 1 to 6, wherein the method further comprises:
and finally typesetting the result of the secondary typesetting.
8. A method of layout according to claim 7, wherein the final layout of the results of the secondary layout comprises:
detecting the residual space of each column again after the secondary typesetting;
merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column;
and adjusting the content to be typeset in each column to adapt to the space of each column.
9. A method of typesetting according to any one of claims 1 to 8, wherein the method further comprises:
detecting spatial abnormality of the primary typesetting and/or the secondary typesetting results;
repairing the detected spatial abnormality.
10. An image-text typesetting device, wherein the device comprises:
the acquisition module is used for acquiring the content to be typeset;
the typesetting module is used for typesetting the content to be typeset, and comprises the steps of dividing columns according to the content to be typeset, primarily typesetting the content to be typeset in each column, readjusting the proportion of each column according to the primary typesetting result, and secondarily typesetting the primary typesetting result;
wherein, the secondary typesetting of the primary typesetting result comprises the following steps: detecting the residual space in the column dividing direction; the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule; adjusting the content to be typeset in the columns after the distribution of the residual space;
detecting spatial abnormality of the primary typesetting and/or the secondary typesetting results;
repairing the detected spatial abnormality;
detecting characters to be typeset and column space thereof after primary typesetting and/or secondary typesetting, and if the characters to be typeset are compressed to the minimum word size and overflow the column where the characters to be typeset are located, increasing the column size to enable the characters to be typeset to be completely displayed in the column; detecting a to-be-typeset keying and a column space where the to-be-typeset keying is located after primary typesetting and/or secondary typesetting, and if the residual space area of the column is larger than the element area of the to-be-typeset keying, adjusting the column size to enable the residual space area of the column to be smaller than the element area of the to-be-typeset keying; detecting the block diagram to be typeset after primary typesetting and/or secondary typesetting, and if the aspect ratio of the block diagram to be typeset is abnormal, adjusting the size of the column to enable the aspect ratio of the block diagram to be typeset to accord with a preset proportion range; after repairing the detected column with the space abnormality, the space correspondence adjustment is carried out on the contents to be typeset in other columns.
11. The image-text typesetting device according to claim 10, wherein the typesetting module is configured to divide the typesetting area into columns, and perform initial typesetting on the content to be typeset in each column by adopting the following manner:
grouping the contents to be typeset according to a preset grouping rule;
dividing columns of the typesetting areas according to preset proportions;
placing the grouped contents to be typeset in each column according to a preset typesetting rule;
and adjusting the content to be typeset in each column to adapt to the space of each column.
12. A graphic typesetting device according to claim 10 or 11, wherein the typesetting module is configured to readjust the proportions of the columns, and perform secondary typesetting on the primary typesetting result in the following manner:
detecting the residual space of each column;
the residual spaces obtained through detection are combined and then residual space distribution is carried out according to a preset distribution rule;
and adjusting the content to be typeset in the relevant column after the residual space is allocated to adapt to the column space.
13. A text-to-text typesetting device according to any one of claims 10 to 12, wherein the typesetting module is further configured to perform final typesetting on the result of the secondary typesetting.
14. A graphic typesetting device according to claim 13, wherein the typesetting module is configured to perform final typesetting on the result of the secondary typesetting by:
detecting the residual space of each column again after the secondary typesetting;
merging the residual spaces obtained by detection and then evenly distributing the merged residual spaces to each column;
and adjusting the content to be typeset in each column to adapt to the space of each column.
15. A graphic typesetting device according to any one of claims 10 to 14, wherein the device further comprises:
the space abnormality detection module is used for detecting space abnormality of the primary typesetting and/or the secondary typesetting results;
and the repair module is used for repairing the detected space abnormality.
16. An electronic device, wherein the device comprises a memory and a processor, the memory having stored therein a computer program, which when executed by the processor, implements the method of any of claims 1 to 9.
17. A computer readable storage medium, wherein the storage medium stores a computer program which, when executed, implements the method of any one of claims 1 to 9.
CN202110922828.2A 2021-08-12 2021-08-12 Picture and text typesetting method and device Active CN113642288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110922828.2A CN113642288B (en) 2021-08-12 2021-08-12 Picture and text typesetting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110922828.2A CN113642288B (en) 2021-08-12 2021-08-12 Picture and text typesetting method and device

Publications (2)

Publication Number Publication Date
CN113642288A CN113642288A (en) 2021-11-12
CN113642288B true CN113642288B (en) 2024-03-15

Family

ID=78420984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110922828.2A Active CN113642288B (en) 2021-08-12 2021-08-12 Picture and text typesetting method and device

Country Status (1)

Country Link
CN (1) CN113642288B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136010A (en) * 2006-08-31 2008-03-05 北京北大方正电子有限公司 Words column dividing method and processing system based on paragraph in textbox
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method
CN110969004A (en) * 2019-12-16 2020-04-07 方正株式(武汉)科技开发有限公司 Automatic typesetting method and system for image and text, server and medium
CN111723555A (en) * 2020-06-22 2020-09-29 稿定(厦门)科技有限公司 Plane typesetting method and system
CN111881656A (en) * 2020-08-11 2020-11-03 网易(杭州)网络有限公司 Text drawing method and device in card game

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136010A (en) * 2006-08-31 2008-03-05 北京北大方正电子有限公司 Words column dividing method and processing system based on paragraph in textbox
CN105045776A (en) * 2015-09-07 2015-11-11 武汉大学 Automatic page type setting method
CN110969004A (en) * 2019-12-16 2020-04-07 方正株式(武汉)科技开发有限公司 Automatic typesetting method and system for image and text, server and medium
CN111723555A (en) * 2020-06-22 2020-09-29 稿定(厦门)科技有限公司 Plane typesetting method and system
CN111881656A (en) * 2020-08-11 2020-11-03 网易(杭州)网络有限公司 Text drawing method and device in card game

Also Published As

Publication number Publication date
CN113642288A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
Scheunders A comparison of clustering algorithms applied to color image quantization
US9152616B2 (en) Template-based page layout for web content
US8995768B2 (en) Methods and devices for processing scanned book's data
US20140193044A1 (en) Page proofreading method and apparatus
US20060064630A1 (en) Document creation system and related methods
CN104992657A (en) Mura compensation module and method, display device and method
CN106485534A (en) The generation method of advertisement and device in webpage
EP2977913A1 (en) Type setting method and apparatus
CN107393459A (en) Method for displaying image and device
CN113705176B (en) Plane typesetting method and system
CN113642288B (en) Picture and text typesetting method and device
CN105874504A (en) Inpainting device and method using segmentation of reference region
JPH01169659A (en) Step even indexing system
CN104516868A (en) Layout space streaming restoring method and layout space streaming restoring system
US6175423B1 (en) Image forming system for arranging plurality of images on a disk play medium
KR920000057A (en) Image storage method and apparatus
CN106713918A (en) Image compression method
CN115951880A (en) EPG page compatible method, system and electronic equipment of IPTV
CN115935928A (en) Method and device for extracting document information
CN101471040B (en) Simulated overlapping surface implementing method based on MPU interface LCD module
US6697080B2 (en) Scalable smoothing of generalized polygons
CN108694161A (en) Type-setting document processing method and processing device
JPH08255255A (en) Document information layout device and document information display device
US20130191423A1 (en) Image file processing apparatus and method
JPH09146949A (en) Automatic article layout device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant