![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
class CFbsTypefaceStore : public CTypefaceStore;
Font and bitmap server typeface store.
CBase
-
Base class for all classes to be instantiated on the heap.
CTypefaceStore
- Typeface store abstract base interface.
CFbsTypefaceStore
- Font and bitmap server typeface store.
Defined in CFbsTypefaceStore
:
AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...DefaultBitmapType()const
Gets the default anti-aliasing setting for scalable fonts. FontHeightInPixels(TInt,TInt)const
Gets the height of the font with specified height and typeface indices, in pixel...FontHeightInTwips(TInt,TInt)const
Gets the height of the font with specified height and typeface indices, in twips...GetFontById(CFont *&,TUid,const TAlgStyle &)
Gets a Bitmap Font by unique identifier and algorithmic drawing style. Chooses f...GetNearestFontInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...NewL(CGraphicsDevice *)
Allocates and constructs a CFbsTypefaceStore, specifying a graphics device. NumTypefaces()const
Gets the number of typefaces supported by this store. RemoveFile(TInt)
Decrements the font store files reference count and removes the typeface when th...SetDefaultBitmapType(TGlyphBitmapType)const
Sets the default anti-aliasing setting for scalable fonts. Unless this default s...SetDefaultLanguageForMetrics(TLanguage)const
Specifies the default language with which font metrics calculation will be based...SetFontNameAliasL(const TDesC &,const TDesC &)const
Sets an alias for a font name.SetSystemDefaultTypefaceNameL(const TDesC &)
Sets the system default font typeface. This font will be used when finding the n...TypefaceSupport(TTypefaceSupport &,TInt)const
Gets typeface information for a specified typeface index. This information is re...~CFbsTypefaceStore()
Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CTypefaceStore
:
AddFontL(CFont *)
Adds a hold, by a client of the typeface store, on the specified font.BaselineOffset(TInt,TFontPrintPosition)
Gets the baseline offset, in twips, for any font in subscript or superscript for...ConstructL()
Second phase constructor. GetNearestFontInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.IncrementFontCount(const CFont *)
Search for the font in iFontAccess and increment its count. ReleaseFont(CFont *)
Releases the hold of a typeface store client on a specified font.SuperSubHeight(TInt,TFontPrintPosition)
Gets the height for a font in subscript or superscript form.iFontAccess
A list of fonts accessed by clients of the typeface store, which pairs a font wi...IMPORT_C static CFbsTypefaceStore* NewL(CGraphicsDevice *aDevice);
Allocates and constructs a CFbsTypefaceStore, specifying a graphics device.
|
|
IMPORT_C TInt AddFile(const TDesC &aName, TInt &aId);
Adds a font store file to the typeface store. All the fonts in added and installed font files are available to the GetNearestFont...()
family of functions. Additionally Bitmap Fonts are also available to CFbsTypefaceStore::GetFontById(CFont *&,TUid,const TAlgStyle &)
.
This function adds the typeface to a reference counted list of fonts. Each client that adds the typeface to the store increases
the reference count. The count is decremented when a client using the typeface is destroyed or calls the CFbsTypefaceStore::RemoveFile(TInt)
function. The typeface is removed from the store only when the the reference count is zero (it is not being used by any clients).
The CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
function is similar, except that the typeface is not reference counted, and is hence not removed when all the clients using
it are destroyed.
|
|
CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...CFbsTypefaceStore::RemoveFile(TInt)
Decrements the font store files reference count and removes the typeface when th...CFbsTypefaceStore::GetFontById(CFont *&,TUid,const TAlgStyle &)
Gets a Bitmap Font by unique identifier and algorithmic drawing style. Chooses f...CFbsTypefaceStore::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.IMPORT_C TInt InstallFile(const TDesC &aName, TInt &aId);
Installs a font store file into the typeface store. All the fonts in added and installed font files are available to the GetNearestFont...()
family of functions. Additionally Bitmap Fonts are also available to CFbsTypefaceStore::GetFontById(CFont *&,TUid,const TAlgStyle &)
.
Installed files remain in the typeface store even after the client which added them is destroyed. They can be removed using
CFbsTypefaceStore::RemoveFile(TInt)
.
|
|
CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::RemoveFile(TInt)
Decrements the font store files reference count and removes the typeface when th...CFbsTypefaceStore::GetFontById(CFont *&,TUid,const TAlgStyle &)
Gets a Bitmap Font by unique identifier and algorithmic drawing style. Chooses f...CFbsTypefaceStore::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.IMPORT_C void RemoveFile(TInt aId=0);
Decrements the font store files reference count and removes the typeface when the reference count is zero. This function decrements
the reference count of a file which was added using CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
, and removes it from the store if the reference count reaches zero. If the font was not found in the list of reference-counted
files (see CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
) it is assumed to be an installed file (see CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
) and an attempt is made to remove it anyway.
Note: The id passed to this function has a different meaning depending on whether or not the file is a Symbian-format bitmap file. If it is a Symbian-format bitmap file the id is a UID, and is the same from one session to the next. If it is an Open Font System file (e.g., a TrueType file) the id is an arbitrary number. Consequently the id may vary from one session to the next, and should not be saved in a file: however it may be kept and used by a client as long as the client is running.
|
CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...Interface status: | deprecated | Use GetNearestFontToDesignHeightInPixels |
IMPORT_C TInt GetNearestFontInPixels(CFont *&aFont, const TFontSpec &aFontSpec);
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 GetNearestFontToDesignHeightInPixels()
yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInPixels()
function instead. This will guarantee that every character within any given text string will fit within the given amount
of pixels, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which
may result in cropped characters.
Chooses from the fonts loaded at system startup or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C virtual TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec);
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.
Chooses from the fonts loaded at system startup or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C TInt GetNearestFontToDesignHeightInPixels(CFont *&aFont, const TFontSpec &aFontSpec);
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 GetNearestFontInPixels()
yielding (virtually) the same result. However clients are strongly encouraged to use the new GetNearestFontToMaxHeightInPixels()
function instead. This will guarantee that every character within any given text string will fit within the given amount
of pixels, whereas the design height is an aesthetic unit decided by the font designer without strict physical meaning, which
may result in cropped characters.
Chooses from the fonts loaded at system startup or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C virtual TInt GetNearestFontToMaxHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight);
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.
Chooses from the fonts loaded at system startup or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C TInt GetNearestFontToMaxHeightInPixels(CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight);
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.
Chooses from the fonts loaded at system startup or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C TInt GetFontById(CFont *&aFont, TUid aUid, const TAlgStyle &aAlgStyle);
Gets a Bitmap Font by unique identifier and algorithmic drawing style. Chooses from the Bitmap fonts loaded at system startup
or through the CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
or CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
APIs.
|
|
CFbsTypefaceStore::GetNearestFontToMaxHeightInTwips(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToDesignHeightInTwips(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToMaxHeightInPixels(CFont *&,const TFontSpec &,TInt)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::GetNearestFontToDesignHeightInPixels(CFont *&,const TFontSpec &)
Gets the font which is the nearest to the given font specification.CFbsTypefaceStore::AddFile(const TDesC &,TInt &)
Adds a font store file to the typeface store. All the fonts in added and install...CFbsTypefaceStore::InstallFile(const TDesC &,TInt &)
Installs a font store file into the typeface store. All the fonts in added and i...IMPORT_C virtual TInt NumTypefaces() const;
Gets the number of typefaces supported by this store.
|
CTypefaceStore::NumTypefaces()const
Gets the number of typefaces supported by the typeface store.IMPORT_C virtual void TypefaceSupport(TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const;
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.
Returns benignly with an empty TTypefaceSupport
if the index is too high; this can happen if another process removes a typeface after the first process has already got the
number of typefaces. However, if the aTypefaceIndex<0 the function panics with EFbsTypefaceIndexOutOfRange.
|
CTypefaceStore::TypefaceSupport(TTypefaceSupport &,TInt)const
Gets typeface information for a specified typeface index.IMPORT_C virtual TInt FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const;
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.
If aTypefaceIndex<0 the function panics with EFbsTypefaceIndexOutOfRange. If aTypefaceIndex is greater than the number of typefaces or aHeightIndex<0 then the function returns 0. If aHeightIndex is greater than the number of heights then the function returns the biggest height.
|
|
CTypefaceStore::FontHeightInTwips(TInt,TInt)const
Gets the height of the font with specified height and typeface indices, in twips...IMPORT_C TInt FontHeightInPixels(TInt aTypefaceIndex, TInt aHeightIndex) const;
Gets the height of the font with specified height and typeface indices, in pixels. The value returned is rounded up or down to the nearest font height in pixels.
If aTypefaceIndex<0 the function panics with EFbsTypefaceIndexOutOfRange. If aTypefaceIndex is greater than the number of typefaces or aHeightIndex<0 then the function returns 0. If aHeightIndex is greater than the number of heights then the function returns the biggest height.
|
|
IMPORT_C TGlyphBitmapType DefaultBitmapType() const;
Gets the default anti-aliasing setting for scalable fonts.
|
IMPORT_C void SetDefaultBitmapType(TGlyphBitmapType aType) const;
Sets the default anti-aliasing setting for scalable fonts. Unless this default setting is overridden so that a font is explicitly
requested with anti-aliasing turned on or off, (see TOpenFontSpec::SetBitmapType(TGlyphBitmapType)
or TFontStyle::SetBitmapType(TGlyphBitmapType)
), fonts will use the default setting. The default setting would typically only be changed via the Control Panel. The new
setting affects fonts requested after the change has been made. There is currently no anti-aliasing support for bitmapped
fonts.
|
TFontStyle::SetBitmapType(TGlyphBitmapType)
Sets whether the font should be drawn using anti-aliasing. If set, this value ov...IMPORT_C void SetFontNameAliasL(const TDesC &aFontAlias, const TDesC &aFontName) const;
Sets an alias for a font name.
If a requested font cannot be found and its name occurs in the alias list then it will be searched for again using the font name corresponding to that alias. If an empty font name is passed then the alias will be removed the list.
|
IMPORT_C void SetDefaultLanguageForMetrics(TLanguage aLanguage) const;
Specifies the default language with which font metrics calculation will be based on. The default language will be used if none is set on the font specification.
|
TFontSpec::SetScriptTypeForMetrics(TLanguage)
Specifies the script with which font metrics calculation will be based on. Capability: | WriteDeviceData |
IMPORT_C void SetSystemDefaultTypefaceNameL(const TDesC &aFontTypefaceName);
Sets the system default font typeface. This font will be used when finding the nearest font and the font specified is an empty descriptor. If the system default font is not set, then the default behaviour is to find the nearest match.
|