Class TTFSubFont


  • public class TTFSubFont
    extends java.lang.Object
    A font, which is comprised of a subset of characters of a TrueType font. Based on code developed by Wolfgang Glas http://svn.clazzes.org/svn/sketch/trunk/pdf/pdf-entities/src/main/java/org/clazzes/sketch/pdf/entities/impl/TTFSubFont.java
    • Constructor Summary

      Constructors 
      Constructor Description
      TTFSubFont​(TrueTypeFont baseFont, java.lang.String suffix)
      Constructs a subfont based on the given font using the given suffix.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCharCode​(int charCode)
      Add the given charcode to the subfpont.
      void writeToStream​(java.io.OutputStream os)
      Write the subfont to the given output stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TTFSubFont

        public TTFSubFont​(TrueTypeFont baseFont,
                          java.lang.String suffix)
        Constructs a subfont based on the given font using the given suffix.
        Parameters:
        baseFont - the base font of the subfont
        suffix - suffix used for the naming
    • Method Detail

      • addCharCode

        public void addCharCode​(int charCode)
        Add the given charcode to the subfpont.
        Parameters:
        charCode - the charCode to be added
      • writeToStream

        public void writeToStream​(java.io.OutputStream os)
                           throws java.io.IOException
        Write the subfont to the given output stream.
        Parameters:
        os - the stream used for writing
        Throws:
        java.io.IOException - if something went wrong.