Movatterモバイル変換


[0]ホーム

URL:


CN1458604A - Method for forming industrial marking machine font library under window environment - Google Patents

Method for forming industrial marking machine font library under window environment
Download PDF

Info

Publication number
CN1458604A
CN1458604ACN 03117739CN03117739ACN1458604ACN 1458604 ACN1458604 ACN 1458604ACN 03117739CN03117739CN 03117739CN 03117739 ACN03117739 ACN 03117739ACN 1458604 ACN1458604 ACN 1458604A
Authority
CN
China
Prior art keywords
font
file
library
function
marking machine
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
CN 03117739
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.)
CHONGQING DIJIA SCIENCE TECHNOLOGY Co Ltd
Original Assignee
CHONGQING DIJIA SCIENCE TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHONGQING DIJIA SCIENCE TECHNOLOGY Co LtdfiledCriticalCHONGQING DIJIA SCIENCE TECHNOLOGY Co Ltd
Priority to CN 03117739priorityCriticalpatent/CN1458604A/en
Publication of CN1458604ApublicationCriticalpatent/CN1458604A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

The method of creating industrial marking machine font library utilizes fully Windows operation system and CAD software resource to develop more monoline font library in less investment and short period, and the font library may be revised and increased by the user. Via combination with digital technology, the said method may be used directly in creating Chinese character stroke locus for industrial mark printer, laser letter carving machine, industrial embroidery machine, etc. The monoline font library creating process includes the steps of: converting binary skeletal letter font file in CAD and other large professional software into font defining file in text format; simplifying and optimizing the font defining file; converting the simplified and optimized font defining file into font data base file; and designing complete font library application software interface.

Description

The generation method of industrial marking machine character library under the Windows environment
Technical field
The present invention relates to the generation method of industrial marking machine character library under a kind of Windows environment
Background technology
Character library under the Windows environment is hollow character library, and then there is the low problem of printing effect in the stroke beautiful design of various character libraries but be used for industrial marking machine, and industrial marking machine also needs to develop single line body character library except that using hollow character library.The method that current Windows environment is created down single line voxel vector character library has: 1) use the mapping software exploitation, this method development efficiency is low, and is difficult for creating standard compliant type matrix and track, needs that difficulty more just of character library of exploitation multiple font.2) use a series of mathematical methods hollow character library is carried out the profile extraction and followed the tracks of, more hollow profile is handled, thereby generated uniline message.This method development difficulty is big, needs to drop into more fund and long time.3) utilize the dot matrix word library under the DOS environment to generate single line voxel vector character library, the defective of this method is that font is insufficient.4) the binary vector Chinese character shape file that utilizes Large-scale CAD software to provide converts thereof into the text of the output that can be used to draw.The existing at present people of this method can not make the degree that numerical control is exported in research but also reach on industrial marking machine.This patent independent research transfer algorithm, and the text after the conversion done effective simplification, optimization and transformation, and developed multiple application interface, reached practical journey
The summary of the invention goal of the invention
This technology can be developed more single line body character library in the short time under less investment, can make full use of the resource of Windows operating system and CAD software, and the single line body character library user who develops can also revise and add voluntarily.This technology combines with Numeric Control Technology, directly applies to the generation of Chinese-character stroke digital controlled tracing, can be used for industrial mark printer, laser stamp, industrial embroidery machine etc.To the update of industrial marking machine, change inconvenient, the ropy backwardness of mark of present industrial marking machine Chinese character input, will play great impetus, the practical background in fabulous economic results in society and market is arranged.
(1) outline letters mark track vector data obtains
What the TureType character library under the Windows was preserved is the hollow information of literal, according to character library information hollow literal is drawn earlier during use, fills as required then.Windows provides a series of api function can obtain a series of data of hollow word vector track, and concrete steps are as follows:
1) uses the CreateFontIndirect function, create logical font according to the attribute of appointment;
2) start a path branches with the BeginPath function;
3) with Line, Cricle, Arc, Rectangle function representation current path;
4) stop path definition with the EndPath function;
5) all convert all curves in the path to straight-line segment with the FlattenPath function;
6) obtain the outline letters stroke vectors data that current path is defined with the GetPath function.
(2) vector data of skeleton word obtains
Do not have single line body character library under the Windows, industrial marking machine can't directly be printed single line body literal with any character library that windows provides.But contain some single line body character library in number of C AD software, they exist with binary shape file form, and the stroke track that how to utilize this resource to produce numerical control industrial marking machine single line body literal is the key to the issue place.Our way is:
1) the skeleton Chinese character base that exists with scale-of-two shape file form that contains in the softwares such as CAD is converted to the glyph definition file of text formatting.A glyph definition file is made up of a plurality of glyph definition descriptors, and each glyph definition descriptor comprises a header line and several description row.See embodiment 1 about the data structure of glyph definition file.
2) the glyph definition file is done to simplify and optimization process.Simplification work is, remove use in the mark machine less than the shape attribute, to improve print speed; Optimization work is to increase non-circular curve and describe attribute, to improve print quality.Simplifying optimized Algorithm sees
Embodiment 2.
3) recall precision in order to improve character library and to use changes into font data library file (i.e. the font file that finally can use) to the shape defined file after optimizing and simplifying again in industrial marking machine.Utilize data base management system (DBMS) that font file is done various maintenances and visit, effectively raise the service efficiency of character library.The table name of database is exactly a font name, and structure of data table is as shown in the table;
Field nameCodingFont description is capable
Type ????Text ????Text
Length ????4 ????255
4) the complete Chinese character editor and the various software interface that uses this character library of design.
The Chinese character index interface: import the various font font Chinese characters of wanting mark output as the Word word processing under the Windows environment easily, the application data base technology finds font attribute in the single line body font data library file of appointment.The statement form that Chinese character index calls is " the SELECT glyph definition is described row FROM fontname WHERE coding=literal code ".
The Chinese character image Processing Interface: according to the font attribute data that find, the Graphics Application treatment technology generates the Chinese-character stroke shape, and obtains the feature discrete point coordinate of stroke curve.
The modification interface of word string: word string is modified and is comprised processing such as arch, inclination, convergent-divergent, translation, rotation, and respective algorithms is encapsulated in the generic module, realizes the rhetorical function of word string.The modification interface of word string is seen embodiment 3.
The mixing interface of text strings and figure:, can increase figure, symbol commonly used in some industrial marking easily because character library is self-defining font data storehouse.Remove figure, outer symbol that the developer increases, the user also can increase new graphical symbol at any time.These figures are the same with lexigraphy in database, can image mixed character typeset, and to increase the mark effect.
The coinage interface: place name, name and the trade mark etc. that often occur in the mark machine usually are not contained among 6 763 Chinese characters and 682 graphical symbols of standard GB 2312-80 regulation.Extremely low for these frequencies of utilization, but literal and the symbol used always in the mark machine as long as perform font description according to form and the predetermined data structure of embodiment 11, just can be realized the function of creating characters of literal.The invention effect
(1) Chinese character input efficiency height
Can use the various input method of Chinese character of Windows, compare with the Chinese character input of mark machine under the DOS environment, input efficiency improves more than 10 times.
(2) Chinese character index efficient height
The glyph definition file is after optimizing simplification and changing into database file, and Chinese character index efficient has improved 10 times, because the raising of recall precision, the configuration of control computer can reduce, and the cost of total system has also reduced, and can improve the competitiveness of product in market.
(3) print quality improves
Increased after the attribute of non-circular curve, even the broken line sense of curve also can not appear in special big character, the stroke degree of distortion descends, and print quality improves.
(4) font variation
As long as can find new scale-of-two Chinese character shape file, just can generate one's own font data library file, thereby be single line body character library of system's increase with this patent.Mark machine under the Windows environment on the market nearly all has only one or both single line body character libraries at present, and reason is will create to generate a single line body character library, and the expense of time and fund is too big.
(5) character library maintainability, extensibility are good
Data structure in accordance with regulations increases record in the font data library file or amendment record has just been finished the task of the expansion and the modification of character library.
(6) realize image mixed character typeset
The DXF form is a kind of method for expressing of the marker graphic data in the AutoCAD graphic file.All user appointed information can both be represented with the DXF file layout in the graphic file.We have developed the interface with DXF, can realize image mixed character typeset easily.
Description of drawings
Fig. 1 font description direction code
The rotational transform of Fig. 2 word string
The conversion of Fig. 3 word string arch
Fig. 4 word string is amplified conversion
Embodiment embodiment 1 glyph definition file layout
Define the shape of descriptive text with straight line, circular arc and nurbs curve, shape definition is formed by describing first trip and descriptor string.
Shape first trip definition has following content:
shapenumber,defbytes
Wherein:
Shapenumber is literal code, with the ASCH representation;
Difbytes is a descriptor string byte number.
The descriptor string is made up of basic descriptor and private code descriptor, does not have between descriptor to separate with comma.Basic descriptor comprises two parts: long amount of vector and direction code, form is three characters of " 0XX ".First two characters incharacter 0 expression back are hexadecimal value, the length of second character specifies vector, and the direction of the 3rd character specifies vector, direction and direction code are provided by accompanying drawing 1.
Private code is described the membrane inside the rush stalk and is defined as follows shown in the table.
Coding (sexadecimal)The font description explanation
000Definition finishes
001Start to write
002Start writing
003Remove vector length with next byte
004Take advantage of vector length with next byte
005Current location is pressed into storehouse
006From storehouse, eject current location
007Nurbs curve
008The X-Y relative displacement that provides by following two bytes
009Finish a plurality of X-Y relative displacements by (0,0)
00AOctant arc by following two bytes definition
00BSegment by following five bytes definition
00CArc according to X-Y displacement and convexity definition
00DThe arc of a plurality of appointment convexitys
00EEmpty
00FEmpty
Embodiment 2 character library optimized Algorithm
This character library is described the database file that membrane inside the rush stalk record is formed by font attribute in essence, and the user can revise and optimization being defined as of font attribute at any time.Certainly, after attribute definition was revised, the graphics process branched program also will be made corresponding modification.The method of simplifying, optimizing is a lot.Wherein increasing nurbs curve (non-uniform rational B-spline) attribute is that this patent aims at the font attribute that super-huge Chinese character is set up.The handling procedure of this attribute is as follows: 1, when the increment of coordinate of a stroke during greater than specified value, enter this program.2, at first by nurbs curve of former discrete data point definition.P(u)=Σi=0nPiR1,3(u),WhereinRi,3(u)=WiNi,3(u)Σj=0nWjNj,.3(u)RI, 3 (u)---3 rational basis functions; Pi---feature polygon reference mark; Wi---the weight factor at reference mark.3, according to the stroke needs on-line setup W of special big characteriParameter.
Wi=0 o'clock, the position, reference mark there was not influence, W to fontiIncrease, local line segment will be to PiApproaching, WiDuring → ∞, what be pulled names a person for a particular job and PiOverlap.Revise the local shape of stroke easily by weight factor.Nurbs curve more can be represented free curve accurately than general Bezier.
On adjusted nurbs curve, make linear interpolation, remake linear interpolation output.
Modification 1. translation algorithms of embodiment 3 word strings:
If any point P in the track (X, Y), translation Δ X is P ' (X ', Y ') behind the Δ Y, then:
X′=X+ΔX
Y′=Y+ΔY
Use translation algorithm, realize the alignment function of each print object.2. rotation algorithm:
With reference to the accompanying drawings 2, the definition screen object lower left corner is O (XMin, YMax), arbitrary coordinate points P in the track (X, phasing degree Y) is θ, rotates coordinate points behind the given corner Δ θ and be P ' (X ', Y '), then: (1) radius of turn R and phasing degree θ are:θ=arctanYmax-YX-Xmin;R=(X-Xmin)2+(Ymax-Y)2(2) rotation back angle θ '=θ+Δ θ; (3) coordinate of rotation back P ' (X ', Y ') is:
X′=Xmin+Rcosθ′
Y '=YMax+ Rsin θ ' is the arch algorithm 3.:
With reference to the accompanying drawings 3, the point coordinate after four angular coordinates, arch transformation parameter and the arch conversion of definition arch object.
(1) establishes arch centre coordinate O (X0, Y0), arch initial angle θ1, end angle θ2, R1, R2Be screen after the arch
The radius up and down of object, R3Be middle footpath (being arch radius) that the pass between them is:
Figure A0311773900073
Can get R1, R2, R3
(2) (θ is R) (with O (X for any 1 P ' in the word vector path0, Y0) be the utmost point heart), according to angle than=wide
Degree ratio, radius ratio=aspect ratio have relational expression:
Figure A0311773900074
Can get antipode coordinate R, θ after the arch;
(3) (θ R) is converted into (X with O polar coordinates to be put P '0, Y0) be true origin rectangular coordinate point P ' (X, Y):
X=Rcosθ
Y=Rsinθ
(4), finally try to achieve coordinate P ' after the arch (X ', Y ') by translation algorithm
X′=X0+X=X0+Rcosθ
Y '=Y0+ Y=Y0+ Rsin θ 4. interpolator arithmetics: with reference to the accompanying drawings 4, definition screen lower left corner coordinate points is O (XMin, YMax), arbitrary coordinate points P in the track (X, Y), the convergent-divergent multiple is K, then: the polar angle that (1) P is ordered is:θ=arctanYmax-YX-Xmin
The utmost point directly is:R=(X-Xmin)2+(Ymax-Y)2;(2) amplify the back to P ' (X ', Y ') point,
P ' polar angle is: θ, the utmost point directly are R1=KR; (3) rectangular coordinate that amplifies back literal vector path P ' (X ', Y ') point is:
X′=Xmin+R1cosθ
Y′=Ymax+R1sinθ

Claims (2)

1. the generation method of industrial marking machine single line body character library under the Windows environment is characterized in that:
1) the font file conversion of the skeleton literal that exists with binary format that contains in the large-scale professional softwares such as CAD is become the glyph definition file of text formatting, its technical characterictic is a structure of analyzing binary file, font attribute is converted into the basic descriptor and the private code descriptor of text formatting;
2) adaptability that the glyph definition file to need at mark to be done is simplified and optimization process, remove use in the mark machine less than font attribute, to improve print speed, increase nurbs curve and describe attribute, to improve print quality;
3) the shape defined file after optimizing and simplifying is changed into the font data library file, database table is made up of two fields: literal code and descriptor string;
4) software interface of complete this character library of use of design.
2. the acquisition methods of industrial marking machine character library outline letters mark track data under the Windows environment:
1) uses the CreateFontIndirect function, create logical font by the attribute of appointment;
2) start a path branches with the BeginPath function;
3) with Line, Circle, Arc, Rectangle function representation current path;
4) stop path definition with the EndPath function:
5) all convert all curves in the path to straight-line segment with the FlattenPath function;
6) obtain the outline letters stroke vectors data that current path is defined with the GetPath function.
CN 031177392003-04-212003-04-21Method for forming industrial marking machine font library under window environmentPendingCN1458604A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN 03117739CN1458604A (en)2003-04-212003-04-21Method for forming industrial marking machine font library under window environment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN 03117739CN1458604A (en)2003-04-212003-04-21Method for forming industrial marking machine font library under window environment

Publications (1)

Publication NumberPublication Date
CN1458604Atrue CN1458604A (en)2003-11-26

Family

ID=29430253

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN 03117739PendingCN1458604A (en)2003-04-212003-04-21Method for forming industrial marking machine font library under window environment

Country Status (1)

CountryLink
CN (1)CN1458604A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7622806B2 (en)2005-10-142009-11-24Chipmos Technologies (Bermuda) Ltd.Laser mark on an IC component
CN101920603A (en)*2010-08-062010-12-22东莞市升力智能科技有限公司NURBS graph laser cleaning method
CN104608506A (en)*2015-01-212015-05-13内蒙古包钢钢联股份有限公司Method for printing complex mark through table type pneumatic marking machine
CN112232022A (en)*2020-10-152021-01-15浙江大学 Chinese character font and layout design method and system for dynamically adjusting parameters
CN115870629A (en)*2023-02-212023-03-31飞天诚信科技股份有限公司Laser lettering method, device, equipment and medium for single-line font

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7622806B2 (en)2005-10-142009-11-24Chipmos Technologies (Bermuda) Ltd.Laser mark on an IC component
CN101920603A (en)*2010-08-062010-12-22东莞市升力智能科技有限公司NURBS graph laser cleaning method
CN104608506A (en)*2015-01-212015-05-13内蒙古包钢钢联股份有限公司Method for printing complex mark through table type pneumatic marking machine
CN112232022A (en)*2020-10-152021-01-15浙江大学 Chinese character font and layout design method and system for dynamically adjusting parameters
CN112232022B (en)*2020-10-152024-02-27浙江大学Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts
CN115870629A (en)*2023-02-212023-03-31飞天诚信科技股份有限公司Laser lettering method, device, equipment and medium for single-line font

Similar Documents

PublicationPublication DateTitle
KR100643849B1 (en) Chinese library of embedded curves based on stroke centerline
CN102509511B (en) Rapid Map Drawing System Based on GIS Data
WO1989006400A1 (en)Method of converting graphic data
WO2003104963A1 (en)Input method for optimizing digitize operation code for the world characters information and information processing system thereof
CN112232022B (en)Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts
CN1458604A (en)Method for forming industrial marking machine font library under window environment
CN1094608C (en)Font producing apparatus
Lim et al.Oriental character font design by a structured composition of stroke elements
CN1107281C (en)Matrix generator capable of generating matrix of character composition factor with linked stroke
CN101957837B (en)Method for accessing stroke vector font
CN1119739C (en)Chinese-character 5-stroke digital input method with keyboard of computer and its keyboard
CN1116335A (en)Chinese character screen-writing input system
CN1510637A (en) A Universal Method for Printing and Drawing Graphical Files and Dynamic Link Library
CN1205530C (en)Automatic Chinese character font forming method and device
CN1234564A (en)Font generating method and computor medium
CN1362657A (en)Hand writing input method for hand held data processor
CN1359079A (en)Ultralarge Chinese character information treating device and method
CalderBuilding user interfaces with lightweight objects
CN1294357A (en)Stroke method for generating Chinese characters
CN1315026C (en)Digital Chinese character input method and its keyboard
CN1124064C (en) Nine-key Chinese input method
CN1419179A (en)Chinese characters input method according to stroke sequence and keyboard thereof
CN1598743A (en)Input method for inputing Chinese according to standard stroke and its keyboard
CN1107255C (en)Infinite ordered character set Chinese character whole set method and system
CN1245305A (en)Total strokes vector input method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C12Rejection of a patent application after its publication
RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp