QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
ON_Font Class Reference

#include <opennurbs_font.h>

Inheritance diagram for ON_Font:
ON_Object

Public Types

enum  {
  face_name_size = 65 , bold_weight = 700 , medium_weight = 500 , normal_weight = 400 ,
  light_weight = 300 , default_charset = 1 , symbol_charset = 2 , normal_font_height = 256
}
 

Public Member Functions

double AscentRatio () const
 
bool CompareFontCharacteristics (ON_Font &font_to_compare, bool bCompareName) const
 
void Defaults ()
 
void Dump (ON_TextLog &) const
 
const wchar_t * FontFaceName () const
 
int FontIndex () const
 
const wchar_t * FontName () const
 
int FontWeight () const
 
void GetFontFaceName (ON_wString &) const
 
void GetFontName (ON_wString &) const
 
int HeightOfI () const
 
int HeightOfLinefeed () const
 
bool IsBold () const
 
bool IsItalic () const
 
bool IsUnderlined () const
 
ON_BOOL32 IsValid (ON_TextLog *text_log=NULL) const
 
double LinefeedRatio () const
 
ON_UUID ModelObjectId () const
 
 ON_Font ()
 
ON_BOOL32 Read (ON_BinaryArchive &)
 
void SetBold (bool)
 
bool SetFontFaceName (const char *)
 
bool SetFontFaceName (const wchar_t *)
 
void SetFontIndex (int)
 
void SetFontName (const char *)
 
void SetFontName (const wchar_t *)
 
void SetFontWeight (int)
 
void SetIsItalic (bool)
 
void SetItalic (bool)
 
void SetLinefeedRatio (double linefeed_ratio)
 
void SetUnderlined (bool)
 
ON_BOOL32 Write (ON_BinaryArchive &) const
 
 ~ON_Font ()
 
- Public Member Functions inherited from ON_Object
ON_BOOL32 AttachUserData (ON_UserData *pUserData)
 
bool CopyFrom (const ON_Object *src)
 
void CopyUserData (const ON_Object &source_object)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
ON_BOOL32 DetachUserData (ON_UserData *pUserData)
 
ON_UserDataFirstUserData () const
 
ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
ON_BOOL32 IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MemoryRelocate ()
 
void MoveUserData (ON_Object &source_object)
 
virtual ON::object_type ObjectType () const
 
 ON_Object ()
 
 ON_Object (const ON_Object &)
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
virtual unsigned int SizeOf () const
 
void TransformUserData (const ON_Xform &xform)
 
virtual ~ON_Object ()
 

Static Public Member Functions

static bool IsSymbolFontFaceName (const wchar_t *facename)
 

Public Attributes

wchar_t m_facename [face_name_size]
 
ON_UUID m_font_id
 
int m_font_index
 
bool m_font_italic
 
ON_wString m_font_name
 
bool m_font_underlined
 
int m_font_weight
 
double m_linefeed_ratio
 
- Public Attributes inherited from ON_Object
ON_MEMORY_POOLm_mempool
 

Static Public Attributes

static const double m_default_linefeed_ratio = 1.6
 
static const int m_metrics_char = 'I'
 

Private Member Functions

 ON_OBJECT_DECLARE (ON_Font)
 

Private Attributes

int m_I_height
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
face_name_size 
bold_weight 
medium_weight 
normal_weight 
light_weight 
default_charset 
symbol_charset 
normal_font_height 

Constructor & Destructor Documentation

◆ ON_Font()

ON_Font::ON_Font ( )

◆ ~ON_Font()

ON_Font::~ON_Font ( )

Member Function Documentation

◆ AscentRatio()

double ON_Font::AscentRatio ( ) const

◆ CompareFontCharacteristics()

bool ON_Font::CompareFontCharacteristics ( ON_Font & font_to_compare,
bool bCompareName ) const

◆ Defaults()

void ON_Font::Defaults ( )

◆ Dump()

void ON_Font::Dump ( ON_TextLog & dump) const
virtual

Reimplemented from ON_Object.

◆ FontFaceName()

const wchar_t * ON_Font::FontFaceName ( ) const

◆ FontIndex()

int ON_Font::FontIndex ( ) const

◆ FontName()

const wchar_t * ON_Font::FontName ( ) const

◆ FontWeight()

int ON_Font::FontWeight ( ) const

◆ GetFontFaceName()

void ON_Font::GetFontFaceName ( ON_wString & s) const

◆ GetFontName()

void ON_Font::GetFontName ( ON_wString & s) const

◆ HeightOfI()

int ON_Font::HeightOfI ( ) const

◆ HeightOfLinefeed()

int ON_Font::HeightOfLinefeed ( ) const

◆ IsBold()

bool ON_Font::IsBold ( ) const

◆ IsItalic()

bool ON_Font::IsItalic ( ) const

◆ IsSymbolFontFaceName()

bool ON_Font::IsSymbolFontFaceName ( const wchar_t * facename)
static

◆ IsUnderlined()

bool ON_Font::IsUnderlined ( ) const

◆ IsValid()

ON_BOOL32 ON_Font::IsValid ( ON_TextLog * text_log = NULL) const
virtual

Implements ON_Object.

◆ LinefeedRatio()

double ON_Font::LinefeedRatio ( ) const

◆ ModelObjectId()

ON_UUID ON_Font::ModelObjectId ( ) const
virtual

Reimplemented from ON_Object.

◆ ON_OBJECT_DECLARE()

ON_Font::ON_OBJECT_DECLARE ( ON_Font )
private

◆ Read()

ON_BOOL32 ON_Font::Read ( ON_BinaryArchive & file)
virtual

Reimplemented from ON_Object.

◆ SetBold()

void ON_Font::SetBold ( bool bBold)

◆ SetFontFaceName() [1/2]

bool ON_Font::SetFontFaceName ( const char * s)

◆ SetFontFaceName() [2/2]

bool ON_Font::SetFontFaceName ( const wchar_t * s)

◆ SetFontIndex()

void ON_Font::SetFontIndex ( int i)

◆ SetFontName() [1/2]

void ON_Font::SetFontName ( const char * s)

◆ SetFontName() [2/2]

void ON_Font::SetFontName ( const wchar_t * s)

◆ SetFontWeight()

void ON_Font::SetFontWeight ( int w)

◆ SetIsItalic()

void ON_Font::SetIsItalic ( bool b)

◆ SetItalic()

void ON_Font::SetItalic ( bool b)

◆ SetLinefeedRatio()

void ON_Font::SetLinefeedRatio ( double linefeed_ratio)

◆ SetUnderlined()

void ON_Font::SetUnderlined ( bool b)

◆ Write()

ON_BOOL32 ON_Font::Write ( ON_BinaryArchive & file) const
virtual

Reimplemented from ON_Object.

Member Data Documentation

◆ m_default_linefeed_ratio

const double ON_Font::m_default_linefeed_ratio = 1.6
static

◆ m_facename

wchar_t ON_Font::m_facename[face_name_size]

◆ m_font_id

ON_UUID ON_Font::m_font_id

◆ m_font_index

int ON_Font::m_font_index

◆ m_font_italic

bool ON_Font::m_font_italic

◆ m_font_name

ON_wString ON_Font::m_font_name

◆ m_font_underlined

bool ON_Font::m_font_underlined

◆ m_font_weight

int ON_Font::m_font_weight

◆ m_I_height

int ON_Font::m_I_height
private

◆ m_linefeed_ratio

double ON_Font::m_linefeed_ratio

◆ m_metrics_char

const int ON_Font::m_metrics_char = 'I'
static

The documentation for this class was generated from the following files: