|
CartoType API
|
#include <cartotype_typeface.h>
Inherited by CFreeTypeFace.
Public Member Functions | |
| CT_IMPORT | CTypeface (const TTypefaceAttrib &aAttrib) |
| CT_IMPORT TResult | SetInstance (const TTypefaceInstance &aInstance) |
| virtual CGlyph * | Glyph (TResult &aError, int32 aCode)=0 |
| virtual bool | HasCharacter (int32 aCode)=0 |
| virtual TResult | OnNewInstance ()=0 |
| virtual int32 | MemoryUsed ()=0 |
| virtual void | ClearCachedData ()=0 |
| const TTypefaceAttrib & | Attrib () const |
| const TTypefaceInstance & | Instance () const |
| virtual void * | FreeTypeFace () |
| CT_IMPORT void | SetScripts () |
| const TFontMetrics & | Metrics () const |
| int32 | Id () const |
| void | SetId (int32 aId) |
Static Public Member Functions | |
| static CT_IMPORT uint32 | Script (uint32 aCode) |
Protected Attributes | |
| TFontMetrics | iMetrics |
A typeface is a factory that creates glyphs for drawing text. Glyhs are cached by the CartoType engine.
| const TTypefaceAttrib& CartoType::CTypeface::Attrib | ( | ) | const [inline] |
Return the attributes (name, etc.) of this typeface.
| virtual void CartoType::CTypeface::ClearCachedData | ( | ) | [pure virtual] |
Clear any cached data.
| virtual void* CartoType::CTypeface::FreeTypeFace | ( | ) | [inline, virtual] |
Return the FreeType FT_Face if any. Used only in supporting tools, not in the main CartoType library.
Create a glyph for the character code or glyph code aCode. Character codes are Unicode values. Glyph codes are negative numbers.
| virtual bool CartoType::CTypeface::HasCharacter | ( | int32 | aCode | ) | [pure virtual] |
Return true if this typeface supports (contains a glyph or glyphs for) the character indexed by the Unicode value aCode.
| int32 CartoType::CTypeface::Id | ( | ) | const [inline] |
Return the unique ID.
| const TTypefaceInstance& CartoType::CTypeface::Instance | ( | ) | const [inline] |
Return the instance (size, etc.) currently set for this typeface.
| virtual int32 CartoType::CTypeface::MemoryUsed | ( | ) | [pure virtual] |
Return the number of bytes of heap used by the typeface.
| const TFontMetrics& CartoType::CTypeface::Metrics | ( | ) | const [inline] |
Return the metrics of the current instance.
| virtual TResult CartoType::CTypeface::OnNewInstance | ( | ) | [pure virtual] |
Set up the typeface so that it can create glyphs for a new instance. This function is called immediately after iInstance is changed. It must set iMetrics.
| CT_EXPORT uint32 CTypeface::Script | ( | uint32 | aCode | ) | [static] |
Return the script of a character.
| void CartoType::CTypeface::SetId | ( | int32 | aId | ) | [inline] |
Set the unique ID. For use by CTypefaceResource.
| CT_EXPORT void CTypeface::SetScripts | ( | ) |
Set the record of which scripts are supported.
1.7.5.1