FileDocCategorySizeDatePackage
FontProperty.javaAPI DocAndroid 1.5 API2834Wed May 06 22:41:54 BST 2009org.apache.harmony.awt.gl.font

FontProperty

public class FontProperty extends Object
Class containing font property information. This information can be found in font.property files. See API documentation, logical fonts description part.

Fields Summary
String
fileName
String
encoding
int[]
exclRange
String
name
int
style
Constructors Summary
Methods Summary
public java.lang.StringgetEncoding()
Returns encoding used in this font property.

        return this.encoding;
    
public int[]getExclusionRange()
Returns an array of exclusion ranges. This array contain pairs of low and high bounds of the intervals of characters to ignore in total Unicode characters range.

        return this.exclRange;
    
public java.lang.StringgetFileName()
Returns file name of the font that is described by this font property.

        return this.fileName;
    
public java.lang.StringgetName()
Returns font name of this font property.

        return this.name;
    
public intgetStyle()
Returns font style of this font property.


                 
      
        return this.style;
    
public booleanisCharExcluded(char ch)
Returns true if specified character covered by exclusion ranges of this font property, false otherwise.

param
ch specified char to check

        if (exclRange == null ){
            return false;
        }

        for (int i = 0; i < exclRange.length;){
            int lb = exclRange[i++];
            int hb = exclRange[i++];

            if (ch >= lb && ch <= hb){
                return true;
            }
        }

        return false;