[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.TextFormat.ResolveFontName

ResolveFontName Method

ResolveFontName(IFontCollection, bool, Font)

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.

Declaration
public Font ResolveFontName(IFontCollection fontCollection = null, bool restrictedFontLookup = false, Font defaultFont = null)
Public Function ResolveFontName(Optional fontCollection As IFontCollection = Nothing, Optional restrictedFontLookup As Boolean = False, Optional defaultFont As Font = Nothing) As Font
Parameters
Type Name Description
IFontCollection fontCollection

The IFontCollection to search the font from. If this parameter is omitted the font is searched in SystemFonts only.

bool restrictedFontLookup

Indicates whether or not the font should be searched in the given fontCollection only. If False, the font is also searched in SystemFonts.

Font 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.

Returns
Type Description
Font

The Font object corresponding to FontName and font style in the current instance of TextFormat.