2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 * @author Ilya S. Okomin
22 package org.apache.harmony.awt.gl.font;
26 * Class containing font property information. This information can be found
27 * in font.property files. See API documentation, logical fonts description part.
30 public class FontProperty {
33 String fileName = null;
35 // name of the encoding to be used
36 String encoding = null;
38 // array of exclusion ranges (pairs of low and high unicode exclusion bounds)
39 int[] exclRange = null;
48 * Returns font style of this font property.
50 public int getStyle(){
55 * Returns font name of this font property.
57 public String getName(){
62 * Returns encoding used in this font property.
64 public String getEncoding(){
69 * Returns an array of exclusion ranges. This array contain pairs of
70 * low and high bounds of the intervals of characters to ignore in
71 * total Unicode characters range.
73 public int[] getExclusionRange(){
74 return this.exclRange;
78 * Returns file name of the font that is described by this font property.
80 public String getFileName(){
85 * Returns true if specified character covered by exclusion ranges of this
86 * font property, false otherwise.
88 * @param ch specified char to check
90 public boolean isCharExcluded(char ch){
91 if (exclRange == null ){
95 for (int i = 0; i < exclRange.length;){
96 int lb = exclRange[i++];
97 int hb = exclRange[i++];
99 if (ch >= lb && ch <= hb){