Index

C/C++ Functions

dtGlyphGetKern

DT_SWORD dtGlyphGetKern(DT_DTENGINE engine, DT_ID_SWORD font_index, DT_ID_ULONG glyph_index_1, DT_ID_ULONG glyph_index_2, DT_SWORD* kerning_x, DT_SWORD* kerning_y)

Short Description: Get kerning for two adjacent glyphs

dtCharGetKern

DT_SWORD dtCharGetKern(DT_DTENGINE engine, DT_ID_SWORD font_index, DT_ID_ULONG char_code_1, DT_ID_ULONG char_code_2, DT_SWORD* kerning_x, DT_SWORD* kerning_y)

Short Description: Get kerning for two adjacent characters

This function returns the font dependent kerning information for the kern-pair referenced by a pair of Unicode character codes (or a pair of font dependent glyph indices).

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.

char_code_1

Unicode character code of the first (left for left-to-right scripts) glyph in the kern-pair.

char_code_2

Unicode character code of the second (right for left-to-right scripts) glyph in the kern-pair.

glyph_index_1

Font dependent index of the first (left for left-to-right scripts) glyph in the kern-pair.

glyph_index_2

Font dependent index of the second (right for left-to-right scripts) glyph in the kern-pair.

kerning_x

A valid pointer to the DT_SWORD type that will receive the amount of horizontal kerning in font units. If the specified kern-pair does not exist, this value is 0.

However, if you do not wish to receive the value of the above parameter, you may set this pointer to DV_NULL.

kerning_y

A valid pointer to the DT_SWORD type that will receive the amount of vertical kerning in font units. Since virtually all Roman characters are kerned horizontally, this value is almost always 0. If the specified kern-pair does not exist, this value is 0.

However, if you do not wish to receive the value of the above parameter, you may set this pointer to DV_NULL.

Return Value

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

 

Index