|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.CIDSubset
public class CIDSubset
Provides methods to get font information. Naming: glyph index: original index of the glyph in the non-subset font (!= unicode index) character selector: index into a set of glyphs. For subset CID fonts, this starts at 0. For non-subset fonts, this is the same as the glyph index. Unicode index: The Unicode codepoint of a character. Glyph name: the Adobe glyph name (as found in Glyphs.java)
Constructor Summary | |
---|---|
CIDSubset(MultiByteFont mbf)
|
Method Summary | |
---|---|
char[] |
getChars()
Returns a char array containing all Unicode characters that are in the subset. |
int |
getGIDFromChar(char ch)
Returns the glyph index from the original font from a character |
java.util.BitSet |
getGlyphIndices()
Returns a BitSet with bits set for each available glyph index in the subset. |
java.util.Map<java.lang.Integer,java.lang.Integer> |
getGlyphs()
Returns an unmodifiable Map of the font subset. |
int |
getNumberOfGlyphs()
Returns the number of glyphs in the subset. |
int |
getOriginalGlyphIndex(int index)
Returns the original index of the glyph inside the (non-subset) font's glyph list. |
char |
getUnicode(int index)
Returns the Unicode value for a subset index (character selector). |
char |
getUnicodeFromGID(int glyphIndex)
Gets the unicode character from the original font glyph index |
int[] |
getWidths()
Return the array of widths. |
int |
mapChar(int glyphIndex,
char unicode)
Maps a character to a character selector for a font subset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CIDSubset(MultiByteFont mbf)
Method Detail |
---|
public int getOriginalGlyphIndex(int index)
getOriginalGlyphIndex
in interface CIDSet
index
- the subset index (character selector) to access the glyph
public char getUnicode(int index)
getUnicode
in interface CIDSet
index
- the subset index (character selector)
public int mapChar(int glyphIndex, char unicode)
mapChar
in interface CIDSet
glyphIndex
- the glyph index of the characterunicode
- the Unicode index of the character
public java.util.Map<java.lang.Integer,java.lang.Integer> getGlyphs()
getGlyphs
in interface CIDSet
public char getUnicodeFromGID(int glyphIndex)
getUnicodeFromGID
in interface CIDSet
glyphIndex
- The original glyph index of the character in the font
public int getGIDFromChar(char ch)
getGIDFromChar
in interface CIDSet
ch
- The character
public char[] getChars()
getChars
in interface CIDSet
public int getNumberOfGlyphs()
getNumberOfGlyphs
in interface CIDSet
public java.util.BitSet getGlyphIndices()
getGlyphIndices
in interface CIDSet
public int[] getWidths()
This is used to get an array for inserting in an output format. It should not be used for lookup.
getWidths
in interface CIDSet
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |