[go: up one dir, main page]

CN112232022B - Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts - Google Patents

Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts Download PDF

Info

Publication number
CN112232022B
CN112232022B CN202011104155.1A CN202011104155A CN112232022B CN 112232022 B CN112232022 B CN 112232022B CN 202011104155 A CN202011104155 A CN 202011104155A CN 112232022 B CN112232022 B CN 112232022B
Authority
CN
China
Prior art keywords
glyph
skeleton
outline
chinese character
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011104155.1A
Other languages
Chinese (zh)
Other versions
CN112232022A (en
Inventor
殷叶航
陈泽文
赵延吉
伍文棋
张瑞
张克俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202011104155.1A priority Critical patent/CN112232022B/en
Publication of CN112232022A publication Critical patent/CN112232022A/en
Application granted granted Critical
Publication of CN112232022B publication Critical patent/CN112232022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本发明公开了一种动态调整参数的汉字字形与布局设计方法和系统,包括:(1)针对每个汉字,确定字形图像与字形矢量轮廓对应关系,并提取字形图像中的字骨架,对字骨架剪枝后构建骨架点集,将字形轮廓上的轮廓节点与最近的骨架点匹配,被匹配的骨架点为骨架关键点;(2)构建矢量字形模型包括以下组成信息:骨架关键点集,轮廓节点相对于匹配骨架关键点的第一偏移向量,轮廓节点之间纵横对齐信息,轮廓节点所属闭合轮廓信息,字形面积占据字身框的比例;(3)通过可视化的实时输入参数,可以基于该矢量字形模型实现对汉字结构、笔形特点的调整以及汉字作品布局的设计,满足用户需求。

The invention discloses a Chinese character glyph and layout design method and system for dynamically adjusting parameters, which includes: (1) for each Chinese character, determine the corresponding relationship between the glyph image and the glyph vector outline, extract the character skeleton in the glyph image, and compare the character After skeleton pruning, a skeleton point set is constructed, and the contour nodes on the glyph outline are matched with the nearest skeleton points. The matched skeleton points are skeleton key points; (2) The construction of the vector glyph model includes the following composition information: skeleton key point set, The first offset vector of the outline node relative to the matching skeleton key point, the vertical and horizontal alignment information between the outline nodes, the closed outline information to which the outline node belongs, and the proportion of the glyph area occupying the font body frame; (3) Through visual real-time input parameters, you can Based on this vector glyph model, the adjustment of Chinese character structure and stroke characteristics and the design of the layout of Chinese character works are realized to meet user needs.

Description

动态调整参数的汉字字形与布局设计方法和系统Chinese character glyph and layout design method and system for dynamically adjusting parameters

技术领域Technical field

本发明属于人工智能艺术和计算机辅助设计技术领域,具体涉及一种动态调整参数的汉字字形与布局设计方法和系统。The invention belongs to the technical fields of artificial intelligence art and computer-aided design, and specifically relates to a Chinese character glyph and layout design method and system for dynamically adjusting parameters.

背景技术Background technique

书法、篆刻等汉字艺术形式与汉字字体设计作品已广泛使用手机、电脑等呈现,或经过数字化处理呈现在广告、书籍等印刷品上。然而,汉字艺术与设计作品在数字化环境中的创作与修改受到极大制约,往往需要设计者具备操作专业设计软件的知识,具有较低的可调整性与可定制性。近年产生的可变字体技术,能够满足终端用户对动态、可调整字体的需求,但要求字库设计具有极高工程水准,故难以在中文字体普及。修改与个性化定制书法、篆刻等汉字艺术与汉字字体设计作品方法仍十分不成熟。Chinese character art forms such as calligraphy and seal cutting, as well as Chinese character font design works, have been widely presented on mobile phones, computers, etc., or have been digitally processed and presented on advertisements, books and other printed matter. However, the creation and modification of Chinese character art and design works in the digital environment are greatly restricted, often requiring designers to have knowledge of operating professional design software, with low adjustability and customizability. The variable font technology produced in recent years can meet the needs of end users for dynamic and adjustable fonts, but it requires a very high engineering level in font design, so it is difficult to popularize Chinese fonts. The methods of modifying and customizing Chinese character arts such as calligraphy and seal cutting and Chinese character font design works are still very immature.

公布号为CN 107818544A的专利申请公开了一种字符缩放方法,公布号为CN105513006A的专利申请公开了一种TrueType字体轮廓粗细调整方法及装置。这两篇技术内容均是应用提取所得骨架信息实现字形形变方法,但是每个方法均是特定方式的改变,普适性不强,不能满足应用需求。The patent application with publication number CN 107818544A discloses a character scaling method, and the patent application with publication number CN105513006A discloses a TrueType font outline thickness adjustment method and device. Both of these technical contents use the extracted skeleton information to achieve glyph deformation methods. However, each method is a change in a specific way, is not universally applicable, and cannot meet application needs.

发明内容Contents of the invention

本发明的目的是提供一种动态调整参数的汉字字形与布局设计方法和系统,通过构建的矢量字形模型对汉字进行表示,方便用户对汉字字形和布局的设计。The purpose of the present invention is to provide a Chinese character glyph and layout design method and system that dynamically adjusts parameters, represents Chinese characters through a constructed vector glyph model, and facilitates users to design Chinese character glyphs and layouts.

为实现上述发明目的,本发明提供以下技术方案:In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:

一种动态调整参数的汉字字形与布局设计方法,包括以下步骤:A Chinese character glyph and layout design method that dynamically adjusts parameters, including the following steps:

(1)预处理汉字字形,包括以矢量形式存储的字形矢量轮廓和以图像存储的字形图像,使每个汉字字形都具有相匹配的图像与矢量两种表示,并提取字形图像中的字骨架,对字骨架剪枝后构建骨架点集,将字形轮廓上的轮廓节点与最近的骨架点匹配,被匹配的骨架点为骨架关键点;(1) Preprocess Chinese character glyphs, including glyph vector outlines stored in vector form and glyph images stored as images, so that each Chinese character glyph has a matching image and vector representation, and extract the character skeleton in the glyph image , build a skeleton point set after pruning the character skeleton, match the contour nodes on the glyph outline with the nearest skeleton point, and the matched skeleton point is the skeleton key point;

(2)构建矢量字形模型,矢量字形模型包括以下组成信息:骨架关键点集,轮廓节点相对于匹配骨架关键点的第一偏移向量,轮廓节点之间纵横对齐信息,轮廓节点所属闭合轮廓信息,字形面积占据字身框的比例;(2) Construct a vector glyph model. The vector glyph model includes the following composition information: skeleton key point set, the first offset vector of the contour node relative to the matching skeleton key point, vertical and horizontal alignment information between contour nodes, and closed contour information to which the contour node belongs. , the ratio of the font area to the font body frame;

(3)字形与布局设计,包括依据矢量字形模型,通过对骨架关键点做参数变换来改变汉字结构;对第一偏移向量及轮廓点排列方式与坐标进行参数变换来改变汉字笔形特点,轮廓节点纵横对齐关系和轮廓节点所属闭合轮廓信息将辅助字形模型向矢量字形的还原,以保持字形原有的轮廓间关系与轮廓节点对齐关系;依据字形面积占据字身框的比例设计汉字作品布局。(3) Glyph and layout design, including changing the structure of Chinese characters through parameter transformation of skeleton key points based on the vector glyph model; performing parameter transformation on the first offset vector and outline point arrangement and coordinates to change the stroke characteristics and outline of Chinese characters The vertical and horizontal alignment relationship of nodes and the closed outline information of the outline nodes will assist the restoration of the glyph model to vector glyphs to maintain the original relationship between the outlines of the glyphs and the alignment relationship of the outline nodes; design the layout of Chinese character works based on the proportion of the glyph area occupying the font body frame.

优选地,所述字形矢量轮廓采用二阶或三阶贝塞尔样条表示时,预处理汉字过程还包括:确定手柄点与最邻近的轮廓节点的关联关系;Preferably, when the glyph vector outline is represented by a second-order or third-order Bessel spline, the preprocessing process of Chinese characters also includes: determining the association between the handle point and the nearest outline node;

矢量字形模型还包括以下组成信息:手柄点与轮廓节点的关联关系,手柄点相对关联轮廓节点的第二偏移向量,手柄点之间纵横对齐信息,手柄点与轮廓节点之间纵横对齐信息;The vector glyph model also includes the following component information: the association between the handle point and the outline node, the second offset vector of the handle point relative to the associated outline node, the vertical and horizontal alignment information between the handle points, and the vertical and horizontal alignment information between the handle point and the outline node;

字形与布局设计过程还包括:通过对第二偏移向量做参数变换来改变汉字结构,通过手柄点纵横对齐信息、手柄点与轮廓节点间纵横对齐关系,保持字形原有的手柄点与轮廓节点对齐关系,对第二偏移向量及轮廓点排列方式与坐标进行参数变换来改变汉字笔形特点。The glyph and layout design process also includes: changing the structure of Chinese characters through parameter transformation of the second offset vector, and maintaining the original handle points and outline nodes of the glyph through the vertical and horizontal alignment information of the handle points and the vertical and horizontal alignment relationships between the handle points and outline nodes. Alignment relationship, parameter transformation is performed on the second offset vector and outline point arrangement and coordinates to change the stroke characteristics of Chinese characters.

一种动态交互式调整参数的汉字字形与布局设计系统,包括:A Chinese character glyph and layout design system that dynamically and interactively adjusts parameters, including:

字形模型读取单元,用于读取上述动态调整参数的汉字字形与布局设计方法产生的矢量字形模型;A glyph model reading unit, used to read the vector glyph model generated by the above dynamically adjusted parameter Chinese character glyph and layout design method;

字形与布局设计单元,用于接收用户实时输入的参数,依据该参数采用上述动态调整参数的汉字字形与布局设计方法中来实现改变汉字结构、改变汉字笔形特点和设计汉字布局;The glyph and layout design unit is used to receive real-time input parameters from the user, and use the above-mentioned Chinese character glyph and layout design method of dynamically adjusting parameters based on the parameters to change the structure of Chinese characters, change the characteristics of Chinese character strokes, and design the layout of Chinese characters;

可视化单元,用于实时可视化字形与布局设计单元的设计结果;The visualization unit is used to visualize the design results of the glyph and layout design unit in real time;

保存导出单元:保存或导出字形与布局设计单元的设计结果。Save export unit: Save or export the design results of glyph and layout design units.

与现有技术相比,本发明具有的有益效果为:Compared with the prior art, the beneficial effects of the present invention are:

本发明提供的一种动态调整参数的汉字字形与布局设计方法和系统,通过将汉字抽象成矢量字形模型进行表示,由于该矢量字形模型包含了全面的汉字字形信息,通过可视化的实时输入参数,可以基于该矢量字形模型实现对汉字结构、笔形特点的调整以及汉字作品布局的设计,满足用户需求。The invention provides a Chinese character glyph and layout design method and system that dynamically adjusts parameters by abstracting Chinese characters into a vector glyph model for representation. Since the vector glyph model contains comprehensive Chinese character glyph information, through visual real-time input parameters, Based on this vector glyph model, the adjustment of Chinese character structure and stroke characteristics and the design of the layout of Chinese character works can be realized to meet user needs.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动前提下,还可以根据这些附图获得其他附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.

图1是实施例提供的动态调整参数的汉字字形与布局设计方法的流程图:Figure 1 is a flow chart of a Chinese character glyph and layout design method for dynamically adjusting parameters provided by the embodiment:

图2是实施例提供的汉字“東”的术语解释示意图;Figure 2 is a schematic diagram for explaining the terminology of the Chinese character "东" provided by the embodiment;

图3(a)和图3(b)是实施例提供的汉字中宫改变前后的示意图;Figure 3(a) and Figure 3(b) are schematic diagrams before and after the change of palace in Chinese characters provided by the embodiment;

图4是实施例提供的汉字东重心改变示意图;Figure 4 is a schematic diagram of changing the east center of gravity of Chinese characters provided by the embodiment;

图5(a)、图5(b)以及图5(c)是实施例提供的不同布局参数设计的汉字作品布局的示意图;Figure 5(a), Figure 5(b) and Figure 5(c) are schematic diagrams of the layout of Chinese character works designed with different layout parameters provided by the embodiment;

图6是实施例提供的动态交互式调整参数的汉字字形与布局设计系统的结构示意图。Figure 6 is a schematic structural diagram of a Chinese character glyph and layout design system for dynamically interactive parameter adjustment provided by the embodiment.

具体实施方式Detailed ways

为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不限定本发明的保护范围。In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention and do not limit the scope of the present invention.

术语说明:Terminology:

hit-or-miss:图像形态学中使用两种结构元(structuring element)检测可以用第一个结构元完全覆盖以及用第二个结构元完全不覆盖的像素,常用于模式检测等应用。Hit-or-miss: In image morphology, two structuring elements are used to detect pixels that can be completely covered by the first structuring element and not covered by the second structuring element. They are often used in applications such as pattern detection.

中宫:指汉字结构向中心收紧或放松程度。Zhonggong: refers to the degree to which the Chinese character structure tightens or relaxes toward the center.

重心:指字体视觉中心点的高低。Center of gravity: refers to the height of the visual center point of the font.

手柄点:(Bezier handles,off-points)指贝塞尔曲线上不在曲线上,控制曲线弯曲的点。Handle points: (Bezier handles, off-points) refer to the points on the Bezier curve that are not on the curve and control the bending of the curve.

图2是实施例提供的汉字“東”的术语解释示意图。如图2所示,细线条为字形轮廓,粗线条为骨架线,细线条的方框为轮廓节点,细线条的三角为轮廓起始节点,粗线条上的星号为骨架关键点,细线条外的圆圈为手柄点。Figure 2 is a schematic diagram for explaining the terminology of the Chinese character "东" provided by the embodiment. As shown in Figure 2, the thin lines are the glyph outlines, the thick lines are the skeleton lines, the boxes with the thin lines are the outline nodes, the triangles with the thin lines are the starting nodes of the outline, the asterisks on the thick lines are the key points of the skeleton, and the ones outside the thin lines are the key points of the skeleton. Circles are handle points.

图1是实施例提供的动态调整参数的汉字字形与布局设计方法的流程图。如图1所示,该汉字字形与布局设计方法包括以下步骤:Figure 1 is a flow chart of a Chinese character glyph and layout design method for dynamically adjusting parameters provided by the embodiment. As shown in Figure 1, the Chinese character glyph and layout design method includes the following steps:

步骤1:预处理汉字字形Step 1: Preprocess Chinese character glyphs

本实施例中,汉字可以来自于字库,对于来自于字库的汉字,直接读取汉字的字形矢量轮廓,然后栅格化字形矢量轮廓将字形轮廓转换为字形图像,并确定字形图像与字形矢量轮廓对应关系;汉字还可以来自于书法与篆刻等字形图像,针对这类,直接读取汉字的字形图像并将字形图像转换为矢量轮廓,同时确定字形图像与字形矢量轮廓对应关系,也就是字形图像坐标与字形矢量坐标的换算关系,该换算关系被保留以保证二者的坐标关系可相互转化。其中,矢量轮廓可以采用二阶或三阶贝塞尔样条表示,或采用多边形表示。In this embodiment, Chinese characters can come from a font library. For Chinese characters from a font library, the glyph vector outline of the Chinese character is directly read, and then the glyph vector outline is rasterized to convert the glyph outline into a glyph image, and the glyph image and glyph vector outline are determined. Correspondence; Chinese characters can also come from glyph images such as calligraphy and seal cutting. For this type, the glyph image of the Chinese character is directly read and the glyph image is converted into a vector outline. At the same time, the corresponding relationship between the glyph image and the glyph vector outline is determined, that is, the glyph image. The conversion relationship between coordinates and glyph vector coordinates. This conversion relationship is retained to ensure that the coordinate relationships between the two can be converted into each other. Among them, the vector outline can be represented by a second-order or third-order Bessel spline, or by a polygon.

在获得字形图像的基础上,需要提取字形图像中的字骨架,并对字骨架剪枝后构建骨架点集,将字形轮廓上的轮廓节点与最近的骨架点匹配,被匹配的骨架点为骨架关键点。On the basis of obtaining the glyph image, it is necessary to extract the character skeleton in the glyph image, prune the character skeleton and construct a skeleton point set, match the contour nodes on the glyph outline with the nearest skeleton point, and the matched skeleton point is the skeleton key point.

本实施例中,可以采用图像形态学的细化算法与中轴算法从栅格化后的字形图像中提取字骨架。由于提取的字骨架会存在一些杂乱信息,因此还需要对字骨架进行剪枝,以使得字骨架整洁,具体地,可以采用以下方式对字骨架剪枝:In this embodiment, the image morphology thinning algorithm and the central axis algorithm can be used to extract the character skeleton from the rasterized glyph image. Since the extracted character skeleton will contain some messy information, the character skeleton also needs to be pruned to make the character skeleton clean. Specifically, the character skeleton can be pruned in the following ways:

方式一:基于中轴变换获得的平面上各点到轮廓边缘距离,剪除骨架上距离字形轮廓边缘较近的骨架点;或,Method 1: Based on the distance from each point on the plane to the outline edge obtained by the central axis transformation, prune the skeleton points on the skeleton that are closer to the edge of the glyph outline; or,

方式二:利用hit-or-miss方法查找骨架交点,腐蚀骨架交点,此时字骨架将变为没有交叉点的离散线段。查找过短的线段并剔除,以实现字形骨架剪枝。Method 2: Use the hit-or-miss method to find the skeleton intersection points and erode the skeleton intersection points. At this time, the character skeleton will become a discrete line segment without intersection points. Find line segments that are too short and eliminate them to achieve glyph skeleton pruning.

经过字骨架剪枝后字骨架上的点构建成骨架点集。基于该骨架点集,将字形轮廓上的轮廓节点与最近的骨架点匹配,被匹配的骨架点为骨架关键点。当字形矢量轮廓采用二阶或三阶贝塞尔样条表示时,还需要确定手柄点与最邻近的轮廓节点的关联关系,也就是要确定每个手柄点与哪个轮廓节点相连,该关联关系用于后续调整笔形特点。After character skeleton pruning, the points on the character skeleton are constructed into a skeleton point set. Based on the skeleton point set, the contour nodes on the glyph outline are matched with the nearest skeleton points, and the matched skeleton points are the skeleton key points. When the glyph vector outline is represented by a second-order or third-order Bessel spline, it is also necessary to determine the association between the handle point and the nearest outline node, that is, to determine which outline node each handle point is connected to. Used for subsequent adjustment of pen shape characteristics.

步骤2:构建矢量字形模型Step 2: Build the vector glyph model

基于步骤1中对汉字预处理的结果信息来构建矢量字形模型,该矢量字形模型具体可以包括:骨架关键点集,轮廓节点相对于匹配骨架关键点的第一偏移向量,轮廓节点之间纵横对齐信息,轮廓节点所属闭合轮廓信息,字形面积占据字身框的比例,当字形矢量轮廓采用贝塞尔样条表示时,该矢量字形模型还包括手柄点与轮廓节点的关联关系,手柄点相对关联轮廓节点的第二偏移向量,手柄点之间纵横对齐信息,手柄点与轮廓节点之间纵横对齐信息。Construct a vector glyph model based on the result information of Chinese character preprocessing in step 1. The vector glyph model may specifically include: a skeleton key point set, the first offset vector of the outline node relative to the matching skeleton key point, the vertical and horizontal lines between the outline nodes Alignment information, closed outline information of the outline node, and the proportion of the glyph area occupying the font body frame. When the glyph vector outline is represented by a Bessel spline, the vector glyph model also includes the relationship between the handle points and the outline nodes. The handle points are relative to each other. The second offset vector associated with the contour node, vertical and horizontal alignment information between handle points, and vertical and horizontal alignment information between handle points and contour nodes.

其中,骨架关键点集中骨架关键点表示了选取的关键点与轮廓节点一一对应关系,具体实施时,可以将骨架关键点集表示为二维点坐标的序列,用长度为2的数组列表存储表示。Among them, the skeleton key points in the skeleton key point set represent the one-to-one correspondence between the selected key points and the contour nodes. During specific implementation, the skeleton key point set can be expressed as a sequence of two-dimensional point coordinates and stored in an array list with a length of 2. express.

轮廓节点相对于匹配骨架关键点的第一偏移向量表示为二维向量的序列,具体实现为长度为2的数组列表;上述骨架关键点列表长度与第一偏移向量列表长度相同。The first offset vector of the outline node relative to the matching skeleton key point is represented as a sequence of two-dimensional vectors, and is specifically implemented as an array list with a length of 2; the length of the above skeleton key point list is the same as the length of the first offset vector list.

手柄点与轮廓节点的关联关系具体实现为一个列表,列表按手柄点顺序记录了与手柄点相关联的轮廓节点下标,这样就可以简单明确地表示手柄点与轮廓节点的关联关系。The relationship between handle points and contour nodes is specifically implemented as a list. The list records the subscripts of the contour nodes associated with the handle points in the order of the handle points, so that the relationship between the handle points and the contour nodes can be expressed simply and clearly.

手柄点相对关联轮廓节点的第二偏移向量表示为二维向量的序列,具体实现为长度为2的数组列表。The second offset vector of the handle point relative to the associated contour node is represented as a sequence of two-dimensional vectors, which is specifically implemented as an array list with a length of 2.

将轮廓节点之间纵横对齐信息、手柄点之间纵横对齐信息,手柄点与轮廓节点之间纵横对齐信息简称为轮廓节点、手柄点的纵横对齐信息,即记录了哪些节点(节点包括轮廓节点和手柄点)具有相同的横坐标或纵坐标;具体实现为两个列表,分别记录需要对齐横坐标或纵坐标的节点的编号,每个列表包含用字符串列表实现的点集序列,字符串指定了轮廓节点与手柄点的下标。The vertical and horizontal alignment information between contour nodes, the vertical and horizontal alignment information between handle points, and the vertical and horizontal alignment information between handle points and contour nodes are referred to as the vertical and horizontal alignment information of contour nodes and handle points, that is, which nodes (nodes include contour nodes and handle points) have the same abscissa or ordinate; the specific implementation is two lists, respectively recording the numbers of nodes that need to be aligned with the abscissa or ordinate. Each list contains a point set sequence implemented with a string list, and the string specifies The subscripts of contour nodes and handle points are specified.

轮廓节点所属闭合轮廓信息具体实现为一个列表,列表节点按顺序记录了轮廓节点所属闭合轮廓的下标。The closed contour information to which the contour node belongs is specifically implemented as a list, and the list node records the subscripts of the closed contour to which the contour node belongs in order.

字形面积占据字身框的比例是一个范围在(0,1)的数值。The ratio of the font area to the font body frame is a value in the range of (0,1).

以上矢量字形模型的表示方法相比于原始的轮廓表示更容易操纵,表现在汉字结构操作可以更加灵活,汉字的结构与笔形可一定程度分离操作。在计算上相对容易,能实现实时计算,且能同时实现多种形变。The above representation method of vector glyph model is easier to manipulate than the original outline representation, which means that the structure operation of Chinese characters can be more flexible, and the structure and stroke shape of Chinese characters can be operated separately to a certain extent. It is relatively easy to calculate, can achieve real-time calculation, and can achieve multiple deformations at the same time.

以上矢量字形模型构建过程不仅仅针对于整个汉字,当输入汉字字形经过笔画分离,同样可以采用上述矢量字形模型构建方法存储笔画的矢量表示。The above vector glyph model construction process is not only for the entire Chinese character. When the input Chinese character glyph is separated by strokes, the above vector glyph model construction method can also be used to store the vector representation of the strokes.

步骤3:字形与布局设计Step 3: Font and layout design

本实施例中,字形与布局设计均是依据上述矢量字形模型。具体过程包括:依据矢量字形模型,通过对骨架关键点做参数变换来改变汉字结构;通过对轮廓节点之间纵横对齐信息和轮廓节点所属闭合轮廓信息确定笔画,对笔画的轮廓节点和第一偏移向量进行参数变换来改变汉字笔形特点;依据字形面积占据字身框的比例设计汉字作品布局。In this embodiment, the font and layout design are based on the above-mentioned vector font model. The specific process includes: based on the vector glyph model, changing the structure of Chinese characters by performing parameter transformation on the key points of the skeleton; determining the strokes by analyzing the vertical and horizontal alignment information between the outline nodes and the closed outline information to which the outline nodes belong, and adjusting the outline nodes and the first offset of the strokes. Shift vectors are used for parameter transformation to change the stroke characteristics of Chinese characters; the layout of Chinese character works is designed based on the proportion of the glyph area occupying the character body frame.

在一种实施方式中,在改变汉字结构时,保持笔形特点不变,并充分利用矢量字形模型的表示方式,具体过程为:通过设置调节比例参数对骨架关键点和第二偏移向量做线性变换实现对汉字大小和宽窄的调整;通过对骨架关键点应用改变函数实现对汉字中宫和重心的调整。In one implementation, when changing the structure of Chinese characters, the stroke characteristics are kept unchanged and the representation method of the vector glyph model is fully utilized. The specific process is: linearly adjusting the skeleton key points and the second offset vector by setting the adjustment scale parameters. Transformation realizes the adjustment of the size and width of Chinese characters; the adjustment of the palace and center of gravity of Chinese characters is realized by applying a change function to the key points of the skeleton.

针对横纵坐标范围为[0,n]的汉字,对汉字大小和宽窄的调整时,设定调整比例参数a,依据该调整比例参数a,得到新骨架关键点坐标为a(R-(n/2,n/2))+(n/2,n/2),手柄点相对关联轮廓节点的新第二偏移向量为aL1,其中,调整比例参数a包括高度调节比例参数a1和宽度调整比例参数a2,R为原始骨架关键点坐标,L1为手柄点相对关联轮廓节点的原始第二偏移向量。For Chinese characters whose horizontal and vertical coordinates range is [0,n], when adjusting the size and width of Chinese characters, set the adjustment ratio parameter a. Based on the adjustment ratio parameter a, the coordinates of the new skeleton key points are obtained as a(R-(n /2,n/2))+(n/2,n/2), the new second offset vector of the handle point relative to the associated contour node is aL 1 , where the adjustment scale parameter a includes the height adjustment scale parameter a 1 and Width adjustment scale parameter a 2 , R is the original skeleton key point coordinates, and L 1 is the original second offset vector of the handle point relative to the associated outline node.

当高度调节比例参数a1和宽度调整比例参数a2相等时,即可以实现对汉字大小的调整,当高度调节比例参数a1和宽度调整比例参数a2不相等时,即可以实现汉字的不同宽窄高度的调整。When the height adjustment ratio parameter a1 and the width adjustment ratio parameter a2 are equal, the size of Chinese characters can be adjusted. When the height adjustment ratio parameter a1 and the width adjustment ratio parameter a2 are not equal, the adjustment of different widths and heights of Chinese characters can be realized. .

对汉字中宫调整时,选择定义在区间[-1,1]上,且在区间[0,1]上的每个连续区间都不凸或不凹的函数为改变函数,设定改变函数的调整参数,以原始骨架关键点作为输入,利用确定调整参数的改变函数对原始骨架关键点计算,得到新骨架关键点,依据新骨架关键点得到中宫调整的汉字。When adjusting the Chinese character palace, select a function defined on the interval [-1,1], and each continuous interval on the interval [0,1] is not convex or concave as the change function, and set the change function Adjust the parameters, take the original skeleton key points as input, use the change function that determines the adjustment parameters to calculate the original skeleton key points, obtain new skeleton key points, and obtain the Chinese characters adjusted by the middle palace based on the new skeleton key points.

举例说明,骨架关键点集中任一骨架关键点从[0,n]规范到[-1,1]后的坐标为(x,y),收缩/扩张横向中宫可将横坐标按照以下改变函数做如下变换:(sign(x)|x|2-c,sign(y)|y|2-d),其中,其中c和d为范围在(0,2)的调整参数,分别控制横向与纵向的中宫;调整参数值>1时,中宫扩张;调整参数值<1时,中宫收缩。以篆刻“靡故匪新”为例,中宫改变前后的示意图如图3(a)和图3(b)所示。For example, the coordinates of any skeleton key point in the skeleton key point set from [0, n] to [-1, 1] are (x, y). Contraction/expansion of the horizontal center palace can change the abscissa coordinate according to the following function Make the following transformation: (sign(x)|x| 2-c ,sign(y)|y| 2-d ), where c and d are adjustment parameters in the range of (0,2), respectively controlling the horizontal and Vertical uterus; when the adjustment parameter value is >1, the uterus expands; when the adjustment parameter value is <1, the uterus contracts. Taking seal cutting as an example of "replacing the old with the new", the schematic diagrams of the Zhonggong before and after the change are shown in Figure 3(a) and Figure 3(b).

对汉字重心调整时,选择定义在区间[0,1]上的凹或凸函数为改变函数,设定改变函数的调整参数,以原始骨架关键点作为输入,利用确定调整参数的改变函数对原始骨架关键点计算,得到新骨架关键点,依据新骨架关键点得到重心调整的汉字。When adjusting the center of gravity of Chinese characters, select a concave or convex function defined in the interval [0,1] as the change function, set the adjustment parameters of the change function, take the original skeleton key points as input, and use the change function that determines the adjustment parameters to modify the original Skeleton key points are calculated to obtain new skeleton key points, and Chinese characters with adjusted center of gravity are obtained based on the new skeleton key points.

举例说明,设骨架关键点集中任一骨架关键点从[0,1000]规范到[0,1]后的坐标为(x,y),提高/降低重心可将纵坐标按照以下改变函数做如下变换:(1-(1-y)e)1-e,其中e为一个控制重心的调整参数;调整参数值>1时,重心提高,调整参数值<1时,重心降低。以黑体汉字“東”为例,重心改变示意图如图4所示。For example, assume that the coordinates of any skeleton key point in the skeleton key point set from [0,1000] to [0,1] are (x, y). To increase/lower the center of gravity, the vertical coordinate can be changed according to the following change function: Transformation: (1-(1-y) e ) 1-e , where e is an adjustment parameter that controls the center of gravity; when the adjustment parameter value > 1, the center of gravity increases, and when the adjustment parameter value < 1, the center of gravity decreases. Taking the bold Chinese character "东" as an example, the schematic diagram of changing the center of gravity is shown in Figure 4.

本实施例中,所述汉字笔形特点包括笔画粗细、笔画粗细对比、撇捺收笔形状、点画与撇捺的软硬等。In this embodiment, the Chinese character stroke characteristics include stroke thickness, stroke thickness contrast, stroke and stroke shape, softness and hardness of stippling and stroke, etc.

在另外一个实施方式中,在改变笔画粗细、笔画粗细对比时,设定偏移量调整比例b,轮廓节点相对于匹配骨架关键点的新第一偏移向量为bL2,其中,L2为轮廓节点相对于匹配骨架关键点的原始第一偏移向量。设第一偏移向量的坐标为(Δx,Δy),粗细与对比的改变只需对第一偏移向量倍乘偏移量调整比例b即可实现,例如在横向加粗可在Δx上倍乘调整比例b,和/或纵向加粗可在Δy上倍乘调整比例b。In another embodiment, when changing the stroke thickness and stroke thickness contrast, the offset adjustment ratio b is set, and the new first offset vector of the outline node relative to the matching skeleton key point is bL 2 , where L 2 is The original first offset vector of the silhouette node relative to the matching skeleton keypoint. Assume that the coordinates of the first offset vector are (Δx, Δy). Changes in thickness and contrast can be achieved by simply multiplying the first offset vector by the offset adjustment ratio b. For example, thickening in the horizontal direction can be multiplied by Δx. Multiply the adjustment ratio b, and/or vertical bolding can multiply the adjustment ratio b on Δy.

在改变撇捺收笔形状、点画与撇捺的软硬时,遍历轮廓节点和手柄点,匹配与当前遍历点及临接若干点相符的笔形特点,记录匹配到的笔形特点对应的起始轮廓节点,通过当前遍历点的临接若干点序列做坐标数值改变或增减点操作来改动笔形特点,其中,所述笔形特点采用轮廓节点与手柄点排序模式、三点成角、两点距离或曲线法向描述。When changing the shape of the stroke, stippling, and softness of the stroke, traverse the outline nodes and handle points, match the pen shape characteristics that match the current traversal point and several adjacent points, and record the starting outline corresponding to the matched pen shape characteristics. Node, the pen shape characteristics are modified by changing the coordinate value or adding or subtracting point operations on several point sequences adjacent to the current traversed point. The pen shape characteristics adopt the outline node and handle point sorting mode, three-point angle, two-point distance or Curve normal description.

其中,轮廓节点与手柄点排序模式表示在轮廓环绕方向上,节点与手柄点的特定排列方式,例如,在字形轮廓上查找所有符合(节点,手柄点,手柄点,节点,节点)模式的子序列(轮廓的一部分),三点成角即在查找到的子序列中,特定的三个节点或手柄点的成角大小。两点距离即在查找到的子序列中,特定的两个节点或手柄点的距离。曲线法向即查找到的部分轮廓上,某个点(节点或轮廓曲线上的点)垂直于沿轮廓线切线,指向轮廓外部的方向向量。Among them, the sorting mode of outline nodes and handle points indicates the specific arrangement of nodes and handle points in the outline surrounding direction. For example, on the glyph outline, find all children that match the (node, handle point, handle point, node, node) pattern. Sequence (part of the outline), the three-point angle is the angle size of the specific three nodes or handle points in the found subsequence. The distance between two points is the distance between two specific nodes or handle points in the found subsequence. The normal direction of the curve is the direction vector on the found part of the contour where a certain point (node or point on the contour curve) is perpendicular to the tangent line along the contour and points to the outside of the contour.

在另外一种实施方式中,依据字形面积占据字身框的比例设计汉字作品布局时,在汉字作品中,每个汉字所占面积比例与字形面积占据字身框的比例成正相关。In another implementation, when designing the layout of a Chinese character work based on the proportion of the font area occupying the character body frame, in the Chinese character work, the area proportion occupied by each Chinese character is positively correlated with the proportion of the font area occupying the character body frame.

根据字形笔画延伸范围与字形面积占据字身框的比例,综合考虑每个字形应在汉字作品中占据的位置大小。以篆刻布局为例,为实现印面上文字布局的尽可能均衡,可利用字形面积占据字身框的比例信息,计算字形包围盒,使填充到包围盒的字形的笔画尽可能均匀地分布在印面上。这种布局状态可与直接将印面等分的几何平均布局用插值方法融合,从而达到参数化控制布局的目标。以篆刻“一心一意”为例,不同布局参数设计的汉字作品布局的示意图如图图5(a)、图5(b)以及图5(c)所示。According to the extension range of the glyph strokes and the proportion of the glyph area occupying the font body frame, the position size that each glyph should occupy in the Chinese character work is comprehensively considered. Taking the layout of seal cutting as an example, in order to achieve the most balanced text layout on the printing surface, the proportion information of the glyph area to the font body frame can be used to calculate the glyph bounding box, so that the strokes of the glyphs filled in the bounding box are distributed as evenly as possible on the printing surface. superior. This layout state can be integrated with the geometric mean layout that directly divides the printing surface into equal parts using the interpolation method, thereby achieving the goal of parametric control of the layout. Taking the seal cutting "One Heart and One Mind" as an example, the schematic diagrams of the layout of Chinese character works designed with different layout parameters are shown in Figure 5(a), Figure 5(b) and Figure 5(c).

实施例还提供了一种动态交互式调整参数的汉字字形与布局设计系统,包括:The embodiment also provides a Chinese character glyph and layout design system that dynamically and interactively adjusts parameters, including:

字形模型读取单元601,用于读取上述动态调整参数的汉字字形与布局设计方法产生的矢量字形模型;The glyph model reading unit 601 is used to read the vector glyph model generated by the Chinese character glyph and layout design method of dynamically adjusting parameters;

字形与布局设计单元602,用于接收用户实时输入的参数,该参数包括调节比例参数a、调整中宫和重心的调整参数以及偏移量调整比例b,依据该参数采用上述动态调整参数的汉字字形与布局设计方法中来实现改变汉字结构、改变汉字笔形特点和设计汉字布局;The font and layout design unit 602 is used to receive parameters input by the user in real time. The parameters include the adjustment ratio parameter a, the adjustment parameter for adjusting the middle palace and the center of gravity, and the offset adjustment ratio b. Based on this parameter, the Chinese characters using the above dynamic adjustment parameters are Use font and layout design methods to change the structure of Chinese characters, change the characteristics of Chinese character strokes and design the layout of Chinese characters;

可视化单元603,用于实时可视化字形与布局设计单元的设计结果;The visualization unit 603 is used to visualize the design results of the font and layout design unit in real time;

保存导出单元604:保存或导出字形与布局设计单元的设计结果,该设计结果包括调整后字形和/或整幅作品所对应的图像、矢量图或字库。Save and export unit 604: save or export the design results of the font and layout design unit. The design results include the adjusted fonts and/or images, vectors or fonts corresponding to the entire work.

在整个动态交互式调整参数的汉字字形与布局设计系统中,首先读取字形图像并转化为矢量,或者直接读取字体矢量轮廓,基于该矢量轮廓和预处信息转换为矢量字形模型,该矢量字形模型存储到汉字字形与布局设计系统中,应用时,用户可视化地调整参数,系统依据调整参数改变字形和布局,然后导出调整后的作品图像或矢量图。In the entire Chinese character glyph and layout design system that dynamically and interactively adjusts parameters, first read the glyph image and convert it into a vector, or directly read the font vector outline, and convert it into a vector glyph model based on the vector outline and preprocessing information. The vector The glyph model is stored in the Chinese character glyph and layout design system. When applying, the user can visually adjust the parameters. The system changes the glyph and layout based on the adjusted parameters, and then exports the adjusted work image or vector image.

上述一种动态调整参数的汉字字形与布局设计方法和系统,通过将汉字抽象成矢量字形模型进行表示,由于该矢量字形模型包含了全面的汉字字形信息,通过可视化的实时输入参数,可以基于该矢量字形模型实现对汉字结构、笔形特点的调整以及汉字作品布局的设计,满足用户需求。The above-mentioned Chinese character glyph and layout design method and system for dynamically adjusting parameters is represented by abstracting Chinese characters into a vector glyph model. Since the vector glyph model contains comprehensive Chinese character glyph information, through visual real-time input parameters, it can be based on the The vector glyph model realizes the adjustment of Chinese character structure and stroke characteristics and the design of the layout of Chinese character works to meet user needs.

以上所述的具体实施方式对本发明的技术方案和有益效果进行了详细说明,应理解的是以上所述仅为本发明的最优选实施例,并不用于限制本发明,凡在本发明的原则范围内所做的任何修改、补充和等同替换等,均应包含在本发明的保护范围之内。The above-described specific embodiments describe in detail the technical solutions and beneficial effects of the present invention. It should be understood that the above are only the most preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, equivalent substitutions, etc. made within the scope of the invention shall be included in the protection scope of the present invention.

Claims (10)

1.一种动态调整参数的汉字字形与布局设计方法,其特征在于,包括以下步骤:1. A Chinese character glyph and layout design method that dynamically adjusts parameters, which is characterized by including the following steps: (1)预处理汉字字形,包括以矢量形式存储的字形矢量轮廓和以图像存储的字形图像,使每个汉字字形都具有相匹配的图像与矢量两种表示,并提取字形图像中的字骨架,对字骨架剪枝后构建骨架点集,将字形轮廓上的轮廓节点与最近的骨架点匹配,被匹配的骨架点为骨架关键点;(1) Preprocess Chinese character glyphs, including glyph vector outlines stored in vector form and glyph images stored as images, so that each Chinese character glyph has a matching image and vector representation, and extract the character skeleton in the glyph image , build a skeleton point set after pruning the character skeleton, match the contour nodes on the glyph outline with the nearest skeleton point, and the matched skeleton point is the skeleton key point; (2)构建矢量字形模型,矢量字形模型包括以下组成信息:骨架关键点集,轮廓节点相对于匹配骨架关键点的第一偏移向量,轮廓节点之间纵横对齐信息,轮廓节点所属闭合轮廓信息,字形面积占据字身框的比例;(2) Construct a vector glyph model. The vector glyph model includes the following composition information: skeleton key point set, the first offset vector of the contour node relative to the matching skeleton key point, vertical and horizontal alignment information between contour nodes, and closed contour information to which the contour node belongs. , the ratio of the font area to the font body frame; (3)字形与布局设计,包括依据矢量字形模型,通过对骨架关键点做参数变换来改变汉字结构;对第一偏移向量及轮廓点排列方式与坐标进行参数变换来改变汉字笔形特点,轮廓节点纵横对齐关系和轮廓节点所属闭合轮廓信息将辅助字形模型向矢量字形的还原,以保持字形原有的轮廓间关系与轮廓节点对齐关系;依据字形面积占据字身框的比例设计汉字作品布局。(3) Glyph and layout design, including changing the structure of Chinese characters through parameter transformation of skeleton key points based on the vector glyph model; performing parameter transformation on the first offset vector and outline point arrangement and coordinates to change the stroke characteristics and outline of Chinese characters The vertical and horizontal alignment relationship of nodes and the closed outline information of the outline nodes will assist the restoration of the glyph model to vector glyphs to maintain the original relationship between the outlines of the glyphs and the alignment relationship of the outline nodes; design the layout of Chinese character works based on the proportion of the glyph area occupying the font body frame. 2.如权利要求1所述的动态调整参数的汉字字形与布局设计方法,其特征在于,所述字形矢量轮廓采用二阶或三阶贝塞尔样条表示时,预处理汉字过程还包括:确定手柄点与最邻近的轮廓节点的关联关系;2. The Chinese character glyph and layout design method of dynamically adjusting parameters according to claim 1, characterized in that when the glyph vector outline is represented by a second-order or third-order Bessel spline, the preprocessing process of Chinese characters also includes: Determine the relationship between the handle point and the nearest contour node; 矢量字形模型还包括以下组成信息:手柄点与轮廓节点的关联关系,手柄点相对关联轮廓节点的第二偏移向量,手柄点之间纵横对齐信息,手柄点与轮廓节点之间纵横对齐信息;The vector glyph model also includes the following component information: the association between the handle point and the outline node, the second offset vector of the handle point relative to the associated outline node, the vertical and horizontal alignment information between the handle points, and the vertical and horizontal alignment information between the handle point and the outline node; 字形与布局设计过程还包括:通过对第二偏移向量做参数变换来改变汉字结构,通过手柄点纵横对齐信息、手柄点与轮廓节点间纵横对齐关系,保持字形原有的手柄点与轮廓节点对齐关系,对第二偏移向量及轮廓点排列方式与坐标进行参数变换来改变汉字笔形特点。The glyph and layout design process also includes: changing the structure of Chinese characters through parameter transformation of the second offset vector, and maintaining the original handle points and outline nodes of the glyph through the vertical and horizontal alignment information of the handle points and the vertical and horizontal alignment relationships between the handle points and outline nodes. Alignment relationship, parameter transformation is performed on the second offset vector and outline point arrangement and coordinates to change the stroke characteristics of Chinese characters. 3.如权利要求2所述的动态调整参数的汉字字形与布局设计方法,其特征在于,采用图像形态学的细化算法与中轴算法从栅格化后的字形图像中提取字骨架。3. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 2, characterized in that the character skeleton is extracted from the rasterized glyph image using a thinning algorithm of image morphology and a central axis algorithm. 4.如权利要求2所述的动态调整参数的汉字字形与布局设计方法,其特征在于,采用以下方式对字骨架剪枝:4. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 2, characterized in that the character skeleton is pruned in the following manner: 方式一:基于中轴变换获得的平面上各点到轮廓边缘距离,剪除骨架上距离字形轮廓边缘较近的骨架点;或,Method 1: Based on the distance from each point on the plane to the outline edge obtained by the central axis transformation, prune the skeleton points on the skeleton that are closer to the edge of the glyph outline; or, 方式二:利用hit-or-miss方法查找骨架交点,腐蚀骨架交点,此时字骨架将变为没有交叉点的离散线段,查找过短的线段并剔除,以实现字形骨架剪枝。Method 2: Use the hit-or-miss method to find the skeleton intersections and erode the skeleton intersections. At this time, the character skeleton will become a discrete line segment without intersections. Find the line segments that are too short and eliminate them to achieve glyph skeleton pruning. 5.如权利要求2所述的动态调整参数的汉字字形与布局设计方法,其特征在于,在改变汉字结构时,通过设置调节比例参数对骨架关键点和第二偏移向量做线性变换实现对汉字大小和宽窄的调整;5. The Chinese character glyph and layout design method of dynamically adjusting parameters as claimed in claim 2, characterized in that when changing the structure of Chinese characters, linear transformation is performed on the key points of the skeleton and the second offset vector by setting the adjustment proportion parameters to realize the alignment. Adjustment of Chinese character size and width; 通过对骨架关键点应用改变函数实现对汉字中宫和重心的调整。Adjustment of the palace and center of gravity of Chinese characters is achieved by applying a change function to the key points of the skeleton. 6.如权利要求5所述的动态调整参数的汉字字形与布局设计方法,其特征在于,针对横纵坐标范围为[0,n]的汉字,对汉字大小和宽窄的调整时,设定调整比例参数a,依据该调整比例参数a,得到新骨架关键点坐标为a(R-(n/2,n/2))+(n/2,n/2),手柄点相对关联轮廓节点的新第二偏移向量为aL1,其中,调整比例参数a包括高度调节比例参数a1和宽度调整比例参数a2,R为原始骨架关键点坐标,L1为手柄点相对关联轮廓节点的原始第二偏移向量。6. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 5, characterized in that, for Chinese characters whose horizontal and vertical coordinate ranges are [0, n], when adjusting the size and width of Chinese characters, the setting adjustment Scale parameter a. According to the adjustment of scale parameter a, the coordinates of the key points of the new skeleton are a(R-(n/2,n/2))+(n/2,n/2). The handle points are relative to the associated contour nodes. The new second offset vector is aL 1 , where the adjustment scale parameter a includes the height adjustment scale parameter a 1 and the width adjustment scale parameter a 2 , R is the original skeleton key point coordinates, and L 1 is the original coordinate of the handle point relative to the associated contour node. Second offset vector. 7.如权利要求5所述的动态调整参数的汉字字形与布局设计方法,其特征在于,对汉字中宫调整时,选择定义在区间[-1,1]上,且在区间[0,1]上的每个连续区间都不凸或不凹的函数为改变函数,设定改变函数的调整参数,以原始骨架关键点作为输入,利用确定调整参数的改变函数对原始骨架关键点计算,得到新骨架关键点,依据新骨架关键点得到中宫调整的汉字;7. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 5, characterized in that when adjusting the Chinese character palace, the selection is defined in the interval [-1,1], and in the interval [0,1 The function that is neither convex nor concave for each continuous interval on ] is a change function. Set the adjustment parameters of the change function, take the original skeleton key points as input, and use the change function that determines the adjustment parameters to calculate the original skeleton key points, and we get The new skeleton details are used to obtain the Chinese characters adjusted by the middle palace based on the new skeleton details; 对汉字重心调整时,选择定义在区间[0,1]上的凹或凸函数为改变函数,设定改变函数的调整参数,以原始骨架关键点作为输入,利用确定调整参数的改变函数对原始骨架关键点计算,得到新骨架关键点,依据新骨架关键点得到重心调整的汉字。When adjusting the center of gravity of Chinese characters, select a concave or convex function defined in the interval [0,1] as the change function, set the adjustment parameters of the change function, take the original skeleton key points as input, and use the change function that determines the adjustment parameters to modify the original Skeleton key points are calculated to obtain new skeleton key points, and Chinese characters with adjusted center of gravity are obtained based on the new skeleton key points. 8.如权利要求2所述的动态调整参数的汉字字形与布局设计方法,其特征在于,所述汉字笔形特点包括笔画粗细、笔画粗细对比、撇捺收笔形状、点画与撇捺的软硬;8. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 2, wherein the Chinese character stroke characteristics include stroke thickness, stroke thickness contrast, stroke and stroke shape, softness and hardness of stippling and stroke. ; 在改变笔画粗细、笔画粗细对比时,设定偏移量调整比例b,轮廓节点相对于匹配骨架关键点的新第一偏移向量为bL2,其中,L2为轮廓节点相对于匹配骨架关键点的原始第一偏移向量;When changing the stroke thickness and stroke thickness contrast, set the offset adjustment ratio b, and the new first offset vector of the outline node relative to the matching skeleton key point is bL 2 , where L 2 is the outline node relative to the matching skeleton key point The original first offset vector of the point; 在改变撇捺收笔形状、点画与撇捺的软硬时,遍历轮廓节点和手柄点,匹配与当前遍历点及临接若干点相符的笔形特点,记录匹配到的笔形特点对应的起始轮廓节点,通过当前遍历点的临接若干点序列做坐标数值改变或增减点操作来改动笔形特点,其中,所述笔形特点采用轮廓节点与手柄点排序模式、三点成角、两点距离或曲线法向描述。When changing the shape of the stroke, stippling, and softness of the stroke, traverse the outline nodes and handle points, match the pen shape characteristics that match the current traversal point and several adjacent points, and record the starting outline corresponding to the matched pen shape characteristics. Node, the pen shape characteristics are modified by changing the coordinate value or adding or subtracting point operations on several point sequences adjacent to the current traversed point. The pen shape characteristics adopt the outline node and handle point sorting mode, three-point angle, two-point distance or Curve normal description. 9.如权利要求2所述的动态调整参数的汉字字形与布局设计方法,其特征在于,依据字形面积占据字身框的比例设计汉字作品布局时,在汉字作品中,每个汉字所占面积比例与字形面积占据字身框的比例成正相关。9. The Chinese character glyph and layout design method for dynamically adjusting parameters as claimed in claim 2, characterized in that when designing the layout of a Chinese character work based on the proportion of the glyph area occupying the character body frame, in the Chinese character work, the area occupied by each Chinese character The proportion is positively related to the proportion of the font area occupying the font body frame. 10.一种动态交互式调整参数的汉字字形与布局设计系统,其特征在于,包括:10. A Chinese character glyph and layout design system that dynamically and interactively adjusts parameters, which is characterized by including: 字形模型读取单元,用于读取权利要求1~9任一项所述的动态调整参数的汉字字形与布局设计方法产生的矢量字形模型;A glyph model reading unit, used to read the vector glyph model generated by the Chinese character glyph and layout design method of dynamically adjusting parameters according to any one of claims 1 to 9; 字形与布局设计单元,用于接收用户实时输入的参数,依据该参数采用权利要求1~9任一项所述的动态调整参数的汉字字形与布局设计方法中来实现改变汉字结构、改变汉字笔形特点和设计汉字布局;The font and layout design unit is used to receive real-time input parameters from the user, and use the Chinese character font and layout design method of dynamically adjusting parameters according to any one of claims 1 to 9 to achieve changing the structure of Chinese characters and changing the stroke shape of Chinese characters. Features and design Chinese character layout; 可视化单元,用于实时可视化字形与布局设计单元的设计结果;The visualization unit is used to visualize the design results of the glyph and layout design unit in real time; 保存导出单元:保存或导出字形与布局设计单元的设计结果。Save export unit: Save or export the design results of glyph and layout design units.
CN202011104155.1A 2020-10-15 2020-10-15 Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts Active CN112232022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011104155.1A CN112232022B (en) 2020-10-15 2020-10-15 Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011104155.1A CN112232022B (en) 2020-10-15 2020-10-15 Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts

Publications (2)

Publication Number Publication Date
CN112232022A CN112232022A (en) 2021-01-15
CN112232022B true CN112232022B (en) 2024-02-27

Family

ID=74117306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011104155.1A Active CN112232022B (en) 2020-10-15 2020-10-15 Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts

Country Status (1)

Country Link
CN (1) CN112232022B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420345B (en) * 2021-07-01 2022-05-20 浙江大学 An Interactive Genetic Discrete Layout Method for Two-dimensional Cells Based on Skeleton Orientation
CN114201944A (en) * 2021-11-19 2022-03-18 合肥高维数据技术有限公司 Font deformation method and its watermark embedding and extraction method
CN114359038B (en) * 2022-01-14 2025-03-14 浙江大学 Multi-style dynamic word combination method based on generative adversarial network
CN114385983B (en) * 2022-01-25 2025-07-22 合肥高维数据技术有限公司 Visual character deformation method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04205581A (en) * 1990-11-30 1992-07-27 Ricoh Co Ltd Character recognizing method
CN1458604A (en) * 2003-04-21 2003-11-26 重庆迪佳科技有限公司 Method for forming industrial marking machine font library under window environment
CN104992143A (en) * 2015-06-04 2015-10-21 北京大学 Automatic extraction method for character strokes of vector fonts

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2014277854A1 (en) * 2014-12-22 2016-07-07 Canon Kabushiki Kaisha Emboldening of outline fonts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04205581A (en) * 1990-11-30 1992-07-27 Ricoh Co Ltd Character recognizing method
CN1458604A (en) * 2003-04-21 2003-11-26 重庆迪佳科技有限公司 Method for forming industrial marking machine font library under window environment
CN104992143A (en) * 2015-06-04 2015-10-21 北京大学 Automatic extraction method for character strokes of vector fonts

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种移动终端笔画字体存储结构及轮廓化算法;张骥先;罗蕾;姜帆;;计算机辅助设计与图形学学报(第12期);全文 *
基于贝叶斯网络的品牌风格语言知识建模方法;徐江;王海贤;张克俊;;中国机械工程(第19期);全文 *
骨架汉字字形存储与显示技术;赵恒,金通,王国瑾;中文信息学报(第01期);全文 *

Also Published As

Publication number Publication date
CN112232022A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN112232022B (en) Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts
EP0950988B1 (en) Three-Dimensional image generating apparatus
TW486642B (en) Glyph-based outline font generation independent of resolution
US6917369B2 (en) Method and apparatus for rendering cell-based distance fields using texture mapping
US7002598B2 (en) Method for generating a composite glyph and rendering a region of the composite glyph in object-order
US7006095B2 (en) Method for typesetting a set glyphs represented as a set of two dimensional distance fields
US6933952B2 (en) Method for antialiasing a set of objects represented as a set of two-dimensional distance fields in object-order
US7412360B2 (en) Method and apparatus for shape deformation and placement
KR100219072B1 (en) Font transformation and rasterizing method using medial axis transform
CN101702309B (en) Method for rendering a region of a composite glyph
US7042458B2 (en) Methods for generating an adaptively sampled distance field of an object with specialized cells
US20200279415A1 (en) Efficiently Computed Distance Fields
CN100401370C (en) Method and apparatus for determining antialiased intensity of pixel component
US7190367B2 (en) Method, apparatus, and system for rendering using a progressive cache
US7176926B2 (en) Method for animating two-dimensional objects
US7123271B2 (en) Method and apparatus for antialiasing a set of objects represented as a set of two-dimensional distance fields in image-order
Kinch MetaFog: Converting mEtaFoNt shapes to contours
CN113392772B (en) A text image shrinkage and deformation enhancement method for text recognition
Seah et al. Modeling and Rendering with eXpressive B-Spline Curves
Yin et al. HUA: an interactive calligraphy and ink-wash painting system
JP2833101B2 (en) Pattern deformation method
Parikh et al. Differentiable Variable Fonts
TWI282947B (en) Silhouette oriented gray font generation
CN1936961A (en) Edge-Shading Guided Grayscale Font Generation Method
Hussain On computerisation and representation of characters

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant