class CFbsTypefaceStore : public CTypefaceStore |
Font and bitmap server typeface store.
Private Member Functions | |
---|---|
CFbsTypefaceStore(CGraphicsDevice *) | |
void | ConstructL() |
TInt | CreateFont(CFont *&, const TFontInfo &) |
TInt | FontHeight(TInt, TInt, TInt) |
TInt | GetNearestFontInTwipsAndCreateFont(CFont *&, TInt, const TFontSpec &, TInt) |
void | GetPixelSizeInTwips(TSize &) |
TBool | IsFontLoaded(CFont *&, const TFontInfo &) |
TInt | SendGetNearestFontCommandNCreateFont(CFont *&, TInt, const TFontSpec &, TInt) |
Private Attributes | |
---|---|
CGraphicsDevice * | iDevice |
RFbsSession * | iFbs |
CFontCache * | iTwipsCache |
Inherited Attributes | |
---|---|
CTypefaceStore::iFontAccess |
CFbsTypefaceStore | ( | CGraphicsDevice * | aDevice | ) | [private] |
CGraphicsDevice * aDevice |
TInt | CreateFont | ( | CFont *& | aFont, |
const TFontInfo & | aFontInfo | |||
) | [private] |
CFont *& aFont | |
const TFontInfo & aFontInfo |
TInt | FontHeight | ( | TInt | aTypefaceIndex, |
TInt | aHeightIndex, | |||
TInt | aMessage | |||
) | const [private] |
IMPORT_C TInt | FontHeightInPixels | ( | TInt | aTypefaceIndex, |
TInt | aHeightIndex | |||
) | const |
IMPORT_C TInt | FontHeightInTwips | ( | TInt | aTypefaceIndex, |
TInt | aHeightIndex | |||
) | const [virtual] |
Gets the height of the font with specified height and typeface indices, in twips.
The value returned is rounded up or down to the nearest font height in twips.
The height of the font, in twips.
IMPORT_C TInt | GetFontById | ( | CFont *& | aFont, |
TUid | aUid, | |||
const TAlgStyle & | aAlgStyle | |||
) |
IMPORT_C void | GetLinkedTypefaceL | ( | CLinkedTypefaceSpecification & | aLinkedTypefaceSpec | ) |
CLinkedTypefaceSpecification & aLinkedTypefaceSpec |
IMPORT_C TInt | GetNearestFontInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) |
IMPORT_C TInt | GetNearestFontInTwips | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) | [virtual] |
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
Note that this deprecated function is replaced by the new GetNearestFontToDesignHeightInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.
KErrNone if successful; a system-wide error code otherwise.
Use GetNearestFontToDesignHeightInTwips
TInt | GetNearestFontInTwipsAndCreateFont | ( | CFont *& | aFont, |
TInt | aFbsMessage, | |||
const TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight = 0 | |||
) | [private] |
IMPORT_C TInt | GetNearestFontToDesignHeightInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) |
IMPORT_C TInt | GetNearestFontToDesignHeightInTwips | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) | [virtual] |
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
This new function replaces the deprecated GetNearestFontInTwips() yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInTwips() function instead. This will guarantee that every character within any given text string will fit within the given amount of twips, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which may result in cropped characters.
KErrNone if successful; a system-wide error code otherwise.
IMPORT_C TInt | GetNearestFontToMaxHeightInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) |
IMPORT_C TInt | GetNearestFontToMaxHeightInTwips | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) | [virtual] |
Gets the font which is the nearest to the given font specification.
When the font is no longer needed, call ReleaseFont().
The font and bitmap server returns a pointer to the nearest matching font from those available. Matches to max height of font - this does its best to return a font that will fit within the maximum height specified (but note that variations due to hinting algorithms may rarely result in this height being exceeded by up to one pixel). Problems can also be encountered with bitmap fonts where the typeface exists but doesn't have a font small enough.
KErrNone if successful; a system-wide error code otherwise.
void | GetPixelSizeInTwips | ( | TSize & | aSize | ) | const [private] |
TSize & aSize |
TBool | IsFontLoaded | ( | CFont *& | aFont, |
const TFontInfo & | aFontInfo | |||
) | const [private] |
CFont *& aFont | |
const TFontInfo & aFontInfo |
IMPORT_C CFbsTypefaceStore * | NewL | ( | CGraphicsDevice * | aDevice | ) | [static] |
CGraphicsDevice * aDevice |
IMPORT_C TInt | NumTypefaces | ( | ) | const [virtual] |
Gets the number of typefaces supported by the typeface store.
The number of supported typefaces.
IMPORT_C TInt | RegisterLinkedTypeface | ( | const CLinkedTypefaceSpecification & | aLinkedTypefaceSpec, |
TInt & | aId | |||
) |
const CLinkedTypefaceSpecification & aLinkedTypefaceSpec | |
TInt & aId |
IMPORT_C TInt | RegisterLinkedTypeface | ( | const CLinkedTypefaceSpecification & | aLinkedTypefaceSpec | ) |
const CLinkedTypefaceSpecification & aLinkedTypefaceSpec |
IMPORT_C void | RemoveFontFileLocksL | ( | const TDesC & | aDrive, |
TBool | aAllFonts | |||
) | [static] |
IMPORT_C void | RemoveFontFileLocksL | ( | const TDesC & | aFileName | ) | [static] |
const TDesC & aFileName |
TInt | SendGetNearestFontCommandNCreateFont | ( | CFont *& | aFont, |
TInt | aFbsMessage, | |||
const TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight = 0 | |||
) | [private] |
IMPORT_C void | SetDefaultBitmapType | ( | TGlyphBitmapType | aType | ) | const |
TGlyphBitmapType aType |
IMPORT_C void | SetDefaultLanguageForMetrics | ( | TLanguage | aLanguage | ) | const |
TLanguage aLanguage |
IMPORT_C void | SetFontNameAliasL | ( | const TDesC & | aFontAlias, |
const TDesC & | aFontName | |||
) | const |
IMPORT_C void | SetSystemDefaultTypefaceNameL | ( | const TDesC & | aFontTypefaceName | ) |
const TDesC & aFontTypefaceName |
IMPORT_C void | TypefaceSupport | ( | TTypefaceSupport & | aTypefaceSupport, |
TInt | aTypefaceIndex | |||
) | const [virtual] |
Gets typeface information for a specified typeface index.
This information is returned in aTypefaceSupport, and includes the typeface name and typeface attributes, the number of font heights, the maximum and minimum font heights, and whether it is a scaleable typeface.
TTypefaceSupport & aTypefaceSupport | On return, if the function executed successfully, this object contains the typeface information. |
TInt aTypefaceIndex | A typeface index number, in the range: zero to (NumTypefaces() - 1). |
IMPORT_C TInt | UpdateLinkedTypeface | ( | const CLinkedTypefaceSpecification & | aLinkedTypefaceSpec | ) |
const CLinkedTypefaceSpecification & aLinkedTypefaceSpec |