NumericShaper
public
final
class
NumericShaper
extends Object
implements
Serializable
| java.lang.Object | |
| ↳ | java.awt.font.NumericShaper |
The NumericShaper class is used to convert Latin-1 (European)
digits to other Unicode decimal digits. Users of this class will
primarily be people who wish to present data using
national digit shapes, but find it more convenient to represent the
data internally using Latin-1 (European) digits. This does not
interpret the deprecated numeric shape selector character (U+206E).
Instances of NumericShaper are typically applied
as attributes to text with the
NUMERIC_SHAPING attribute
of the TextAttribute class.
For example, this code snippet causes a TextLayout to
shape European digits to Arabic in an Arabic context:
Map map = new HashMap(); map.put(TextAttribute.NUMERIC_SHAPING, NumericShaper.getContextualShaper(NumericShaper.ARABIC));