Typically, clients will call getIndexFor(char) for each character in a style run. When getIndexFor() returns a different value from ones seen previously, the characters up to that point will be assigned a font obtained from getFont().
| Modifier and Type | Field and Description |
|---|---|
| private Font[] | |
| private int[][] | |
| private static final int | |
| private static final int | |
| private Font | |
| private static FontResolver | |
| private static final int | |
| private static final int | |
| private Font[] | |
| private int[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Font[] | |
| private Font[] | |
| public Font | getFont(int
an index from getFontIndex() which determines the
font family index, Map<? extends AttributedCharacterIterator.a Map from which the size and style of the Font
are determined. The default size is 12 and the default style
is Font.PLAIN attributes)Return a Font from a given font index with properties from attributes. |
| public int | Returns: a value for consumption by getFont()the character to map c)Return an index for the given character. |
| public int | |
| private int | getIndexFor(char c)
Search fonts in order, and return "1" to indicate its in the default font, (or not found at all), or the index of the first font which can display the given character, plus 2, if it is not in the default font. |
| private int | |
| public static FontResolver | |
| public int | Returns: the font index for the initial code point found, or 1 if the iterator was empty.a code point iterator, this will be advanced past any code
points that have the same font index iter)Determines the font index for the code point at the current position in the iterator, then advances the iterator to the first code point that has a different index or until the iterator is DONE, and returns the font index. |
| allFonts | back to summary |
|---|---|
| private Font[] allFonts | |
| blocks | back to summary |
|---|---|
| private int[][] blocks | |
| BLOCKSIZE | back to summary |
|---|---|
| private static final int BLOCKSIZE | |
| DEFAULT_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_SIZE | |
| defaultFont | back to summary |
|---|---|
| private Font defaultFont | |
| INSTANCE | back to summary |
|---|---|
| private static FontResolver INSTANCE | |
| MASK | back to summary |
|---|---|
| private static final int MASK | |
| SHIFT | back to summary |
|---|---|
| private static final int SHIFT | |
| supplementaryFonts | back to summary |
|---|---|
| private Font[] supplementaryFonts | |
| supplementaryIndices | back to summary |
|---|---|
| private int[] supplementaryIndices | |
| FontResolver | back to summary |
|---|---|
| private FontResolver() | |
| getAllFonts | back to summary |
|---|---|
| private Font[] getAllFonts() | |
| getAllSCFonts | back to summary |
|---|---|
| private Font[] getAllSCFonts() | |
| getFont | back to summary |
|---|---|
| public Font getFont(int index, Map<? extends AttributedCharacterIterator. Return a Font from a given font index with properties from attributes. The font index, which should have been produced by getFontIndex(), determines a font family. The size and style of the Font reflect the properties in attributes. Any Font or font family specifications in attributes are ignored, on the assumption that clients have already handled them.
| |
| getFontIndex | back to summary |
|---|---|
| public int getFontIndex(char c) Return an index for the given character. The index identifies a font family to getFont(), and has no other inherent meaning.
| |
| getFontIndex | back to summary |
|---|---|
| public int getFontIndex(int cp) | |
| getIndexFor | back to summary |
|---|---|
| private int getIndexFor(char c) Search fonts in order, and return "1" to indicate its in the default font, (or not found at all), or the index of the first font which can display the given character, plus 2, if it is not in the default font. | |
| getIndexFor | back to summary |
|---|---|
| private int getIndexFor(int cp) | |
| getInstance | back to summary |
|---|---|
| public static FontResolver getInstance() Return a shared instance of FontResolver. | |
| nextFontRunIndex | back to summary |
|---|---|
| public int nextFontRunIndex(CodePointIterator iter) Determines the font index for the code point at the current position in the iterator, then advances the iterator to the first code point that has a different index or until the iterator is DONE, and returns the font index.
| |