# graphicsFontResource

A graphics font resource record carrying id, family, sourceUri, format, minimumWeight, 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 graphicsFontResource
```

- text id: Stores id as text.
- text family: Stores family as text.
- text sourceUri: Stores source uri as text.
- text format: Stores format as text.
- int minimumWeight: Stores minimum weight as int.
- int maximumWeight: Stores maximum weight as int.
- text styles: Stores styles as text.
- text source: Stores source as text.
- graphicsFontResource(text id, text family, text sourceUri, text format, int minimumWeight, int maximumWeight, text styles, text source): Graphics font resource.
- ValidationIssue() returns text: Validation issue.
- Describe() returns text: Describe.

## Use graphicsFontResource

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.
graphicsFontResource sample = graphicsFontResource("id", "cpu", "source Uri", "png", 1, 1, "styles", "example")
Console.Log(Text.From(sample.id))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsfontresource"
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--graphicsFontResource/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsFontResource.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.
graphicsFontResource instance = graphicsFontResource("id", "cpu", "source Uri", "png", 1, 1, "styles", "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__graphicsfontresource"
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--graphicsFontResource/method-ValidationIssue-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsFontResource.Describe

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Describe.
graphicsFontResource instance = graphicsFontResource("id", "cpu", "source Uri", "png", 1, 1, "styles", "example")
text result = instance.Describe()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsfontresource"
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--graphicsFontResource/method-Describe-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
