1 17 18 19 20 package org.apache.fop.fonts.truetype; 21 22 import java.util.List ; 23 24 27 class TTFMtxEntry { 28 29 private int wx; 30 private int lsb; 31 private String name = ""; 32 private int index; 33 private List unicodeIndex = new java.util.ArrayList (); 34 private int[] boundingBox = new int[4]; 35 private long offset; 36 private byte found = 0; 37 38 44 public String toString(TTFFile t) { 45 return "Glyph " + name + " index: " + getIndexAsString() + " bbox [" 46 + t.convertTTFUnit2PDFUnit(boundingBox[0]) + " " 47 + t.convertTTFUnit2PDFUnit(boundingBox[1]) + " " 48 + t.convertTTFUnit2PDFUnit(boundingBox[2]) + " " 49 + t.convertTTFUnit2PDFUnit(boundingBox[3]) + "] wx: " 50 + t.convertTTFUnit2PDFUnit(wx); 51 } 52 53 57 public int[] getBoundingBox() { 58 return boundingBox; 59 } 60 61 65 public void setBoundingBox(int[] boundingBox) { 66 this.boundingBox = boundingBox; 67 } 68 69 73 public byte getFound() { 74 return found; 75 } 76 77 81 public int getIndex() { 82 return index; 83 } 84 85 89 public boolean isIndexReserved() { 90 return (getIndex() >= 32768) && (getIndex() <= 65535); 91 } 92 93 98 public String getIndexAsString() { 99 if (isIndexReserved()) { 100 return Integer.toString(getIndex()) + " (reserved)"; 101 } else { 102 return Integer.toString(getIndex()); 103 } 104 } 105 106 110 public int getLsb() { 111 return lsb; 112 } 113 114 118 public String getName() { 119 return name; 120 } 121 122 126 public long getOffset() { 127 return offset; 128 } 129 130 134 public List getUnicodeIndex() { 135 return unicodeIndex; 136 } 137 138 142 public int getWx() { 143 return wx; 144 } 145 146 150 public void setFound(byte found) { 151 this.found = found; 152 } 153 154 158 public void setIndex(int index) { 159 this.index = index; 160 } 161 162 166 public void setLsb(int lsb) { 167 this.lsb = lsb; 168 } 169 170 174 public void setName(String name) { 175 this.name = name; 176 } 177 178 182 public void setOffset(long offset) { 183 this.offset = offset; 184 } 185 186 190 public void setWx(int wx) { 191 this.wx = wx; 192 } 193 194 195 } 196 | Popular Tags |