# graphicsShapedRunV2

A graphics shaped run v2 record carrying index, sourceStart, sourceEnd, clusterStart, clusterEnd, 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 graphicsShapedRunV2
```

- int index: Stores index as int.
- int sourceStart: Stores source start as int.
- int sourceEnd: Stores source end as int.
- int clusterStart: Stores cluster start as int.
- int clusterEnd: Stores cluster end as int.
- int glyphStart: Stores glyph start as int.
- int glyphEnd: Stores glyph end as int.
- int fontIndex: Stores font index as int.
- text script: Stores script as text.
- text language: Stores language as text.
- text direction: Stores direction as text.
- int bidiLevel: Stores bidi level as int.
- graphicsShapedRunV2(int index, int sourceStart, int sourceEnd, int clusterStart, int clusterEnd, int glyphStart, int glyphEnd, int fontIndex, text script, text language, text direction, int bidiLevel): Graphics shaped run v2.
- ValidationIssue(text source, int sourceLength) returns text: Validation issue.
- Snapshot() returns text: Snapshot.

## Use graphicsShapedRunV2

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.
graphicsShapedRunV2 sample = graphicsShapedRunV2(1, 1, 1, 1, 1, 1, 1, 1, "script", "language", "direction", 1)
Console.Log(Text.From(sample.index))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedrunv2"
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--graphicsShapedRunV2/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedRunV2.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.
graphicsShapedRunV2 instance = graphicsShapedRunV2(1, 1, 1, 1, 1, 1, 1, 1, "script", "language", "direction", 1)
text argument_source = "argument source"
int argument_sourceLength = 1
text result = instance.ValidationIssue(argument_source, argument_sourceLength)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedrunv2"
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--graphicsShapedRunV2/method-ValidationIssue-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphicsShapedRunV2.Snapshot

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using graphics.text

// Snapshot.
graphicsShapedRunV2 instance = graphicsShapedRunV2(1, 1, 1, 1, 1, 1, 1, 1, "script", "language", "direction", 1)
text result = instance.Snapshot()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.graphics_text__graphicsshapedrunv2"
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--graphicsShapedRunV2/method-Snapshot-14 --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_v2.yh

AI training permission: https://demonhunterlabs.com/ai-use
