API Reference > OdDb Classes > OdDbHostAppServices Class > OdDbHostAppServices Methods > OdDbHostAppServices::getSubstituteFont Method
OdDbHostAppServices::getSubstituteFont Method
Syntax
C++
virtual OdString getSubstituteFont(const OdString& fontName, OdFontType fontType);
Parameters 
Description 
const OdString& fontName 
[in] Font name.  
OdFontType fontType 
[in] Font type. 

Returns the font to be used when the specified font is not found. 

 

fontType must be one of the following: 

 

Name 
Value 
Description 
kFontTypeUnknown 
Unknown. 
kFontTypeShx 
SHX font. 
kFontTypeTrueType 
TrueType font. 
kFontTypeShape 
Shape file. 
kFontTypeBig 
BigFont file. 

 

The default implementation of this function calls getAlternateFontName for fonts that are not of type kFontTypeShape or kFontTypeBig. When they are, and empty string is returned. 

Client code could override this function to perform custom substitution for these types of fonts.

Font Handling

Copyright © 2002–2020. Open Design Alliance. All rights reserved.