Package de.intarsys.cwt.font.truetype
Class CreateSubset
- java.lang.Object
-
- de.intarsys.cwt.font.truetype.CreateSubset
-
public class CreateSubset extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static byte[][]SubsetTables
-
Constructor Summary
Constructors Constructor Description CreateSubset(TTFont font, java.util.Set glyphIndices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.SetaddCompositeGlyphs(de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] locations, java.util.Set glyphs)Add all dependent glyphs not yet included for any composite glyphs in the set of glyphs.protected voidaddCompositeGlyphs(de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] locations, java.util.Set glyphs, int codePoint)Add dependent glyphs not yet included for composite glyphs.TTFontcompute()protected TTFontcopySubset()protected voidcreateGlyphTable(TTTable loca, TTTable glyf, de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] oldLocations, java.util.Set glyphs, boolean shortFormat)TTFontgetFont()java.util.SetgetGlyphIndices()TTFontgetResult()
-
-
-
Constructor Detail
-
CreateSubset
public CreateSubset(TTFont font, java.util.Set glyphIndices)
-
-
Method Detail
-
addCompositeGlyphs
protected java.util.Set addCompositeGlyphs(de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] locations, java.util.Set glyphs) throws java.io.IOException, TrueTypeExceptionAdd all dependent glyphs not yet included for any composite glyphs in the set of glyphs.- Parameters:
glyfRandom-locations-glyphs-- Returns:
- Throws:
java.io.IOExceptionTrueTypeException
-
addCompositeGlyphs
protected void addCompositeGlyphs(de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] locations, java.util.Set glyphs, int codePoint) throws java.io.IOException, TrueTypeExceptionAdd dependent glyphs not yet included for composite glyphs.- Parameters:
glyfRandom-locations-glyphs-codePoint-- Throws:
java.io.IOExceptionTrueTypeException
-
compute
public TTFont compute() throws java.io.IOException, TrueTypeException
- Throws:
java.io.IOExceptionTrueTypeException
-
copySubset
protected TTFont copySubset()
-
createGlyphTable
protected void createGlyphTable(TTTable loca, TTTable glyf, de.intarsys.tools.randomaccess.IRandomAccess glyfRandom, int[] oldLocations, java.util.Set glyphs, boolean shortFormat) throws java.io.IOException, TrueTypeException
- Throws:
java.io.IOExceptionTrueTypeException
-
getFont
public TTFont getFont()
-
getGlyphIndices
public java.util.Set getGlyphIndices()
-
getResult
public TTFont getResult()
-
-