# graphicsShapedText

A graphics shaped text record carrying value, font, locale, direction, clusters, 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 graphicsShapedText
```

- text value: Stores value as text.
- graphicsFontReference font: Stores font as graphicsFontReference.
- text locale: Stores locale as text.
- text direction: Stores direction as text.
- list of graphicsGlyphCluster clusters: Stores clusters as list of graphicsGlyphCluster.
- int ascent: Stores ascent as int.
- int descent: Stores descent as int.
- int lineGap: Stores line gap as int.
- text source: Stores source as text.
- text diagnostic: Stores diagnostic as text.
- graphicsShapedText(text value, graphicsFontReference font, text locale, text direction, int ascent, int descent, int lineGap, text source): Graphics shaped text.
- AddCluster(graphicsGlyphCluster cluster) returns bool: Add cluster.
- ValidationIssue() returns text: Validation issue.
- Width() returns int: Width.
- MissingGlyphCount() returns int: Missing glyph count.
- RenderReport() returns text: Render report.

## Use graphicsShapedText

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.
graphicsShapedText sample = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "example")
Console.Log(Text.From(sample.value))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedtext"
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--graphicsShapedText/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedText.AddCluster

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Add cluster.
graphicsShapedText instance = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "example")
graphicsGlyphCluster argument_cluster = graphicsGlyphCluster("value", 1, 1, "glyph Id", 1, "font Family", "script", 1, true, true)
bool result = instance.AddCluster(argument_cluster)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedtext"
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--graphicsShapedText/method-AddCluster-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedText.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.
graphicsShapedText instance = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "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__graphicsshapedtext"
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--graphicsShapedText/method-ValidationIssue-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedText.Width

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Width.
graphicsShapedText instance = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "example")
int result = instance.Width()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedtext"
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--graphicsShapedText/method-Width-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedText.MissingGlyphCount

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Missing glyph count.
graphicsShapedText instance = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "example")
int result = instance.MissingGlyphCount()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedtext"
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--graphicsShapedText/method-MissingGlyphCount-14 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedText.RenderReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Render report.
graphicsShapedText instance = graphicsShapedText("value", graphicsFontReference("cpu", "fallback Families", 1, 1, 1, "style", "features", "example"), "locale", "direction", 1, 1, 1, "example")
text result = instance.RenderReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedtext"
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--graphicsShapedText/method-RenderReport-15 --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
