graphics.text · function ·
CreateGraphicsFontReference
Create graphics font reference from the supplied values.
Shape, measure, and represent text and glyph resources.
external CreateGraphicsFontReference(text family, text fallbackFamilies, int weight, int size, int lineHeight, text style, text features, text source) returns graphicsFontReferenceStatus: source-declared
Parameters
text family- Supply family as text.
text fallbackFamilies- Supply fallback families as text.
int weight- Supply weight as int.
int size- Supply size as int.
int lineHeight- Supply line height as int.
text style- Supply style as text.
text features- Supply features as text.
text source- Supply source as text.
Use CreateGraphicsFontReference
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using graphics.text
// Shape, measure, and represent text and glyph resources.
text family = "cpu"
text fallbackFamilies = "fallback Families"
int weight = 1
int size = 1
int lineHeight = 1
text style = "style"
text features = "features"
text source = "example"
graphicsFontReference result = CreateGraphicsFontReference(family, fallbackFamilies, weight, size, lineHeight, style, features, source)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.graphics_text__creategraphicsfontreference"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/graphics/text/shaping.yh:294