Class FontUtils

java.lang.Object
org.sejda.sambox.pdmodel.font.FontUtils

public final class FontUtils extends Object
Author:
Andrea Vacondio
  • Method Details

    • isEmbeddingPermitted

      public static boolean isEmbeddingPermitted(org.apache.fontbox.ttf.TrueTypeFont ttf) throws IOException
      Returns:
      true if the fsType in the OS/2 table permits embedding.
      Throws:
      IOException
    • isSubsettingPermitted

      public static boolean isSubsettingPermitted(org.apache.fontbox.ttf.TrueTypeFont ttf) throws IOException
      Returns:
      true if the fsType in the OS/2 table permits subsetting.
      Throws:
      IOException
    • getTag

      public static String getTag(Map<Integer,Integer> gidToCid)
      Returns:
      an uppercase 6-character unique tag for the given subset.
    • getTag

      public static String getTag()
      Returns:
      an uppercase 6-character unique tag randomly created
    • isSubsetFontName

      public static boolean isSubsetFontName(String name)
      Parameters:
      name - a font name
      Returns:
      true if the name denotes a subset font Ex. ABCDEF+Verdana