TextStudioShapedGlyphPreparationSnapshot
public sealed class TextStudioShapedGlyphPreparationSnapshot : ITextStudioShapedGlyphBackend, ITextStudioShapedGeometryBackend, ITextStudioShapedGlyphImageBackend, ITextStudioGlyphImageProviderCaller-owned shaped glyph and font-face data for one representative preparation sample.
Constructors
Section titled “Constructors”
TextStudioShapedGlyphPreparationSnapshot(TextStudioBackendShapedGlyph[], TextStudioBackendShapedFontFace[], TextStudioBackendShapedGlyphGeometry[], TextStudioBackendShapedPrimitive[], int[], TextStudioGlyphImageSnapshot[])
Section titled “TextStudioShapedGlyphPreparationSnapshot(TextStudioBackendShapedGlyph[], TextStudioBackendShapedFontFace[], TextStudioBackendShapedGlyphGeometry[], TextStudioBackendShapedPrimitive[], int[], TextStudioGlyphImageSnapshot[])”public TextStudioShapedGlyphPreparationSnapshot(TextStudioBackendShapedGlyph[] glyphs, TextStudioBackendShapedFontFace[] fontFaces, TextStudioBackendShapedGlyphGeometry[] geometry = null, TextStudioBackendShapedPrimitive[] primitives = null, int[] ownerCodepoints = null, TextStudioGlyphImageSnapshot[] images = null)Creates a snapshot by copying the supplied glyph and font-face data.
Parameters
| Name | Type |
|---|---|
glyphs |
TextStudio.TextStudioBackendShapedGlyph[] |
fontFaces |
TextStudio.TextStudioBackendShapedFontFace[] |
geometry |
TextStudio.TextStudioBackendShapedGlyphGeometry[] |
primitives |
TextStudio.TextStudioBackendShapedPrimitive[] |
ownerCodepoints |
System.Int32[] |
images |
TextStudio.TextStudioGlyphImageSnapshot[] |
Methods
Section titled “Methods”
GetGlyphImageRequest(int, out TextStudioGlyphImageRequest, out string)
Section titled “GetGlyphImageRequest(int, out TextStudioGlyphImageRequest, out string)”public TextStudioGlyphImageStatus GetGlyphImageRequest(int shapedGlyphIndex, out TextStudioGlyphImageRequest request, out string diagnostic)Gets the prepared exact image request for a shaped glyph, when owned pixels are available.
Parameters
| Name | Type |
|---|---|
shapedGlyphIndex |
System.Int32 |
request |
TextStudio.TextStudioGlyphImageRequest |
diagnostic |
System.String |
Returns
TextStudio.TextStudioGlyphImageStatus
CaptureGlyphImage(in TextStudioGlyphImageRequest, out TextStudioGlyphImageSnapshot, out string)
Section titled “CaptureGlyphImage(in TextStudioGlyphImageRequest, out TextStudioGlyphImageSnapshot, out string)”public TextStudioGlyphImageStatus CaptureGlyphImage(in TextStudioGlyphImageRequest request, out TextStudioGlyphImageSnapshot image, out string diagnostic)Copies prepared image pixels into the requested shaped occurrence when its identity still matches.
Parameters
| Name | Type |
|---|---|
request |
TextStudio.TextStudioGlyphImageRequest |
image |
TextStudio.TextStudioGlyphImageSnapshot |
diagnostic |
System.String |
Returns
TextStudio.TextStudioGlyphImageStatus
TryGetShapedGlyph(int, out TextStudioBackendShapedGlyph)
Section titled “TryGetShapedGlyph(int, out TextStudioBackendShapedGlyph)”public bool TryGetShapedGlyph(int index, out TextStudioBackendShapedGlyph glyph)Gets one glyph from the current shaped topology revision.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
glyph |
TextStudio.TextStudioBackendShapedGlyph |
Returns
System.Boolean: false when the index is invalid or topology is unavailable.
TryGetShapedFontFace(int, out TextStudioBackendShapedFontFace)
Section titled “TryGetShapedFontFace(int, out TextStudioBackendShapedFontFace)”public bool TryGetShapedFontFace(int fontId, out TextStudioBackendShapedFontFace face)Gets the font face referenced by a shaped glyph.
Parameters
| Name | Type |
|---|---|
fontId |
System.Int32 |
face |
TextStudio.TextStudioBackendShapedFontFace |
Returns
System.Boolean: false when the font is unavailable in the current revision.
TryGetShapedGlyphGeometry(int, out TextStudioBackendShapedGlyphGeometry)
Section titled “TryGetShapedGlyphGeometry(int, out TextStudioBackendShapedGlyphGeometry)”public bool TryGetShapedGlyphGeometry(int index, out TextStudioBackendShapedGlyphGeometry geometry)Gets planar geometry aligned with a glyph in this preparation snapshot.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
geometry |
TextStudio.TextStudioBackendShapedGlyphGeometry |
Returns
System.Boolean
TryGetShapedPrimitive(int, out TextStudioBackendShapedPrimitive)
Section titled “TryGetShapedPrimitive(int, out TextStudioBackendShapedPrimitive)”public bool TryGetShapedPrimitive(int index, out TextStudioBackendShapedPrimitive primitive)Gets one filled vector primitive owned by this preparation snapshot.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
primitive |
TextStudio.TextStudioBackendShapedPrimitive |
Returns
System.Boolean
TryGetOwnerCodepoint(int, out int)
Section titled “TryGetOwnerCodepoint(int, out int)”public bool TryGetOwnerCodepoint(int textUnitIndex, out int codepoint)Gets the semantic owner codepoint used for preparation scopes, without changing the shaped font glyph.
Parameters
| Name | Type |
|---|---|
textUnitIndex |
System.Int32 |
codepoint |
System.Int32 |
Returns
System.Boolean
TryGetGlyph(int, out TextStudioBackendShapedGlyph)
Section titled “TryGetGlyph(int, out TextStudioBackendShapedGlyph)”public bool TryGetGlyph(int index, out TextStudioBackendShapedGlyph glyph)Gets the shaped glyph at the supplied snapshot index.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
glyph |
TextStudio.TextStudioBackendShapedGlyph |
Returns
System.Boolean
TryGetFontFace(int, out TextStudioBackendShapedFontFace)
Section titled “TryGetFontFace(int, out TextStudioBackendShapedFontFace)”public bool TryGetFontFace(int fontId, out TextStudioBackendShapedFontFace fontFace)Gets the font face identified by the supplied backend font ID.
Parameters
| Name | Type |
|---|---|
fontId |
System.Int32 |
fontFace |
TextStudio.TextStudioBackendShapedFontFace |
Returns
System.Boolean
Properties
Section titled “Properties”
GlyphCount
Section titled “GlyphCount”public int GlyphCount { get; }Returns
System.Int32
FontFaceCount
Section titled “FontFaceCount”public int FontFaceCount { get; }Returns
System.Int32
ShapedGlyphRevision
Section titled “ShapedGlyphRevision”public int ShapedGlyphRevision { get; }Returns
System.Int32
ShapedGlyphCount
Section titled “ShapedGlyphCount”public int ShapedGlyphCount { get; }Returns
System.Int32
ShapedPrimitiveCount
Section titled “ShapedPrimitiveCount”public int ShapedPrimitiveCount { get; }Returns
System.Int32