# graphicsFontReference

A graphics font reference record carrying family, fallbackFamilies, weight, size, lineHeight, and related state.

Last updated: 2026-09-09

Package: graphics.text | Status: source-declared

Tags: cpu, graphics, graphics.text, method, source-example, text, thing, yeho

Shape, measure, and represent text and glyph resources.

```yh
external thing graphicsFontReference
```

- text family: Stores family as text.
- text fallbackFamilies: Stores fallback families as text.
- int weight: Stores weight as int.
- int size: Stores size as int.
- int lineHeight: Stores line height as int.
- text style: Stores style as text.
- text features: Stores features as text.
- text source: Stores source as text.
- graphicsFontReference(text family, text fallbackFamilies, int weight, int size, int lineHeight, text style, text features, text source): Graphics font reference.
- ValidationIssue() returns text: Validation issue.
- CacheIdentity(text locale, int scalePercent) returns text: Cache identity.

## Use graphicsFontReference

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using graphics.text

// Shape, measure, and represent text and glyph resources.
graphicsFontReference sample = graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example")
Console.Log(Text.From(sample.family))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsfontreference"
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"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/graphics.text--graphicsFontReference/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsFontReference.ValidationIssue

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Validation issue.
graphicsFontReference instance = graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example")
text result = instance.ValidationIssue()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsfontreference"
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"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/graphics.text--graphicsFontReference/method-ValidationIssue-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsFontReference.CacheIdentity

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Cache identity.
graphicsFontReference instance = graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example")
text argument_locale = "argument locale"
int argument_scalePercent = 1
text result = instance.CacheIdentity(argument_locale, argument_scalePercent)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsfontreference"
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"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/graphics.text--graphicsFontReference/method-CacheIdentity-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/graphics/text/shaping.yh

AI training permission: https://demonhunterlabs.com/ai-use
