iText 7 7.1.14 API
iText.StyledXmlParser.Css.Font.CssFontFace Class Reference

Class that will examine the font as described in the CSS, and store it in a form that the font provider will understand. More...

Classes

class   CssFontFaceSrc
  Class that defines a font face source. More...
 

Public Types

enum   FontFormat {
  None, FontFormat.TrueType, FontFormat.OpenType, FontFormat.WOFF,
  FontFormat.WOFF2, FontFormat.EOT, FontFormat.SVG
}
  The Enum FontFormat. More...
 

Public Member Functions

virtual String  GetFontFamily ()
  Gets the font-family. More...
 
virtual IList< CssFontFace.CssFontFaceSrc GetSources ()
  Gets the font face sources. More...
 

Static Public Member Functions

static iText.StyledXmlParser.Css.Font.CssFontFace  Create (IList< CssDeclaration > properties)
  Create a CssFontFace instance from a list of CSS font attributes ("font-family" or "src"). More...
 
static String[]  SplitSourcesSequence (String src)
  Processes and splits a string sequence containing a url/uri. More...
 
static bool  IsSupportedFontFormat (CssFontFace.FontFormat format)
  Checks whether in general we support requested font format. More...
 

Detailed Description

Class that will examine the font as described in the CSS, and store it in a form that the font provider will understand.

Member Enumeration Documentation

◆ FontFormat

The Enum FontFormat.

Enumerator
TrueType 

"truetype"

OpenType 

"opentype"

WOFF 

"woff"

WOFF2 

"woff2"

EOT 

"embedded-opentype"

SVG 

"svg"

Member Function Documentation

◆ Create()

static iText.StyledXmlParser.Css.Font.CssFontFace iText.StyledXmlParser.Css.Font.CssFontFace.Create ( IList< CssDeclaration properties )
inlinestatic

Create a CssFontFace instance from a list of CSS font attributes ("font-family" or "src").

Parameters
properties the font properties
Returns
the CssFontFace instance

◆ GetFontFamily()

virtual String iText.StyledXmlParser.Css.Font.CssFontFace.GetFontFamily ( )
inlinevirtual

Gets the font-family.

Gets the font-family. Actually font-family is an alias.

Returns
the font family (or alias)

◆ GetSources()

virtual IList<CssFontFace.CssFontFaceSrc> iText.StyledXmlParser.Css.Font.CssFontFace.GetSources ( )
inlinevirtual

Gets the font face sources.

Returns
the sources

◆ IsSupportedFontFormat()

static bool iText.StyledXmlParser.Css.Font.CssFontFace.IsSupportedFontFormat ( CssFontFace.FontFormat  format )
inlinestatic

Checks whether in general we support requested font format.

Parameters
format

FontFormat

Returns
true, if supported or unrecognized.

◆ SplitSourcesSequence()

static String [] iText.StyledXmlParser.Css.Font.CssFontFace.SplitSourcesSequence ( String  src )
inlinestatic

Processes and splits a string sequence containing a url/uri.

Parameters
src a string representing css src attribute
Returns
an array of System.String urls for font loading