Document Solutions for PDF
DS.Documents.Imaging Assembly / GrapeCity.Documents.Text Namespace / TextFormat Class / ResolveFontName Method
The IFontCollection to search the font from. If this parameter is omitted the font is searched in FontCollection.SystemFonts only.
Indicates whether or not the font should be searched in the given fontCollection only. If False, the font is also searched in FontCollection.SystemFonts.
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.

In This Topic
    ResolveFontName Method
    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
    'Declaration
     
    Public Function ResolveFontName( _
       Optional ByVal fontCollection As IFontCollection, _
       Optional ByVal restrictedFontLookup As System.Boolean, _
       Optional ByVal defaultFont As Font _
    ) As Font
    public Font ResolveFontName( 
       IFontCollection fontCollection,
       System.bool restrictedFontLookup,
       Font defaultFont
    )

    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