FontFromRichTextProperties Method |
Returns a font with the requested rich-text (family) name, preserving that name even
when the font is not installed on the current machine. If an installed font matches it
is returned; otherwise a "not on device" managed font that keeps the requested name is
returned (rendered with a fallback quartet). Use this to author a font by name on a
machine that does not have it installed: the Font constructor and
FromQuartetProperties(String, Boolean, Boolean) both substitute the family in that case, losing the
requested name when the file is written.
Namespace:
Rhino.DocObjects
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 8.35
Syntaxpublic static Font FromRichTextProperties(
string richTextFontName,
bool bold,
bool italic,
bool underlined,
bool strikethrough
)
Public Shared Function FromRichTextProperties (
richTextFontName As String,
bold As Boolean,
italic As Boolean,
underlined As Boolean,
strikethrough As Boolean
) As Font
Parameters
- richTextFontName
- Type: SystemString
The rich-text font (family) name to store. - bold
- Type: SystemBoolean
True to select the heavier member of the rich-text quartet. - italic
- Type: SystemBoolean
True to select the more slanted member of the rich-text quartet. - underlined
- Type: SystemBoolean
True for underlined text. - strikethrough
- Type: SystemBoolean
True for strikethrough text.
Return Value
Type:
FontA font that preserves the requested name, or null if none could be created.
See Also