Divooka Reference

Stroke Font

14 nodes

On this page 14

Baseline Unit

Function

Baseline offset in raw Hershey units.

Signature
BaselineUnit() -> Low Accuracy Number
float BaselineUnit()

Returns

resultLow Accuracy Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Cap Height

Function

Font units from baseline to cap line.

Signature
CapHeight() -> Low Accuracy Number
float CapHeight()

Returns

resultLow Accuracy Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Characters

Function

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

Signature
Characters(Stroke Font: Stroke Font) -> IReadOnlyCollection<Char>
IReadOnlyCollection<char> Characters(StrokeFont Stroke Font)

Parameters

nametypedefaultdescription
Stroke FontStroke Font—

Returns

resultIReadOnlyCollection<Char>
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Is Cursive

Function

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

Signature
IsCursive(Stroke Font: Stroke Font) -> Truth
bool IsCursive(StrokeFont Stroke Font)

Parameters

nametypedefaultdescription
Stroke FontStroke Font—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Item

Function

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

Signature
Item(Stroke Font: Stroke Font, c: Char) -> Stroke Glyph
StrokeGlyph Item(StrokeFont Stroke Font, char c)

Parameters

nametypedefaultdescription
Stroke FontStroke Font—
cChar—

Returns

resultStroke Glyph
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Name

Function

What this face is called.

Signature
Name(Stroke Font: Stroke Font) -> Text
string Name(StrokeFont Stroke Font)

Parameters

nametypedefaultdescription
Stroke FontStroke Font—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Get Or Fallback

Function

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

Signature
GetOrFallback(Stroke Font: Stroke Font, c: Char) -> Stroke Glyph
StrokeGlyph GetOrFallback(StrokeFont Stroke Font, char c)

Parameters

nametypedefaultdescription
Stroke FontStroke Font—
cChar—

Returns

resultStroke Glyph
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Stroke Font
Package
Image Processing

By Name

Function

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

Signature
ByName(name: Text) -> Stroke Font
StrokeFont ByName(string name)

Parameters

nametypedefaultdescription
nameText—

Returns

resultStroke 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

Function

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

Signature
FromFile(path: Text, name: Text, cursive: Truth) -> Stroke Font
StrokeFont FromFile(
    string path,
    string name,
    bool cursive = false)

Parameters

nametypedefaultdescription
pathText—The `.jhf` file.
nameText—What to call the face; the file name without its extension when not given.
cursiveTruthFalseWhether the face's glyphs are drawn to join up.

Returns

resultStroke 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

Function

The three faces embedded in this package.

Signature
All() -> IReadOnlyList<Stroke Font>
IReadOnlyList<StrokeFont> All()

Returns

resultIReadOnlyList<Stroke Font>
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Print

Function

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

Signature
Print() -> Stroke Font
StrokeFont Print()

Returns

resultStroke Font
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Script

Function

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

Signature
Script() -> Stroke Font
StrokeFont Script()

Returns

resultStroke Font
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Script Complex

Function

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

Signature
ScriptComplex() -> Stroke Font
StrokeFont ScriptComplex()

Returns

resultStroke Font
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing

Parse

Function

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

Signature
Parse(name: Text, text: Text, cursive: Truth) -> Stroke Font
StrokeFont Parse(string name, string text, bool cursive)

Parameters

nametypedefaultdescription
nameText—What to call the face.
textText—The file's contents, read as Latin-1.
cursiveTruth—Whether the face's glyphs are drawn to join up.

Returns

resultStroke Font
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Stroke Font
Package
Image Processing