Stroke Font
14 nodes
On this page 14
Baseline Unit
FunctionBaseline offset in raw Hershey units.
BaselineUnit() -> Low Accuracy Number
float BaselineUnit()
Returns
| result | Low Accuracy Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Cap Height
FunctionFont units from baseline to cap line.
CapHeight() -> Low Accuracy Number
float CapHeight()
Returns
| result | Low Accuracy Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Characters
FunctionEvery character this face has a glyph for. The Hershey faces here cover ASCII 32-126.
Characters(Stroke Font: Stroke Font) -> IReadOnlyCollection<Char>
IReadOnlyCollection<char> Characters(StrokeFont Stroke Font)
Parameters
| name | type | default | description |
|---|---|---|---|
| Stroke Font | Stroke Font | — |
Returns
| result | IReadOnlyCollection<Char> |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Is Cursive
FunctionTrue for connected cursive faces, where glyphs are drawn to join up.
IsCursive(Stroke Font: Stroke Font) -> Truth
bool IsCursive(StrokeFont Stroke Font)
Parameters
| name | type | default | description |
|---|---|---|---|
| Stroke Font | Stroke Font | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Item
FunctionThe glyph for a character, or null if this face has none.
Item(Stroke Font: Stroke Font, c: Char) -> Stroke Glyph
StrokeGlyph Item(StrokeFont Stroke Font, char c)
Parameters
| name | type | default | description |
|---|---|---|---|
| Stroke Font | Stroke Font | — | |
| c | Char | — |
Returns
| result | Stroke Glyph |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Name
FunctionWhat this face is called.
Name(Stroke Font: Stroke Font) -> Text
string Name(StrokeFont Stroke Font)
Parameters
| name | type | default | description |
|---|---|---|---|
| Stroke Font | Stroke Font | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Get Or Fallback
FunctionThe glyph for a character, falling back to this face's '?' and then to a blank of the space's width.
GetOrFallback(Stroke Font: Stroke Font, c: Char) -> Stroke Glyph
StrokeGlyph GetOrFallback(StrokeFont Stroke Font, char c)
Parameters
| name | type | default | description |
|---|---|---|---|
| Stroke Font | Stroke Font | — | |
| c | Char | — |
Returns
| result | Stroke Glyph |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
By Name
FunctionOne of the embedded faces by StrokeFont.Name, or null if no face carries that name.
ByName(name: Text) -> Stroke Font
StrokeFont ByName(string name)
Parameters
| name | type | default | description |
|---|---|---|---|
| name | Text | — |
Returns
| result | Stroke Font |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
From File
FunctionReads a face from a `.jhf` file on disk, for the stroke and engraving faces this package does
not embed.
FromFile(path: Text, name: Text, cursive: Truth) -> Stroke Font
StrokeFont FromFile(
string path,
string name,
bool cursive = false)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The `.jhf` file. |
| name | Text | — | What to call the face; the file name without its extension when not given. |
| cursive | Truth | False | Whether the face's glyphs are drawn to join up. |
Returns
| result | Stroke Font |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
All
FunctionThe three faces embedded in this package.
All() -> IReadOnlyList<Stroke Font>
IReadOnlyList<StrokeFont> All()
Returns
| result | IReadOnlyList<Stroke Font> |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Hershey Roman Simplex: unjoined print, which is what a plotter or an engraver usually wants.
Print() -> Stroke Font
StrokeFont Print()
Returns
| result | Stroke Font |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Script
FunctionHershey Script: a light cursive hand, the one a handwriting animation usually wants.
Script() -> Stroke Font
StrokeFont Script()
Returns
| result | Stroke Font |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Script Complex
FunctionHershey Script Complex: the same hand with more strokes per glyph, so a heavier, more formal one.
ScriptComplex() -> Stroke Font
StrokeFont ScriptComplex()
Returns
| result | Stroke Font |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing
Parse
FunctionParses the text of a `.jhf` file into a face.
Parse(name: Text, text: Text, cursive: Truth) -> Stroke Font
StrokeFont Parse(string name, string text, bool cursive)
Parameters
| name | type | default | description |
|---|---|---|---|
| name | Text | — | What to call the face. |
| text | Text | — | The file's contents, read as Latin-1. |
| cursive | Truth | — | Whether the face's glyphs are drawn to join up. |
Returns
| result | Stroke Font |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Stroke Font
- Package
- Image Processing