java/awt/font/GlyphVector/TestLayoutFlags.java

Print this page


   1 /* @test
   2    @bug 4328745 5090704
   3    @summary exercise getLayoutFlags, getGlyphCharIndex, getGlyphCharIndices
   4  */
   5 
   6 import java.awt.*;
   7 import java.awt.event.*;
   8 import java.awt.font.*;
   9 import java.awt.geom.*;
  10 
  11 import sun.font.*;
  12 
  13 public class TestLayoutFlags {
  14 
  15     static public void main(String[] args) {
  16         new TestLayoutFlags().runTest();
  17     }
  18 
  19     void runTest() {
  20 
  21         Font font = new Font("Lucida Sans", Font.PLAIN, 24);
  22 
  23         String latin1 = "This is a latin1 string"; // none
  24         String hebrew = "\u05d0\u05d1\u05d2\u05d3"; // rtl
  25         String arabic = "\u0646\u0644\u0622\u0646"; // rtl + mc/g
  26         String hindi = "\u0939\u093f\u0923\u094d\u0921\u0940"; // ltr + reorder
  27         //      String tamil = "\u0b9c\u0bcb"; // ltr + mg/c + split
  28 
  29         FontRenderContext frc = new FontRenderContext(null, true, true);
  30 
  31         // get glyph char indices needs to initializes layoutFlags before use (5090704)
  32         {


   1 /* @test
   2    @bug 4328745 5090704
   3    @summary exercise getLayoutFlags, getGlyphCharIndex, getGlyphCharIndices
   4  */
   5 
   6 import java.awt.*;
   7 import java.awt.event.*;
   8 import java.awt.font.*;
   9 import java.awt.geom.*;
  10 


  11 public class TestLayoutFlags {
  12 
  13     static public void main(String[] args) {
  14         new TestLayoutFlags().runTest();
  15     }
  16 
  17     void runTest() {
  18 
  19         Font font = new Font("Lucida Sans", Font.PLAIN, 24);
  20 
  21         String latin1 = "This is a latin1 string"; // none
  22         String hebrew = "\u05d0\u05d1\u05d2\u05d3"; // rtl
  23         String arabic = "\u0646\u0644\u0622\u0646"; // rtl + mc/g
  24         String hindi = "\u0939\u093f\u0923\u094d\u0921\u0940"; // ltr + reorder
  25         //      String tamil = "\u0b9c\u0bcb"; // ltr + mg/c + split
  26 
  27         FontRenderContext frc = new FontRenderContext(null, true, true);
  28 
  29         // get glyph char indices needs to initializes layoutFlags before use (5090704)
  30         {