Index

CDTEngineV8

FontGetStringValue

This function retrieves various string values that may be defined in the referenced font. Some of these values are format specific while others are format independent and/or have a more general purpose.

Parameters

ParameterDescription

font_index

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

string_id

Identifies the string to retrieve.

string_buffer

A valid pointer to a user-supplied buffer to which the function will copy the string value.

max_string_len

Size of the user-supplied buffer, i.e. the maximum number of bytes that can be stored in the buffer.

Return Value

If the function was not successful, the return value is 0. If the function was successful, the return value is the actual length of the retrieved string, in bytes. If the string exceeds max_string_len bytes in length, only the first max_string_len bytes will be copied (i.e. the string will be truncated).

What is copied to the string_buffer depends on string_id. At present, the following IDs are supported:

Standard Return Values

Additional Return Values For multiple-master and Variable Fonts

Note 1

When parsing or searching for white space characters in strings that are taken directly from Type 1 fonts, please be prepared to use a robust parsing function. This is because in Type 1 font programs the term "white space character" refers to a whole family of space characters such as: a single space character, a single tab character, multiple space characters, multiple tab characters, as well as various combinations of single or multiple space and/or tab characters. These combinations, while rare, may exist in certain Type 1 fonts.



 

Index