CN1936961A - Edge-Shading Guided Grayscale Font Generation Method - Google Patents
Edge-Shading Guided Grayscale Font Generation Method Download PDFInfo
- Publication number
- CN1936961A CN1936961A CN 200510103796 CN200510103796A CN1936961A CN 1936961 A CN1936961 A CN 1936961A CN 200510103796 CN200510103796 CN 200510103796 CN 200510103796 A CN200510103796 A CN 200510103796A CN 1936961 A CN1936961 A CN 1936961A
- Authority
- CN
- China
- Prior art keywords
- stroke
- strokes
- shadow
- literal
- collection
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 239000011159 matrix material Substances 0.000 claims description 20
- 238000010276 construction Methods 0.000 claims description 10
- 230000015572 biosynthetic process Effects 0.000 claims description 2
- 238000004380 ashing Methods 0.000 claims 6
- 238000006467 substitution reaction Methods 0.000 claims 2
- 238000005516 engineering process Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 7
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000009499 grossing Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003339 best practice Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
Description
技术领域technical field
本发明属于书写文字或符号的数字表现相关技术的领域,尤指产生边影导向的灰阶字型的一种系统、方法、以及计算机可读取媒介装置。The invention belongs to the technical field of digital representation of written characters or symbols, in particular to a system, method, and computer-readable media device for generating edge-shadow-oriented grayscale fonts.
背景技术Background technique
目前市面上存在着许多产生汉字的字型产生系统,汉字字型是由一群代表汉字的象形图形所组成,被组成的汉字数是成千上万个,例如通用的中文就包含有两万个以上。At present, there are many font generation systems for generating Chinese characters on the market. Chinese character fonts are composed of a group of pictographic figures representing Chinese characters. The number of Chinese characters formed is tens of thousands. For example, the common Chinese contains 20,000. above.
传统的计算机技术用于产生汉字的字型是采用外围形状的表现方法,此种技术描述于Addison-Wesley出版(1985年)的“Postscript Language Tutorial Cookbook”(AdobeSystem Inc.),这种方法用组合成文字外形的一些直线段及曲线段储存起来代表产生字形的数据。这种技术有一些缺陷;首先,由于不同的字型外形必需一一储存来产生成千上万个不同文字的形状,所以内存的空间需求相当大。其次,字形外围数据是依高解像度的需求储存,只能产生高解像品质的字型,这些数据并不适合于产生低解像度的字型。Traditional computer technology is used to generate the font of Chinese characters by using the peripheral shape representation method. This technology is described in "Postscript Language Tutorial Cookbook" (Adobe System Inc.) published by Addison-Wesley (1985). This method uses a combination of Some straight line segments and curved line segments forming the shape of the characters are stored to represent the data for generating the glyphs. This technique has some drawbacks; first, since different font shapes must be stored one by one to generate thousands of different character shapes, the memory space requirement is quite large. Secondly, the peripheral data of fonts are stored according to the requirement of high resolution, and only high-resolution fonts can be produced. These data are not suitable for low-resolution fonts.
另外一种产生汉字字型的方法是采用笔划基础的字型数据,其中文字的每个笔划是分别被定义成可用来组成每字的字型数据,而每字是由多个笔划互相迭合或交叉形成。笔划基础的字型数据包含关键点、宽度值、特征点和曲线比例值,这些数据的组合用来定义每个笔划的外围形状,有关笔划基础字型的建造及显示已经详述于美国专利案号5,852,448,6,151,032和6,157,390。笔划基础字型技术适用于低内存容量,以及在高低解像度两者并用的需求下的场合。Another way to generate Chinese character fonts is to use stroke-based font data, where each stroke of a character is defined as the font data that can be used to form each character, and each character is composed of multiple strokes superimposed on each other or cross formation. The stroke-based font data includes key points, width values, feature points, and curve ratio values. The combination of these data is used to define the peripheral shape of each stroke. The construction and display of stroke-based fonts have been described in detail in the US Patent Nos. 5,852,448, 6,151,032 and 6,157,390. Stroke-based font technology is suitable for low memory capacity and occasions where both high and low resolutions are required.
再另一种产生汉字字型的方法是采用图形基础的字型数据,其中文字的每个图形是分别被定义成可用来组成每字的字型数据,而每字是由至少一个图形组成,且每个图形是由至少一个笔划组成。图形基础的字型数据亦如笔划基础的定义一样是用关键点、宽度值、特征点、和曲线比例值来表现,有关图形基础字型的技术已经详述于美国专利案号6,501,475和6,661,417。Yet another method for generating Chinese character fonts is to use graphic-based font data, wherein each graphic of the text is defined as the font data that can be used to form each character, and each character is composed of at least one graphic, And each graphic is composed of at least one stroke. The font data of the graphic basis is also represented by key points, width values, feature points, and curve ratio values just like the stroke-based definition. The technology of the graphic-based font has been described in detail in US Patent Nos. 6,501,475 and 6,661,417.
如今随着面板显像技术的进步发展,文字已经可以用灰阶影像显示在手机、掌上型计算机以及其它电子仪器上,以前只能以黑白二位阶影像的显示变成可以用黑(0)到白(255)之间的256的灰阶影像来显示,由于用二位阶来显示文字的技术用于灰阶屏幕会造成文字影像品质变差,这种品质变差的现象对具有复杂给何形状的汉字的情况尤其显著,例如图1(D)所显示的中文字9,其中的方格12在灰阶显像时就如图1(E)所示,这个方格12包含四个像素16a-16d,参看其中的16b,它包含一占据文字9的部份区域A1以及没有占据文字9的区域A2,用传统的技术来产生16b的灰阶值是用下式计算:Nowadays, with the progress and development of panel display technology, text can be displayed on mobile phones, palmtop computers and other electronic devices with grayscale images. Previously, only black and white two-level images can be displayed in black(0) 256 to white (255) gray-scale images to display, because the technology of displaying characters with two levels is used in gray-scale screens, the quality of text and images will deteriorate. This phenomenon of poor quality has complex implications The situation of Chinese characters of any shape is particularly obvious, such as the Chinese character 9 shown in Figure 1(D), the
灰阶值=(A1×黑+A2×白)/(A1+A2) …(1)Gray scale value = (A1×black+A2×white)/(A1+A2) …(1)
在以下的叙述里,方程式(1)称为“灰阶值计算式”,图1(A)示出用灰阶值计算式运算后的文字10显示,其文字10的笔划20和笔划22的部份显示如图1(B)所示,图1(B)示出(4×4)像素于18a-18d的四列以表示笔划20和笔划22的灰阶值,如图标,笔划20占有像素列18a的50%下半部以及像素列18b的50%上半部,同样地,笔划22占有像素列18c的50%下半部以及像素列18d的50%上半部,据此,这四列18a-18d的灰阶值皆有如下式计算所得相同的灰阶值:In the following narration, equation (1) is called "gray scale value calculation formula", and Fig. 1 (A) shows the
灰阶值=0.5×黑+0.5×白 …(2)Gray scale value = 0.5×black+0.5×white …(2)
计算结果使得这四列18a-18d是用同一灰阶值来整个涂满,于是形成分不出是由二个笔划组成的区块。图1(C)示出用传统技术显示图1(A)文字10的结果,可以看出这种将笔划混成一块的灰阶影像确实使得文字显示品质严重变差。The result of the calculation makes the four
综上所述,开发一种有别于传统技术的系统、方法以及计算机可读取媒介装置可同时来显示高品质的灰阶及二阶的字型技术是被渴望的一项需求。To sum up, it is a desired demand to develop a system, method and computer-readable medium device that can simultaneously display high-quality gray scale and two-level font technology different from the traditional technology.
发明内容Contents of the invention
本发明的目的在于,提供一种边影导向的灰阶字型产生法、系统、以及计算机可读取媒介装置,其可同时来显示高品质的灰阶及二阶的字型。The object of the present invention is to provide an edge-oriented grayscale font generation method, system, and computer-readable medium device, which can simultaneously display high-quality grayscale and second-level fonts.
本发明提供一种系统、方法以及计算机可读取媒介装置,用以产生边影导向的灰阶字型影像,取得高品质的字型显像于点矩阵画面上以及灰阶影像画面上。The present invention provides a system, method and computer-readable medium device for generating edge shadow-oriented gray-scale font images to obtain high-quality font images on dot matrix screens and gray-scale image screens.
根据本发明的一项揭露,本发明提供一种方法用来定义(产生)一组边影导向表现的基本笔划集,并据以建造文字集里的文字成为边影导向的的字型数据。这种方法首先撷取文字集里的每个文字,一个文字包含一个或多个笔划,有些相似拓朴形状的笔划组合成不同文字的笔划,因此就构成许多的文字形状,根据美国专利案号5,852,448、6,151,032和6,157,390的描述,一群相似拓朴形状的笔划是采用一个基本笔划的定义来表现这群相似笔划,换言之,所有文字集里所有的笔划是由至少一个基本笔划来表现,每个基本笔划是如前述美国专利案所述,由关键点、宽度值、特征点和曲线比例值定义表现相似笔划的生成过程。According to a disclosure of the present invention, the present invention provides a method for defining (generating) a set of basic stroke sets for edge-shade-oriented representation, and constructing characters in the character set as edge-shade-oriented font data. This method first extracts each character in the character set. A character contains one or more strokes. Some strokes with similar topological shapes are combined into strokes of different characters, thus forming many character shapes. According to US Patent No. In the descriptions of 5,852,448, 6,151,032 and 6,157,390, a group of strokes with similar topological shapes is represented by the definition of a basic stroke. In other words, all strokes in all text sets are represented by at least one basic stroke, and each basic Strokes are defined by key points, width values, feature points, and curve scale values as described in the aforementioned US patents to generate similarly behaving strokes.
字型设计师在定义基本笔划时,可以指定边影导向区域码来定义基本笔划的部份区域应进行计算灰阶值(亦即基本笔划在生成笔划时,该笔划的部份区域涵盖了由方程式(1)所计算出的像素)。例如边影区域码可能定义一平行笔划的上半部或下半部应进行计算灰阶值,这样被定义的上半部区域(或下半部区域)就称为一个边影区域。字型设计师选一适当的边影区域码定义于每一基本笔划里,使得由该基本笔划来生成的所有相似形状的笔划皆会同样产生如定义所规范的边影区域,并能将被产生的边影区域呈现于灰阶画面上。本发明的一项揭露乃是在基本笔划的定义中指定边影区域码,就已经自动指定所有对应的相似笔划的边影区域。此后,字型设计师就可观测整个被生成文字集里的所有笔划显示在灰阶画面的效果。如果第一次尝试的效果不如想象中的预期,那么字型设计师可以再重新调整边影区域范围于基本笔划的定义里;一旦效果被确认满意后,就可将边影导向表现的基本笔划的数据储存起来供组字使用。When the font designer defines the basic stroke, he can specify the area code of the edge guide to define the part of the basic stroke that should calculate the grayscale value (that is, when the basic stroke generates a stroke, the part of the stroke covered by the pixels calculated by equation (1). For example, the edge shadow area code may define that the upper half or the lower half of a parallel stroke should calculate the gray scale value, so the defined upper half area (or lower half area) is called an edge shadow area. The font designer chooses an appropriate edge shadow area code and defines it in each basic stroke, so that all similar-shaped strokes generated by the basic stroke will also produce the edge shadow area specified by the definition, and can be used The resulting fringe area appears on the grayscale image. One disclosure of the present invention is that specifying the shading area code in the definition of a basic stroke automatically specifies the shading areas of all corresponding similar strokes. Afterwards, the font designer can observe the effect of all the strokes in the entire generated text set displayed on the grayscale screen. If the effect of the first attempt is not as expected, then the font designer can re-adjust the range of the edge shadow area in the definition of the basic stroke; once the effect is confirmed to be satisfactory, the edge shadow can be directed to the basic stroke of the expression The data stored for group word use.
根据本发明的一项观点本方法包含采用计算机图形的人机界面工具,并透过适当的影像分析的技术,于步骤中指引从事边影导向表现的基本策划的建造。据此观点,本发明亦提供-计算机图形的人机界面工具以及-计算机可读取媒介装置包含提供各项指令完成本方法的各项揭露。According to an aspect of the invention the method comprises the use of computer graphics human-machine interface tools and, through appropriate image analysis techniques, guiding in steps the construction of a basic plan for edge-oriented representations. From this point of view, the present invention also provides - a computer graphics man-machine interface tool and - a computer-readable medium device including various disclosures providing various instructions to implement the method.
根据本发明的另一项观点,本发明提供一种方法来呈现以边影导向表现的文字。每一个文字是由一个或多个笔划组成,且每个笔划是由关键点、宽度值、特征点、曲线比值,以及一个如前述的边影区域码。对于每一个形成文字的笔划,本方法是根据关键点、宽度值、特征点、和曲线比例值决定笔划的外图形状及坐标位置,而指定于笔划定义里的一个边影区域码是用来决定笔划的边影区域投射在各个像素所占的面积,面积的大小决定了像素的灰阶值,最后,本方法乃是根据这些被决定的灰阶值来呈现各个画面上的像素值。According to another aspect of the present invention, the present invention provides a method for presenting characters represented by an edge shadow guide. Each character is composed of one or more strokes, and each stroke is composed of key points, width values, feature points, curve ratios, and an edge shadow area code as described above. For each stroke that forms characters, this method is to determine the outer figure shape and coordinate position of the stroke according to the key point, width value, feature point, and curve ratio value, and an edge shadow area code specified in the stroke definition is used to Determine the area occupied by each pixel projected by the side shadow area of the stroke, and the size of the area determines the grayscale value of the pixel. Finally, this method presents the pixel value on each screen according to these determined grayscale values.
本发明还提供一种反异化方法于减缓锯齿状影像的异化现象的产生,反异化方法涉及分析每一像素周遭的影像拓朴结构,并依照分析后的拓朴结构选一预先定义的加权值矩阵计算像素平滑化的动作以产生最佳的反异化效果,这些被预先选定的加权值矩阵为计算像素平滑化取得反异化像素值的规则依据。The present invention also provides an anti-alienation method for slowing down the alienation phenomenon of jagged images. The anti-alienation method involves analyzing the topological structure of the image around each pixel, and selecting a predefined weighted value according to the analyzed topological structure. The matrix calculates the action of pixel smoothing to produce the best anti-alienation effect, and these pre-selected weight matrixes are the rule basis for calculating pixel smoothing to obtain anti-alienation pixel values.
附图说明Description of drawings
为进一步说明本发明的具体技术内容,以下结合实施例及附图详细说明如后,其中:In order to further illustrate the specific technical content of the present invention, below in conjunction with embodiment and accompanying drawing detailed description as follows, wherein:
图1(A)-(E)是用图例示出采用传统二阶(黑白)点矩阵影像显示灰阶影像字型会遭遇到的困境。1(A)-(E) illustrate the difficulties encountered in displaying gray-scale image fonts by using traditional two-level (black and white) dot matrix images.
图2示出用以实施本发明方法的系统或图形人机界面工具的方块图。Figure 2 shows a block diagram of a system or graphical human-machine interface tool for implementing the method of the present invention.
图3(A)-(C)示出本发明所揭露的一采用关键点,宽度值特征点等定义基本笔划及其边影码的范例。3(A)-(C) show an example of using key points, width value feature points, etc. to define basic strokes and their edge shadow codes disclosed by the present invention.
图4为本发明所揭露的一定义边影导向表现灰阶影像字型方法的流程图。FIG. 4 is a flow chart of a method for defining an edge-guided representation of a grayscale image font disclosed in the present invention.
图5为本发明所揭露的-显示边影导向表现灰阶影像字型方法的流程图。FIG. 5 is a flow chart of a method for displaying gray scale image fonts by displaying an edge shadow guide disclosed in the present invention.
图6(A)-(D)示出本发明所揭露的一用于降低形成锯齿边灰阶影像字型的反异化方法。6(A)-(D) show an anti-alienation method for reducing the grayscale image fonts formed by jagged edges disclosed by the present invention.
具体实施方式Detailed ways
最佳实施例best practice
图2示出实施本发明方法的典型的计算环境,其中有-包括显示仪27及印表仪28的通用数字计算机26,用以实现本发明的各种方法。显示仪28,印表仪28,以及其它输出仪(如屏幕画面显示器和打印机等)可以显像、印出、以及输出本发明方法所产生的字型。其它为此技术所熟知的型式的计算系统,例如网络或主机系统亦可以用来实施本发明方法。Figure 2 shows a typical computing environment for implementing the method of the present invention, wherein there is a general-purpose
以下所述本发明用于定义或产生文字所含的笔划,亦可被了解为定义或产生文字所含的图形,如发明背景所述,图形为构成文字的单元,此单元由一个或多个笔划组成。在本发明里不管是笔划或图形为基础,两者皆是由关键点、宽度值、特征点、以及曲线比例值加予定义,且用这些定义的基本笔划或基本图形来决定字形数据以及产生字型,因此若不会有混淆的顾虑,此后所述“笔划”涵盖笔划和图形二种。The invention described below is used to define or generate the strokes contained in the characters, and can also be understood as defining or generating the graphics contained in the characters. As described in the background of the invention, a graph is a unit that constitutes a character, and this unit consists of one or more Composition of strokes. In the present invention, no matter it is based on strokes or graphics, both are defined by key points, width values, feature points, and curve ratio values, and use these defined basic strokes or basic graphics to determine font data and generate Therefore, if there is no concern of confusion, the "stroke" mentioned hereafter covers both strokes and graphics.
图3(A)示出-基本笔划30,它是由关键点(K1和K2),宽度值(W1),特征点(f1,f2,f3,和f4),以及曲线比例值(未示出)所定义,如美国专利案号5,852,448,6,151,032,和6,157,390所述,汉字的特性之一是很多字可共同拥有很多的比划,换言之,相似笔划可用于很多字里,例如图3(A)所示的水平笔划30可以用在很多字里也可以重复用在同一字里,例如图1(A)文字10里的笔划20和22。且如上述专利案所述,一组相似笔划群可用-基本笔划来代表其拓朴形状,每一基本笔划是首先由关键点和宽度值加予定义。Fig. 3 (A) shows-
关键点(K1和K2)通常被选为在基本笔划的在线或弯曲处或弯曲处的切线交点,始得移动关键点就可以变基本笔划的外形,以产生各式各样和它相似的笔划,宽度值(W1)通常被选在基本笔划里的二点间的距离,使得改变宽度值亦可产生各式各样不同粗细的相似笔划。每个基本笔划皆有一些方程式来表示怎样从关键点及宽度值决定特征点,例如图3(A),那些决定特征点(f1,f2,f3,和f4)的方程式为:The key points (K1 and K2) are usually selected as the tangent intersection points on the line or bend or bend of the basic stroke, and the shape of the basic stroke can be changed by moving the key point to produce a variety of strokes similar to it , the width value (W1) is usually selected as the distance between two points in the basic stroke, so that changing the width value can also produce a variety of similar strokes with different thicknesses. Each basic stroke has some equations to represent how to determine the feature points from the key points and width values, such as Figure 3(A), the equations for determining the feature points (f1, f2, f3, and f4) are:
f1=K1+W1/2f1=K1+W1/2
f2=K1-W1/2f2=K1-W1/2
f3=K2+W1/2f3=K2+W1/2
f4=K2-W1/2 ------(3)f4=K2-W1/2 ------(3)
因此,特征点是经由预先定义它和关键点以及宽度值的空间关系所决定,如图所示,特征点是选在基本笔划的外图形状上正转换切线或曲率方向处。更且,每个基本笔划亦也一些预先定义的曲线比例值,它们是根据解像度的层级所预先建造的数值群,用以产生相邻二个特征点之间在不同解像度时的曲线形状,有关树状结构的曲线比例值的建造是如上述专利案所描述。Therefore, the feature point is determined by pre-defining its spatial relationship with the key point and the width value. As shown in the figure, the feature point is selected at the position where the tangent or curvature direction is transformed on the outer shape of the basic stroke. Moreover, each basic stroke also has some predefined curve ratio values, which are pre-built numerical groups according to the resolution level, and are used to generate the curve shape between two adjacent feature points at different resolutions. The construction of the tree-structured curve scale values is as described in the aforementioned patent.
每个基本笔划是用一指定的笔划数目来确认,每个被定义的基本笔划可由移动关键点以及改变宽度值来定义那些对应它的相似笔划群,一旦关键点被移动以及宽度值被改变后,就会那些预存的方程式计算出新的特征点位置,并经由预存的树状结构的曲线比例值计算出相邻二个新特征点间新的曲线形状于各个不同解像度的层级里。这种产生相似笔划的过程已经详述于上述专利案里。Each basic stroke is confirmed by a specified number of strokes. Each defined basic stroke can be defined by moving the key point and changing the width value to define those similar stroke groups corresponding to it. Once the key point is moved and the width value is changed. , calculate the new feature point position with those pre-stored equations, and calculate the new curve shape between two adjacent new feature points in each level of different resolutions through the pre-stored tree structure curve ratio value. This process of generating similar strokes has been described in detail in the aforementioned patent case.
如前述发明背景所述,当上述笔划被定义成显像于二位阶的点矩阵影像画面用来显像于灰阶影像画面时,就会产生品质变差的现象,所以,根据本发明的一项揭露,每个基本笔划(以及因此基本比划所生成的相似笔划)也增加了一项指定边影区域码来定义在笔划内产生灰阶边影区域的方式。As mentioned above in the background of the invention, when the above-mentioned strokes are defined to be displayed on a two-level dot matrix image frame and used to be displayed on a grayscale image frame, the quality will deteriorate. Therefore, according to the present invention It is disclosed that each basic stroke (and thus similar strokes generated by the basic stroke) is also added with a specified edge shadow area code to define the way to generate grayscale edge shadow areas within the stroke.
图3(B)示出分别指定边影区域码“10”和“01”于二笔划34和36里,一个边影区域码用来定义在每个笔划里的灰阶边影区域,当此区域投影到灰阶影像画面时会根据其落在笔划里的格子面积决定此格子像素的灰阶值,例如笔划34指定-边影区域码“10”,表示其上半部,34a是由点(K1,f1,f3,f2)所围成的边影区域,且由其被指定的灰阶值来计算其所座落格子的像素值。换言之,边影区域亦是由关键点、宽度值、特征点、以及曲线比例值所围成的部份笔划区域,另外属于下半部的34b不是一个边影区域,且被调整为黑点(不会造成其像素格子成为灰值)。笔划36被指定一边影区域码“01”,在本例里意指其上半部36a不是边影区域且被调整为黑点,而下半部36b是由点群(k、k2、f4、f2)所围成之边影区域,当被显像时需计算其上像素格子的灰阶值。对熟悉本技术人士而言,上述边影区域码仅是其中一个范例,事实上边影区域码系根据基本笔划形状及它在字型产生上之需求而有多样的定义方式。仅是为了目前的描述用,在每一笔划上所指定之边影区域码意指笔划内部的部份区块需要去计算落在其上的像素的灰值,每个笔划的边影区域码是被储存于笔划的身份码(笔划数目或第几个笔划)里。Fig. 3 (B) shows to designate the edge shadow area code " 10 " and " 01 " in two
图3(C)出示图1(A)的文字10里的二个笔划20和22,且它们各别皆有一边影区域码“10”。如图3(B)所示,当影像时会有四个像素列18a-18d座落其上。由于每个笔划的边影区域码“10”在显像时会变成灰阶值而使得这二个笔划在显像时会如标示39所示,它们在视觉上是两个被区隔的笔划。产生这种结果是因为下半部非边影区域的影像是采用指定的灰阶值,例如指定其灰阶值为白色,所以,采用适当定义边影区域导向所表现的笔划来组合文字,就可以显示平滑化的灰阶影像字型,比如图1(A)所示文字10的二个笔划20和22混迭在一起的现象就可以由定义边影区域导向的基本笔划的表现来避免掉。FIG. 3(C) shows two
图4是定义一组带有边影导向表现的基本笔划的流程图,这些被定义后的基本笔划就用来定义文字的灰阶影像字型。如方块40所示,字型设计师显示一组文字集(显示在各种不同的点矩阵尺寸)供定义边影导向的参考用,基本上,一字型设计师是一图形设计家,其任务是创造字型数据库供商业用。在文字集的每个文字是由一个或多个笔划组成,且所有组成文字的笔划更可切分成群,每群包含一组相似笔划,每组相似笔划群可用一基本笔划来代表它们的拓朴形状的生成,基本笔划是用关键点、宽度值、特征点和曲线比例值为参数所定义的笔形生成的程序。Fig. 4 is a flow chart of defining a group of basic strokes with edge-shading-guided performance, and these defined basic strokes are used to define the grayscale image font of the text. As shown in block 40, the font designer displays a set of glyphs (displayed at various dot matrix sizes) for reference in defining edge shadow guides. Basically, a font designer is a graphic designer whose The task is to create a font database for commercial use. Each character in the character set is composed of one or more strokes, and all the strokes that make up the characters can be divided into groups, each group contains a group of similar strokes, and each group of similar strokes can be represented by a basic stroke For the generation of topological shapes, the basic stroke is a program for generating strokes defined by parameters using key points, width values, feature points, and curve ratio values.
如方块42所示,字型设计师将每个基本笔划定义成边影导向的表现。字型设计师经由视觉确认每个基本笔划里指定一边影区域的最佳定义,例如观测一个笔划和另外相接或相邻笔划之间的状况来指定边影区域以避免它们在低解像时会产生重迭的现象,然后再指定边影区域码给该基本笔划,在基本笔划的定义里被指定的边影区域码于组字时就会呈现在对应此基本笔划的各个相似笔划里。As shown in
如方块44所示,字型设计师将所有用边影导向表现的文字显示出来,每一文字的笔划皆由其边影区域码决定其灰阶影像的显像;换言之,仅有边影区域所座落的像素格子才会计算该些像素的灰值。As shown in
如方块46所示,字型设计师用其视觉观看所有被显示的灰阶显像的文字,若这些文字已经被适当地减建成灰阶字型,已经没有笔划被迭合在一起的现象时,就完成了本方法的灰阶字型的建造,否则再回到方块42重新对某些基本笔划定义成新的边影区域导向的表现,再如方块44所显示,由这些重新定义边影区域的基本笔划所生成的那些灰阶影像文字;再如方块46所示,字型设计师再观看这些灰阶影像文字的品质是否满意,反复这样的动作直至满意为止。As shown in
根据本发明的另一项观点,本发明提供一种显示以边影导向表现的灰阶影像文字的方法,图5示出这种方法的一种流程图,例如图5所示的方法可用于图4的方块4,图5所示的步骤是由一储存于计算机里的影像显示程序或引擎执行,以显示灰阶影像文字于灰阶画面的显示器上。According to another aspect of the present invention, the present invention provides a method for displaying gray-scale image characters represented by edge-shading guides. FIG. 5 shows a flow chart of this method. For example, the method shown in FIG. 5 can be used for
如方块52所示,这种方法是根据点矩阵尺寸建造一文字的扫瞄影像,例如图6(A)所示的一6×6点矩阵60,其中沿箭头67所示的为其一条扫瞄线,在范例说明中,一文字影像64将被显示于点矩阵60上。As shown in block 52, this method is to construct a scanned image of a character according to the size of the dot matrix, such as a 6×6 dot matrix 60 shown in FIG. Line, in the example description, a character image 64 will be displayed on the dot matrix 60 .
如图5方块54所示,对于点矩阵60里的每个像素,会有一个合适的演算式计划出边影导向表现的像素的灰值。例如方程式(1)用来计算每个像素的灰值,如方块59所示,这些被计算出的灰值就构成文字的灰阶影像。但是,依上述被计算出来的灰值直接用显示文字的灰阶影像会产生边缘呈锯齿状或异化的影像字型,因此也可以采用反异化的方法来降低锯齿状的突显,例如图5方块56和方块58所示的反异化方法。在影像图形的处理上有很多反异化方法被提出,本发明所提供如图6(B)所示的一种反异化方法,其中在3×3像素区70的九个像素分别各有如图5方块54所述被计算出来的灰值,而座落在像素区70的中心的P5是欲被重新计算其新的灰值的像素,P5的新灰值的计算是根据其周围的八个像素灰值依其加权多寡所形成的均匀混合结果,其计算式如下:As shown in block 54 of FIG. 5 , for each pixel in the dot matrix 60 , there will be an appropriate algorithm to plan the gray value of the pixel for the edge-shading-oriented representation. For example, equation (1) is used to calculate the gray value of each pixel, as shown in block 59 , and these calculated gray values constitute the grayscale image of the text. However, directly using the grayscale image of the displayed text based on the gray value calculated above will produce jagged or dissimilated image fonts. Therefore, anti-alienation methods can also be used to reduce the jagged highlights, such as the box in Figure 5 56 and the anti-alienation method shown in box 58. Many anti-alienation methods have been proposed in the processing of image graphics. The present invention provides an anti-alienation method as shown in FIG. The calculated gray value of the square 54, and the P5 located in the center of the pixel area 70 is the pixel to be recalculated to its new gray value, and the calculation of the new gray value of P5 is based on the surrounding eight pixels The uniform mixture result formed by the gray value according to its weighting, its calculation formula is as follows:
P5的新像素值=New pixel value of P5 =
其中Wi为像素I的加权值,且熟悉本技艺人士皆知矩阵w的加权值通常是呈高斯分布,亦即,若中心点的加权值最大,则其它离中心点的加权值是依高斯分布递减。Where Wi is the weighted value of pixel I, and those familiar with the art know that the weighted value of matrix w is usually Gaussian distribution, that is, if the weighted value of the center point is the largest, then the weighted values of other points away from the center are according to Gaussian distribution decrease.
传统的反异化方法是取-固定高斯分布的加权值矩阵而本发明的反异化方法是依据笔划的书写方向取不同的加权值矩阵分别计算P5。例如考虑的像素66和像素68座落于文字影像64(图6(A))的反异化计算方式就如图6(C)和图6(D)所示。The traditional anti-alienation method is to take a weighted value matrix of fixed Gaussian distribution, while the anti-alienated method of the present invention is to take different weighted value matrices according to the writing direction of the stroke to calculate P5 respectively. For example, the anti-alienation calculation method for the considered pixel 66 and pixel 68 located in the text image 64 (FIG. 6(A)) is shown in FIG. 6(C) and FIG. 6(D).
图6(C)考虑包围像素66的文字影像的3×3像素区,从计算最左及最右像素76和78的差值会得到如80所示的三类:零、正值、或负值的书写值,例如图6(C)所示的书写值为<0,+,+>,根据书写值就可以选出数个预复制的加权值矩阵的其中一个矩阵,例如选加权值矩阵W,(82),它是预制的加权值矩阵用来计算书写值<0,+,+>以产生最佳反异化效果。因此,中心位置的像素66是采用被选出的加权值矩阵w1(82)代入方程式(4)里计算出P5(像素66)的反异化的灰值。Figure 6(C) considers the 3×3 pixel area of the text image surrounding pixel 66, from the calculation of the difference between the leftmost and rightmost pixels 76 and 78, three categories as shown at 80 will be obtained: zero, positive value, or negative The writing value of the value, such as the writing value shown in Figure 6 (C) <0, +, +>, according to the writing value, one of the matrix of several pre-duplicated weighted value matrices can be selected, for example, the weighted value matrix is selected W, (82), which is a prefabricated weighted value matrix used to calculate written values <0, +, +> to produce the best anti-alienation effect. Therefore, the pixel 66 at the central position uses the selected weight value matrix w1 (82) to substitute into equation (4) to calculate the de-alienated gray value of P5 (pixel 66).
同样地,图6(D)考虑环绕像素68的3×3像素区,经计算像素列83a,83b,和83c后得到图6(D)的书写值8 4为<一,一,一>根据此书写值84于是选了复制的加权矩阵w2(86),用经代入方程式(4)里计算出p5(像素68)的反异化的灰值,以达到最佳的反异化效果。熟悉本技术的专业人士亦可了解到,加权值矩阵的元素亦可采用其它不同于本发明所揭露的数值,用于不同的书写值的状况里,也可产生同样的反异化效果。Similarly, Fig. 6(D) considers the 3×3 pixel area surrounding the pixel 68, and after calculating the pixel columns 83a, 83b, and 83c, the written value 84 of Fig. 6(D) is obtained as <one, one, one> according to The written value 84 then selects the duplicated weighting matrix w2 (86), and uses the de-alienated gray value of p5 (pixel 68) calculated by substituting it into the equation (4) to achieve the best de-alienated effect. Those skilled in the art can also understand that the elements of the weighting value matrix can also adopt other values different from those disclosed in the present invention, which can also produce the same anti-alienation effect when used in different situations of writing values.
本发明的各种方法可由-图形人机界面(GUI)的工具来实施,例如可用窗口为基础的操作系统的GUI工具,且一些方法里的一个或多个部骤亦可,透过影像方析的技巧自动完成。The various methods of the present invention can be implemented by a tool of a graphical human-machine interface (GUI), such as a GUI tool of a window-based operating system, and one or more steps in some methods can also be implemented through a video Analysis techniques are automatically completed.
一旦本发明的优先实施例已经披露且详述如上,其它类似或相当的想法及作法的修饰就很容易被略具本行业技能的人士所理解,本发明的权利请求范围包含本实施例以及其它类似的实施例。Once the preferred embodiment of the present invention has been disclosed and described in detail above, other similar or equivalent modifications of ideas and practices can be easily understood by those with a little skill in the industry. The claims of the present invention include this embodiment and other modifications. Similar examples.
Claims (19)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510103796 CN1936961A (en) | 2005-09-23 | 2005-09-23 | Edge-Shading Guided Grayscale Font Generation Method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510103796 CN1936961A (en) | 2005-09-23 | 2005-09-23 | Edge-Shading Guided Grayscale Font Generation Method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN1936961A true CN1936961A (en) | 2007-03-28 |
Family
ID=37954449
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200510103796 Pending CN1936961A (en) | 2005-09-23 | 2005-09-23 | Edge-Shading Guided Grayscale Font Generation Method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1936961A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101393643B (en) * | 2007-09-21 | 2012-01-18 | 华东师范大学 | Computer stroke deforming system and method |
| CN102456231A (en) * | 2010-10-19 | 2012-05-16 | 威锋数位开发股份有限公司 | Method and system for converting target bitmap font into target outline font |
| TWI875632B (en) * | 2024-07-15 | 2025-03-01 | 威鋒數位開發股份有限公司 | Automatically adjusting strokes method, apparatus, and non-transitory computer-readable storage media |
-
2005
- 2005-09-23 CN CN 200510103796 patent/CN1936961A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101393643B (en) * | 2007-09-21 | 2012-01-18 | 华东师范大学 | Computer stroke deforming system and method |
| CN102456231A (en) * | 2010-10-19 | 2012-05-16 | 威锋数位开发股份有限公司 | Method and system for converting target bitmap font into target outline font |
| TWI875632B (en) * | 2024-07-15 | 2025-03-01 | 威鋒數位開發股份有限公司 | Automatically adjusting strokes method, apparatus, and non-transitory computer-readable storage media |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6501475B1 (en) | Glyph-based outline font generation independent of resolution | |
| EP0786757B1 (en) | Adjusting contrast in antialiasing | |
| US6157390A (en) | Stroke-based font generation | |
| US8854375B2 (en) | Method and system for generating gray dot-matrix font from binary dot-matrix font | |
| US6661417B1 (en) | System and method for converting an outline font into a glyph-based font | |
| CN101676988B (en) | Method for displaying the quality of small characters in stroke-based Chinese fonts | |
| US8711372B2 (en) | Techniques for image segment accumulation in document rendering | |
| JP2013061660A (en) | Method for generating stroke-based font character for low-resolution display | |
| CN112232022B (en) | Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts | |
| CN1998023A (en) | Method for drawing regions of combined glyphs | |
| JPH05143742A (en) | Vector image drawing device | |
| JP4162670B2 (en) | How to generate a silhouetted gray font | |
| CN102651137A (en) | Algebraic curve rasterization method based on pixel precision | |
| CN1936961A (en) | Edge-Shading Guided Grayscale Font Generation Method | |
| CN1099643C (en) | Font generating method and computor medium | |
| JP2012108825A (en) | Information processing device, information processing method and program | |
| TWI282947B (en) | Silhouette oriented gray font generation | |
| TWI231457B (en) | System and method for converting an outline font into a glyph-based font | |
| JP3448606B2 (en) | Method and apparatus for generating stroke-based characters in full resolution space | |
| CN102074004A (en) | Method and device for determining type of barrier of spatial entity | |
| HK1101723A (en) | Silhouette-oriented gray font generation | |
| JP5492911B2 (en) | Character creation method and character creation device | |
| TWI409800B (en) | About rasterizing asian characters based on stroke font representation | |
| JP2012173632A (en) | Method and system for generating gray dot-matrix font from binary dot-matrix font | |
| KR20250095630A (en) | Display device, method of displaying handwriting, and method of determining handwriting outline |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1101723 Country of ref document: HK |
|
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| REG | Reference to a national code |
Ref country code: HK Ref legal event code: WD Ref document number: 1101723 Country of ref document: HK |