test/sun/java2d/SunGraphicsEnvironment/TestSGEuseAlternateFontforJALocales.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 7032930
  27  *
  28  * @summary verify the existence of the  method
  29  *           SunGraphicsEnvironment.useAlternateFontforJALocales
  30  *

  31  * @run main/othervm TestSGEuseAlternateFontforJALocales
  32  * @run main/othervm -Dfile.encoding=windows-31j -Duser.language=ja -Duser.country=JA TestSGEuseAlternateFontforJALocales
  33  *
  34  */
  35 
  36 import java.lang.reflect.Method;
  37 import java.nio.charset.Charset;
  38 import java.util.Locale;
  39 import java.awt.Font;
  40 import java.awt.FontMetrics;
  41 import java.awt.Graphics2D;
  42 import java.awt.GraphicsEnvironment;
  43 import java.awt.image.BufferedImage;
  44 
  45 public class TestSGEuseAlternateFontforJALocales {
  46 
  47     public static void main(String args[]) throws Exception {
  48         System.out.println("Default Charset = "
  49             + Charset.defaultCharset().name());
  50         System.out.println("Locale = " + Locale.getDefault());




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 7032930
  27  *
  28  * @summary verify the existence of the  method
  29  *           SunGraphicsEnvironment.useAlternateFontforJALocales
  30  *
  31  * @modules java.desktop/sun.java2d
  32  * @run main/othervm TestSGEuseAlternateFontforJALocales
  33  * @run main/othervm -Dfile.encoding=windows-31j -Duser.language=ja -Duser.country=JA TestSGEuseAlternateFontforJALocales
  34  *
  35  */
  36 
  37 import java.lang.reflect.Method;
  38 import java.nio.charset.Charset;
  39 import java.util.Locale;
  40 import java.awt.Font;
  41 import java.awt.FontMetrics;
  42 import java.awt.Graphics2D;
  43 import java.awt.GraphicsEnvironment;
  44 import java.awt.image.BufferedImage;
  45 
  46 public class TestSGEuseAlternateFontforJALocales {
  47 
  48     public static void main(String args[]) throws Exception {
  49         System.out.println("Default Charset = "
  50             + Charset.defaultCharset().name());
  51         System.out.println("Locale = " + Locale.getDefault());