| Constructor and Description |
|---|
TTFSubsetter(TrueTypeFont ttf)
Creates a subsetter for the given font.
|
TTFSubsetter(TrueTypeFont ttf,
List<String> tables)
Creates a subsetter for the given font.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int unicode)
Add the given character code to the subset.
|
void |
addAll(Set<Integer> unicodeSet)
Add the given character codes to the subset.
|
Map<Integer,Integer> |
getGIDMap()
Returns the map of new -> old GIDs.
|
void |
setPrefix(String prefix)
Sets the prefix to add to the font's PostScript name.
|
void |
writeToStream(OutputStream os)
Write the subfont to the given output stream.
|
public TTFSubsetter(TrueTypeFont ttf) throws IOException
ttf - the font to be subsetIOExceptionpublic TTFSubsetter(TrueTypeFont ttf, List<String> tables) throws IOException
ttf - the font to be subsettables - optional tables to keep if presentIOExceptionpublic void setPrefix(String prefix)
public void add(int unicode)
unicode - character codepublic void addAll(Set<Integer> unicodeSet)
unicodeSet - character code setpublic Map<Integer,Integer> getGIDMap() throws IOException
IOExceptionpublic void writeToStream(OutputStream os) throws IOException
os - the stream used for writing. It will be closed by this method.IOException - if something went wrong.IllegalStateException - if the subset is empty.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.