org.apache.fop.fonts.truetype

Class TTFSubSetFile


public class TTFSubSetFile
extends TTFFile

Reads a TrueType file and generates a subset that can be used to embed a TrueType CID 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/

Field Summary

Fields inherited from class org.apache.fop.fonts.truetype.TTFFile

TRACE_ENABLED, dirTabs, lastLoca, log, mtxTab

Method Summary

byte[]
readFont(FontFileReader in, String name, Map glyphs)
Returns a subset of the original font.

Methods inherited from class org.apache.fop.fonts.truetype.TTFFile

checkTTC, convertTTFUnit2PDFUnit, getAnsiKerning, getCMaps, getCapHeight, getCharSetName, getCharWidth, getFamilyNames, getFirstChar, getFlags, getFontBBox, getFullName, getItalicAngle, getKerning, getLastChar, getLowerCaseAscent, getLowerCaseDescent, getNumGlyphs, getPostScriptName, getStemV, getSubFamilyName, getWeightClass, getWidths, getXHeight, isCFF, isEmbeddable, main, printStuff, readDirTabs, readFont, readFont, readFontHeader, readHorizontalHeader, readHorizontalMetrics, readIndexToLocation

Method Details

readFont

public byte[] readFont(FontFileReader in,
                       String name,
                       Map glyphs)
            throws IOException
Returns a subset of the original font.
Parameters:
in - FontFileReader to read from
name - Name to be checked for in the font file
glyphs - Map of glyphs (glyphs has old index as (Integer) key and new index as (Integer) value)
Returns:
A subset of the original font

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.