元编程参考文档

单线字体

14 个节点

本页内容 14

基线单位

函数

Baseline offset in raw Hershey units.

签名
基线单位() -> 低精度数字
float BaselineUnit()

返回

结果低精度数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

大写字母高度

函数

Font units from baseline to cap line.

签名
大写字母高度() -> 低精度数字
float CapHeight()

返回

结果低精度数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

字符

函数

Every character this face has a glyph for. The Hershey faces here cover ASCII 32-126.

签名
字符(Stroke Font: Stroke Font) -> IReadOnlyCollection<Char>
IReadOnlyCollection<char> Characters(StrokeFont Stroke Font)

参数

名称类型默认值说明
Stroke FontStroke Font—

返回

结果IReadOnlyCollection<Char>
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

是否连笔

函数

True for connected cursive faces, where glyphs are drawn to join up.

签名
是否连笔(Stroke Font: Stroke Font) -> 真否
bool IsCursive(StrokeFont Stroke Font)

参数

名称类型默认值说明
Stroke FontStroke Font—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

字形

函数

The glyph for a character, or null if this face has none.

签名
字形(Stroke Font: Stroke Font, C: Char) -> Stroke Glyph
StrokeGlyph Item(StrokeFont Stroke Font, char c)

参数

名称类型默认值说明
Stroke FontStroke Font—
CChar—

返回

结果Stroke Glyph
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

名称

函数

What this face is called.

签名
名称(Stroke Font: Stroke Font) -> 文本
string Name(StrokeFont Stroke Font)

参数

名称类型默认值说明
Stroke FontStroke Font—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

获取或使用后备字体

函数

The glyph for a character, falling back to this face's '?' and then to a blank of the space's width.

签名
获取或使用后备字体 -> Stroke Glyph
    Stroke Font: Stroke Font
    C: Char
StrokeGlyph GetOrFallback(StrokeFont Stroke Font, char c)

参数

名称类型默认值说明
Stroke FontStroke Font—
CChar—

返回

结果Stroke Glyph
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
单线字体
所属包
图像处理

按名称获取

函数

One of the embedded faces by StrokeFont.Name, or null if no face carries that name.

签名
按名称获取(名称: 文本) -> Stroke Font
StrokeFont ByName(string name)

参数

名称类型默认值说明
名称文本—

返回

结果Stroke Font

备注

Matched case-insensitively, so a caller that got the name out of a graph, a command line or a
settings file does not have to reproduce the capitalisation exactly.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

从文件加载

函数

Reads a face from a `.jhf` file on disk, for the stroke and engraving faces this package does
not embed.

签名
从文件加载(路径: 文本, 名称: 文本, 连笔: 真否) -> Stroke Font
StrokeFont FromFile(
    string path,
    string name,
    bool cursive = false)

参数

名称类型默认值说明
路径文本—The `.jhf` file.
名称文本—What to call the face; the file name without its extension when not given.
连笔真否FalseWhether the face's glyphs are drawn to join up.

返回

结果Stroke Font

备注

Latin-1 rather than UTF-8, for the reason the embedded loader uses it: the format encodes each
coordinate as one byte offset from 'R', and bytes above 0x7F are ordinary coordinates rather
than the start of a multi-byte sequence. Read as UTF-8 they become U+FFFD and the glyph
collapses.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

全部字体

函数

The three faces embedded in this package.

签名
全部字体() -> IReadOnlyList<Stroke Font>
IReadOnlyList<StrokeFont> All()

返回

结果IReadOnlyList<Stroke Font>
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

印刷体

函数

Hershey Roman Simplex: unjoined print, which is what a plotter or an engraver usually wants.

签名
印刷体() -> Stroke Font
StrokeFont Print()

返回

结果Stroke Font
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

手写体

函数

Hershey Script: a light cursive hand, the one a handwriting animation usually wants.

签名
手写体() -> Stroke Font
StrokeFont Script()

返回

结果Stroke Font
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

复杂手写体

函数

Hershey Script Complex: the same hand with more strokes per glyph, so a heavier, more formal one.

签名
复杂手写体() -> Stroke Font
StrokeFont ScriptComplex()

返回

结果Stroke Font
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理

解析字体

函数

Parses the text of a `.jhf` file into a face.

签名
解析字体(名称: 文本, 文本: 文本, 连笔: 真否) -> Stroke Font
StrokeFont Parse(string name, string text, bool cursive)

参数

名称类型默认值说明
名称文本—What to call the face.
文本文本—The file's contents, read as Latin-1.
连笔真否—Whether the face's glyphs are drawn to join up.

返回

结果Stroke Font
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线字体
所属包
图像处理