< prev index next >

src/java.desktop/share/classes/sun/font/FontUtilities.java

Print this page


   1 /*
   2  * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 247         }
 248         else if (code <= 0x0e7f) {
 249             // if Indic, assume shaping for conjuncts, reordering:
 250             // 0900 - 097F Devanagari
 251             // 0980 - 09FF Bengali
 252             // 0A00 - 0A7F Gurmukhi
 253             // 0A80 - 0AFF Gujarati
 254             // 0B00 - 0B7F Oriya
 255             // 0B80 - 0BFF Tamil
 256             // 0C00 - 0C7F Telugu
 257             // 0C80 - 0CFF Kannada
 258             // 0D00 - 0D7F Malayalam
 259             // 0D80 - 0DFF Sinhala
 260             // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
 261             return true;
 262         }
 263         else if (code <  0x0f00) {
 264             return false;
 265         }
 266         else if (code <= 0x0fff) { // U+0F00 - U+0FFF Tibetan



 267             return true;
 268         }
 269         else if (code < 0x1100) {
 270             return false;
 271         }
 272         else if (code < 0x11ff) { // U+1100 - U+11FF Old Hangul
 273             return true;
 274         }
 275         else if (code < 0x1780) {
 276             return false;
 277         }
 278         else if (code <= 0x17ff) { // 1780 - 17FF Khmer
 279             return true;
 280         }
 281         else if (code < 0x200c) {
 282             return false;
 283         }
 284         else if (code <= 0x200d) { //  zwj or zwnj
 285             return true;
 286         }


   1 /*
   2  * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 247         }
 248         else if (code <= 0x0e7f) {
 249             // if Indic, assume shaping for conjuncts, reordering:
 250             // 0900 - 097F Devanagari
 251             // 0980 - 09FF Bengali
 252             // 0A00 - 0A7F Gurmukhi
 253             // 0A80 - 0AFF Gujarati
 254             // 0B00 - 0B7F Oriya
 255             // 0B80 - 0BFF Tamil
 256             // 0C00 - 0C7F Telugu
 257             // 0C80 - 0CFF Kannada
 258             // 0D00 - 0D7F Malayalam
 259             // 0D80 - 0DFF Sinhala
 260             // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
 261             return true;
 262         }
 263         else if (code <  0x0f00) {
 264             return false;
 265         }
 266         else if (code <= 0x0fff) { // U+0F00 - U+0FFF Tibetan
 267             return true;
 268         }
 269         else if (code < 0x10A0) {  // U+1000 - U+109F Myanmar
 270             return true;
 271         }
 272         else if (code < 0x1100) {
 273             return false;
 274         }
 275         else if (code < 0x11ff) { // U+1100 - U+11FF Old Hangul
 276             return true;
 277         }
 278         else if (code < 0x1780) {
 279             return false;
 280         }
 281         else if (code <= 0x17ff) { // 1780 - 17FF Khmer
 282             return true;
 283         }
 284         else if (code < 0x200c) {
 285             return false;
 286         }
 287         else if (code <= 0x200d) { //  zwj or zwnj
 288             return true;
 289         }


< prev index next >