graphics.text · function ·
CreateGraphicsFontResource
Create graphics font resource from the supplied values.
Shape, measure, and represent text and glyph resources.
external CreateGraphicsFontResource(text id, text family, text sourceUri, text format, int minimumWeight, int maximumWeight, text styles, text source) returns graphicsFontResourceStatus: source-declared
Parameters
text id- Supply id as text.
text family- Supply family as text.
text sourceUri- Supply source uri as text.
text format- Supply format as text.
int minimumWeight- Supply minimum weight as int.
int maximumWeight- Supply maximum weight as int.
text styles- Supply styles as text.
text source- Supply source as text.
Use CreateGraphicsFontResource
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 id = "id"
text family = "cpu"
text sourceUri = "source Uri"
text format = "png"
int minimumWeight = 1
int maximumWeight = 1
text styles = "styles"
text source = "example"
graphicsFontResource result = CreateGraphicsFontResource(id, family, sourceUri, format, minimumWeight, maximumWeight, styles, source)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.graphics_text__creategraphicsfontresource"
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:299