Index

C/C++ Functions

dtFontGetGlyphSubsts

DT_SWORD dtFontGetGlyphSubsts(DT_DTENGINE engine, DT_ID_SWORD font_index, DT_ID_SWORD script_id, DT_ID_SWORD feature_id, DT_SWORD reserved, DT_AT_GLYPH_SUBSTS_SET* substs_set)

Short Description: Get glyph substitutions as defined in font

This function returns glyph substitutions for the specified script and glyph substitution feature, as defined in the specified font.

This function is a member of D-Type's Advanced Typography API. For additional details on glyph substitutions, please see the Advanced Typography Structures section of this document.

Parameters

ParameterDescription

engine

Handle of the previously created Standard Engine instance.

font_index

Font index of the font or font instance in the Font Catalog.

script_id

Index of the script for which the glyph substitutions are to be retrieved. At present, this can be one of the following:

  • script_id = 0 (DV_AT_SCRIPT_NONE) — No specific script

  • script_id = 1 (DV_AT_SCRIPT_LATN) — Latin script

  • script_id = 2 (DV_AT_SCRIPT_CYRL) — Cyrillic script

  • script_id = 3 (DV_AT_SCRIPT_GREK) — Greek script

  • script_id = 4 (DV_AT_SCRIPT_HEBR) — Hebrew script

  • script_id = 5 (DV_AT_SCRIPT_ARAB) — Arabic script

  • script_id = 6 (DV_AT_SCRIPT_HANI) — Han

  • script_id = 7 (DV_AT_SCRIPT_KANA) — Hiragana/Katakana

feature_id

Index of the glyph substitution feature for which the glyph substitutions are to be retrieved. At present, this can be one of the following:

  • feature_id = 0 (DV_AT_GSUBST_NONE) — No specific feature

  • feature_id = 1 (DV_AT_GSUBST_INIT) — Initial forms

  • feature_id = 2 (DV_AT_GSUBST_MEDI) — Medial forms

  • feature_id = 3 (DV_AT_GSUBST_FINA) — Final forms

  • feature_id = 4 (DV_AT_GSUBST_LIGA) — Ligatures

  • feature_id = 5 (DV_AT_GSUBST_RLIG) — Required ligatures

  • feature_id = 6 (DV_AT_GSUBST_DLIG) — Discretionary ligatures

  • feature_id = 7 (DV_AT_GSUBST_HLIG) — Historical ligatures

  • feature_id = 8 (DV_AT_GSUBST_VERT) — Vertical Alternates

  • feature_id = 9 (DV_AT_GSUBST_VRT2) — Vertical Alternates and Rotation

reserved

Reserved for future use. Must be set to 0.

substs_set

A valid pointer to the DT_AT_GLYPH_SUBSTS_SET type that will receive glyph substitutions for the specified script and glyph substitution feature, as defined in the specified font.

For details, see the Advanced Typography Structures section.

Return Value

The return value is 1 if the function was successful. Otherwise, the function returns 0.

 

Index