Class CssFontFace.CssFontFaceSrc
java.lang.Object
com.itextpdf.styledxmlparser.css.font.CssFontFace.CssFontFaceSrc
- Enclosing class:
- CssFontFace
Class that defines a font face source.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The Constant FormatGroup.static final int
The Constant TypeGroup.static final int
The Constant UrlGroup.static final Pattern
The UrlPattern used to compose a source path. -
Method Summary
Modifier and TypeMethodDescriptionstatic CssFontFace.CssFontFaceSrc
Creates aCssFontFace.CssFontFaceSrc
object by parsing aString
trying to match patterns that reveal the font name, whether that font is local, and which format the font is in.Gets the font format.getSrc()
Gets the source path.boolean
isLocal()
Checks if the font is local.static CssFontFace.FontFormat
parseFormat
(String formatStr) Parses aString
to a font format.toString()
static String
Removes single and double quotes at the start and the end of aString
.
-
Field Details
-
UrlPattern
The UrlPattern used to compose a source path. -
TypeGroup
public static final int TypeGroupThe Constant TypeGroup.- See Also:
-
UrlGroup
public static final int UrlGroupThe Constant UrlGroup.- See Also:
-
FormatGroup
public static final int FormatGroupThe Constant FormatGroup.- See Also:
-
-
Method Details
-
getFormat
Gets the font format.- Returns:
- the font format
-
getSrc
Gets the source path.- Returns:
- the source path
-
isLocal
public boolean isLocal()Checks if the font is local.- Returns:
-
true
if the font is local,false
otherwise
-
toString
-
create
Creates aCssFontFace.CssFontFaceSrc
object by parsing aString
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
CssFontFace.CssFontFaceSrc
object
-
parseFormat
Parses aString
to a font format.- Parameters:
-
formatStr
- a string - Returns:
- a font format
-
unquote
Removes single and double quotes at the start and the end of aString
.
-