java.lang.Object | |
↳ | sun.font.FontResolver |
This class maps an individual character to a Font family which can display it. The character-to-Font mapping does not depend on the character's context, so a particular character will be mapped to the same font family each time.
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().
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a Font from a given font index with properties
from attributes.
| |||||||||||
Return an index for the given character.
| |||||||||||
Return a shared instance of FontResolver.
| |||||||||||
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.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
index | an index from getFontIndex() which determines the font family |
---|---|
attributes | 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 |
Return an index for the given character. The index identifies a font family to getFont(), and has no other inherent meaning.
c | the character to map |
---|
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.
iter | a code point iterator, this will be advanced past any code points that have the same font index |
---|