Class CssFontFace
java.lang.Object
com.itextpdf.styledxmlparser.css.font.CssFontFace
Class that will examine the font as described in the CSS, and store it
in a form that the font provider will understand.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class that defines a font face source.static enum
The Enum FontFormat. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Name that will be used as the alias of the font.private final List
<CssFontFace.CssFontFaceSrc> A list of font face sources. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CssFontFace
(String alias, List<CssFontFace.CssFontFaceSrc> sources) Instantiates a new font face. -
Method Summary
Modifier and TypeMethodDescriptionstatic CssFontFace
create
(List<CssDeclaration> properties) Create aCssFontFace
instance from a list of CSS font attributes ("font-family" or "src").Gets the font-family.Gets the font face sources.static boolean
Checks whether in general we support requested font format.static String[]
Processes and splits a string sequence containing a url/uri.
-
Field Details
-
alias
Name that will be used as the alias of the font. -
sources
A list of font face sources.
-
-
Constructor Details
-
CssFontFace
Instantiates a new font face.- Parameters:
alias
- the font-family (or alias)sources
- the sources
-
-
Method Details
-
create
Create aCssFontFace
instance from a list of CSS font attributes ("font-family" or "src").- Parameters:
properties
- the font properties- Returns:
- the
CssFontFace
instance
-
splitSourcesSequence
Processes and splits a string sequence containing a url/uri.- Parameters:
src
- a string representing css src attribute- Returns:
- an array of
String
urls for font loading
-
isSupportedFontFormat
Checks whether in general we support requested font format.- Parameters:
format
-CssFontFace.FontFormat
- Returns:
- true, if supported or unrecognized.
-
getFontFamily
Gets the font-family. Actually font-family is an alias.- Returns:
- the font family (or alias)
-
getSources
Gets the font face sources.- Returns:
- the sources
-