CN103136186A - Method and device of pinyin type setting - Google Patents
Method and device of pinyin type setting Download PDFInfo
- Publication number
- CN103136186A CN103136186A CN2011104014086A CN201110401408A CN103136186A CN 103136186 A CN103136186 A CN 103136186A CN 2011104014086 A CN2011104014086 A CN 2011104014086A CN 201110401408 A CN201110401408 A CN 201110401408A CN 103136186 A CN103136186 A CN 103136186A
- Authority
- CN
- China
- Prior art keywords
- chinese character
- width
- pinyin
- adjacent
- marking zone
- 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
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The invention provides a method of pinyin type setting. The method of the pinyin type setting includes the steps of arranging pinyin over a corresponding Chinese character in an align center mode and ensuring that the width of the present Chinese character is shorter than that of the pinyin and the width of a Chinese character adjacent to the present Chinese character is longer than that of the pinyin, separating one part adjacent to a pinyin marked area of the present Chinese character from a pinyin marked area of the adjacent Chinese character, and adding the part to the pinyin marked area of the present Chinese character. The invention provides a device of the pinyin type setting. The device of the pinyin type setting is used for arranging the pinyin over the corresponding Chinese character in the align center mode. The device of the pinyin type setting comprises a confirming module and a sharing module. The confirming module is used for ensuring that the width of the present Chinese character is shorter than that of the pinyin and the width of the Chinese character adjacent to the present Chinese character is longer than that of the pinyin. The sharing module is used for separating one part adjacent to the pinyin marked area of the present Chinese character from the pinyin marked area of the adjacent Chinese character and adding the part to the pinyin marked area of the present Chinese character. The method and the device of the pinyin type setting has the advantages of being capable of enabling the type setting of the Chinese characters to be tidy and attractive.
Description
Technical field
The present invention relates to the digital publishing field, in particular to a kind of phonetic composition method and device.
Background technology
In the book publishing of juvenile's class, often need to be to label character phonetic, Fig. 1 shows the design sketch according to the phonetic typesetting of prior art.As shown in the frame line of Fig. 1, phonetic is different in size, often has some phonetic length and has surpassed the Chinese character width, thereby make between Chinese character spacing irregular, and effect is bad.
Prior art tend to arrange the Chinese character spacing larger, but this causes word content more sparse for solving this phenomenon.
Summary of the invention
The present invention aims to provide a kind of phonetic composition method and device, causes the more sparse problem of word with the phonetic typesetting that solves prior art.
In an embodiment of the present invention, a kind of phonetic composition method is provided, has comprised: with the phonetic align center be arranged in the top of its corresponding Chinese character, wherein, determine the width of current Chinese character less than the width of its phonetic, and the width of the adjacent Chinese characters of current Chinese character is greater than the width of its phonetic; Mark off a part adjacent with the pinyin marking zone of current Chinese character from the pinyin marking zone of adjacent Chinese characters, join the pinyin marking zone of current Chinese character.
In an embodiment of the present invention, a kind of phonetic composing device is provided, be used for the phonetic align center be arranged in the top of its corresponding Chinese character, comprise: determination module, be used for determining the width of current Chinese character less than the width of its phonetic, and the width of the adjacent Chinese characters of current Chinese character is greater than the width of its phonetic; Sharing module is used for marking off from the pinyin marking zone of adjacent Chinese characters a part adjacent with the pinyin marking zone of current Chinese character, joins the pinyin marking zone of current Chinese character.
Phonetic composition method and the device of the above embodiment of the present invention because with the pinyin marking district-share of a plurality of Chinese characters, thereby need not to adjust the spacing of Chinese character again, make the Chinese character type-setting neat appearance.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Fig. 1 shows the design sketch according to the phonetic typesetting of prior art;
Fig. 2 shows the phonetic typesetting model parameter figure according to the embodiment of the present invention;
Fig. 3 shows the process flow diagram of phonetic composition method according to the preferred embodiment of the invention;
Fig. 4 shows the design sketch according to the phonetic typesetting of the embodiment of the present invention;
Fig. 5 shows the design sketch according to the ancient poetry phonetic typesetting of prior art;
Fig. 6 shows the design sketch according to the ancient poetry phonetic typesetting of the embodiment of the present invention;
Fig. 7 shows the schematic diagram according to the phonetic composing device of the embodiment of the present invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
In an embodiment of the present invention, a kind of phonetic composition method is provided, has comprised: with the phonetic align center be arranged in the top of its corresponding Chinese character, wherein, determine the width of current Chinese character less than the width of its phonetic, and the width of the adjacent Chinese characters of current Chinese character is greater than the width of its phonetic; Mark off a part adjacent with the pinyin marking zone of current Chinese character from the pinyin marking zone of adjacent Chinese characters, join the pinyin marking zone of current Chinese character.
When the width of a Chinese character during less than the width of its phonetic, the pinyin marking zone that the spacing that is adjacent Chinese character by widening this Chinese character is expanded this Chinese character in the prior art, and in the present embodiment, the pinyin marking zone of this Chinese character is expanded in the unnecessary pinyin marking zone of the adjacent Chinese characters by using this Chinese character, thereby avoided adjusting the spacing of this Chinese character and adjacent Chinese characters, overcome the more sparse problem of Chinese character type-setting of prior art, made space of a whole page neat appearance more.
Fig. 2 shows the phonetic typesetting model parameter figure according to the embodiment of the present invention, wherein, w1 is the width of adjacent Chinese characters, p1 is the width in the pinyin marking zone of adjacent Chinese characters, w2 is the width of current Chinese character, p2 is the width in the pinyin marking zone of current Chinese character, and smin is the minimum spacing in pinyin marking zone of pinyin marking zone and the adjacent Chinese characters of current Chinese character, and the value of w1 and w2 is w.Preferably, mark off a part adjacent with the pinyin marking zone of current Chinese character from the pinyin marking zone of adjacent Chinese characters, the pinyin marking zone that joins current Chinese character comprises: width sp=min (max ((the w1-p1)/2-smin that divides part is set, 0), (p2-w2)/2).That is, adjacent Chinese characters during less than corresponding Chinese character width, can provide shared white space when phonetic length, and the white space width is that the Chinese character width deducts half of phonetic length; And for current Chinese character, when phonetic transcriptions of Chinese characters exceeds the Chinese character width, will exceed half of partial width, remove to take adjacent sharable white space.If can also equal 0 by p1, the described width sp=min (max (w1-smin, 0), (p2-w2)/2) that divides part is set; If p1 is not equal to 0, the described width sp=min (max ((w1-p1)/2-smin, 0), (p2-w2)/2) that divides part is set.
The preferred embodiment technical scheme is simple, and after the Chinese character that can set right added phonetic, phonetic integral body was align center with Chinese character.
Preferably, smin=0 is set.Minimum spacing smin between phonetic can be any number, is generally 0.
Preferably, adjacent Chinese characters does not have phonetic, and this method also comprises: the pinyin marking zone that whole pinyin markings zone of adjacent Chinese characters is joined current Chinese character; Mark off a part adjacent with the pinyin marking zone of adjacent Chinese characters from the pinyin marking zone of next adjacent Chinese characters of adjacent Chinese characters, join the pinyin marking zone of current Chinese character.This preferred embodiment can be processed the special circumstances of some phonetic overlength.
Preferably, add the width in pinyin marking zone of the current Chinese character of dividing after part still less than the width of the phonetic of current Chinese character, this method also comprises: the spacing of current Chinese character and adjacent Chinese characters is set, makes the width in the pinyin marking zone of current Chinese character be not less than the width of the phonetic of current Chinese character.This preferred embodiment can be processed the special circumstances of some phonetic overlength.
Fig. 3 shows the process flow diagram of phonetic composition method according to the preferred embodiment of the invention, comprising:
(1) obtain the width w1 of adjacent Chinese characters and the width w2 of current Chinese character;
(2) obtain corresponding phonetic length p1 and p2;
(3) obtain the minimum spacing smin that allows between phonetic transcriptions of Chinese characters;
(4) whether judge p2 greater than w2, if not, need not to adjust;
(5) if p2 greater than w2, judges further that whether p1 is less than w1;
(6) if p1 less than w1, judges whether p1 equals 0;
(7) if p1 equals 0, the shared white space width sp1 that last Chinese character is set equals the maximal value of (w1-smin) and 0;
(8) if p1 is not equal to 0, the shared white space width sp1 of so last Chinese character equals the maximal value of (w1-p1)/2-smin and 0;
(9) the reality white space width sp that can take equals the minimum value of sp1 and (p2-w2)/2;
(10) spacing between former and later two Chinese characters is deducted the actual white space width sp that takies, that namely completes phonetic takies the shared region typesetting.
In another preferred embodiment, no matter whether p1 equals the maximal value that 0, sp1 equals (w1-p1)/2-smin and 0.
Fig. 4 shows the design sketch according to the phonetic typesetting of the embodiment of the present invention, notes comparing with the typesetting of Fig. 1, and the Chinese character of the square frame mark in Fig. 4 and the spacing of adjacent Chinese characters are not widened, so the whole typesetting effect of Fig. 4 is very attractive in appearance.
Fig. 5 shows the design sketch according to the ancient poetry phonetic typesetting of prior art; Fig. 6 shows the design sketch according to the ancient poetry phonetic typesetting of the embodiment of the present invention.In the one layout region of Fig. 5, because lead-in phonetic is long, use to increase the mode of paragraph left side sky, cause this row Chinese character to misplace, thereby integral body is not attractive in appearance backward.Existing method after phonetic, due to the cause of adjusting the Chinese character spacing, causes Chinese character not alignment up and down, so not too good-looking on ancient poetry adds.And as shown in Figure 6, lead-in can be used the pinyin marking zone of the second word, thereby need not to adjust the position of lead-in, guarantees the consistency from top to bottom of Chinese character, and is attractive in appearance to guarantee.
Fig. 7 shows the schematic diagram according to the phonetic composing device of the embodiment of the present invention, this device be used for the phonetic align center be arranged in the top of its corresponding Chinese character, comprising:
This device is because with the pinyin marking district-share of a plurality of Chinese characters, thereby need not to adjust the spacing of Chinese character again, makes the Chinese character type-setting neat appearance.
Preferably, sharing module is used for arranging width sp=min (max ((the w1-p1)/2-smin that divides part, 0), (p2-w2)/2) or, if p1 equals 0, the described width sp=min (max (w1-smin, 0), (p2-w2)/2) that divides part is set; If p1 is not equal to 0, described width sp=min (max ((the w1-p1)/2-smin that divides part is set, 0), (p2-w2)/2), wherein, w1 is the width of adjacent Chinese characters, p1 is the width in the pinyin marking zone of adjacent Chinese characters, w2 is the width of current Chinese character, and p2 is the width in the pinyin marking zone of current Chinese character, and smin is the minimum spacing in pinyin marking zone of pinyin marking zone and the adjacent Chinese characters of current Chinese character.
Preferably, sharing module arranges smin=0.
Preferably, add the width in pinyin marking zone of the current Chinese character of dividing after part still less than the width of the phonetic of current Chinese character, also comprise: the spacing module, be used for arranging the spacing of current Chinese character and adjacent Chinese characters, make the width in the pinyin marking zone of current Chinese character be not less than the width of the phonetic of current Chinese character.
Preferably, adjacent Chinese characters does not have phonetic, and sharing module also is used for whole pinyin markings zone of adjacent Chinese characters is joined the pinyin marking zone of current Chinese character; Mark off a part adjacent with the pinyin marking zone of adjacent Chinese characters from the pinyin marking zone of next adjacent Chinese characters of adjacent Chinese characters, join the pinyin marking zone of current Chinese character.
As can be seen from the above description, when phonetic transcriptions of Chinese characters length during greater than the Chinese character width, the present invention can use the white space of adjacent Chinese characters top, make the spacing between Chinese character do not widened, thereby guarantee the even of whole typesetting effect, avoided in existing method because do as a whole phonetic and Chinese character and Chinese character spacing phenomenon of uneven density that bring, but typesetting goes out effect more attractive in appearance.
obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step being made into the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is only the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (10)
1. a phonetic composition method, is characterized in that, comprising: with the phonetic align center be arranged in the top of its corresponding Chinese character, wherein,
Determine the width of current Chinese character less than the width of its phonetic, and the width of the adjacent Chinese characters of described current Chinese character is greater than the width of its phonetic;
Mark off a part adjacent with the pinyin marking zone of described current Chinese character from the pinyin marking zone of described adjacent Chinese characters, join the pinyin marking zone of described current Chinese character.
2. method according to claim 1, is characterized in that, marks off a part adjacent with the pinyin marking zone of described current Chinese character from the pinyin marking zone of described adjacent Chinese characters, and the pinyin marking zone that joins described current Chinese character comprises:
The described width sp=min (max ((w1-p1)/2-smin, 0), (p2-w2)/2) that divides part is set;
Perhaps, if p1 equals 0, the described width sp=min (max (w1-smin, 0), (p2-w2)/2) that divides part is set; If p1 is not equal to 0, the described width sp=min (max ((w1-p1)/2-smin, 0), (p2-w2)/2) that divides part is set;
Wherein, w1 is the width of described adjacent Chinese characters, p1 is the width in the pinyin marking zone of described adjacent Chinese characters, w2 is the width of described current Chinese character, p2 is the width in the pinyin marking zone of described current Chinese character, and smin is the minimum spacing in pinyin marking zone of pinyin marking zone and the described adjacent Chinese characters of described current Chinese character.
3. method according to claim 2, is characterized in that, smin=0 is set.
4. method according to claim 1, is characterized in that, described adjacent Chinese characters does not have phonetic, also comprises:
Whole pinyin markings zone of described adjacent Chinese characters is joined the pinyin marking zone of described current Chinese character;
Mark off a part adjacent with the pinyin marking zone of described adjacent Chinese characters from the pinyin marking zone of next adjacent Chinese characters of described adjacent Chinese characters, join the pinyin marking zone of described current Chinese character.
5. method according to claim 1, is characterized in that, the width that adds the described pinyin marking zone of dividing described current Chinese character after part still less than the width of the phonetic of described current Chinese character, also comprises:
The spacing of described current Chinese character and described adjacent Chinese characters is set, makes the width in the pinyin marking zone of described current Chinese character be not less than the width of the phonetic of described current Chinese character.
6. phonetic composing device, be used for the phonetic align center be arranged in the top of its corresponding Chinese character, it is characterized in that, comprising:
Determination module be used for determining the width of current Chinese character less than the width of its phonetic, and the width of the adjacent Chinese characters of described current Chinese character is greater than the width of its phonetic;
Sharing module is used for marking off from the pinyin marking zone of described adjacent Chinese characters a part adjacent with the pinyin marking zone of described current Chinese character, joins the pinyin marking zone of described current Chinese character.
7. device according to claim 6, it is characterized in that, described sharing module is used for arranging described width sp=min (max ((the w1-p1)/2-smin that divides part, 0), (p2-w2)/2), perhaps, if p1 equals 0, the described width sp=min (max (w1-smin, 0), (p2-w2)/2) that divides part is set; If p1 is not equal to 0, described width sp=min (max ((the w1-p1)/2-smin that divides part is set, 0), (p2-w2)/2), wherein, w1 is the width of described adjacent Chinese characters, p1 is the width in the pinyin marking zone of described adjacent Chinese characters, w2 is the width of described current Chinese character, and p2 is the width in the pinyin marking zone of described current Chinese character, and smin is the minimum spacing in pinyin marking zone of pinyin marking zone and the described adjacent Chinese characters of described current Chinese character.
8. device according to claim 7, is characterized in that, described sharing module arranges smin=0.
9. device according to claim 6, is characterized in that, described adjacent Chinese characters does not have phonetic, and described sharing module also is used for whole pinyin markings zone of described adjacent Chinese characters is joined the pinyin marking zone of described current Chinese character; Mark off a part adjacent with the pinyin marking zone of described adjacent Chinese characters from the pinyin marking zone of next adjacent Chinese characters of described adjacent Chinese characters, join the pinyin marking zone of described current Chinese character.
10. device according to claim 6, is characterized in that, the width that adds the described pinyin marking zone of dividing described current Chinese character after part still less than the width of the phonetic of described current Chinese character, also comprises:
The spacing module is used for arranging the spacing of described current Chinese character and described adjacent Chinese characters, makes the width in the pinyin marking zone of described current Chinese character be not less than the width of the phonetic of described current Chinese character.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110401408.6A CN103136186B (en) | 2011-12-05 | 2011-12-05 | Phonetic composition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110401408.6A CN103136186B (en) | 2011-12-05 | 2011-12-05 | Phonetic composition method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103136186A true CN103136186A (en) | 2013-06-05 |
CN103136186B CN103136186B (en) | 2016-06-22 |
Family
ID=48496027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110401408.6A Expired - Fee Related CN103136186B (en) | 2011-12-05 | 2011-12-05 | Phonetic composition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103136186B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105487684A (en) * | 2014-09-28 | 2016-04-13 | 北大方正集团有限公司 | Method and device for outputting Pinyin and Chinese characters |
CN106598934A (en) * | 2016-12-14 | 2017-04-26 | 掌阅科技股份有限公司 | Electronic book data display method and device, and terminal equipment |
CN107783956A (en) * | 2017-11-23 | 2018-03-09 | 掌阅科技股份有限公司 | Composition method, electronic equipment and the computer-readable storage medium of text information |
CN108959224A (en) * | 2018-06-12 | 2018-12-07 | 黄�益 | A kind of text handling method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1416077A (en) * | 2002-12-05 | 2003-05-07 | 北京北大方正电子有限公司 | Method for lining up character layout by using hand-held device |
CN101916517A (en) * | 2010-07-21 | 2010-12-15 | 中兴通讯股份有限公司 | Method and device for displaying text information on electronic reading terminal |
US7934154B2 (en) * | 2004-01-30 | 2011-04-26 | Canon Kabushiki Kaisha | Document processing apparatus, document processing method, and document processing program |
-
2011
- 2011-12-05 CN CN201110401408.6A patent/CN103136186B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1416077A (en) * | 2002-12-05 | 2003-05-07 | 北京北大方正电子有限公司 | Method for lining up character layout by using hand-held device |
US7934154B2 (en) * | 2004-01-30 | 2011-04-26 | Canon Kabushiki Kaisha | Document processing apparatus, document processing method, and document processing program |
CN101916517A (en) * | 2010-07-21 | 2010-12-15 | 中兴通讯股份有限公司 | Method and device for displaying text information on electronic reading terminal |
Non-Patent Citations (1)
Title |
---|
刘子群: "书籍版式设计中字体排版的应用研究", 《中国优秀硕士学位论文全文数据库 哲学与人文科学辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105487684A (en) * | 2014-09-28 | 2016-04-13 | 北大方正集团有限公司 | Method and device for outputting Pinyin and Chinese characters |
CN105487684B (en) * | 2014-09-28 | 2018-03-23 | 北大方正集团有限公司 | The output intent of Chinese-character phonetic letter character and the output device of Chinese-character phonetic letter character |
CN106598934A (en) * | 2016-12-14 | 2017-04-26 | 掌阅科技股份有限公司 | Electronic book data display method and device, and terminal equipment |
CN106598934B (en) * | 2016-12-14 | 2018-09-14 | 掌阅科技股份有限公司 | Display methods, device and the terminal device of electronic book data |
CN107783956A (en) * | 2017-11-23 | 2018-03-09 | 掌阅科技股份有限公司 | Composition method, electronic equipment and the computer-readable storage medium of text information |
CN107783956B (en) * | 2017-11-23 | 2019-03-15 | 掌阅科技股份有限公司 | Composition method, electronic equipment and the computer storage medium of text information |
CN108959224A (en) * | 2018-06-12 | 2018-12-07 | 黄�益 | A kind of text handling method |
Also Published As
Publication number | Publication date |
---|---|
CN103136186B (en) | 2016-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103136186A (en) | Method and device of pinyin type setting | |
CN105159877B (en) | A kind of across media automatic typesetting systems and its method | |
CN111309424B (en) | Page restoration method and related equipment | |
CN103353863B (en) | A kind of text template generates method | |
CN102207870B (en) | Adaptive method and system for multi-language version interface | |
CN108090037B (en) | Automatic typesetting method and device | |
CN104461483A (en) | Font rendering method and device, rendering platform client and server | |
Yadav et al. | Typography as a statement of Design | |
CN101183358A (en) | Typesetting method and apparatus | |
CN102479215B (en) | Automatic file exporting method and electronic reading device | |
KR101777521B1 (en) | Method and Apparatus for generating font for changing font's style | |
CN106033412A (en) | Text conversion method and device | |
CN103870445A (en) | Typesetting method capable of improving reading efficiency | |
CN105183708A (en) | Method and system for making book based on microblog content | |
CN102760159B (en) | Magazine-type article full text mixed composition method for mobile terminal screen | |
CN101105789A (en) | Input position regulation method and system | |
CN103744833A (en) | Path based text creating method | |
CN107861923A (en) | A kind of pre- myopic-preventing exercise-book composition method of energy | |
US20160246761A1 (en) | Method for quickly inserting wordart in pdf document | |
CN103150300A (en) | Pinyin typesetting method and device | |
CN106598934A (en) | Electronic book data display method and device, and terminal equipment | |
CN113962193A (en) | Table typesetting method and device, electronic equipment and storage medium | |
CN106020799A (en) | Method for designing card type enterprise address book | |
CN103377182B (en) | The method and apparatus of the streaming typesetting page number | |
JP2016087991A (en) | Pseudo dynamic image booklet manufacturing method and pseudo dynamic image booklet |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160622 Termination date: 20191205 |