Rhino C++ API  7.21
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_FontFaceQuartet Class Reference

#include <opennurbs_font.h>

Public Types

enum  Member : unsigned char {
  Member::Unset = 0, Member::Regular = 1, Member::Bold = 2, Member::Italic = 3,
  Member::BoldItalic = 4
}
 

Public Member Functions

 ON_FontFaceQuartet ()=default
 
 ON_FontFaceQuartet (const ON_FontFaceQuartet &)=default
 
 ON_FontFaceQuartet (const wchar_t *quartet_name, const class ON_Font *regular, const class ON_Font *bold, const class ON_Font *italic, const class ON_Font *bold_italic)
 
 ~ON_FontFaceQuartet ()=default
 
const class ON_FontBoldFace () const
 
const class ON_FontBoldItalicFace () const
 
const ON_FontClosestFace (bool bPreferedBold, bool bPreferedItalic) const
 
const ON_FontClosestFace (ON_FontFaceQuartet::Member member) const
 
void Dump (ON_TextLog &text_log) const
 
const ON_FontFace (bool bBold, bool bItalic) const
 
const ON_FontFace (ON_FontFaceQuartet::Member member) const
 
unsigned int FaceCount () const
 
Returns
Total number of available faces (0 to 4).
More...
 
bool HasAllFaces () const
 
bool HasBoldFace () const
 
bool HasBoldItalicFace () const
 
bool HasItalicFace () const
 
bool HasRegularFace () const
 
bool IsEmpty () const
 
Returns
True if FaceCount() = 0. (The name may be empty or not empty.)
More...
 
bool IsNotEmpty () const
 
Returns
True if FaceCount() > 0. (The name may be empty or not empty.)
More...
 
const class ON_FontItalicFace () const
 
unsigned int NotInstalledFaceCount () const
 
Returns
Number of faces that are not installed on this device (0 to FaceCount()).
More...
 
ON_FontFaceQuartetoperator= (const ON_FontFaceQuartet &)=default
 
ON_FontFaceQuartet::Member QuartetMember (const ON_Font *font) const
 
const ON_wString QuartetName () const
 
const class ON_FontRegularFace () const
 
const ON_wString RichTextSample (ON::RichTextStyle rich_text_style) const
 
unsigned int SimulatedFaceCount () const
 
Returns
Number of faces that are simulated (0 to FaceCount()).
More...
 

Static Public Member Functions

static unsigned BoldItalicDeviation (ON_FontFaceQuartet::Member desired_member, ON_FontFaceQuartet::Member available_member)
 
static int CompareQuartetName (const ON_FontFaceQuartet *lhs, const ON_FontFaceQuartet *rhs)
 
static ON_FontFaceQuartet::Member MemberFromBoldAndItalic (bool bMemberIsBold, bool bMemberIsItalic)
 
static ON_FontFaceQuartet::Member MemberFromUnsigned (unsigned int member_as_unsigned)
 
static const ON_wString MemberToString (ON_FontFaceQuartet::Member member)
 

Static Public Attributes

static const ON_FontFaceQuartet Empty
 

Member Enumeration Documentation

◆ Member

enum ON_FontFaceQuartet::Member : unsigned char
strong
Enumerator
Unset 
Regular 
Bold 
Italic 
BoldItalic 

Constructor & Destructor Documentation

◆ ON_FontFaceQuartet() [1/3]

ON_FontFaceQuartet::ON_FontFaceQuartet ( )
default

◆ ~ON_FontFaceQuartet()

ON_FontFaceQuartet::~ON_FontFaceQuartet ( )
default

◆ ON_FontFaceQuartet() [2/3]

ON_FontFaceQuartet::ON_FontFaceQuartet ( const ON_FontFaceQuartet )
default

◆ ON_FontFaceQuartet() [3/3]

ON_FontFaceQuartet::ON_FontFaceQuartet ( const wchar_t *  quartet_name,
const class ON_Font regular,
const class ON_Font bold,
const class ON_Font italic,
const class ON_Font bold_italic 
)

Member Function Documentation

◆ BoldFace()

const class ON_Font* ON_FontFaceQuartet::BoldFace ( ) const

◆ BoldItalicDeviation()

static unsigned ON_FontFaceQuartet::BoldItalicDeviation ( ON_FontFaceQuartet::Member  desired_member,
ON_FontFaceQuartet::Member  available_member 
)
static

Description: When an exact quartet face bold/italic match is not available, choosing an available quartet face that minimizes ON_FontFaceQuartet::BoldItalicDeviation() is one way to select which available quartet face to use. Returns: A distance between two quartet face members.

◆ BoldItalicFace()

const class ON_Font* ON_FontFaceQuartet::BoldItalicFace ( ) const

◆ ClosestFace() [1/2]

const ON_Font* ON_FontFaceQuartet::ClosestFace ( bool  bPreferedBold,
bool  bPreferedItalic 
) const

◆ ClosestFace() [2/2]

const ON_Font* ON_FontFaceQuartet::ClosestFace ( ON_FontFaceQuartet::Member  member) const

Parameters: member - [in] Returns: Closest quartet member.

◆ CompareQuartetName()

static int ON_FontFaceQuartet::CompareQuartetName ( const ON_FontFaceQuartet lhs,
const ON_FontFaceQuartet rhs 
)
static

◆ Dump()

void ON_FontFaceQuartet::Dump ( ON_TextLog text_log) const

◆ Face() [1/2]

const ON_Font* ON_FontFaceQuartet::Face ( bool  bBold,
bool  bItalic 
) const

◆ Face() [2/2]

const ON_Font* ON_FontFaceQuartet::Face ( ON_FontFaceQuartet::Member  member) const

Parameters: member - [in] Returns: Specified quartet member.

◆ FaceCount()

unsigned int ON_FontFaceQuartet::FaceCount ( ) const

Returns
Total number of available faces (0 to 4).

◆ HasAllFaces()

bool ON_FontFaceQuartet::HasAllFaces ( ) const

◆ HasBoldFace()

bool ON_FontFaceQuartet::HasBoldFace ( ) const

◆ HasBoldItalicFace()

bool ON_FontFaceQuartet::HasBoldItalicFace ( ) const

◆ HasItalicFace()

bool ON_FontFaceQuartet::HasItalicFace ( ) const

◆ HasRegularFace()

bool ON_FontFaceQuartet::HasRegularFace ( ) const

◆ IsEmpty()

bool ON_FontFaceQuartet::IsEmpty ( ) const

Returns
True if FaceCount() = 0. (The name may be empty or not empty.)

◆ IsNotEmpty()

bool ON_FontFaceQuartet::IsNotEmpty ( ) const

Returns
True if FaceCount() > 0. (The name may be empty or not empty.)

◆ ItalicFace()

const class ON_Font* ON_FontFaceQuartet::ItalicFace ( ) const

◆ MemberFromBoldAndItalic()

static ON_FontFaceQuartet::Member ON_FontFaceQuartet::MemberFromBoldAndItalic ( bool  bMemberIsBold,
bool  bMemberIsItalic 
)
static

◆ MemberFromUnsigned()

static ON_FontFaceQuartet::Member ON_FontFaceQuartet::MemberFromUnsigned ( unsigned int  member_as_unsigned)
static

◆ MemberToString()

static const ON_wString ON_FontFaceQuartet::MemberToString ( ON_FontFaceQuartet::Member  member)
static

◆ NotInstalledFaceCount()

unsigned int ON_FontFaceQuartet::NotInstalledFaceCount ( ) const

Returns
Number of faces that are not installed on this device (0 to FaceCount()).

◆ operator=()

ON_FontFaceQuartet& ON_FontFaceQuartet::operator= ( const ON_FontFaceQuartet )
default

◆ QuartetMember()

ON_FontFaceQuartet::Member ON_FontFaceQuartet::QuartetMember ( const ON_Font font) const

Parameters: font - [in] Font to test Returns: If font exactly matches a quartet member, that member is identified. Otherwise, ON_FontFaceQuartet::Member::Unset is returned.

◆ QuartetName()

const ON_wString ON_FontFaceQuartet::QuartetName ( ) const

◆ RegularFace()

const class ON_Font* ON_FontFaceQuartet::RegularFace ( ) const

◆ RichTextSample()

const ON_wString ON_FontFaceQuartet::RichTextSample ( ON::RichTextStyle  rich_text_style) const

Returns a sample rich text string demonstrating the faces in the quartet.

◆ SimulatedFaceCount()

unsigned int ON_FontFaceQuartet::SimulatedFaceCount ( ) const

Returns
Number of faces that are simulated (0 to FaceCount()).

Member Data Documentation

◆ Empty

const ON_FontFaceQuartet ON_FontFaceQuartet::Empty
static