1 51 package org.apache.fop.fonts; 52 53 import java.util.ArrayList ; 54 55 class TTFMtxEntry { 56 int wx; 57 int lsb; 58 String name; 59 int index; 60 ArrayList unicodeIndex; 61 int[] bbox; 62 long offset; 63 byte found; 64 65 TTFMtxEntry() { 66 name = ""; 67 found = 0; 68 unicodeIndex = new ArrayList (); 69 bbox = new int[4]; 70 } 71 72 public String toString(TTFFile t) { 73 return new String ("Glyph " + name + " index: " + getIndexAsString() + " bbox [" 74 + t.get_ttf_funit(bbox[0]) + " " 75 + t.get_ttf_funit(bbox[1]) + " " 76 + t.get_ttf_funit(bbox[2]) + " " 77 + t.get_ttf_funit(bbox[3]) + "] wx: " 78 + t.get_ttf_funit(wx)); 79 } 80 81 85 public int getIndex() { 86 return index; 87 } 88 89 93 public boolean isIndexReserved() { 94 return (getIndex() >= 32768) && (getIndex() <= 65535); 95 } 96 97 102 public String getIndexAsString() { 103 if (isIndexReserved()) { 104 return Integer.toString(getIndex()) + " (reserved)"; 105 } else { 106 return Integer.toString(getIndex()); 107 } 108 } 109 110 111 } 112 | Popular Tags |