Rhino C++ API
8.18
|
#include <opennurbs_font.h>
Public Member Functions | |
ON_FontList () | |
ON_FontList (bool bMatchUnderlineStrikethroughAndPointSize) | |
~ON_FontList () | |
unsigned int | AddFont (const ON_Font *font, bool bCheckForDuplicates) |
unsigned int | AddFonts (const ON_SimpleArray< const ON_Font * > &fonts) |
unsigned int | AddFonts (size_t font_count, const ON_Font *const *font_list) |
const ON_SimpleArray< const class ON_Font * > & | ByFamilyName () const |
const ON_SimpleArray< const class ON_Font * > & | ByFontCharacteristicsHash () const |
const ON_SimpleArray< const class ON_Font * > & | ByIndex () const |
const ON_SimpleArray< const class ON_Font * > & | ByPostScriptName () const |
const ON_SimpleArray< const class ON_Font * > & | ByQuartetName () const |
const ON_SimpleArray< const class ON_Font * > & | ByWindowsLogfontName () const |
unsigned int | Count () const |
const ON_Font * | FamilyMemberWithWeightStretchStyle (const ON_Font *font, ON_Font::Weight desired_weight, ON_Font::Stretch desired_stretch, ON_Font::Style desired_style) const |
const ON_Font * | FamilyMemberWithWeightStretchStyle (const wchar_t *family_name, ON_Font::Weight desired_weight, ON_Font::Stretch desired_stretch, ON_Font::Style desired_style) const |
const ON_Font * | FontFromQuartetProperties (const wchar_t *quartet_name, bool bBold, bool bItalic) const |
unsigned int | FontListFromNames (const wchar_t *postscript_name, const wchar_t *windows_logfont_name, const wchar_t *family_name, const wchar_t *face_name, ON_SimpleArray< const ON_Font * > &font_list) const |
const ON_Font * | FromFamilyName (const wchar_t *family_name, const wchar_t *prefered_face_name) const |
const ON_Font * | FromFamilyName (const wchar_t *family_name, const wchar_t *prefered_face_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style) const |
const ON_Font * | FromFamilyName (const wchar_t *family_name, const wchar_t *prefered_face_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style, bool bUnderlined, bool bStrikethrough) const |
const ON_Font * | FromFontCharacteristicsHash (ON_SHA1_Hash font_characteristics_hash, bool bReturnFirst) const |
const ON_Font * | FromFontProperties (const ON_Font *font_properties, bool bRequireFaceMatch, bool bRequireStyleMatch) const |
const ON_Font * | FromFontProperties (const ON_Font *font_properties, bool bRequireFaceMatch, bool bRequireStyleMatch, bool bUnderlined, bool bStrikethrough, double point_size) const |
const ON_Font * | FromNames (const wchar_t *postscript_name, const wchar_t *windows_logfont_name, const wchar_t *family_name, const wchar_t *prefered_face_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style, bool bRequireFaceMatch, bool bRequireStyleMatch) const |
const ON_Font * | FromNames (const wchar_t *postscript_name, const wchar_t *windows_logfont_name, const wchar_t *family_name, const wchar_t *prefered_face_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style, bool bRequireFaceMatch, bool bRequireStyleMatch, bool bUnderlined, bool bStrikethrough, double point_size) const |
const ON_Font * | FromPostScriptName (const wchar_t *postscript_name) const |
const ON_Font * | FromPostScriptName (const wchar_t *postscript_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style) const |
const ON_Font * | FromPostScriptName (const wchar_t *postscript_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style, bool bUnderlined, bool bStrikethrough) const |
const ON_Font * | FromRichTextProperties (const wchar_t *rtf_font_name, bool bRtfBold, bool bRtfItalic, bool bUnderlined, bool bStrikethrough) const |
const ON_Font * | FromWindowsLogfontName (const wchar_t *windows_logfont_name) const |
const ON_Font * | FromWindowsLogfontName (const wchar_t *windows_logfont_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style) const |
const ON_Font * | FromWindowsLogfontName (const wchar_t *windows_logfont_name, ON_Font::Weight prefered_weight, ON_Font::Stretch prefered_stretch, ON_Font::Style prefered_style, bool bUnderlined, bool bStrikethrough) const |
ON_Font::NameLocale | NameLocale () const |
const ON_FontFaceQuartet | QuartetFromQuartetName (const wchar_t *quartet_name) const |
const ON_ClassArray< ON_FontFaceQuartet > & | QuartetList () const |
Static Public Member Functions | |
static int | CompareEnglishFamilyAndFaceName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareEnglishFamilyName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareEnglishPostScriptName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareEnglishWindowsLogfontName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareFamilyAndFaceName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareFamilyAndWindowsLogfontName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareFamilyName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareFontCharacteristicsHash (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | ComparePostScriptName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareQuartetName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareStretch (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareUnderlinedStrikethroughPointSize (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareWeightStretchStyle (ON_Font const *const *lhs, ON_Font const *const *rhs) |
static int | CompareWindowsLogfontName (ON_Font const *const *lhs, ON_Font const *const *rhs) |
Friends | |
class | ON_ManagedFonts |
ON_FontList::ON_FontList | ( | ) |
ON_FontList::ON_FontList | ( | bool | bMatchUnderlineStrikethroughAndPointSize | ) |
Parameters: bMatchUnderlineStrikethroughAndPointSize - [in] False to ignore underline, strikethrough, and point size properties (installed font list) True to match underline, strikethrough and point size properties (managed font list)
ON_FontList::~ON_FontList | ( | ) |
unsigned int ON_FontList::AddFont | ( | const ON_Font * | font, |
bool | bCheckForDuplicates | ||
) |
unsigned int ON_FontList::AddFonts | ( | const ON_SimpleArray< const ON_Font * > & | fonts | ) |
unsigned int ON_FontList::AddFonts | ( | size_t | font_count, |
const ON_Font *const * | font_list | ||
) |
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByFamilyName | ( | ) | const |
Returns: Array of fonts sorted by ON_Font.FamilyName() and then by ON_Font.FaceName().
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByFontCharacteristicsHash | ( | ) | const |
Returns: Array of fonts sorted by ON_Font.yFontCharacteristicsHash().
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByIndex | ( | ) | const |
Returns: Array of fonts in the order they were added.
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByPostScriptName | ( | ) | const |
Returns: Array of fonts sorted by ON_Font.PostScriptName().
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByQuartetName | ( | ) | const |
Returns: Array of fonts sorted by ON_Font.QuartetName().
const ON_SimpleArray< const class ON_Font* >& ON_FontList::ByWindowsLogfontName | ( | ) | const |
Returns: Array of fonts sorted by ON_Font.WindowsLogfontName().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
unsigned int ON_FontList::Count | ( | ) | const |
Returns: Number of fonts in the list.
const ON_Font* ON_FontList::FamilyMemberWithWeightStretchStyle | ( | const ON_Font * | font, |
ON_Font::Weight | desired_weight, | ||
ON_Font::Stretch | desired_stretch, | ||
ON_Font::Style | desired_style | ||
) | const |
Parameters: font - [in] Used to identify the family, desired_weight - [in] new weight or unset if font weight is adequate desired_stretch - [in] new stretch or unset if font stretch is adequate desired_style - [in] new style or unset if font style is adequate Returns: A font in the same family with that comes a close as possible to matching the desired weight, stretch and style.
const ON_Font* ON_FontList::FamilyMemberWithWeightStretchStyle | ( | const wchar_t * | family_name, |
ON_Font::Weight | desired_weight, | ||
ON_Font::Stretch | desired_stretch, | ||
ON_Font::Style | desired_style | ||
) | const |
Parameters: family name - [in] desired_weight - [in] desired_stretch - [in] desired_style - [in] Returns: A font in the same family with that comes a close as possible to matching the desired weight, stretch and style.
const ON_Font* ON_FontList::FontFromQuartetProperties | ( | const wchar_t * | quartet_name, |
bool | bBold, | ||
bool | bItalic | ||
) | const |
Description: Find a font in this list with the specified quartet properties. Parameters: quartet_name - [in] bBold - [in] bItalic - [in] Returns: font in the list with specified quartet properties or nullptr if none exists.
unsigned int ON_FontList::FontListFromNames | ( | const wchar_t * | postscript_name, |
const wchar_t * | windows_logfont_name, | ||
const wchar_t * | family_name, | ||
const wchar_t * | face_name, | ||
ON_SimpleArray< const ON_Font * > & | font_list | ||
) | const |
Description: Get the subset of fonts in this list with matching names.
const ON_Font* ON_FontList::FromFamilyName | ( | const wchar_t * | family_name, |
const wchar_t * | prefered_face_name | ||
) | const |
const ON_Font* ON_FontList::FromFamilyName | ( | const wchar_t * | family_name, |
const wchar_t * | prefered_face_name, | ||
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style | ||
) | const |
const ON_Font* ON_FontList::FromFamilyName | ( | const wchar_t * | family_name, |
const wchar_t * | prefered_face_name, | ||
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style, | ||
bool | bUnderlined, | ||
bool | bStrikethrough | ||
) | const |
const ON_Font* ON_FontList::FromFontCharacteristicsHash | ( | ON_SHA1_Hash | font_characteristics_hash, |
bool | bReturnFirst | ||
) | const |
Parameters: font_characteristics_hash - [in] bReturnFirst - [in] If there are multiple fonts with the same hash and bReturnFirst is true, then the first font with tht hash is returned. If there are multiple fonts with the same hash and bReturnFirst is false, then nullptr is returned. new style or unset if font style is adequate Returns: A font with the specified font characteristics hash.
const ON_Font* ON_FontList::FromFontProperties | ( | const ON_Font * | font_properties, |
bool | bRequireFaceMatch, | ||
bool | bRequireStyleMatch | ||
) | const |
const ON_Font* ON_FontList::FromFontProperties | ( | const ON_Font * | font_properties, |
bool | bRequireFaceMatch, | ||
bool | bRequireStyleMatch, | ||
bool | bUnderlined, | ||
bool | bStrikethrough, | ||
double | point_size | ||
) | const |
const ON_Font* ON_FontList::FromNames | ( | const wchar_t * | postscript_name, |
const wchar_t * | windows_logfont_name, | ||
const wchar_t * | family_name, | ||
const wchar_t * | prefered_face_name, | ||
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style, | ||
bool | bRequireFaceMatch, | ||
bool | bRequireStyleMatch | ||
) | const |
Parameters: postscript_name - [in] windows_logfont_name - [in] family_name - [in] The returned font will have an exact match for one of the three names, postscript_name, windows_logfont_name, or family_name.
prefered_face_name - [in] prefered_weight - [in]
prefered_stretch - [in] prefered_style - [in] Preferred font properties.
bRequireFaceMatch - [in] If true and face_name is not empty, then the returned font will have an exact match for either postscript_name, windows_logfont_name, or the family and face name pair.
bRequireStyleMatch - [in] If true and prefered_stretch is not unset, then the returned font will have prefered_style Remarks: Ignores underlined, strikethrough, and point size settings when looking for a match.
const ON_Font* ON_FontList::FromNames | ( | const wchar_t * | postscript_name, |
const wchar_t * | windows_logfont_name, | ||
const wchar_t * | family_name, | ||
const wchar_t * | prefered_face_name, | ||
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style, | ||
bool | bRequireFaceMatch, | ||
bool | bRequireStyleMatch, | ||
bool | bUnderlined, | ||
bool | bStrikethrough, | ||
double | point_size | ||
) | const |
Parameters: postscript_name - [in] windows_logfont_name - [in] family_name - [in] The returned font will have an exact match for one of the three names, postscript_name, windows_logfont_name, or family_name.
prefered_face_name - [in] prefered_weight - [in]
prefered_stretch - [in] prefered_style - [in] Preferred font properties.
bRequireFaceMatch - [in] If true and face_name is not empty, then the returned font will have an exact match for either postscript_name, windows_logfont_name, or the family and face name pair.
bRequireStyleMatch - [in] If true and prefered_stretch is not unset, then the returned font will have prefered_style
bUnderlined - [in] Exact match required. bStrikethrough - [in] Exact match required. point_size - [in] Exact match required.
const ON_Font* ON_FontList::FromPostScriptName | ( | const wchar_t * | postscript_name | ) | const |
const ON_Font* ON_FontList::FromPostScriptName | ( | const wchar_t * | postscript_name, |
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style | ||
) | const |
const ON_Font* ON_FontList::FromPostScriptName | ( | const wchar_t * | postscript_name, |
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style, | ||
bool | bUnderlined, | ||
bool | bStrikethrough | ||
) | const |
const ON_Font* ON_FontList::FromRichTextProperties | ( | const wchar_t * | rtf_font_name, |
bool | bRtfBold, | ||
bool | bRtfItalic, | ||
bool | bUnderlined, | ||
bool | bStrikethrough | ||
) | const |
Parameters: rtf_font_name - [in] Rich text format name. This name is not well defined and depends on the device and application that created the rich text. On Windows this is often a LOGFONT.lfFaceName. On MacOS it is often a PostScript name.
bRtfBold - [in] RTF bold flag
bRtfItalic - [in] RTF italic flag
const ON_Font* ON_FontList::FromWindowsLogfontName | ( | const wchar_t * | windows_logfont_name | ) | const |
const ON_Font* ON_FontList::FromWindowsLogfontName | ( | const wchar_t * | windows_logfont_name, |
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style | ||
) | const |
const ON_Font* ON_FontList::FromWindowsLogfontName | ( | const wchar_t * | windows_logfont_name, |
ON_Font::Weight | prefered_weight, | ||
ON_Font::Stretch | prefered_stretch, | ||
ON_Font::Style | prefered_style, | ||
bool | bUnderlined, | ||
bool | bStrikethrough | ||
) | const |
ON_Font::NameLocale ON_FontList::NameLocale | ( | ) | const |
const ON_FontFaceQuartet ON_FontList::QuartetFromQuartetName | ( | const wchar_t * | quartet_name | ) | const |
Returns: The quartet with the specified name or ON_FontFaceQuartet::Empty if none exists.
const ON_ClassArray< ON_FontFaceQuartet >& ON_FontList::QuartetList | ( | ) | const |
Returns: Array of font face quartets for this list sorted quartet name. Remarks: This is pribarily for old-fashioned font selection UI that harkens back to the days of LOGFONT. The UI displays a name and a bold and italic button that lets you select one of four related faces. The name used to be based on the LOGFONT name. Depending on the contents of the list, there may be some faces in the list that do not appear in the QuartetList().
|
friend |