org.foray.font.format.ttf
Class TTFSubSetFile

java.lang.Object
  extended by org.foray.font.format.ttf.TTFSubSetFile

public class TTFSubSetFile
extends Object

Reads a TrueType file and generates a subset that can be used to embed a TrueType font. TrueType tables needed for embedded CID fonts are: "head", "hhea", "loca", "maxp", "cvt ", "prep", "glyf", "hmtx" and "fpgm". The TrueType spec can be found at the Microsoft Typography site: http://www.microsoft.com/truetype/


Constructor Summary
TTFSubSetFile(TrueTypeFont ttfFont, Subset subset)
          Constructor.
 
Method Summary
 byte[] buildEmbeddableSubset()
          Builds and returns the embeddable subset.
 org.apache.commons.logging.Log getLogger()
          Return the logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTFSubSetFile

public TTFSubSetFile(TrueTypeFont ttfFont,
                     Subset subset)
Constructor.

Parameters:
ttfFont - The font to be subsetted.
subset - The subset information.
Method Detail

buildEmbeddableSubset

public byte[] buildEmbeddableSubset()
                             throws IOException
Builds and returns the embeddable subset.

Returns:
The embeddable subset as a byte array.
Throws:
IOException - For I/O Error.

getLogger

public org.apache.commons.logging.Log getLogger()
Return the logger.

Returns:
The logger.


Copyright © 2017. All rights reserved.