Open CASCADE Technology
7.3.0
|
Collects and provides information about available fonts in system. More...
#include <Font_FontMgr.hxx>
Public Member Functions | |
const Font_NListOfSystemFont & | GetAvailableFonts () const |
void | GetAvailableFontsNames (TColStd_SequenceOfHAsciiString &theFontsNames) const |
Returns sequence of available fonts names. More... | |
Handle< Font_SystemFont > | GetFont (const Handle< TCollection_HAsciiString > &theFontName, const Font_FontAspect theFontAspect, const Standard_Integer theFontSize) const |
Returns font that match given parameters. If theFontName is empty string returned font can have any FontName. If theFontAspect is Font_FA_Undefined returned font can have any FontAspect. If theFontSize is "-1" returned font can have any FontSize. More... | |
Handle< Font_SystemFont > | FindFont (const Handle< TCollection_HAsciiString > &theFontName, const Font_FontAspect theFontAspect, const Standard_Integer theFontSize) const |
Tries to find font by given parameters. If the specified font is not found tries to use font names mapping. If the requested family name not found -> search for any font family with given aspect and height. If the font is still not found, returns any font available in the system. Returns NULL in case when the fonts are not found in the system. More... | |
Handle< Font_SystemFont > | CheckFont (const Standard_CString theFontPath) const |
Read font file and retrieve information from it. More... | |
Standard_Boolean | RegisterFont (const Handle< Font_SystemFont > &theFont, const Standard_Boolean theToOverride) |
Register new font. If there is existing entity with the same name and properties but different path then font will will be overridden or ignored depending on theToOverride flag. More... | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. More... | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Transient * | This () const |
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
void | IncrementRefCounter () const |
Increments the reference counter of this object. More... | |
Standard_Integer | DecrementRefCounter () const |
Decrements the reference counter of this object; returns the decremented value. More... | |
Static Public Member Functions | |
static Handle< Font_FontMgr > | GetInstance () |
Static Public Member Functions inherited from Standard_Transient | |
static const char * | get_type_name () |
Returns a type descriptor about this object. More... | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. More... | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. More... | |
Collects and provides information about available fonts in system.
Handle< Font_SystemFont > Font_FontMgr::CheckFont | ( | const Standard_CString | theFontPath | ) | const |
Read font file and retrieve information from it.
Handle< Font_SystemFont > Font_FontMgr::FindFont | ( | const Handle< TCollection_HAsciiString > & | theFontName, |
const Font_FontAspect | theFontAspect, | ||
const Standard_Integer | theFontSize | ||
) | const |
Tries to find font by given parameters. If the specified font is not found tries to use font names mapping. If the requested family name not found -> search for any font family with given aspect and height. If the font is still not found, returns any font available in the system. Returns NULL in case when the fonts are not found in the system.
const Font_NListOfSystemFont& Font_FontMgr::GetAvailableFonts | ( | ) | const |
void Font_FontMgr::GetAvailableFontsNames | ( | TColStd_SequenceOfHAsciiString & | theFontsNames | ) | const |
Returns sequence of available fonts names.
Handle< Font_SystemFont > Font_FontMgr::GetFont | ( | const Handle< TCollection_HAsciiString > & | theFontName, |
const Font_FontAspect | theFontAspect, | ||
const Standard_Integer | theFontSize | ||
) | const |
Returns font that match given parameters. If theFontName is empty string returned font can have any FontName. If theFontAspect is Font_FA_Undefined returned font can have any FontAspect. If theFontSize is "-1" returned font can have any FontSize.
|
static |
Standard_Boolean Font_FontMgr::RegisterFont | ( | const Handle< Font_SystemFont > & | theFont, |
const Standard_Boolean | theToOverride | ||
) |
Register new font. If there is existing entity with the same name and properties but different path then font will will be overridden or ignored depending on theToOverride flag.