Static Public Member Functions | List of all members
DgnFontManager Struct Referenceabstract

The DgnFontManager provides access to all font related services. More...

#include <DgnFontManager.h>

Inheritance diagram for DgnFontManager:
DgnHost::IHostObject NonCopyableClass

Static Public Member Functions

static DgnFontNumMapP GetDgnFontMapP (DgnFileP dgnFile)
 Get the DgnFontNumMap for a given DgnFile. More...
 
static DgnFontNumMapP GetDgnFontMapP (DgnModelRefP modelRef)
 Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience. More...
 
static DgnFontR GetDefaultRscFont ()
 Get the default RSC font. This font is specified in the Font Configuration File and is used to render missing RSC Fonts. More...
 
static DgnFontR GetDefaultShxFont ()
 Get the default SHX font. This font is specified in the Font Configuration File and is used to render missing SHX fonts. More...
 
static DgnFontP GetDefaultShxBigFont ()
 Get the default SHX bigfont. More...
 
static DgnFontR GetDefaultTrueTypeFont ()
 Get the default TrueType font. This font is specified in the Font Configuration File and is used to render missing TrueType fonts. More...
 
static DgnFontR GetDecoratorFont ()
 Get a Font that matches the font used in dialog boxes. More...
 
static DgnFontP GetFontByNumber (UInt32 fontNum, DgnFileP dgnFile)
 Get a Font for a given DgnFile and font number. More...
 
static DgnFontP GetFontByNumber (UInt32 fontNum, DgnModelRefP modelRef)
 Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience. More...
 
static DgnFontR ResolveFontNum (UInt32 fontNum, DgnFileP dgnFile)
 Resolve a Font for a given DgnFile and font number. More...
 
static DgnFontR ResolveFontNum (UInt32 fontNum, DgnModelRefP modelRef)
 Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience. More...
 
static DgnFontP FindSystemFont (WCharCP fontName, DgnFontFilter filter=DgnFontFilter::Normal)
 Find a Font in the system FontCatalogs by name. More...
 
static bool VisitAllSystemFonts (DgnFontVisitor &visitor, DgnFontFilter filter=DgnFontFilter::Normal)
 Visit all fonts in the system FontCatalogs, optionally with a filter applied. More...
 
static DgnFontListPtr CreateKnownFontList (DgnFileP dgnFile=0, DgnFontFilter filter=DgnFontFilter::Normal)
 Create a FontList with the fonts in the system FontCatalogs, optionally limited by a filter. More...
 
static DgnFontCR GetFontForCodePage (UInt32 fontNum, UInt32 bigFontNum, DgnFileR)
 Given two font numbers, returns the Font that should be used for code page and encoding conversions. More...
 

Additional Inherited Members

- Public Member Functions inherited from DgnHost::IHostObject
void OnHostTermination (bool isProgramExit)
 
- Protected Member Functions inherited from DgnHost::IHostObject
virtual ~IHostObject ()
 
virtual void _OnHostTermination (bool isProgramExit)=0
 
- Protected Member Functions inherited from NonCopyableClass
 NonCopyableClass ()
 
 ~NonCopyableClass ()
 

Detailed Description

The DgnFontManager provides access to all font related services.

Member Function Documentation

static DgnFontListPtr CreateKnownFontList ( DgnFileP  dgnFile = 0,
DgnFontFilter  filter = DgnFontFilter::Normal 
)
static

Create a FontList with the fonts in the system FontCatalogs, optionally limited by a filter.

Parameters
[in]dgnFileIf this argument is non-NULL, the FontList will also include any missing Fonts in the font table of this file.
[in]filterA filter to limit list to only fonts of a certain category.
Returns
A Ptr to the newly created list.
static DgnFontP FindSystemFont ( WCharCP  fontName,
DgnFontFilter  filter = DgnFontFilter::Normal 
)
static

Find a Font in the system FontCatalogs by name.

The system catalogs are initialized at startup and remain valid for the entire MicroStation session. That is, for a given fontName, this method will always return the same value if the Font exists.

Parameters
[in]fontNameThe name of the Font to find.
[in]filterLimit the search to specific categories of Fonts.
static DgnFontR GetDecoratorFont ( )
static

Get a Font that matches the font used in dialog boxes.

This can be useful for decorating graphics in a Viewport with annotations that appear as user interface components.

static DgnFontR GetDefaultRscFont ( )
static

Get the default RSC font. This font is specified in the Font Configuration File and is used to render missing RSC Fonts.

static DgnFontP GetDefaultShxBigFont ( )
static

Get the default SHX bigfont.

This font is specified in the Font Configuration File and is used to render missing SHX bigfonts.

Note
Some systems may have no default bigfont. In this case MicroStation will exit if it ever encounters a missing SHX bigfont, although many users will never need one.
static DgnFontR GetDefaultShxFont ( )
static

Get the default SHX font. This font is specified in the Font Configuration File and is used to render missing SHX fonts.

static DgnFontR GetDefaultTrueTypeFont ( )
static

Get the default TrueType font. This font is specified in the Font Configuration File and is used to render missing TrueType fonts.

static DgnFontNumMapP GetDgnFontMapP ( DgnFileP  dgnFile)
static

Get the DgnFontNumMap for a given DgnFile.

Parameters
[in]dgnFileThe DgnFile of interest.
Returns
a pointer to dgnFile 's DgnFontNumMap, or NULL.
static DgnFontNumMapP GetDgnFontMapP ( DgnModelRefP  modelRef)
static

Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience.

References DgnModelRef::GetDgnFileP(), and DgnFontManager::GetDgnFontMapP().

Referenced by DgnFontManager::GetDgnFontMapP().

static DgnFontP GetFontByNumber ( UInt32  fontNum,
DgnFileP  dgnFile 
)
static

Get a Font for a given DgnFile and font number.

This is merely a convenience routine that retrieves the DgnFontNumMap from the DgnFile and calls DgnFontNumMap::GetFont on it.

Parameters
[in]fontNumThe fontNumber of interest.
[in]dgnFileThe DgnFile of interest.
Returns
the Font or NULL if not found.
static DgnFontP GetFontByNumber ( UInt32  fontNum,
DgnModelRefP  modelRef 
)
static

Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience.

References DgnModelRef::GetDgnFileP(), and DgnFontManager::GetFontByNumber().

Referenced by DgnFontManager::GetFontByNumber().

static DgnFontCR GetFontForCodePage ( UInt32  fontNum,
UInt32  bigFontNum,
DgnFileR   
)
static

Given two font numbers, returns the Font that should be used for code page and encoding conversions.

Remarks
The general rule is that the big font is used if present, otherwise the small font. The font numbers are always resolved to what would be used to render the text for the given DgnFile.
static DgnFontR ResolveFontNum ( UInt32  fontNum,
DgnFileP  dgnFile 
)
static

Resolve a Font for a given DgnFile and font number.

This is merely a convenience routine that retrieves the DgnFontNumMap from the DgnFile and calls DgnFontNumMap::ResolveFont on it.

Parameters
[in]fontNumThe fontNumber of interest.
[in]dgnFileThe DgnFile of interest.
Returns
A reference to the Font or the default font if the font is not found.
static DgnFontR ResolveFontNum ( UInt32  fontNum,
DgnModelRefP  modelRef 
)
static

Equivalent to the DgnFileP overload, but gets the DgnFile from the DgnModelRef as a convenience.

References DgnModelRef::GetDgnFileP(), and DgnFontManager::ResolveFontNum().

Referenced by DgnFontManager::ResolveFontNum().

static bool VisitAllSystemFonts ( DgnFontVisitor visitor,
DgnFontFilter  filter = DgnFontFilter::Normal 
)
static

Visit all fonts in the system FontCatalogs, optionally with a filter applied.

Parameters
[in]visitorThe DgnFontVisitor to be called for each known font in the system.
[in]filterA filter to limit visits to only fonts of interest.
Returns
true of visitor returned true to stop the traversal, false otherwise.

The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.