class CFontStore : public CTypefaceStore |
A store for fonts.
Stores and handles both open and fixed-size fonts. Open fonts are made from open (scalable) typefaces by Open Font plug-in rasterizers. Fonts of other typefaces are stored in a limited number of fixed sizes. However, which is being used is transparent to the user of this class. For example the GetNearestFont...() functions get a bitmap font which may be retrieved from memory or generated via a rasterizer.
Public Attributes | |
---|---|
TInt | iKPixelHeightInTwips |
TInt | iKPixelWidthInTwips |
Private Attributes | |
---|---|
TGlyphBitmapType | iDefaultBitmapType |
CArrayPtrFlat< CFontBitmap > | iFontBitmapList |
CArrayPtrFlat< CFontStoreFile > | iFontStoreFileList |
RFs | iFs |
RArray< RHandleBase > * | iHandleArray |
RHeap * | iHeap |
TInt | iNumberOfShaperCaches |
CArrayPtrFlat< COpenFontFile > | iOpenFontFileList |
CArrayPtrFlat< COpenFontRasterizer > | iOpenFontRasterizerList |
COpenFontSessionCacheList * | iOpenFontSessionCacheList |
TInt | iOpenFontShaperCacheMemUsage |
RPointerArray< CTypefaceSupportInfo > | iOpenFontTypefaceSupportList |
TInt | iOpenFontUid |
TInt | iReserved |
CArrayPtrFlat< CShaperFactory > | iShaperFactoryList |
CArrayFixFlat< TTypefaceFontBitmap > | iTypefaceFontBitmapList |
CArrayPtrFlat< TTypeface > | iTypefaceList |
TUint32 | iUniqueFontIdCount |
TAny * | iUnused2 |
Inherited Attributes | |
---|---|
CTypefaceStore::iFontAccess |
void | AddSanityCheckedFontL | ( | const TParse & | aFileName, |
TUid & | aUid | |||
) | [private] |
TInt | AddTypefacesToSupportList | ( | COpenFontFile * | aOpenFontFile | ) | [private] |
COpenFontFile * aOpenFontFile |
void | CleanupRemoveFontFile | ( | TAny * | aCleanupInfo | ) | [private, static] |
TAny * aCleanupInfo |
IMPORT_C TInt | CreateLinkedTypeface | ( | const TLinkedTypefaceSpecificationArgs & | aLinkedTypefaceSpec, |
TInt | aSession, | |||
TInt & | aId | |||
) |
const TLinkedTypefaceSpecificationArgs & aLinkedTypefaceSpec | |
TInt aSession | |
TInt & aId |
TInt | CreateLinkedTypefaceL | ( | const TLinkedTypefaceSpecificationArgs & | aLinkedTypefaceSpec, |
TInt | aSession, | |||
TInt & | aId | |||
) | [private] |
const TLinkedTypefaceSpecificationArgs & aLinkedTypefaceSpec | |
TInt aSession | |
TInt & aId |
IMPORT_C void | DeleteSessionCache | ( | TInt | aSessionHandle | ) |
TInt aSessionHandle |
TInt | FindBitmapFontFileIndexByUid | ( | TUid | aUid | ) | [private] |
TUid aUid |
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.
void | GenerateLinkedFontFileL | ( | COpenFontLinkedTypefaceSpecification & | aSpec, |
const TAny * | aExtension, | |||
TBool | aUpdate | |||
) | [private] |
COpenFontLinkedTypefaceSpecification & aSpec | |
const TAny * aExtension | |
TBool aUpdate |
TInt | GetCanonicalIndex | ( | TInt | aTypefaceIndex | ) | const [private] |
TInt aTypefaceIndex |
IMPORT_C TInt | GetFontById | ( | CFont *& | aFont, |
TUid | aUid, | |||
const TAlgStyle & | aAlgStyle | |||
) |
IMPORT_C TBool | GetFontFilePath | ( | const TDesC & | aFontName, |
TFileName & | aFilePath | |||
) | const |
IMPORT_C void | GetLinkedTypefaceL | ( | TLinkedTypefaceSpecificationArgs & | aLinkedTypefaceSpec | ) |
TLinkedTypefaceSpecificationArgs & aLinkedTypefaceSpec |
void | GetNearestBitmapFontInPixelsL | ( | CFont *& | aFont, |
TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
IMPORT_C TInt | GetNearestFontInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) |
IMPORT_C TInt | GetNearestFontInPixels | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec | |||
) |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec |
TInt | GetNearestFontInPixels | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec | |
TInt aMaxHeight |
TInt | GetNearestFontInPixelsL | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec | |
TInt aMaxHeight |
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
IMPORT_C TInt | GetNearestFontInTwips | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec | |||
) |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec |
IMPORT_C TInt | GetNearestFontToDesignHeightInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec | |||
) |
IMPORT_C TInt | GetNearestFontToDesignHeightInPixels | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec | |||
) |
CFont *& aFont | |
const TOpenFontSpec & 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 | GetNearestFontToDesignHeightInTwips | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec | |||
) |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec |
IMPORT_C TInt | GetNearestFontToMaxHeightInPixels | ( | CFont *& | aFont, |
const TFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) |
IMPORT_C TInt | GetNearestFontToMaxHeightInPixels | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) |
CFont *& aFont | |
const TOpenFontSpec & 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.
IMPORT_C TInt | GetNearestFontToMaxHeightInTwips | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec | |
TInt aMaxHeight |
TInt | GetNearestOpenFontInPixelsByFontName | ( | COpenFont *& | aNearestOpenFont, |
TOpenFontSpec & | aActualFontSpec, | |||
const TOpenFontSpec & | aDesiredFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
COpenFont *& aNearestOpenFont | |
TOpenFontSpec & aActualFontSpec | |
const TOpenFontSpec & aDesiredFontSpec | |
TInt aMaxHeight |
TInt | GetNearestOpenFontInPixelsBySimilarity | ( | COpenFont *& | aNearestOpenFont, |
TOpenFontSpec & | aActualFontSpec, | |||
const TOpenFontSpec & | aDesiredFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
COpenFont *& aNearestOpenFont | |
TOpenFontSpec & aActualFontSpec | |
const TOpenFontSpec & aDesiredFontSpec | |
TInt aMaxHeight |
void | GetNearestOpenFontInPixelsL | ( | CFont *& | aFont, |
TOpenFontSpec & | aActualFontSpec, | |||
const TOpenFontSpec & | aDesiredFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
CFont *& aFont | |
TOpenFontSpec & aActualFontSpec | |
const TOpenFontSpec & aDesiredFontSpec | |
TInt aMaxHeight |
TInt | GetNearestRealFontInPixels | ( | CFont *& | aFont, |
const TOpenFontSpec & | aFontSpec, | |||
TInt | aMaxHeight | |||
) | [private] |
CFont *& aFont | |
const TOpenFontSpec & aFontSpec | |
TInt aMaxHeight |
TTypeface * | GetNearestTypeface | ( | const TTypeface & | aTypeface | ) | const [private] |
const TTypeface & aTypeface |
TTypefaceFontBitmap | GetNearestTypefaceFontBitmap | ( | const TFontSpec & | aFontSpecInPixels, |
TInt | aMaxHeight | |||
) | [private] |
IMPORT_C TBool | HaveTypefaceFamilyName | ( | const TDesC & | aName | ) |
const TDesC & aName |
TBool | IncRefCountOfLoadedFont | ( | const TParse & | aFileName, |
TUid & | aFontUid | |||
) | [private] |
IMPORT_C void | InstallRasterizerL | ( | COpenFontRasterizer * | aRasterizer | ) |
COpenFontRasterizer * aRasterizer |
IMPORT_C void | InstallShaperFactoryL | ( | CShaperFactory * | aShaperFactory | ) |
CShaperFactory * aShaperFactory |
void | InternalizeFontStoreFileL | ( | CFontStoreFile * | aFontStoreFile, |
TInt | aFontVersion | |||
) | [private] |
CFontStoreFile * aFontStoreFile | |
TInt aFontVersion |
TBool | IsFontLoaded | ( | CFont *& | aFont, |
const TAlgStyle & | aAlgStyle, | |||
const TFontSpec & | aFontSpecInPixels, | |||
TUid | aUid, | |||
TInt | aMaxHeight = 0 | |||
) | const [private] |
TBool | IsFontLoaded | ( | CFont *& | aFont, |
const TAlgStyle & | aAlgStyle, | |||
const TOpenFontSpec & | aFontSpecInPixels, | |||
TInt | aMaxHeight | |||
) | const [private] |
CFont *& aFont | |
const TAlgStyle & aAlgStyle | |
const TOpenFontSpec & aFontSpecInPixels | |
TInt aMaxHeight |
TUid | LoadFileAsBitmapFontL | ( | const TParse & | aParse | ) | [private] |
const TParse & aParse |
TBool | LoadFileAsOpenFontL | ( | const TParse & | aFileName, |
TUid & | aFontUid | |||
) | [private] |
void | LoadFontsL | ( | const TDesC & | aFontsDir | ) | [private] |
const TDesC & aFontsDir |
CBitmapFont * | NewFontL | ( | const TFontSpec & | aFontSpecInTwips, |
const TAlgStyle & | aAlgStyle, | |||
CFontBitmap * | aFontBitmap | |||
) | [private] |
CBitmapFont * | NewFontL | ( | const TOpenFontSpec & | aFontSpecInTwips, |
const TAlgStyle & | aAlgStyle, | |||
COpenFont * | aOpenFont | |||
) | [private] |
const TOpenFontSpec & aFontSpecInTwips | |
const TAlgStyle & aAlgStyle | |
COpenFont * aOpenFont |
IMPORT_C TInt | NumTypefaces | ( | ) | const [virtual] |
Gets the number of typefaces supported by the typeface store.
The number of supported typefaces.
void | RemoveTypefacesFromSupportList | ( | COpenFontFile * | aOpenFontFile | ) | [private] |
COpenFontFile * aOpenFontFile |
void | SanityCheckFontFileL | ( | TParse & | aParse | ) | [private] |
TParse & aParse |
void | SanityCheckForTtfL | ( | RFile & | aFile, |
TUint | aFontFileSize, | |||
TBool | aStrictChecking | |||
) | [private] |
void | SetDefaultBitmapType | ( | TGlyphBitmapType | aType | ) | [inline] |
Sets a default bitmap type.
TGlyphBitmapType aType | A default bitmap type. |
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). |
void | TypefaceSupportLinked | ( | TTypefaceSupport & | aTypefaceSupport, |
TInt | aTypefaceIndex | |||
) | const [private] |
TTypefaceSupport & aTypefaceSupport | |
TInt aTypefaceIndex |
IMPORT_C void | UpdateLinkedTypefaceL | ( | const TLinkedTypefaceSpecificationArgs & | aLinkedTypefaceSpec | ) |
const TLinkedTypefaceSpecificationArgs & aLinkedTypefaceSpec |
TInt | ValidateLinkedFontSpecificationL | ( | COpenFontLinkedTypefaceSpecification & | aSpec, |
TBool | aOverwrite | |||
) | const [private] |
COpenFontLinkedTypefaceSpecification & aSpec | |
TBool aOverwrite |
TInt | VerticalPixelsToTwips | ( | TInt | aPixelHeight | ) | const [private] |
TInt aPixelHeight |
TInt | VerticalTwipsToPixels | ( | TInt | aTwipsHeight | ) | const [private] |
TInt aTwipsHeight |
CArrayPtrFlat< CFontStoreFile > | iFontStoreFileList | [private] |
TInt | iKPixelHeightInTwips |
The height of 1000 pixels in twips.
This is set in the constructor. If the appropriate HALData attributes are set (EDisplayYPixels and EDisplayYTwips) then the value is calculated using these; otherwise the value is set to 11860.
TInt | iKPixelWidthInTwips |
The width of 1000 pixels in twips.
This is set in the constructor. If the appropriate HALData attributes are set (EDisplayXPixels and EDisplayXTwips) then the value is calculated using these; otherwise the value is set to 11860.
CArrayPtrFlat< COpenFontFile > | iOpenFontFileList | [private] |
CArrayPtrFlat< COpenFontRasterizer > | iOpenFontRasterizerList | [private] |
COpenFontSessionCacheList * | iOpenFontSessionCacheList | [private] |
RPointerArray< CTypefaceSupportInfo > | iOpenFontTypefaceSupportList | [private] |
CArrayPtrFlat< CShaperFactory > | iShaperFactoryList | [private] |
CArrayFixFlat< TTypefaceFontBitmap > | iTypefaceFontBitmapList | [private] |