Package com.itextpdf.kernel.font
Class FontUtil
java.lang.Object
com.itextpdf.kernel.font.FontUtil
Utility class for font processing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addRandomSubsetPrefixForFontName
(String fontName) Adds random subset prefix (+ and 6 upper case letters) to passed font name.static com.itextpdf.io.util.IntHashtable
convertCompositeWidthsArray
(PdfArray widthsArray) Converts passedW
array to integer table.static PdfStream
getToUnicodeStream
(Set<Glyph> glyphs) Gets aToUnicode
PdfStream
from passed glyphs.static CMapToUnicode
processToUnicode
(PdfObject toUnicode) Processes passedToUnicode
object toCMapToUnicode
instance.
-
Method Details
-
addRandomSubsetPrefixForFontName
Adds random subset prefix (+ and 6 upper case letters) to passed font name.- Parameters:
-
fontName
- the font add prefix to - Returns:
- the font name with added prefix.
-
processToUnicode
Processes passedToUnicode
object toCMapToUnicode
instance.- Parameters:
-
toUnicode
- theToUnicode
object - Returns:
-
parsed
CMapToUnicode
instance
-
convertCompositeWidthsArray
Converts passedW
array to integer table.- Parameters:
-
widthsArray
- theW
array to convert - Returns:
-
converted
W
array as an integer table
-
getToUnicodeStream
Gets aToUnicode
PdfStream
from passed glyphs.- Parameters:
-
glyphs
- the glyphsToUnicode
will be based on - Returns:
-
the created
ToUnicode
PdfStream
-