CN101571882A - System and method for generating minimum outline of characters - Google Patents

System and method for generating minimum outline of characters Download PDF

Info

Publication number
CN101571882A
CN101571882A CNA2008103013510A CN200810301351A CN101571882A CN 101571882 A CN101571882 A CN 101571882A CN A2008103013510 A CNA2008103013510 A CN A2008103013510A CN 200810301351 A CN200810301351 A CN 200810301351A CN 101571882 A CN101571882 A CN 101571882A
Authority
CN
China
Prior art keywords
row
literal
characters
vector
size
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.)
Pending
Application number
CNA2008103013510A
Other languages
Chinese (zh)
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.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry 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 Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CNA2008103013510A priority Critical patent/CN101571882A/en
Publication of CN101571882A publication Critical patent/CN101571882A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention provides a method for generating minimum outline of characters. The method comprises the following steps: selecting data in a product design graphic file; when the selected data are the characters, reading attributes in the characters; according to the height of each row of characters, acquiring the character size of the row, and acquiring the width of the characters in the row through the character size; calculating the length of the row according to the character space of each row, the width of the characters in each row and the number of the characters in each row, and calculating the total height of all rows according to the row pitch among the rows and the height of the characters in each row; according to the input direction of the characters, acquiring a vector of the direction and a normal vector vertical to the direction, and assigning a value to the vector of the input direction and the normal vector respectively to make the size of the vector of the character input direction be maximum length value in the rows and the size of the normal vector be the total height of all rows; and generating a rectangle consisting of the two vectors, wherein the rectangle is the minimum outline of the characters.

Description

The generation system of minimum outline of characters and method
Technical field
The present invention relates to a kind of generation system and method for minimum outline of characters.
Background technology
Often have some very important Word messages on the surface of mould product, for example, information such as Business Name, name of product, product type, date of manufacture and the place of production.In large batch of production, this word processing is to be formed by a kind of special drift impression, in the design drift, at first, the literal of having arranged in the product figure shelves of simulation, then, choose the minimum outline (that is: the minimum rectangle of encirclement word content) that comprises these literal, it is imprinted on the drift.In the process of design drift, choosing of the minimum outline of literal is often accurate inadequately, for example, and according to the literal width of each word that obtains in the CAD software, bigger than in the reality often, like this rectangle of the minimum outline that obtains literal also can with the deviation that has of reality.The minimum outline that obtains literal accurately can be saved the material that is used to make drift, cuts down finished cost.
Summary of the invention
In view of above content, be necessary to provide a kind of generation system of minimum outline of characters, it can obtain the minimum outline of literal accurately, saves the material that is used to make drift, cuts down finished cost.
In view of above content, also be necessary to provide a kind of generation method of minimum outline of characters, it can obtain the minimum outline of literal accurately, saves the material that is used to make drift, cuts down finished cost.
A kind of generation system of minimum outline of characters comprises main frame, and described main frame comprises: select module, be used for selecting the data of product design figure shelves; Judge module is used to judge whether selected data is literal; Read module is used for reading the attribute of literal, to obtain the height of each style of writing word, the literal input direction, line space between word space and the multirow, the height that reaches according to each style of writing word obtains the font size size of this row, and obtains the width of this row Chinese words by the font size size; Computing module is used for the word space according to every row, the width of every capable Chinese words, and the number that reaches every style of writing word calculates the length of this row, and calculates the overall height of all line numbers according to the altitude gauge of the line space between each row and each row Chinese words; The assignment module, be used for obtaining this direction vector and the normal vector vertical with this direction according to the input direction of literal, and respectively it is carried out assignment, and the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, the size of normal vector is the overall height of each row; Generation module is used to generate one by above-mentioned two rectangles that vector is formed, and this rectangle is the minimum outline of literal.
A kind of generation method of minimum outline of characters, this method comprise the steps: to select the data in the product design figure shelves; When selected data is literal, read the attribute in the literal, to obtain the height of each style of writing word, literal input direction, the line space between word space and the multirow; Height according to each style of writing word obtains the font size size of this row, and obtains the width of this row Chinese words by the font size size; According to the word space of every row, the width of every capable Chinese words, the number that reaches every style of writing word calculates the length of this row, and calculates the overall height of all line numbers according to the altitude gauge of the line space between each row and each row Chinese words; Input direction according to literal obtains this direction vector and the normal vector vertical with this direction, and respectively it is carried out assignment, and the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, and the size of normal vector is the overall height of each row; Generate one by above-mentioned two rectangles that vector is formed, this rectangle is the minimum outline of literal.
Compared to prior art, the generation system of described minimum outline of characters and method, it can obtain the minimum outline of literal accurately, saves the material that is used to make drift, cuts down finished cost.
Description of drawings
Fig. 1 is the hardware structure figure of the generation system preferred embodiment of minimum outline of characters of the present invention.
Fig. 2 is the functional block diagram of main frame shown in Fig. 1.
Fig. 3 is the process flow diagram of the generation method preferred embodiment of minimum outline of characters of the present invention.
Embodiment
As shown in Figure 1, be the system architecture diagram of the generation system preferred embodiment of minimum outline of characters of the present invention.This system mainly comprises display 1, main frame 2, keyboard 3 and mouse 4, and described main frame 2 is connected with database 5.Described database 5 stores various product design figure shelves.
Described main frame 2 is connected with display 1, keyboard 3 and mouse 4, the Input/Output Device when described display 1, keyboard 3 and mouse 4 are used as concrete operations.
As shown in Figure 2, be the functional block diagram of main frame shown in Fig. 12.Described main frame 2 comprises selects module 210, judge module 211, read module 212, computing module 213, assignment module 214 and generation module 215.The alleged module of the present invention is to finish the computer program code segments of a specific function, be more suitable in describing the implementation of software in computing machine than program, therefore below the present invention to all describing in the software description with module.
Wherein, described selection module 210 is used for selecting the data of product design figure shelves.The user is when deisgn product, various data (as: pel, literal) in the figure shelves all have corresponding type designations, to distinguish different data, particularly, suppose that the symbol of literal in the figure shelves is " A ", when the user opens product design figure shelves, when in the figure shelves, selecting type designations " A ", then in this product design figure shelves, only handle the information of relevant literal.Described literal comprises concrete spoken and written languages and various character (as: punctuation mark etc.).
Described judge module 211 is used to judge whether selected data is literal.Judgment mode is by reading selected type designations, to determine whether being literal.
Described read module 212 is used for reading the attribute of literal, to obtain the height of each style of writing word, literal input direction, the line space between word space and the multirow, and obtain the font size size of this row according to the height of each style of writing word, obtain the width of this row Chinese words by the font size size.The more than delegation of literal on the common product figure shelves, the font size size of the literal of each row might be different, for example, first exercises with No. 14 words, and second exercises with No. 12 words, and the user is when input characters, the height of every style of writing word, word space, the literal input direction, attributes such as the line space between the multirow generate automatically.
Described computing module 213 is used for the word space according to every row, the width of every capable Chinese words, and the number that reaches every style of writing word calculates the length of this row, and calculates the overall height of all line numbers according to the altitude gauge of the line space between each row and each row Chinese words.Particularly, the word space of supposing certain delegation is a, the width of each literal is b, this row has n literal, then the length of this row is: L=n* (a+b), suppose that total line number has two row, and the literal height of every row is c and d, line space between two row is from being e, and then the overall height of all line numbers is: H=c+d+e.
Described assignment module 214 is used for obtaining this direction vector and the normal vector vertical with this direction according to the input direction of literal, and respectively it is carried out assignment, the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, and the size of normal vector is the overall height of each row.Particularly, get two vectors, one of them vectorial direction is consistent with the direction of literal input, be assumed to be F1, the size of this vector calculates the value of length maximum in each row for all, that is: | and F1|=max (L1, L2 ... ..Ln), wherein, L1, L2 ... ..Ln be each length of going, another vectorial direction is vertical with the direction of F1, be assumed to be F2, then | F2|=H, wherein H is the overall height of each row.
Described generation module 215 is used to generate one by above-mentioned two rectangles that vector is formed, and this rectangle is the minimum outline of literal.
As shown in Figure 3, be the process flow diagram of the generation method preferred embodiment of minimum outline of characters of the present invention.
Step S10 at first, selects the data of module 210 from database 5 selection product design figure shelves.The user is when deisgn product, various data (as: pel, literal) in the figure shelves all have corresponding type designations, to distinguish different data, particularly, suppose that the symbol of literal in the figure shelves is " A ", when the user opens product design figure shelves, when in the figure shelves, selecting type designations " A ", then in this product design figure shelves, only handle the information of relevant literal.Described literal comprises concrete spoken and written languages and various character (as: punctuation mark etc.).
Step S11, judge module 211 judge whether selected data is literal.Judgment mode is by reading selected type designations, to determine whether being literal.
Step S12, when selected data was literal, read module 212 read the attribute in the literal, to obtain the height of each style of writing word, literal input direction, the line space between word space and the multirow.The more than delegation of literal on the common product figure shelves, the font size size of the literal of each row might be different, for example, first exercises with No. 14 words, and second exercises with No. 12 words, and the user is when input characters, the height of every style of writing word, word space, the literal input direction, attributes such as the line space between the multirow generate automatically.
Step S13, read module 212 also read the font size size of this row according to the height of each the style of writing word that obtains, and obtain the width of this row Chinese words by the font size size.
Step S14, computing module 213 is according to the width of each literal in the word space of every row, the every row, and the number of literal calculates the length of this row, and calculates overall height according to the line space between each row and the altitude gauge of the literal of this row.Particularly, the word space of supposing certain delegation is a, the width of each literal is b, this row has n literal, then the length of this row is: L=n* (a+b), suppose that total line number has two row, and the literal height of every row is c and d, line space between two row is from being e, and then the overall height of all line numbers is: H=c+d+e.
Step S15, assignment module 214 obtains this direction vector and the normal vector vertical with this direction according to the input direction of literal, and respectively it is carried out assignment, and the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, the size of normal vector is the overall height of each row.Particularly, get two vectors, one of them vectorial direction is consistent with the direction of literal input, be assumed to be F1, the size of this vector calculates the value of length maximum in each row for all, that is: | and F1|=max (L1, L2 ... ..Ln), wherein, L1, L2 ... ..Ln be each length of going, another vectorial direction is vertical with the direction of F1, be assumed to be F2, then | F2|=H, wherein H is the overall height of each row.
Step S16, generation module 215 generate one by above-mentioned two rectangles that vector is formed, and this rectangle is the minimum outline of literal.
In step S11, when selected information is not literal, then return to step S10.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to above preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.

Claims (5)

1. the generation system of a minimum outline of characters comprises main frame, it is characterized in that, described main frame comprises:
Select module, be used for selecting the data of product design figure shelves;
Judge module is used to judge whether selected data is literal;
Read module is used for reading the attribute of literal, to obtain the height of each style of writing word, the literal input direction, line space between word space and the multirow, the height that reaches according to each style of writing word obtains the font size size of this row, and obtains the width of this row Chinese words by the font size size;
Computing module is used for the word space according to every row, the width of every capable Chinese words, and the number that reaches every style of writing word calculates the length of this row, and calculates the overall height of all line numbers according to the altitude gauge of the line space between each row and each row Chinese words;
The assignment module, be used for obtaining this direction vector and the normal vector vertical with this direction according to the input direction of literal, and respectively it is carried out assignment, and the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, the size of normal vector is the overall height of each row; And
Generation module is used to generate one by above-mentioned two rectangles that vector is formed, and this rectangle is the minimum outline of literal
2. the generation system of minimum outline of characters as claimed in claim 1 is characterized in that, described data comprises pel and literal.
3. the generation method of a minimum outline of characters is characterized in that, this method comprises the steps:
Select the data in the product design figure shelves;
When selected data is literal, read the attribute in the literal, to obtain the height of each style of writing word, literal input direction, the line space between word space and the multirow;
Height according to each style of writing word obtains the font size size of this row, and obtains the width of this row Chinese words by the font size size;
According to the word space of every row, the width of every capable Chinese words, the number that reaches every style of writing word calculates the length of this row, and calculates the overall height of all line numbers according to the altitude gauge of the line space between each row and each row Chinese words;
Input direction according to literal obtains this direction vector and the normal vector vertical with this direction, and respectively it is carried out assignment, and the vector magnitude that makes the literal input direction is the value of length maximum in the above-mentioned line number, and the size of normal vector is the overall height of each row; And
Generate one by above-mentioned two rectangles that vector is formed, this rectangle is the minimum outline of literal.
4. the generation method of minimum outline of characters as claimed in claim 3 is characterized in that, described data comprises pel and literal.
5. the generation method of minimum outline of characters as claimed in claim 3 is characterized in that, this method also comprises the steps:
When selected data is not literal, be back to the step of selecting the data in the product design figure shelves.
CNA2008103013510A 2008-04-28 2008-04-28 System and method for generating minimum outline of characters Pending CN101571882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008103013510A CN101571882A (en) 2008-04-28 2008-04-28 System and method for generating minimum outline of characters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008103013510A CN101571882A (en) 2008-04-28 2008-04-28 System and method for generating minimum outline of characters

Publications (1)

Publication Number Publication Date
CN101571882A true CN101571882A (en) 2009-11-04

Family

ID=41231238

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008103013510A Pending CN101571882A (en) 2008-04-28 2008-04-28 System and method for generating minimum outline of characters

Country Status (1)

Country Link
CN (1) CN101571882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778296A (en) * 2014-12-11 2015-07-15 安徽建筑大学 Lithologic description layout mathematical programming algorithm for drilling columnar diagram
TWI498754B (en) * 2012-10-16 2015-09-01 Lite On Electronics Guangzhou Method and device of document digitization

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI498754B (en) * 2012-10-16 2015-09-01 Lite On Electronics Guangzhou Method and device of document digitization
CN104778296A (en) * 2014-12-11 2015-07-15 安徽建筑大学 Lithologic description layout mathematical programming algorithm for drilling columnar diagram
CN104778296B (en) * 2014-12-11 2020-09-08 安徽建筑大学 Mathematical planning method for lithological description layout of drilling histogram

Similar Documents

Publication Publication Date Title
Tullis Screen design
CN106886418B (en) HTML interface control label
KR0163178B1 (en) Method and apparatus for encoding and decoding chinese characters
CN103186511A (en) Method and equipment for word formation of Chinese characters, and method for constructing font object library
US4677585A (en) Method for obtaining common mode information and common field attribute information for a plurality of card images
CN104516867A (en) Table reordering method and table reordering system
US8386943B2 (en) Method for query based on layout information
US9159147B2 (en) Method and apparatus for personalized handwriting avatar
CN112668289A (en) Extraction method and device of nested table and storage medium
CN112199929A (en) Form processing method and device, storage medium and electronic equipment
CN110377559B (en) PDF file data extraction method, device and storage medium
CN114937270A (en) Ancient book word processing method, ancient book word processing device and computer readable storage medium
US8326812B2 (en) Data search device, data search method, and recording medium
CN112417826B (en) PDF online editing method and device, electronic equipment and readable storage medium
CN113436298A (en) Method, device and related components for automatically generating Chinese character stroke order animation
CN101571882A (en) System and method for generating minimum outline of characters
CN100383734C (en) Method for setting screen display menu of Arabic and Persian
US11030388B2 (en) Live text glyph modifications
CN116311300A (en) Table generation method, apparatus, electronic device and storage medium
CN108647337B (en) Format processing method and device for simulation analysis data
CN110245341A (en) Identification code Mass production method and device
US11763064B2 (en) Glyph accessibility and swash control system
CN102442047B (en) Label processing method and device for board combination
CN115048599A (en) Enterprise product interface configuration method, device, equipment and medium
CN110188326B (en) Rich text generating method, rich text generating device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20091104