彩色字形 - 基于 SVG 的彩色字形

本主题介绍使用 SVG 扩展添加彩色字形。

要启用字形面板中的 SVG 选项,请确保它处于 SVG 颜色模式。

生成 SVG 彩色字形

添加 SVG 彩色轮廓的最简单方法是从 COLR 轮廓生成它。在 SVG 颜色模式下,右键单击并选择颜色 → 将 COLR 转换为 SVG。

或者,您可以导入 SVG 文件。请确保调整 SVG 文档中使用的变换,以便正确定位和调整彩色轮廓的大小。

在字形面板中进入 SVG 颜色模式。然后在编辑区域内右键单击以编辑或导入 SVG 文档。这是此类 SVG 文档的内容:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="scale(1,-1)">
<path d="M701 1182c-334 0-605-271-605-605 0-334 271-605 605-605 335 0 606 271 606 605 0 334-271 605-606
605 z" fill="none" stroke="#FFF000" stroke-width="64" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M886 903c57 0 103-31 103-69 0-38-46-69-103-69-57 0-103 31-103 69 0 38 46 69 103 69 z M520 903c57
0 103-31 103-69 0-38-46-69-103-69-57 0-103 31-103 69 0 38 46 69 103 69 z" fill="none" stroke="#00DDFF"
stroke-width="64" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M1112 555c0-171-182-309-406-309-224 0-405 138-405 309" fill="none" stroke="#FF0000"
stroke-width="64" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

提示:如果您通过 CPAL 扩展设计彩色字形,可以让 FontCreator 在导出字体时生成 SVG 颜色数据。因此,无需手动添加 SVG 颜色数据。

英文原文:https://www.high-logic.com/fontcreator/manual16/fc_svg-based-color-glyph.html