6 #if !defined(LST_FONT_H__INCLUDED_)
7 #define LST_FONT_H__INCLUDED_
14 #include "FontProperties.h"
15 #include "Utility/Config.h"
16 #include "FontCacheEntry.h"
17 #include "Utility/wstring.h"
24 void trimFontName(std::wstring &name);
25 std::wstring normalizeFontName(std::wstring &name);
35 const std::wstring& getName() {
return m_name; };
36 std::wstring getNormalizedName();
37 void setName(
const std::wstring& newName ) {
m_name = newName; };
38 void setSubst(vector<std::wstring>* substitutes,
bool forceSubst);
39 const vector<std::wstring>& getSub(
bool *forceSubst);
48 void*
getFace(Larson::CConfig* config);
50 std::wstring getFaceFamily();
51 std::wstring getFaceStyle();
52 std::wstring getPathFromName(std::wstring &name);
53 std::wstring getGenericFamily();
55 CFontProperties::Posture getPostureFromName(std::wstring &trimmedName);
56 CFontProperties::Weight getWeightFromName(std::wstring &trimmedName);
60 CFontProperties::ProportionateWidth getWidthFromName(std::wstring &trimmedName);
87 #endif // LST_FONT_H__INCLUDED_
CFontCache – generates and maintains font cache.
Definition: FontCache.h:89
Larson::CFontProperties * getProperties()
get font properties (maybe be null if font properties for this font was not present in the CGM ...
Definition: Font.cpp:50
CFontCache * m_fontCache
pointer to font cache if loaded
Definition: Font.h:73
void * getFace(Larson::CConfig *config)
return pointer to Freetype Face object (FT_Face)
Definition: Font.cpp:393
CFontProperties * m_properties
pointer to font properties
Definition: Font.h:75
bool m_forceSubst
Definition: Font.h:69
CFontCacheEntry * m_fontCacheEntry
pointer to font cache entry for this font
Definition: Font.h:45
CLSTFont – Font object class, one per facename used in a CGM picture.
Definition: Font.h:28
CLSTFont(std::wstring fontname, CFontProperties *props=NULL)
Contructor from assigned font name.
Definition: Font.cpp:17
std::wstring m_name
Definition: Font.h:64
CFontCacheEntry – defines the data in a font cache entry.
Definition: FontCacheEntry.h:20
vector< std::wstring > m_substitutes
font name substitution priority-ordered list
Definition: Font.h:66
CFontProperties – FontProperties attributes.
Definition: FontProperties.h:19
vector< std::wstring > m_aliases
list of aliases for this font
Definition: Font.h:71