Example usage for java.awt.font NumericShaper getShaper

List of usage examples for java.awt.font NumericShaper getShaper

Introduction

In this page you can find the example usage for java.awt.font NumericShaper getShaper.

Prototype

public static NumericShaper getShaper(Range singleRange) 

Source Link

Document

Returns a shaper for the provided Unicode range.

Usage

From source file:Test.java

public NumericShaperPanel() {
    String text = "java";
    HashMap map = new HashMap();
    Font font = new Font("Mongolian Baiti", Font.PLAIN, 32);
    map.put(TextAttribute.FONT, font);
    map.put(TextAttribute.NUMERIC_SHAPING, NumericShaper.getShaper(NumericShaper.Range.MONGOLIAN));
    FontRenderContext fontRenderContext = new FontRenderContext(null, false, false);
    layout = new TextLayout(text, map, fontRenderContext);
}