Mapping Fonts

A font mapper is a LVectorBase::VectorFontMapperCallback callback function, defined by the user, which is used to set the font characteristics for any text added to the vector handle after enabling a font mapper for a vector handle by calling LVectorBase::EnableFontMapper. If the font mapper callback function returns an error, then the changes to the LogFont will be ignored.

For example, consider the situation in which the user is loading a CGM file that contains text of font Arial. If a font mapper callback function has not been enabled using LVectorBase::EnableFontMapper, the user has no control over the font of the text, and it will be added to the vector drawing as Arial. If a font mapper callback function is defined for the LVectorBase::VectorFontMapperCallback function, before the CGM file is loaded, the user can catch the font of the text and change it to something such as Courier New. When the text that is part of the CGM file is added to the vector drawing, the text will appear as Courier New instead of Arial.

To determine whether a font mapper is enabled, call LVectorBase::IsFontMapperEnabled.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help