Class FontUtil

java.lang.Object
com.itextpdf.kernel.font.FontUtil

public class FontUtil extends Object
Utility class for font processing.
  • Method Details

    • addRandomSubsetPrefixForFontName

      public static String addRandomSubsetPrefixForFontName (String fontName)
      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

      public static CMapToUnicode processToUnicode (PdfObject toUnicode)
      Processes passed ToUnicode object to CMapToUnicode instance.
      Parameters:
      toUnicode - the ToUnicode object
      Returns:
      parsed CMapToUnicode instance
    • convertCompositeWidthsArray

      public static com.itextpdf.io.util.IntHashtable convertCompositeWidthsArray (PdfArray widthsArray)
      Converts passed W array to integer table.
      Parameters:
      widthsArray - the W array to convert
      Returns:
      converted W array as an integer table
    • getToUnicodeStream

      public static PdfStream getToUnicodeStream (Set<Glyph> glyphs)
      Gets a ToUnicode PdfStream from passed glyphs.
      Parameters:
      glyphs - the glyphs ToUnicode will be based on
      Returns:
      the created ToUnicode PdfStream