17 #if !defined(OPENNURBS_FONT_INC_)
18 #define OPENNURBS_FONT_INC_
43 bool CreateFontFromFaceName(
44 const wchar_t* face_name,
49 #if defined(ON_OS_WINDOWS_GDI)
50 ON_Font(
const LOGFONT& logfont );
102 #if defined(ON_OS_WINDOWS_GDI)
122 bold_weight = FW_BOLD,
123 medium_weight = FW_MEDIUM,
124 normal_weight = FW_NORMAL,
125 light_weight = FW_LIGHT,
128 default_charset = DEFAULT_CHARSET,
129 symbol_charset = SYMBOL_CHARSET,
145 normal_font_height = 256
162 bool IsSymbolFontFaceName(
163 const wchar_t* facename
166 void SetFontName(
const wchar_t* );
167 void SetFontName(
const char* );
170 const wchar_t* FontName()
const;
172 void SetFontIndex(
int);
173 int FontIndex()
const;
179 double LinefeedRatio()
const;
181 void SetLinefeedRatio(
double linefeed_ratio );
183 bool SetFontFaceName(
const wchar_t* );
184 bool SetFontFaceName(
const char* );
187 const wchar_t* FontFaceName()
const;
189 int FontWeight()
const;
190 void SetFontWeight(
int);
192 bool IsItalic()
const;
193 void SetIsItalic(
bool );
194 void SetItalic(
bool );
197 void SetBold(
bool );
200 bool IsUnderlined()
const;
201 void SetUnderlined(
bool );
210 int HeightOfI()
const;
217 int HeightOfLinefeed()
const;
230 double AscentRatio()
const;
247 bool CompareFontCharacteristics(
ON_Font& font_to_compare,
bool bCompareName)
const;
249 #if defined(ON_OS_WINDOWS_GDI)
250 bool SetLogFont(
const LOGFONT& logfont );
251 const LOGFONT& LogFont()
const;
262 wchar_t m_facename[face_name_size];
272 void UpdateImplementationSettings();
273 #if defined(ON_OS_WINDOWS_GDI)
virtual ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const =0
virtual ON_BOOL32 Read(ON_BinaryArchive &binary_archive)
static const int m_metrics_char
static const double m_default_linefeed_ratio
virtual ON_BOOL32 Write(ON_BinaryArchive &binary_archive) const
virtual void Dump(ON_TextLog &) const
ON_Object & operator=(const ON_Object &)
virtual ON_UUID ModelObjectId() const