1 17 18 19 20 package org.apache.fop.fonts.truetype; 21 22 26 public class TTFCmapEntry { 27 28 private int unicodeStart; 29 private int unicodeEnd; 30 private int glyphStartIndex; 31 32 TTFCmapEntry() { 33 unicodeStart = 0; 34 unicodeEnd = 0; 35 glyphStartIndex = 0; 36 } 37 38 TTFCmapEntry(int unicodeStart, int unicodeEnd, int glyphStartIndex) { 39 this.unicodeStart = unicodeStart; 40 this.unicodeEnd = unicodeEnd; 41 this.glyphStartIndex = glyphStartIndex; 42 } 43 44 47 public boolean equals(Object o) { 48 if (o instanceof TTFCmapEntry) { 49 TTFCmapEntry ce = (TTFCmapEntry)o; 50 if (ce.unicodeStart == this.unicodeStart 51 && ce.unicodeEnd == this.unicodeEnd 52 && ce.glyphStartIndex == this.glyphStartIndex) { 53 return true; 54 } 55 } 56 return false; 57 } 58 59 63 public int getGlyphStartIndex() { 64 return glyphStartIndex; 65 } 66 67 71 public int getUnicodeEnd() { 72 return unicodeEnd; 73 } 74 75 79 public int getUnicodeStart() { 80 return unicodeStart; 81 } 82 83 87 public void setGlyphStartIndex(int glyphStartIndex) { 88 this.glyphStartIndex = glyphStartIndex; 89 } 90 91 95 public void setUnicodeEnd(int unicodeEnd) { 96 this.unicodeEnd = unicodeEnd; 97 } 98 99 103 public void setUnicodeStart(int unicodeStart) { 104 this.unicodeStart = unicodeStart; 105 } 106 107 } 108 | Popular Tags |