In This Topic
Returns the
Font object for the current settings in the
FontName,
FontBold,
FontItalic properties. Note that if the FontName is specified (not empty), this method will return the same font that would be used by a
TextLayout given the same settings.
Syntax
Parameters
- fontCollection
- The IFontCollection to search the font from. If this parameter is omitted the font is searched in FontCollection.SystemFonts only.
- restrictedFontLookup
- Indicates whether or not the font should be searched in the given fontCollection only. If False, the font is also searched in FontCollection.SystemFonts.
- defaultFont
- The default font returned if font with specified name not found, if this parameter is null then fontCollection.DefaultFont or FontCollection.SystemFonts.DefaultFont is used.
Return Value
The
Font object corresponding to
FontName and font style in the current instance of
TextFormat.
See Also