CN111079396B - Chinese typesetting method and typesetting device for irregular unit cell - Google Patents

Chinese typesetting method and typesetting device for irregular unit cell Download PDF

Info

Publication number
CN111079396B
CN111079396B CN201911328305.4A CN201911328305A CN111079396B CN 111079396 B CN111079396 B CN 111079396B CN 201911328305 A CN201911328305 A CN 201911328305A CN 111079396 B CN111079396 B CN 111079396B
Authority
CN
China
Prior art keywords
typesetting
layout
optional
baselines
optimal
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
CN201911328305.4A
Other languages
Chinese (zh)
Other versions
CN111079396A (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

Abstract

The application relates to a typesetting method and a typesetting device for Chinese in an irregular cell, wherein the typesetting method for Chinese in the irregular cell comprises the steps of obtaining character information of characters to be typeset; determining corresponding optional layout areas corresponding to all the optional layout baselines according to the text information to obtain at least one group of optional layout baselines and corresponding optional layout areas, wherein the optional layout baselines are determined in the irregular unit cells according to preset rules; selecting a group of selectable layout baselines and corresponding selectable layout areas from at least one group of selectable layout baselines and corresponding selectable layout areas as an optimal layout baseline and an optimal layout area; and typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area. The method and the device can determine the optimal typesetting base line and the optimal typesetting area, so that flexible adjustment of the typesetting area is realized, and the typesetting effect is more attractive.

Description

Chinese typesetting method and typesetting device for irregular unit cell
Technical Field
The application belongs to the technical field of typesetting, and particularly relates to a Chinese typesetting method and device in an irregular cell.
Background
When typesetting the characters in the table, the head part of the table is separated by using diagonal line segments to present the effect of the diagonal cells and other irregular cells, so that the characters in the irregular cells need to be typeset. At present, the typesetting method for characters in an irregular cell area in a table is to superimpose diagonal line segments on corresponding cells to form an expected diagonal cell effect, and in fact, the whole diagonal cell is still a typesetting area, so that the whole diagonal cell cannot be directly positioned in different partitions of the diagonal cell in actual typesetting, and when content editing is performed in one partition, the position of the content in the other partition follows the change due to the content change, and editors have to repeatedly perform position adjustment, so that the editing efficiency is affected.
In the related art, an oblique line with a fixed oblique angle is determined in an irregular cell area, for example, a straight line from a certain vertex to an opposite side of a triangle is generally taken in a triangle cell layout area, and then typesetting is performed along the direction of the straight line, 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 affected, and the form is not attractive enough.
Disclosure of Invention
In order to overcome the problems that in the related art, at least to a certain extent, an oblique line with a fixed oblique angle is determined in an irregular cell area, and the angle of the oblique line cannot be automatically adjusted according to the number of characters to be typeset or the size of the characters when typeset along the oblique line direction, so that the typeset effect is affected, and the form is not attractive enough, the application provides a Chinese typesetting method and a Chinese typesetting device in the irregular cell.
In a first aspect, a method of typesetting Chinese characters in an irregular cell, comprising:
acquiring character information of characters to be typeset;
determining corresponding optional layout areas corresponding to all the optional layout baselines according to the text information to obtain at least one group of optional layout baselines and corresponding optional layout areas, wherein the optional layout baselines are determined in the irregular unit cells according to preset rules;
selecting a group of selectable layout baselines and corresponding selectable layout areas from the at least one group of selectable layout baselines and corresponding selectable layout areas as an optimal layout baseline and an optimal layout area;
and typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
Further, the method further comprises:
at least one of the selectable layout baselines is randomly generated in the irregular cell.
Further, the text information includes text base points, text quantity and text outline information, and the determining, according to the text information, a corresponding selectable layout area corresponding to each selectable layout baseline includes:
determining the outline of each character according to the character outline information;
corresponding to each optional layout base line, setting each character base point on the optional layout base line according to the outer contour;
and constructing a parallelogram according to the optional layout base line, the number of characters, the character base points and the outer outlines of the characters, and determining the parallelogram as an optional layout area corresponding to the optional layout base line.
Further, the constructing a parallelogram according to the selectable layout baseline, the number of characters, the character base points and the outer outlines of the characters, includes:
constructing two parallel sides of a parallelogram to be parallel to the optional layout base line;
setting the distance between the two parallel sides as the minimum distance containing the outer contour of each character;
intersecting the two parallel sides with the sides of the irregular cell, and determining at least one vertex of the parallelogram according to the intersection point;
and determining other vertexes of the parallelogram according to the at least one vertex so that four vertexes of the parallelogram do not exceed the irregular cell.
Further, selecting a set of selectable layout baselines and corresponding selectable layout areas from the at least one set of selectable layout baselines and corresponding selectable layout areas as the optimal layout baselines and the optimal layout areas, including:
calculating evaluation values of each group of optional layout baselines and corresponding optional layout areas;
and taking the group of selectable layout baselines with the largest evaluation value and the corresponding selectable layout areas as the optimal layout baselines and the optimal layout areas.
Further, the calculating the evaluation value of each group of selectable layout baselines and the corresponding selectable layout areas comprises the following steps:
and calculating each sub-evaluation value corresponding to each group of optional layout baselines and the corresponding optional layout areas, and carrying out weighted summation on each sub-evaluation value to obtain the evaluation values of each group of optional layout baselines and the corresponding optional layout areas.
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 regarded as each sub-evaluation value.
Further, each preset evaluation item includes: the area of the selective plate arranging area, the intersection point of at least one group of edges of the selective plate arranging area and the irregular unit lattice, and the included angle between the selective plate arranging base line and at least one edge of the irregular unit lattice.
Further, the typesetting the text to be typeset in the optimal typesetting area according to the optimal typesetting baseline includes: and arranging the characters along the optimal typesetting base line in the optimal typesetting area according to typesetting parameters.
In a second aspect, a Chinese character typesetting device in an irregular cell includes:
the acquisition module is used for acquiring character information of the characters to be typeset;
the determining module is used for determining corresponding optional layout areas corresponding to each optional layout baseline according to the text information to obtain at least one group of optional layout baselines and corresponding optional layout areas, wherein the optional layout baselines are determined in the irregular unit cells according to a preset rule;
the selecting module is used for selecting a group of optional layout baselines and corresponding optional layout areas from the at least one group of optional layout baselines and corresponding optional layout areas as an optimal layout baseline and an optimal layout area;
and the typesetting module is used for typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
According to the irregular cell Chinese typesetting method and typesetting device, the character information of the characters to be typeset is obtained, the corresponding selectable typesetting areas are determined according to the character information and correspond to the selectable typesetting baselines, one group of selectable typesetting baselines and the selectable typesetting areas corresponding to the selectable typesetting baselines are selected as the optimal typesetting baselines and the optimal typesetting areas, and the characters to be typeset are typeset according to the optimal typesetting baselines in the optimal typesetting areas, so that flexible adjustment of the typesetting areas can be realized, and typesetting effects are 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 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 one embodiment of the present application.
Fig. 2 is a schematic diagram of a method for typesetting in an irregular cell according to an embodiment of the present application.
Fig. 3 is a schematic diagram of another method for typesetting in irregular cells according to an embodiment of the present application.
Fig. 4 is a flowchart of a method for typesetting in an irregular cell according to another embodiment of the present application.
Fig. 5 is a schematic diagram of a method for typesetting in an irregular cell according to another embodiment of the present application.
Fig. 6 is a schematic flow chart of step S44 in the method shown in fig. 4.
Fig. 7 is a flowchart of a method for typesetting in an irregular cell according to another embodiment of the present application.
Fig. 8 is a schematic diagram of a method for typesetting in an irregular cell according to another embodiment of the present application.
Fig. 9 is a functional block diagram of a device for typesetting in irregular cells according to an embodiment of the present application.
Detailed Description
For the purpose of making 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 will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, based on the examples herein, which are within the scope of the protection sought by those of ordinary skill in the art without undue effort, are intended to be encompassed by the present application.
Fig. 1 is a flowchart of a method for typesetting in an irregular cell according to an embodiment of the present application, as shown in fig. 1, where the method for typesetting in an irregular cell includes:
s11: acquiring character information of characters to be typeset;
s12: determining corresponding optional layout areas corresponding to all the optional layout baselines according to the text information to obtain at least one group of optional layout baselines and corresponding optional layout areas, wherein the optional layout baselines are determined in the irregular unit cells according to preset rules;
s13: selecting a group of selectable layout baselines and corresponding selectable layout areas from at least one group of selectable layout baselines and corresponding selectable layout areas as an optimal layout baseline and an optimal layout area;
s14: typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
Referring to fig. 2, when typesetting characters in an irregular cell, typesetting baselines of the characters need to be determined in the irregular cell, wherein the typesetting baselines are a line for arranging basic points of the characters, and any typesetting baselines can be arranged in a typesetting area. Referring to fig. 3, the text base point refers to an origin of a coordinate system adopted when constructing a text contour curve, for example, a lower left corner of a text to be typeset is selected as the text base point, and the typesetting method of the text in the existing irregular unit cell is that only one typesetting base line is selected in one typesetting area.
According to the irregular cell Chinese typesetting method, the text information of the text to be typeset is firstly obtained, the corresponding optional typesetting areas are determined according to the text information and correspond to the optional typesetting baselines, at least one group of optional typesetting baselines and the corresponding optional typesetting areas are obtained, one group of optional typesetting baselines and the corresponding optional typesetting areas are selected to serve as the optimal typesetting baselines and the optimal typesetting areas, and typesetting is conducted on the text to be typeset according to the optimal typesetting baselines in the optimal typesetting areas, so that flexible adjustment of the typesetting areas according to the text information is achieved, and typesetting effects are attractive.
As a modification of the above-described embodiment, an embodiment of the present invention provides another method of typesetting in an irregular cell, as shown in the flowchart of fig. 4, the method of typesetting in an irregular cell including:
s41: and 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 selectable layout base line, setting each character base point on the selectable layout base line according to the outer contour;
as an optional embodiment of the present invention, the optional layout baseline is determined in the irregular unit cell according to a preset rule, including: at least one selectable layout baseline is randomly generated in the irregular cell. Referring to fig. 5, at the position of the table head, the cell area shape is not a regular rectangle, for example, a diagonal line is drawn in a rectangular cell, the rectangular cell is divided into several irregular cell areas by the diagonal line, and different table item names can be added in each cell. For example, at least one selectable layout baseline is randomly generated in the irregular cell 1.
It should be noted that, the more typesetting baselines are selected in the irregular unit cells, the more typesetting baselines and typesetting areas can be selected, so that the selection of the optimal typesetting baselines and the typesetting areas corresponding to the optimal typesetting baselines is facilitated, the number of selected typesetting baselines and the selection method can be determined by those skilled in the art according to requirements or historical experience, and the invention is not limited.
S44: and constructing a parallelogram according to the optional layout base line, the number of characters, the character base points and the outer contours of each character, and determining the parallelogram as an optional layout area corresponding to the optional layout base line.
Referring to fig. 6, in some embodiments, step S44 may be implemented by, but is not limited to, the following process:
s441: constructing two parallel sides of a parallelogram to be parallel to an optional layout base line;
s442: setting the distance between two parallel sides as the minimum distance containing the outer contour of each character;
s443: intersecting the two parallel sides with the sides of the irregular cell, and determining at least one vertex of the parallelogram according to the intersection;
s444: other vertices of the parallelogram are determined based on at least one vertex such that four vertices of the parallelogram do not exceed the irregular cell.
For example, as shown in fig. 8, a typesetting baseline is selected from irregular unit lattices, such as triangle unit lattices, as an optional typesetting baseline, two parallel sides of a parallelogram are constructed to be parallel to the optional typesetting baseline, character base points to be typeset are moved to the optional typesetting baseline, the outline of each character is constructed according to character information of the character to be typeset, the distance between the two parallel sides is set to be the minimum distance containing the outline of each character, at the moment, the two parallel sides are prolonged to intersect with the sides of the triangle unit lattices, at least one vertex of the parallelogram is determined according to the intersection point, other vertices of the parallelogram are determined according to the at least one vertex, at the moment, the positions of four vertices of the parallelogram are divided into multiple cases, and the parallelogram with the four vertices of the parallelogram in the triangle unit lattices is selected as an optional typesetting area corresponding to the optional typesetting baseline.
According to the Chinese typesetting method in the irregular unit cell, according to the selectable typesetting base line, the number of characters, the character base points and the outer outlines of the characters, a parallelogram is constructed, the parallelogram is determined to be the selectable typesetting area corresponding to the selectable typesetting base line, the typesetting area can be modulated according to the character information, and the problems that the number of the characters is large or the size of the characters is large and the like are avoided to influence typesetting effects.
Fig. 7 is a flowchart of a method for typesetting in an irregular cell according to another embodiment of the present application, as shown in fig. 7, where the method for typesetting in an irregular cell includes:
s71: and calculating evaluation values of each group of optional layout baselines and corresponding optional layout areas.
And calculating each sub-evaluation value corresponding to each group of optional layout baselines and the corresponding optional layout areas, and carrying out weighted summation on each sub-evaluation value to obtain the evaluation values of each group of optional layout baselines and the corresponding optional layout areas.
In some embodiments, calculating each sub-rating 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 regarded as each sub-evaluation value.
The preset evaluation items comprise: the area of the selectable plate arranging area, the intersection point of at least one group of edges of the selectable plate arranging area and the irregular unit cell, and the included angle of the selectable plate arranging base line and at least one edge of the irregular unit cell.
Referring to fig. 8, the layout area is a parallelogram area, and the layout area S can be calculated from the parallelogram side length and the parallelogram height; and determining the slope of the typesetting base line according to the intersection coordinates (P1, P2) of the typesetting base line and the irregular cell, wherein the included angles between the typesetting base line and the irregular cell side line are alpha 1 and alpha 2.
Establishing an evaluation function of values of angles of intersection points P1, P2, alpha 1 and alpha 2 of the parallelogram area S and the typesetting base line and the triangle, wherein the evaluation function comprises the following steps:
to parallel fourThe evaluation function of the edge area is Value0 (S); value0 (S) may be equal to S, or equal to S 2
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 certain fixed point Q1, and it should be noted that the Q1 may take points such as edge points, midpoints, golden division points, etc. of the typesetting area intersected with the base line, and Value1 (P1) may be equal to-i P1Q1 i, or equal to-i P1Q1 i 2 . The Value2 (P2) calculation method is the same as the Value (P1).
The evaluation function of the included angle alpha 2 is Value3 (alpha 1); value3 (α1) may be Cos (α1- γ1), where γ1 is a fixed angle, e.g., an angle β1 in an irregular cell such as a triangular cell.
The evaluation function of the included angle alpha 2 is Value4 (alpha 2); value4 (α2) may be Cos (α2- γ3), where γ3 is a fixed angle, e.g., another angle β2 in an irregular cell such as a triangular cell may be taken.
The evaluation value calculation formula ValueAll (S, P1, P2, α1, α2,) of the selectable layout area can be converted into: valueall=value0 (S) ×k0+value1 (P1) ×k1+value2 (P2) ×k2+value3 (α1) ×k3+value2 (α2) ×k4. Wherein k0, k1, k2, k3, k4 are evaluation adjustment coefficients. The values of k0, k1, k2, k3, and k4 may be determined according to actual needs, and the present invention is not limited thereto.
S72: and taking the group of selectable layout baselines with the largest evaluation value and the corresponding selectable layout areas as the optimal layout baselines and the optimal layout areas.
S73: and arranging the characters along the optimal typesetting base line in the optimal typesetting area according to typesetting parameters.
Typesetting parameters such as front blank, rear blank, between words, stretching/compressing and the like, typesetting the words to be typeset according to the typesetting parameters and the word arrangement mode of arranging the words along the extending direction of the typesetting base line, thereby obtaining the optimal word typesetting effect.
According to the Chinese typesetting method in the irregular unit cell, the evaluation values of each group of optional typesetting baselines and the corresponding optional typesetting areas are calculated, and the group of optional typesetting baselines with the largest evaluation values and the corresponding optional typesetting areas are used as the optimal typesetting baselines and the optimal typesetting areas, so that typesetting effects can be better.
The embodiment of the invention provides a Chinese character typesetting device in an irregular cell, as shown in a functional structure diagram in fig. 9, comprising:
an obtaining module 91, configured to obtain text information of a text to be typeset;
the determining module 92 is configured to determine, according to the text information, a corresponding selectable layout area corresponding to each selectable layout baseline, to obtain at least one set of selectable layout baselines and corresponding selectable layout areas thereof, where the selectable layout baselines are determined in the irregular unit cells according to a preset rule;
a selecting module 93, configured to select, from at least one set of selectable layout baselines and selectable layout areas corresponding thereto, one set of selectable layout baselines and selectable layout areas corresponding thereto as an optimal layout baseline and an optimal layout area;
and the typesetting module 94 is used for typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
The determination module 92 includes:
a first construction unit: the two parallel sides used for constructing the parallelogram are parallel to the optional layout base line, and the distance between the two parallel sides is set to be the minimum distance containing the outer contour of each character;
a second construction unit: for intersecting two parallel sides with the sides of the non-regular cell, determining at least one vertex of the parallelogram based on the intersection point, and determining other vertices of the parallelogram based on the at least one vertex such that the four vertices of the parallelogram do not exceed the non-regular cell.
The specific implementation of the device for typesetting in irregular cells in the related embodiments has been described in detail in the related method embodiments, and will not be described in detail herein.
According to the Chinese typesetting device in the irregular unit cell, the acquiring module acquires the text information of the text to be typeset, the determining module determines the corresponding selectable typesetting areas according to the text information and corresponds to each selectable typesetting baseline to obtain at least one group of selectable typesetting baselines and the corresponding selectable typesetting areas, wherein the selectable typesetting baselines are determined in the irregular unit cell according to the preset rule, the selecting module selects one group of selectable typesetting baselines and the corresponding selectable typesetting areas thereof in the at least one group of selectable typesetting baselines and the corresponding selectable typesetting areas thereof as the optimal typesetting baselines and the optimal typesetting areas, and the typesetting module typesets the text to be typeset according to the optimal typesetting baselines in the optimal typesetting areas, so that flexible adjustment of the final typesetting areas is realized, and the final typesetting effect is more attractive.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, the meaning of "plurality" means at least two.
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 further implementations are included within the scope of the preferred embodiment of the present application 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 embodiments of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," 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 present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. 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 will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the 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 scope of the present invention, however, any changes in shape or structure of the present invention, and all technical solutions that are the same or similar to the present application, fall within the scope of the present invention.

Claims (3)

1. A method of typesetting chinese in an irregular cell, comprising:
acquiring character information of characters to be typeset, wherein the character information comprises character base points, character quantity and character outline information;
determining the outline of each character according to the character outline information of the character information, corresponding to each optional layout base line, setting each character base point on the optional layout base line according to the outline, constructing a parallelogram according to the optional layout base line, the number of characters, the character base points of each character and the outline, constructing two parallel sides of the parallelogram to be parallel to the optional layout base line, setting the distance between the two parallel sides to be the minimum distance of the outline containing each character, intersecting the two parallel sides with the sides of the irregular unit lattice, 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 to enable the four vertices of the parallelogram not to exceed the irregular unit lattice, determining the parallelogram as an optional layout area corresponding to the optional layout base line so as to obtain at least one group of optional layout base lines and corresponding optional layout areas, wherein the optional layout base lines are preset in the selected unit according to the preset rule, and the preset layout area is determined in the selected unit according to the rule: randomly generating at least one of the selectable layout baselines in the irregular cell;
calculating evaluation values of each group of optional layout baselines and corresponding optional layout areas in the at least one group of optional layout baselines and corresponding optional layout areas, and taking the group of optional layout baselines and corresponding optional layout areas with the largest evaluation values as an optimal layout baseline and an optimal layout area; wherein, the calculating the evaluation value of each group of selectable plate arranging baselines and the corresponding selectable plate arranging areas comprises the following steps: calculating each sub-evaluation value corresponding to each group of optional layout baselines and the corresponding optional layout areas, and carrying out weighted summation on each sub-evaluation value to obtain evaluation values of each group of optional layout baselines and the corresponding optional layout areas;
wherein the calculating each sub-evaluation value includes:
calculating the evaluation value of each preset evaluation item according to a preset calculation formula, wherein each preset evaluation item comprises: the area of the selective plate arranging area, the intersection point of at least one group of edges of the selective plate arranging area and the irregular unit cell, and the included angle between the selective plate arranging base line and at least one edge of the irregular unit cell;
taking the evaluation value of each evaluation item as each sub-evaluation value;
and typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
2. The method for typesetting a text in an irregular cell according to claim 1, wherein typesetting the text to be typeset in the optimal typesetting area according to the optimal typesetting baseline comprises: and arranging the characters along the optimal typesetting base line in the optimal typesetting area according to typesetting parameters.
3. A Chinese character typesetting apparatus in an irregular cell, comprising:
the acquisition module is used for acquiring character information of the characters to be typeset, wherein the character information comprises character base points, character quantity and character outline information;
the determining module is configured to determine an outer contour of each text according to the text contour information of the text information, determine an irregular baseline of each optional arrangement, set each text base on the optional arrangement baseline according to the outer contour, construct a parallelogram according to the optional arrangement baseline, the number of text, the text base of each text and the outer contour, construct two parallel sides of the parallelogram parallel to the optional arrangement baseline, set a distance between the two parallel sides to a minimum distance of the outer contour containing each text, intersect the two parallel sides with an edge of the irregular cell, determine at least one vertex of the parallelogram according to the intersection point, determine 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, determine the parallelogram as an optional arrangement area corresponding to the optional arrangement baseline so as to obtain at least one group of optional arrangement and a preset area corresponding to the optional arrangement baseline, wherein the optional arrangement is determined as the irregular cell according to the optional arrangement baseline, and the optional arrangement is determined as the preset area in the irregular cell according to the optional arrangement baseline: randomly generating at least one of the selectable layout baselines in the irregular cell;
the selecting module is used for calculating the evaluation values of each group of optional layout baselines and the corresponding optional layout areas in the at least one group of optional layout baselines and the corresponding optional layout areas, and taking the group of optional layout baselines with the largest evaluation values and the corresponding optional layout areas as the optimal layout baselines and the optimal layout areas; wherein, the calculating the evaluation value of each group of selectable plate arranging baselines and the corresponding selectable plate arranging areas comprises the following steps: calculating each sub-evaluation value corresponding to each group of optional layout baselines and the corresponding optional layout areas, and carrying out weighted summation on each sub-evaluation value to obtain evaluation values of each group of optional layout baselines and the corresponding optional layout areas;
wherein the calculating each sub-evaluation value includes:
calculating the evaluation value of each preset evaluation item according to a preset calculation formula, wherein each preset evaluation item comprises: the area of the selective plate arranging area, the intersection point of at least one group of edges of the selective plate arranging area and the irregular unit cell, and the included angle between the selective plate arranging base line and at least one edge of the irregular unit cell;
taking the evaluation value of each evaluation item as each sub-evaluation value;
and the typesetting module is used for typesetting the characters to be typeset according to the optimal typesetting base line in the optimal typesetting area.
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 CN111079396A (en) 2020-04-28
CN111079396B true 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 (11)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914443B (en) * 2013-01-09 2018-06-12 北大方正集团有限公司 A kind of mixing method and device of multilingual words

Patent Citations (11)

* 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
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
"维、哈、柯少数民族文字排版关键技术的研究";孔真;《佳木斯职业学院学报》;20170115;全文 *

Also Published As

Publication number Publication date
CN111079396A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
JP5036179B2 (en) Two-dimensional linear data real-time three-dimensional conversion method and apparatus, two-dimensional linear data real-time three-dimensional image display method and display apparatus
US8958645B2 (en) Systems and methods for topic-specific video presentation
US10452788B2 (en) Modeling a three-dimensional object having multiple materials
US20150206028A1 (en) Point cloud reduction apparatus, system, and method
CN103761397A (en) Three-dimensional model slice for surface exposure additive forming and projection plane generating method
CN108919954B (en) Dynamic change scene virtual and real object collision interaction method
US20040036674A1 (en) Apparatus and method for associating voxel information with display positions
US9965894B2 (en) Three-dimensional map display system
CN110929612A (en) Target object labeling method, device and equipment
GB2546861A (en) 3D model generation from 2D images
CN113681898B (en) Three-dimensional object printing method, data processing device and computer equipment
US20160092605A1 (en) System and method for generating planar section 3d shape representations
CN111079396B (en) Chinese typesetting method and typesetting device for irregular unit cell
US20160239996A1 (en) 3d map display system
CN107833227B (en) Drawing method and system for circular cutting area
JP3392628B2 (en) Outline extraction method and system
CN112967400A (en) Unity 3D-based three-dimensional graph dynamic creation method and device
US20230032860A1 (en) Image processing apparatus and method and non-transitory computer readable medium
JP2017013319A (en) Slice image creation device, three-dimensional molding system and slice image creation method
CN108986216B (en) Laser radar control software 3D drawing method
CN104933746A (en) Method and device for setting dynamic shadow for plane image
WO2018187939A1 (en) Method for identifying three-dimensional image, and terminal
CN113902887A (en) Three-dimensional visual edge generation method, system, computer and readable storage medium
JPH0157390B2 (en)
JP6058216B2 (en) Drawing apparatus, drawing method, and drawing program

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