CN111079396A - Typesetting method and device for characters in irregular unit grid - Google Patents

Typesetting method and device for characters in irregular unit grid Download PDF

Info

Publication number
CN111079396A
CN111079396A CN201911328305.4A CN201911328305A CN111079396A CN 111079396 A CN111079396 A CN 111079396A CN 201911328305 A CN201911328305 A CN 201911328305A CN 111079396 A CN111079396 A CN 111079396A
Authority
CN
China
Prior art keywords
typesetting
optional
baselines
optimal
character
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.)
Granted
Application number
CN201911328305.4A
Other languages
Chinese (zh)
Other versions
CN111079396B (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.)
Founder International Beijing Co Ltd
Original Assignee
Founder International Beijing 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 Founder International Beijing Co Ltd filed Critical Founder International Beijing Co Ltd
Priority to CN201911328305.4A priority Critical patent/CN111079396B/en
Publication of CN111079396A publication Critical patent/CN111079396A/en
Application granted granted Critical
Publication of CN111079396B publication Critical patent/CN111079396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The application relates to a typesetting method and a typesetting device for Chinese characters in irregular cells, wherein the typesetting method for Chinese characters in irregular cells comprises the steps of obtaining character information of characters to be typeset; determining corresponding optional typesetting areas corresponding to the optional typesetting baselines according to the text information to obtain at least one group of optional typesetting baselines and the corresponding optional typesetting areas, wherein the optional typesetting baselines are determined in the irregular cells according to a preset rule; selecting a group of optional typesetting baselines and corresponding optional typesetting areas as an optimal typesetting baseline and an optimal typesetting area from at least one group of optional typesetting baselines and corresponding optional typesetting areas; and typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line. According to the method and the device, an optimal typesetting baseline and an optimal typesetting area can be determined, so that the typesetting area can be flexibly adjusted to enable the typesetting effect to be more attractive.

Description

Typesetting method and device for characters in irregular unit grid
Technical Field
The application belongs to the technical field of typesetting, and particularly relates to a typesetting method and a typesetting device for characters in irregular unit cells.
Background
When typesetting the characters in the table, the table head part is separated by a slash line segment to present an irregular cell effect such as a slash cell, so the characters in the irregular cell need to be typeset. The conventional typesetting method for characters in an irregular cell area in a table is to superpose oblique line segments on corresponding cells to form an expected oblique line cell effect, and actually, the whole oblique line cell is still a typesetting area, so that the oblique line cell cannot be directly positioned in different partitions of the oblique line cell during actual typesetting.
In the related art, an oblique line with a fixed inclination angle is determined in an irregular unit grid area, for example, a straight line from a certain vertex of a triangle to an opposite side is generally taken in a triangular unit grid typesetting area, and then typesetting is performed along the straight line direction, but the typesetting algorithm cannot automatically adjust the angle of the oblique line according to the number of characters to be typeset or the size of the characters, so that the typesetting effect is influenced, and the table is not beautiful enough.
Disclosure of Invention
The invention provides a method and a device for typesetting characters in irregular cells, aiming at overcoming the problems that in the related technology, an oblique line with a fixed inclination angle is determined in an irregular cell area, and the angle of the oblique line cannot be automatically adjusted according to the number of the characters to be typeset or the size of the characters when typesetting along the oblique line direction, so that the typesetting effect is influenced, and the form is not beautiful enough.
In a first aspect, a method for typesetting a Chinese character in an irregular unit cell includes:
acquiring character information of characters to be typeset;
determining a corresponding optional typesetting area corresponding to each optional typesetting baseline according to the text information to obtain at least one group of optional typesetting baselines and the corresponding optional typesetting areas, wherein the optional typesetting baselines are determined in the irregular cells according to a preset rule;
selecting a group of optional typesetting baselines and corresponding optional typesetting areas as an optimal typesetting baseline and an optimal typesetting area from the at least one group of optional typesetting baselines and the corresponding optional typesetting areas;
and typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line.
Further, the method further comprises:
and randomly generating at least one optional typesetting baseline in the irregular cells.
Further, the text information includes text base points, text numbers, and text outline information, and determining corresponding selectable layout areas corresponding to the respective selectable layout baselines according to the text information includes:
determining the outline of each character according to the character outline information;
corresponding to each optional typesetting base line, arranging each character base point on the optional typesetting base line according to the outer contour;
and constructing a parallelogram according to the optional typesetting base line, the number of the characters, the character base points and the outer contour of each character, and determining the parallelogram as an optional typesetting area corresponding to the optional typesetting base line.
Further, constructing a parallelogram according to the selectable typesetting baseline, the number of the characters, and the character base points and the outer contours of the characters, includes:
constructing two parallel edges of a parallelogram to be parallel to the selectable typesetting base line;
setting the distance between the two parallel sides as the minimum distance of the outline containing each character;
intersecting the two parallel edges with the edges of the irregular cell, and determining at least one vertex of the parallelogram according to the intersection point;
determining other vertices of the parallelogram according to the at least one vertex so that four vertices of the parallelogram do not exceed the irregular cell.
Further, the selecting a group of selectable layout baselines and corresponding selectable layout areas as an optimal layout baseline and an optimal layout area in the at least one group of selectable layout baselines and corresponding selectable layout areas includes:
calculating evaluation values of each group of optional typesetting baselines and the corresponding optional typesetting areas;
and taking a group of optional layout baselines with the maximum evaluation value and the corresponding optional layout area as the optimal layout baselines and the optimal layout area.
Further, the calculating the evaluation values of each group of the selectable layout baselines and the corresponding selectable layout areas thereof includes:
and calculating each sub-evaluation value corresponding to each group of the selectable layout baselines and the corresponding selectable layout area, and performing weighted summation on each sub-evaluation value to obtain each group of the selectable layout baselines and the evaluation value of the corresponding selectable layout area.
Further, the calculating each sub-evaluation value includes:
calculating the evaluation value of each preset evaluation item according to a preset calculation formula;
the evaluation value of each evaluation item is taken as each sub-evaluation value.
Further, the preset evaluation items include: the layout area of the optional layout area, the intersection point of at least one group of edges of the optional layout area and the irregular cell, and the included angle between the optional layout base line and at least one edge of the irregular cell.
Further, the typesetting the text to be typeset in the optimal typesetting area according to the optimal typesetting base line includes: and arranging characters in the optimal typesetting area along the optimal typesetting base line according to the typesetting parameters.
In a second aspect, a typesetting device for Chinese characters in irregular unit cells comprises:
the acquisition module is used for acquiring the character information of the characters to be typeset;
a determining module, configured to determine, according to the text information, a corresponding optional layout area corresponding to each optional layout baseline, so as to obtain at least one group of optional layout baselines and the corresponding optional layout areas thereof, where the optional layout baselines are determined in the irregular cells according to a preset rule;
the selection module is used for selecting one group of optional typesetting baselines and the corresponding optional typesetting areas as the optimal typesetting baselines and the optimal typesetting areas in the at least one group of optional typesetting baselines and the corresponding optional typesetting areas;
and the typesetting module is used for typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line.
According to the method and the device for typesetting the characters in the irregular unit grid, which are provided by the embodiment of the invention, the character information of the characters to be typeset is obtained, the corresponding optional typesetting area is determined corresponding to each optional typesetting base line according to the character information, one group of optional typesetting base lines and the corresponding optional typesetting area are selected as the optimal typesetting base line and the optimal typesetting area in at least one group of optional typesetting base lines and the corresponding optional typesetting area, and the characters to be typeset are typeset in the optimal typesetting area according to the optimal typesetting base line, so that the flexible adjustment of the typesetting area can be realized, and the typesetting effect is more attractive.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a method for typesetting a Chinese character in an irregular cell according to an embodiment of the present application.
Fig. 2 is a schematic diagram illustrating a schematic diagram of a method for typesetting a Chinese character in an irregular cell according to an embodiment of the present application.
Fig. 3 is a schematic diagram of another irregular cell chinese character typesetting method according to an embodiment of the present application.
Fig. 4 is a flowchart of a method for typesetting a Chinese character in an irregular cell according to another embodiment of the present application.
Fig. 5 is a schematic diagram illustrating a method for typesetting a Chinese character in an irregular cell according to another embodiment of the present application.
Fig. 6 is a flowchart illustrating step S44 of the method shown in fig. 4.
Fig. 7 is a flowchart of a method for typesetting a Chinese character in an irregular cell according to another embodiment of the present application.
Fig. 8 is a schematic diagram illustrating a method for typesetting a Chinese character in an irregular cell according to another embodiment of the present application.
Fig. 9 is a functional block diagram of a typesetting apparatus for Chinese characters in irregular unit cells according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a method for typesetting a Chinese character in an irregular unit cell according to an embodiment of the present application, and as shown in fig. 1, the method for typesetting a Chinese character in an irregular unit cell includes:
s11: acquiring character information of characters to be typeset;
s12: determining corresponding optional typesetting areas corresponding to the optional typesetting baselines according to the text information to obtain at least one group of optional typesetting baselines and the corresponding optional typesetting areas, wherein the optional typesetting baselines are determined in the irregular cells according to a preset rule;
s13: selecting a group of optional typesetting baselines and corresponding optional typesetting areas as an optimal typesetting baseline and an optimal typesetting area from at least one group of optional typesetting baselines and corresponding optional typesetting areas;
s14: and typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line.
Referring to fig. 2, when typesetting the text in the irregular unit cell, a typesetting baseline of the text needs to be determined in the irregular unit cell, the typesetting baseline is a line for arranging text base points, and any typesetting baseline can be arranged in one typesetting area. Referring to fig. 3, a text base point refers to an original point of a coordinate system used when a text contour curve is constructed, for example, the lower left corner of a text to be typeset is selected as the text base point, in the conventional typesetting method for the text in an irregular unit cell, only one typesetting baseline is selected in one typesetting area, because the oblique line angle of the typesetting baseline is a fixed value, the text base point extends along the direction of the fixed oblique line, and the typesetting method for the text to be typeset is limited only by the oblique line angle and is irrelevant to the size, the shape or the number of the text to be typeset, therefore, for different text to be typeset with different sizes and different numbers, the typesetting effect is relatively single, and the.
In the method for typesetting characters in irregular unit cells provided by this embodiment, the character information of the characters to be typeset is obtained first, the corresponding optional typesetting area is determined corresponding to each optional typesetting baseline according to the character information, at least one group of optional typesetting baselines and the corresponding optional typesetting areas are obtained, the group of optional typesetting baselines and the corresponding optional typesetting areas are selected as the optimal typesetting baseline and the optimal typesetting area, and the characters to be typeset are typeset in the optimal typesetting area according to the optimal typesetting baseline, so that the typesetting area is flexibly adjusted according to the character information, and the typesetting effect is more beautiful.
As an improvement of the foregoing embodiment, an embodiment of the present invention provides another method for typesetting a Chinese character in an irregular cell, as shown in the flowchart in fig. 4, where the method for typesetting a Chinese character in an irregular cell includes:
s41: acquiring character information of the characters to be typeset, wherein the character information comprises character base points, character quantity and character outline information.
S42: determining the outline of each character according to the character outline information;
s43: corresponding to each optional typesetting base line, setting each character base point on the optional typesetting base line according to the outer contour;
as an optional implementation manner of the present invention, the optional typesetting baseline is determined in the irregular cells according to a preset rule, and includes: and randomly generating at least one optional typesetting baseline in the irregular cells. Referring to fig. 5, the table head position, the cell area shape is not regular rectangle, for example, oblique lines are drawn in the rectangular cell, the rectangular cell is divided into several irregular cell areas by oblique lines, and different table item names can be added in each cell. For example, at least one selectable imposition baseline is randomly generated in irregular cell 1.
It should be noted that the more the layout baselines are selected from the irregular cells, the more the layout baselines and the layout areas are selected from, which is favorable for selecting the optimal layout baselines and the layout areas corresponding to the optimal layout baselines, and the number of the selected layout baselines and the selection method can be determined by those skilled in the art according to the needs or historical experience, which is not limited by the invention.
S44: and constructing a parallelogram according to the optional typesetting base line, the number of the characters, the character base points and the outer contour of each character, and determining the parallelogram as an optional typesetting area corresponding to the optional typesetting base line.
Referring to fig. 6, in some embodiments, step S44 may be implemented by, but is not limited to, the following processes:
s441: constructing two parallel edges of a parallelogram to be parallel to the selectable typesetting base line;
s442: setting the distance between the two parallel sides as the minimum distance of the outer contour containing each character;
s443: intersecting the two parallel edges with the edges of the irregular cells, and determining at least one vertex of the parallelogram according to the intersection point;
s444: determining the other vertices of the parallelogram from at least one vertex such that the four vertices of the parallelogram do not exceed the irregular cell.
For example, as shown in fig. 8, a typesetting baseline is selected from an irregular cell, such as a triangular cell, as an optional typesetting baseline, two parallel sides of a parallelogram are constructed to be parallel to the optional typesetting baseline, a base point of the text to be typeset is moved to the optional typesetting baseline, constructing the outline of each character according to the character information of the character to be typeset, setting the distance between the two parallel sides as the minimum distance containing the outline of each character, extending the two parallel sides to intersect with the sides of the triangular unit cell, determining at least one vertex of the parallelogram according to the intersection points, determining other vertices of the parallelogram according to the at least one vertex, wherein the positions of the four vertices of the parallelogram are divided into a plurality of cases, and selecting the parallelogram of which the four vertexes are all in the triangular unit cell as an optional typesetting area corresponding to the optional typesetting base line.
In the method for typesetting characters in an irregular unit cell provided by this embodiment, a parallelogram is constructed according to an optional typesetting baseline, the number of characters, and the character base points and the outer contours of each character, and the parallelogram is determined as an optional typesetting area corresponding to the optional typesetting baseline, so that the typesetting area can be modulated according to character information, and the typesetting effect is prevented from being affected by the problems of a large number of characters, a large size of characters, and the like.
Fig. 7 is a flowchart of a method for typesetting a Chinese character in an irregular unit cell according to another embodiment of the present application, as shown in fig. 7, the method for typesetting a Chinese character in an irregular unit cell includes:
s71: and calculating evaluation values of each group of the selectable layout baselines and the corresponding selectable layout areas.
And calculating each sub-evaluation value corresponding to each group of the selectable layout baselines and the corresponding selectable layout area, and performing weighted summation on each sub-evaluation value to obtain each group of the selectable layout baselines and the evaluation value of the corresponding selectable layout area.
In some embodiments, calculating the respective sub-rating values includes:
calculating the evaluation value of each preset evaluation item according to a preset calculation formula;
the evaluation value of each evaluation item is taken as each sub-evaluation value.
The preset evaluation items comprise: the area of the optional typesetting area, the intersection point of at least one group of edges of the optional typesetting area and the irregular cell, and the included angle between the optional typesetting baseline and at least one edge of the irregular cell.
Referring to FIG. 8, the layout area is a parallelogram area, the layout area S can be calculated according to the side length of the parallelogram and the height of the parallelogram, the slope of the layout base line is determined according to the coordinates (P1, P2) of the intersection of the layout base line and the irregular cell, and the included angle between the layout base line and the edge line of the irregular cell is α 1, α 2.
Establishing an evaluation function of the values of the parallelogram area S and the angles of the intersection points P1, P2, α 1 and α 2 of the layout base line and the triangle, wherein the evaluation function comprises the following steps:
the evaluation function for the parallelogram area is Value0 (S); value0(S) may be equal to S, or equal to S2
The evaluation function for the intersection point P1 is Value1 (P1);
the evaluation function for the intersection point P2 is Value2 (P2);
the evaluation functions Value1 and Value2 may be distances between the intersection points P1 and P2 and a fixed point Q1, it should be noted that Q1 may take points as an edge end point, a middle point, a golden section point, etc. of the layout region intersecting the baseline, and Value1(P1) may be equal to- | P1Q1|, or equal to- | P1Q1|2. The Value2(P2) was calculated in the same manner as the Value (P1).
The evaluation function for pinch angle α 2 is Value3(α 1), Value3(α 1) may be Cos (α 1- γ 1), where γ 1 is a fixed angle, for example, an angle β 1 in an irregular cell such as a triangular cell.
The evaluation function for included angle α 2 is Value4(α 2), Value4(α 2) may be Cos (α 2- γ 3), where γ 3 is a fixed angle, for example, another angle β 2 in an irregular cell such as a triangular cell may be taken.
The evaluation Value calculation formula ValueAll (S, P1, P2, α, α,..) of the optional layout area may be converted into ValueAll — Value0(S) × k0+ Value1(P1) × k1+ Value2(P2) × k2+ Value3(α) × k3+ Value2 (2 2) × 2, where k2, and k2 are evaluation adjustment coefficients.
S72: and taking a group of optional layout baselines with the maximum evaluation value and the corresponding optional layout area as the optimal layout baselines and the optimal layout area.
S73: and arranging the characters in the optimal typesetting area along the optimal typesetting base line according to the typesetting parameters.
The typesetting parameters are as front space, back space, word space, stretching/compressing and the like, and the typesetting is carried out on the words to be typeset according to the word arrangement mode of arranging the words along the extension direction of the typesetting base line and the typesetting parameters, thereby obtaining the optimal word typesetting effect.
In the method for typesetting a Chinese character in an irregular unit cell, the evaluation values of each group of the optional typesetting baselines and the corresponding optional typesetting areas are calculated, and the group of the optional typesetting baselines with the largest evaluation value and the corresponding optional typesetting areas are used as the optimal typesetting baseline and the optimal typesetting area, so that the typesetting effect can be better.
The embodiment of the present invention provides a typesetting apparatus for Chinese characters in irregular unit cells, as shown in the schematic functional structure diagram of fig. 9, the typesetting apparatus for Chinese characters in irregular unit cells comprises:
an obtaining module 91, configured to obtain text information of a text to be typeset;
a determining module 92, configured to determine, according to the text information, a corresponding optional layout area corresponding to each optional layout baseline, so as to obtain at least one group of optional layout baselines and corresponding optional layout areas thereof, where the optional layout baselines are determined in the irregular cells according to a preset rule;
a selecting module 93, configured to select, from the at least one group of selectable layout baselines and the corresponding selectable layout regions thereof, the group of selectable layout baselines and the corresponding selectable layout regions thereof as an optimal layout baseline and an optimal layout region;
and a typesetting module 94, configured to typeset the text to be typeset in the optimal typesetting area according to the optimal typesetting baseline.
The determination module 92 includes:
a first building unit: the two parallel edges used for constructing the parallelogram are parallel to the selectable typesetting base line, and the distance between the two parallel edges is set as the minimum distance of the outer contour of each character;
a second building element: the method is used for intersecting two parallel edges with the edges of the irregular cells, determining at least one vertex of the parallelogram according to the intersection point, and determining other vertices of the parallelogram according to the at least one vertex so that four vertices of the parallelogram do not exceed the irregular cells.
The specific implementation of the irregular cell Chinese typesetting device in the above related embodiment has been described in detail in the related method embodiment, and will not be elaborated herein.
In the device for typesetting text in irregular unit cell provided by this embodiment, the obtaining module obtains text information of text to be typeset, the determining module determines a corresponding optional typesetting area corresponding to each optional typesetting baseline according to the text information to obtain at least one group of optional typesetting baselines and corresponding optional typesetting areas, where the optional typesetting baselines are determined in the irregular unit cell according to a preset rule, the selecting module selects a group of optional typesetting baselines and corresponding optional typesetting areas as an optimal typesetting baseline and an optimal typesetting area in the at least one group of optional typesetting baselines and corresponding optional typesetting areas, and the typesetting module typesets the text to be typeset in the optimal typesetting area according to the optimal typesetting baseline, thereby implementing flexible adjustment of the typesetting areas and making the final typesetting effect more beautiful.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
It should be noted that the present invention is not limited to the above-mentioned preferred embodiments, and those skilled in the art can obtain other products in various forms without departing from the spirit of the present invention, but any changes in shape or structure can be made within the scope of the present invention with the same or similar technical solutions as those of the present invention.

Claims (10)

1. A method for typesetting characters in irregular unit cells is characterized by comprising the following steps:
acquiring character information of characters to be typeset;
determining a corresponding optional typesetting area corresponding to each optional typesetting baseline according to the text information to obtain at least one group of optional typesetting baselines and the corresponding optional typesetting areas, wherein the optional typesetting baselines are determined in the irregular cells according to a preset rule;
selecting a group of optional typesetting baselines and corresponding optional typesetting areas as an optimal typesetting baseline and an optimal typesetting area from the at least one group of optional typesetting baselines and the corresponding optional typesetting areas;
and typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line.
2. The method for typesetting a Chinese character in an irregular unit cell according to claim 1, further comprising:
and randomly generating at least one optional typesetting baseline in the irregular cells.
3. The method for typesetting a Chinese character in an irregular unit cell according to claim 1, wherein the character information comprises character base points, character number and character outline information, and the determining of the corresponding optional typesetting area corresponding to each optional typesetting baseline according to the character information comprises:
determining the outline of each character according to the character outline information;
corresponding to each optional typesetting base line, arranging each character base point on the optional typesetting base line according to the outer contour;
and constructing a parallelogram according to the optional typesetting base line, the number of the characters, the character base points and the outer contour of each character, and determining the parallelogram as an optional typesetting area corresponding to the optional typesetting base line.
4. The method for typesetting characters in irregular unit cells according to claim 3, wherein the constructing a parallelogram according to the selectable typesetting baseline, the number of characters, the character base points and the outer contour of each character comprises:
constructing two parallel edges of a parallelogram to be parallel to the selectable typesetting base line;
setting the distance between the two parallel sides as the minimum distance of the outline containing each character;
intersecting the two parallel edges with the edges of the irregular cell, and determining at least one vertex of the parallelogram according to the intersection point;
determining other vertices of the parallelogram according to the at least one vertex so that four vertices of the parallelogram do not exceed the irregular cell.
5. The method for typesetting Chinese characters in irregular unit cells according to claim 1, wherein the selecting a group of optional typesetting baselines and corresponding optional typesetting areas as the optimal typesetting baseline and the optimal typesetting area among the at least a group of optional typesetting baselines and corresponding optional typesetting areas comprises:
calculating evaluation values of each group of optional typesetting baselines and the corresponding optional typesetting areas;
and taking a group of optional layout baselines with the maximum evaluation value and the corresponding optional layout area as the optimal layout baselines and the optimal layout area.
6. The method of typesetting Chinese characters in irregular unit grids according to claim 5, wherein the calculating the evaluation values of each group of the selectable typesetting baselines and the corresponding selectable typesetting areas comprises:
and calculating each sub-evaluation value corresponding to each group of the selectable layout baselines and the corresponding selectable layout area, and performing weighted summation on each sub-evaluation value to obtain each group of the selectable layout baselines and the evaluation value of the corresponding selectable layout area.
7. The method of typifying a Chinese character in an irregular cell as claimed in claim 6, wherein said calculating each of the sub-evaluation values includes:
calculating the evaluation value of each preset evaluation item according to a preset calculation formula;
the evaluation value of each evaluation item is taken as each sub-evaluation value.
8. The typesetting method for Chinese characters in irregular unit cells as claimed in claim 3, wherein the preset evaluation items comprise: the layout area of the optional layout area, the intersection point of at least one group of edges of the optional layout area and the irregular cell, and the included angle between the optional layout base line and at least one edge of the irregular cell.
9. The method for typesetting a Chinese character in an irregular unit cell according to claim 1, wherein the typesetting the character to be typeset according to the optimal typesetting base line in the optimal typesetting area comprises: and arranging characters in the optimal typesetting area along the optimal typesetting base line according to the typesetting parameters.
10. A typesetting device for characters in irregular unit cells is characterized by comprising:
the acquisition module is used for acquiring the character information of the characters to be typeset;
a determining module, configured to determine, according to the text information, a corresponding optional layout area corresponding to each optional layout baseline, so as to obtain at least one group of optional layout baselines and the corresponding optional layout areas thereof, where the optional layout baselines are determined in the irregular cells according to a preset rule;
the selection module is used for selecting one group of optional typesetting baselines and the corresponding optional typesetting areas as the optimal typesetting baselines and the optimal typesetting areas in the at least one group of optional typesetting baselines and the corresponding optional typesetting areas;
and the typesetting module is used for typesetting the characters to be typeset in the optimal typesetting area according to the optimal typesetting base line.
CN201911328305.4A 2019-12-20 2019-12-20 Chinese typesetting method and typesetting device for irregular unit cell Active CN111079396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911328305.4A CN111079396B (en) 2019-12-20 2019-12-20 Chinese typesetting method and typesetting device for irregular unit cell

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911328305.4A CN111079396B (en) 2019-12-20 2019-12-20 Chinese typesetting method and typesetting device for irregular unit cell

Publications (2)

Publication Number Publication Date
CN111079396A true CN111079396A (en) 2020-04-28
CN111079396B CN111079396B (en) 2023-06-16

Family

ID=70316375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911328305.4A Active CN111079396B (en) 2019-12-20 2019-12-20 Chinese typesetting method and typesetting device for irregular unit cell

Country Status (1)

Country Link
CN (1) CN111079396B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427369A (en) * 2001-12-19 2003-07-02 英业达股份有限公司 Typesetting method of character frame
CN1828581A (en) * 2006-04-14 2006-09-06 北京北大方正电子有限公司 Layout method for word content fitting rectangular words frame
CN1952923A (en) * 2006-11-22 2007-04-25 北京北大方正电子有限公司 A typesetting method of character in monotonic range
CN101013418A (en) * 2007-02-15 2007-08-08 北京大学 Auto-adaptive typesetting method for word in textbox
CN101436178A (en) * 2008-12-03 2009-05-20 北大方正集团有限公司 Method and system for typesetting oblique line unit lattice
CN103136185A (en) * 2011-12-05 2013-06-05 北大方正集团有限公司 Method and device for block type setting
US20140195902A1 (en) * 2013-01-09 2014-07-10 Beijing Founder Electronics Co., Ltd. Method for mixedly typesetting multi-language text
CN105787877A (en) * 2016-02-18 2016-07-20 苏州开眼数据技术股份有限公司 Dynamic multi-picture typesetting method and apparatus
CN108170660A (en) * 2018-01-22 2018-06-15 北京百度网讯科技有限公司 Display methods, device, browser, terminal and the medium of multilingual typesetting
CN109710911A (en) * 2018-12-28 2019-05-03 天津字节跳动科技有限公司 Content typesetting method, apparatus, electronic equipment and the storage medium of cell
CN110096691A (en) * 2019-04-16 2019-08-06 掌阅科技股份有限公司 Composition method, electronic equipment and computer storage medium based on e-book
CN110347994A (en) * 2019-07-12 2019-10-18 北京香侬慧语科技有限责任公司 A kind of form processing method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427369A (en) * 2001-12-19 2003-07-02 英业达股份有限公司 Typesetting method of character frame
CN1828581A (en) * 2006-04-14 2006-09-06 北京北大方正电子有限公司 Layout method for word content fitting rectangular words frame
CN1952923A (en) * 2006-11-22 2007-04-25 北京北大方正电子有限公司 A typesetting method of character in monotonic range
CN101013418A (en) * 2007-02-15 2007-08-08 北京大学 Auto-adaptive typesetting method for word in textbox
CN101436178A (en) * 2008-12-03 2009-05-20 北大方正集团有限公司 Method and system for typesetting oblique line unit lattice
CN103136185A (en) * 2011-12-05 2013-06-05 北大方正集团有限公司 Method and device for block type setting
US20140195902A1 (en) * 2013-01-09 2014-07-10 Beijing Founder Electronics Co., Ltd. Method for mixedly typesetting multi-language text
CN105787877A (en) * 2016-02-18 2016-07-20 苏州开眼数据技术股份有限公司 Dynamic multi-picture typesetting method and apparatus
CN108170660A (en) * 2018-01-22 2018-06-15 北京百度网讯科技有限公司 Display methods, device, browser, terminal and the medium of multilingual typesetting
CN109710911A (en) * 2018-12-28 2019-05-03 天津字节跳动科技有限公司 Content typesetting method, apparatus, electronic equipment and the storage medium of cell
CN110096691A (en) * 2019-04-16 2019-08-06 掌阅科技股份有限公司 Composition method, electronic equipment and computer storage medium based on e-book
CN110347994A (en) * 2019-07-12 2019-10-18 北京香侬慧语科技有限责任公司 A kind of form processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孔真: ""维、哈、柯少数民族文字排版关键技术的研究"", 《佳木斯职业学院学报》 *

Also Published As

Publication number Publication date
CN111079396B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN113424224B (en) Method for identifying and reserving merging point cloud of preferred points
US8031192B2 (en) System and method for generating additional polygons within the contours of a rendered object to control levels of detail
US5892691A (en) Method, apparatus, and software product for generating weighted deformations for geometric models
KR19980071435A (en) Method and apparatus for graphical surface model mapping
EP0486173A2 (en) Apparatus and method for displaying a trimmed surface on a computer graphics display system
US6570568B1 (en) System and method for the coordinated simplification of surface and wire-frame descriptions of a geometric model
CN111105366A (en) Image processing method and device, terminal device and storage medium
US20160239996A1 (en) 3d map display system
CN111079396A (en) Typesetting method and device for characters in irregular unit grid
JP2738588B2 (en) 3D model drawing method
JP3392628B2 (en) Outline extraction method and system
JPH0636013A (en) Method and device for generating topographic data
US20230032860A1 (en) Image processing apparatus and method and non-transitory computer readable medium
CN110211214A (en) Texture stacking method, device and the storage medium of three-dimensional map
CN116128923A (en) Intra-cavity tissue tracking method, electronic device and computer readable medium
JP2020035216A (en) Image processing device, method, and program
KR100748572B1 (en) Rasterization of polytopes in cylindrical coordinates
US20210295597A1 (en) Three-dimensional shape data processing apparatus and non-transitory computer readable medium
US10812113B2 (en) Method of detecting and correcting error in mesh and apparatus for same
Žalik A topology construction from line drawings using a uniform plane subdivision technique
EP0596666B1 (en) Processing image data
CN112204624A (en) Method and device for automatically shearing model and storage medium
US10664223B2 (en) Methods and apparatus for mapping virtual surface to physical surface on curved display
JPH05298413A (en) Graphic processor
CN114327215B (en) Method, device and medium for intelligently identifying object brushing of chart

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