Class FontNames

java.lang.Object
com.itextpdf.io.font.FontNames

public class FontNames extends Object
  • Field Details

  • Constructor Details

    • FontNames

      public FontNames()
  • Method Details

    • getNames

      public String[][] getNames (int id)
      Extracts the names of the font in all the languages available.
      Parameters:
      id - the name id to retrieve in OpenType notation
      Returns:
      not empty String[][] if any names exists, otherwise null.
    • getFullName

      public String[][] getFullName()
    • getFontName

      public String getFontName()
    • getCidFontName

      public String getCidFontName()
    • getFamilyName

      public String[][] getFamilyName()
    • getFamilyName2

      public String[][] getFamilyName2()
      Get extra family name if exists.
      Returns:
      extra family name if exists in the font, null otherwise.
    • getStyle

      public String getStyle()
    • getSubfamily

      public String getSubfamily()
    • getFontWeight

      public int getFontWeight()
    • setFontWeight

      protected void setFontWeight (int weight)
      Sets font weight.
      Parameters:
      weight - integer form 100 to 900. See FontWeights.
    • getFontStretch

      public String getFontStretch()
      Gets font stretch in css notation (font-stretch property).
      Returns:
      One of FontStretches values.
    • setFontStretch

      protected void setFontStretch (String fontStretch)
      Sets font stretch in css notation (font-stretch property).
      Parameters:
      fontStretch - FontStretches.
    • allowEmbedding

      public boolean allowEmbedding()
    • isBold

      public boolean isBold()
    • isItalic

      public boolean isItalic()
    • isUnderline

      public boolean isUnderline()
    • isOutline

      public boolean isOutline()
    • isShadow

      public boolean isShadow()
    • isCondensed

      public boolean isCondensed()
    • isExtended

      public boolean isExtended()
    • setAllNames

      protected void setAllNames (Map<Integer,List<String[]>> allNames)
    • setFullName

      protected void setFullName (String[][] fullName)
    • setFullName

      protected void setFullName (String fullName)
    • setFontName

      protected void setFontName (String psFontName)
    • setCidFontName

      protected void setCidFontName (String cidFontName)
    • setFamilyName

      protected void setFamilyName (String[][] familyName)
    • setFamilyName2

      protected void setFamilyName2 (String[][] familyName2)
      Set extra family name used for better fonts match.
      Parameters:
      familyName2 - family name to set.
    • setFamilyName

      protected void setFamilyName (String familyName)
    • setStyle

      protected void setStyle (String style)
    • setSubfamily

      protected void setSubfamily (String subfamily)
    • setSubfamily

      protected void setSubfamily (String[][] subfamily)
    • setMacStyle

      protected void setMacStyle (int macStyle)
      Sets Open Type head.macStyle.

      FontMacStyleFlags

      Parameters:
      macStyle - macStyle flag
    • getMacStyle

      protected int getMacStyle()
    • setAllowEmbedding

      protected void setAllowEmbedding (boolean allowEmbedding)
    • toString

      public String toString()
      Overrides:
      toString in class Object