Main Page   Modules   Compound List   File List   Compound Members   File Members  

STTypeEnv methods


Functions

STStatus STTypeEnvNew (STTypeEnv *oEnv)
 A default constructor for a type environment object. More...

STStatus STTypeEnvNewCopy (STTypeEnv *oEnv, STTypeEnv iOldEnv)
 A copy constructor for a type environment object. More...

STStatus STTypeEnvDispose (STTypeEnv iEnv)
 A destructor. More...

STStatus STTypeEnvSetFontFallbackPolicy (STTypeEnv iEnv, STFontFallbackPolicy iPolicy)
 Sets the global font fallback policy. More...

STStatus STTypeEnvGetFontFallbackPolicy (STTypeEnv iEnv, STFontFallbackPolicy *oPolicy)
 Queries the global font fallback policy. More...

STStatus STTypeEnvSetFontFallbacks (STTypeEnv iEnv, STCount iFontCount, STFont *iFontArray)
 Sets the global default list of fallback fonts. More...

STStatus STTypeEnvGetFontFallbacks (STTypeEnv iEnv, STCount *oFontCount, STFont **oFontArray)
 Returns the global font fallback array. More...

STStatus STTypeEnvFindFont (STTypeEnv iEnv, const utf16 *iName, int iNameLength, uint16 iNameID, STFont *oFont)
 Finds a font by its name. More...

STStatus STTypeEnvFindAllFonts (STTypeEnv iEnv, const utf16 *iName, int iNameLength, uint16 iNameID, STCount *oFontCount, STFont **oFont)
 Finds all fonts by their Unicode name and returns an array of font IDs. More...

STStatus STTypeEnvFindFontByPlatformName (STTypeEnv iEnv, const byte *iName, int iNameLength, uint16 iPlatformID, uint16 iEncodingID, uint16 iLanguageID, uint16 iNameID, STFont *oFont)
 Finds a font by its platform-specific name and returns the font ID. More...

STStatus STTypeEnvFindAllFontsByPlatformName (STTypeEnv iEnv, const byte *iName, int iNameLength, uint16 iPlatformID, uint16 iEncodingID, uint16 iLanguageID, uint16 iNameID, STCount *oFontCount, STFont **oFont)
 Finds all fonts by their Platform name and returns an array of font IDs. More...

STStatus STTypeEnvFindFontsByURL (STTypeEnv iEnv, const char *iURL, STCount *oFontCount, STFont **oFont)
STStatus STTypeEnvCreateFont (STTypeEnv iEnv, STCount iDataCount, byte **iData, size_t *iDataLength, STCount *oFontCount, STFont **oFont)
 Creates an STSF font from several data streams. More...

STStatus STTypeEnvDestroyFont (STTypeEnv iEnv, STFont iFont)
 Disposes of a font previously created with STCreateFont(). More...

STStatus STTypeEnvCreateFontFromURL (STTypeEnv iEnv, STCount iURLCount, char **iURL, STCount *oFontCount, STFont **oFont)
STStatus STTypeEnvFindAllScalers (STTypeEnv iEnv, STCount *oScalerCount, STScaler **oScalerArray)
 Enumerates all font scalers available to this type environment. More...

STStatus STTypeEnvFindScaler (STTypeEnv iEnv, STTag iTag, STScaler *oScaler)
 Finds a scaler by its tag. More...

STStatus STTypeEnvFindAllLayoutEngines (STTypeEnv iEnv, STCount *oLECount, STLayoutEngine **oLEArray)
 Enumerates all layout engines available to this type environment. More...

STStatus STTypeEnvFindLayoutEngine (STTypeEnv iEnv, STTag iTag, STLayoutEngine *oLayoutEngine)
 Finds a layout engine by its tag. More...

STStatus STTypeEnvSetLocations (STTypeEnv iEnv, STFontLocationsMask iMask)
 Specfies which pre-defined locations STSF should scan for fonts. More...

STStatus STTypeEnvGetLocations (STTypeEnv iEnv, STFontLocationsMask *oMask)
 Returns the previously set font locations mask. More...

STStatus STTypeEnvSetFontFolders (STTypeEnv iEnv, STCount iFolderCount, char **iFolders)
 Specifies a list of directories STSF will scan for fonts in addition to pre-defined locations. More...

STStatus STTypeEnvGetFontFolders (STTypeEnv iEnv, STCount *oFolderCount, char ***oFolders)
 Returns a list of directories previously set with STTypeEnvSetFontFolders. More...


Function Documentation

STStatus STTypeEnvCreateFont STTypeEnv    iEnv,
STCount    iDataCount,
byte **    iData,
size_t *    iDataLength,
STCount   oFontCount,
STFont **    oFont
 

Creates an STSF font from several data streams.

Parameters:
iEnv  type environment object
iDataCount  number of data streams
iData  array of iDataCount pointers to data
iDataLength  array of data region lengths
oFontCount  number of created fonts
oFont  array of allocated font IDs
Returns:
STStatus

STStatus STTypeEnvDestroyFont STTypeEnv    iEnv,
STFont    iFont
 

Disposes of a font previously created with STCreateFont().

This function will return an error code if attempt is made to destroy a font that was not previously created with STCreateFont() All fonts that have not been explicitly destroyed will be destroyed when the Type Environment object from which they were created is destroyed.

Parameters:
iEnv  type environment object
iFont  font ID of a previously created font.
Returns:
STStatus

STStatus STTypeEnvDispose STTypeEnv    iEnv
 

A destructor.

Parameters:
iEnv  type environment object
Returns:
status

STStatus STTypeEnvFindAllFonts STTypeEnv    iEnv,
const utf16   iName,
int    iNameLength,
uint16    iNameID,
STCount   oFontCount,
STFont **    oFont
 

Finds all fonts by their Unicode name and returns an array of font IDs.

See STTypeEnvFindFont() for more information.

Parameters:
iEnv  type environment object
iName  a UTF-16 string that specifies the name
iNameLength  number of bytes in the iName string
iNameID  meaning of the name
oFontCount  a pointer to a variable where on return the number of returned fontIDs is stored
oFont  a pointer to an array of STFont variables where the resulting font IDs are stored on return. If this pointer is NULL the function just counts all fonts with the name iName. The array is allocated inside this function, and the caller is responsible for freeing up the memory.
Returns:
status

STStatus STTypeEnvFindAllFontsByPlatformName STTypeEnv    iEnv,
const byte   iName,
int    iNameLength,
uint16    iPlatformID,
uint16    iEncodingID,
uint16    iLanguageID,
uint16    iNameID,
STCount   oFontCount,
STFont **    oFont
 

Finds all fonts by their Platform name and returns an array of font IDs.

See STTypeEnvFindFontByPlatformName() for more information.

Parameters:
iEnv  type environment object
iName  a string that specifies the name
iNameLength  number of bytes in the name
iPlatformID  platform ID
iEncodingID  platform-specific encoding ID
iLanguageID  language ID
iNameID  meaning of the name
oFontCount  a pointer to a variable where on return the number of returned fontIDs is stored
oFont  a pointer to an array of STFont variables where the resulting font IDs are stored on return. If this pointer is NULL the function just counts all fonts with the name iName. The array is allocated inside this function, and the caller is responsible for freeing up the memory.
Returns:
status

STStatus STTypeEnvFindAllLayoutEngines STTypeEnv    iEnv,
STCount   oLECount,
STLayoutEngine **    oLEArray
 

Enumerates all layout engines available to this type environment.

There is always at least one layout engine available to a type environment. The first layout engine in the output array of layout engine IDs is the default layout engine.

Parameters:
iEnv  type environment object
oLECount  returns the number of layout engines
oLEArray  allocated array of layout engines IDs
Returns:
STStatus

STStatus STTypeEnvFindAllScalers STTypeEnv    iEnv,
STCount   oScalerCount,
STScaler **    oScalerArray
 

Enumerates all font scalers available to this type environment.

Parameters:
iEnv  type environment object
oScalerCount  returns the number of found scalers
oScalerArray  allocated array of scaler IDs
Returns:
STStatus

STStatus STTypeEnvFindFont STTypeEnv    iEnv,
const utf16   iName,
int    iNameLength,
uint16    iNameID,
STFont   oFont
 

Finds a font by its name.

If the font name (iName) is NULL, it returns the first available font. iNameID parameter indicates the name ID of the name, as defined in TrueType/OpenType specs. A special value of iNameID (ST_NAME_ANY) indicates that ST will search for the specified font name among all names. Standard name ID values are defined in sttags.h header file.

Parameters:
iEnv  type environment object
iName  a UTF-16 string that specifies the name
iNameLength  number of bytes in the iName string
iNameID  meaning of the name
oFont  a pointer to STFont variable where on return the resulting font ID is stored
Returns:
status

STStatus STTypeEnvFindFontByPlatformName STTypeEnv    iEnv,
const byte   iName,
int    iNameLength,
uint16    iPlatformID,
uint16    iEncodingID,
uint16    iLanguageID,
uint16    iNameID,
STFont   oFont
 

Finds a font by its platform-specific name and returns the font ID.

Platform-specific names are defined in TrueType/OpenType specs. STSF synthesizes TrueType-compliant names for non-TrueType fonts. iPlatformID, iEncodingID, iLanguageID, and iNameID have special values of ST_PLATFORM_ANY, ST_ENCODING_ANY, ST_LANGUAGE_ANY, and ST_NAME_ANY that indicate that their values do not matter. If the font name is NULL, the first font that satisfies the search criterion is returned.

Parameters:
iEnv  type environment object
iName  a string that specifies the name
iNameLength  number of bytes in the name
iPlatformID  platform ID
iEncodingID  platform-specific encoding ID
iLanguageID  language ID
iNameID  meaning of the name
oFont  a pointer to STFont variable where on return the resulting font ID is stored
Returns:
status

STStatus STTypeEnvFindLayoutEngine STTypeEnv    iEnv,
STTag    iTag,
STLayoutEngine   oLayoutEngine
 

Finds a layout engine by its tag.

Parameters:
iEnv  type environment object
iTag  a tag assigned to the layout engine
oScaler  returns a scaler ID
Returns:
STStatus

STStatus STTypeEnvFindScaler STTypeEnv    iEnv,
STTag    iTag,
STScaler   oScaler
 

Finds a scaler by its tag.

Parameters:
iEnv  type environment object
iTag  a tag assigned to the scaler. Known tags: iFontFusionScaler - 'FFUS' - FontFusion scaler iFreeType1Scaler - 'FTY1' - FreeType v. 1 scaler iFreeType2Scaler - 'FTY2' - FreeType v. 2 scaler
oScaler  returns a scaler ID
Returns:
STStatus

STStatus STTypeEnvGetFontFallbackPolicy STTypeEnv    iEnv,
STFontFallbackPolicy   oPolicy
 

Queries the global font fallback policy.

Parameters:
iEnv  STTypeEnv object
oPolicy  a value that indicates the font fallback policy is returned here
Returns:
STStatus

STStatus STTypeEnvGetFontFallbacks STTypeEnv    iEnv,
STCount   oFontCount,
STFont **    oFontArray
 

Returns the global font fallback array.

This function allocates memory for the array and it is the responsibility of the caller to free the memory when it is no longer used.

Parameters:
iEnv  type environment object
oFontCount  number of fonts
Returns:
STSTatus

STStatus STTypeEnvGetFontFolders STTypeEnv    iEnv,
STCount   oFolderCount,
char ***    oFolders
 

Returns a list of directories previously set with STTypeEnvSetFontFolders.

Memory is allocated by STSF and it is the responsibility of the caller to deallocate all strings and then the array.

Parameters:
iEnv  type environment
oFolderCount  number of directories in the oFolders array
iFolders  array of directories
Returns:
STStatus

STStatus STTypeEnvGetLocations STTypeEnv    iEnv,
STFontLocationsMask   oMask
 

Returns the previously set font locations mask.

Parameters:
iEnv  type environment object
oMask  one or more flags ORed together
Returns:
STStatus

STStatus STTypeEnvNew STTypeEnv   oEnv
 

A default constructor for a type environment object.

Parameters:
oEnv  on return a pointer to the new type environment object is stored here
Returns:
status

STStatus STTypeEnvNewCopy STTypeEnv   oEnv,
STTypeEnv    iOldEnv
 

A copy constructor for a type environment object.

Parameters:
oEnv  on return a pointer to the new type environment is stored here
iOldEnv  original type environment
Returns:
status

STStatus STTypeEnvSetFontFallbackPolicy STTypeEnv    iEnv,
STFontFallbackPolicy    iPolicy
 

Sets the global font fallback policy.

All objects that use this Type Environment object will inherit this font fallback policy.

Parameters:
iEnv  STTypeEnv object
iPolicy  a value that indicates the font fallback policy
Returns:
STStatus

STStatus STTypeEnvSetFontFallbacks STTypeEnv    iEnv,
STCount    iFontCount,
STFont   iFontArray
 

Sets the global default list of fallback fonts.

This default setting can be overridden for text objects by calling STTextSetFontFallbacks(). When some glyphs are missing from fonts set by style objects, font fallbacks list will be searched for replacement fonts.

Parameters:
iEnv  type environment object
iFontCount  number of fonts in the font array
iFontArray  array of fonts
Returns:
STStatus

STStatus STTypeEnvSetFontFolders STTypeEnv    iEnv,
STCount    iFolderCount,
char **    iFolders
 

Specifies a list of directories STSF will scan for fonts in addition to pre-defined locations.

Setting iFolderCount to 0 makes STSF scan only pre-defined font locations

Parameters:
iEnv  type environment
iFolderCount  number of directories in the iFolders array
iFolders  array of directories
Returns:
STStatus

STStatus STTypeEnvSetLocations STTypeEnv    iEnv,
STFontLocationsMask    iMask
 

Specfies which pre-defined locations STSF should scan for fonts.

Parameters:
iEnv  type environment object
iMask  one or more flags ORed together
Returns:
STStatus


Generated on Thu Mar 20 23:35:53 2003 for Standard Type Services by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001