iText 7 7.2.1 API
iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc Class Reference

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

Public Member Functions

virtual CssFontFace.FontFormat  GetFormat ()
 
virtual String  GetSrc ()
 
virtual bool  IsLocal ()
 
override String  ToString ()
 

Static Public Member Functions

static CssFontFace.CssFontFaceSrc  Create (String src)
  Creates a CssFontFaceSrc object by parsing a System.String trying to match patterns that reveal the font name, whether that font is local, and which format the font is in. More...
 
static CssFontFace.FontFormat  ParseFormat (String formatStr)
  Parses a System.String to a font format. More...
 
static String  Unquote (String quotedString)
  Removes single and double quotes at the start and the end of a System.String. More...
 

Static Public Attributes

static readonly Regex  UrlPattern
  The UrlPattern used to compose a source path. More...
 
const int  TypeGroup = 1
  The Constant TypeGroup. More...
 
const int  UrlGroup = 4
  The Constant UrlGroup. More...
 
const int  FormatGroup = 9
  The Constant FormatGroup. More...
 

Detailed Description

Class that defines a font face source.

Member Function Documentation

◆ Create()

static CssFontFace.CssFontFaceSrc iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.Create ( String  src )
inlinestatic

Creates a CssFontFaceSrc object by parsing a System.String trying to match patterns that reveal the font name, whether that font is local, and which format the font is in.

Parameters
src a string containing information about a font
Returns
the font in the form of a CssFontFaceSrc object

◆ ParseFormat()

static CssFontFace.FontFormat iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.ParseFormat ( String  formatStr )
inlinestatic

Parses a System.String to a font format.

Parameters
formatStr a string
Returns
a font format

◆ Unquote()

static String iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.Unquote ( String  quotedString )
inlinestatic

Removes single and double quotes at the start and the end of a System.String.

Parameters
quotedString a System.String that might be between quotes
Returns
the System.String without the quotes

Member Data Documentation

◆ FormatGroup

const int iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.FormatGroup = 9
static

The Constant FormatGroup.

◆ TypeGroup

const int iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.TypeGroup = 1
static

The Constant TypeGroup.

◆ UrlGroup

const int iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.UrlGroup = 4
static

The Constant UrlGroup.

◆ UrlPattern

readonly Regex iText.StyledXmlParser.Css.Font.CssFontFace.CssFontFaceSrc.UrlPattern
static
Initial value:
= iText.Commons.Utils.StringUtil.RegexCompile("^((local)|(url))\\(((\'[^\']*\')|(\"[^\"]*\")|([^\'\"\\)]*))\\)( format\\(((\'[^\']*\')|(\"[^\"]*\")|([^\'\"\\)]*))\\))?$"
)

The UrlPattern used to compose a source path.

iText.Commons.Utils.StringUtil
This file is a helper class for internal usage only. Be aware that its API and functionality may be c...
Definition: StringUtil.cs:55
iText.Commons.Utils
Definition: AtomicLong.cs:43
iText.Commons
Definition: AbstractContextBasedEventHandler.cs:25
iText
Definition: Barcode128.cs:56