public class SubsetDefaultImpl extends Object implements Subset
Subset interface.
This implementation is suitable for subclassing, if specific behaviour is needed beyond the correspondance between subset and full gids.
| Constructor and Description |
|---|
SubsetDefaultImpl(int numGlyphs,
boolean doSubset)
Create a new subset for a font.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doSubset() |
int |
getExistingSubsetGid(int fullGid)
Return the currently esisting subset gid corresponding to a full gid,
if there is one, without generating a new one.
|
int |
getFullGid(int subsetGid)
Return the full gid corresponding to a subset gid.
|
int |
getNumGlyphs()
Return the number of glyphs in the subset.
|
int |
getSubsetGid(int fullGid)
Return the subset gid corresponding to a full gid.
|
public SubsetDefaultImpl(int numGlyphs,
boolean doSubset)
throws InvalidFontException,
UnsupportedFontException
numGlyphs - the number of glyphs in the full fontdoSubset - whether to effectively subsetInvalidFontExceptionUnsupportedFontExceptionpublic boolean doSubset()
public int getNumGlyphs()
SubsetgetNumGlyphs in interface Subsetpublic int getSubsetGid(int fullGid)
throws InvalidFontException,
UnsupportedFontException
SubsetgetSubsetGid in interface SubsetfullGid - the full gid, must be a legal gid for the full font.InvalidFontExceptionUnsupportedFontExceptionpublic int getFullGid(int subsetGid)
SubsetgetFullGid in interface SubsetsubsetGid - the subset gid, must be in the range
[0..getNumGlyphs () [public int getExistingSubsetGid(int fullGid)
SubsetgetExistingSubsetGid in interface SubsetfullGid - the full gid, must be a legal gid for the full font.Copyright © 2010 - 2020 Adobe. All Rights Reserved