1 18 package org.apache.batik.svggen.font.table; 19 20 import java.io.IOException ; 21 import java.io.RandomAccessFile ; 22 23 27 public class MaxpTable implements Table { 28 29 private int versionNumber; 30 private int numGlyphs; 31 private int maxPoints; 32 private int maxContours; 33 private int maxCompositePoints; 34 private int maxCompositeContours; 35 private int maxZones; 36 private int maxTwilightPoints; 37 private int maxStorage; 38 private int maxFunctionDefs; 39 private int maxInstructionDefs; 40 private int maxStackElements; 41 private int maxSizeOfInstructions; 42 private int maxComponentElements; 43 private int maxComponentDepth; 44 45 protected MaxpTable(DirectoryEntry de,RandomAccessFile raf) throws IOException { 46 raf.seek(de.getOffset()); 47 versionNumber = raf.readInt(); 48 numGlyphs = raf.readUnsignedShort(); 49 maxPoints = raf.readUnsignedShort(); 50 maxContours = raf.readUnsignedShort(); 51 maxCompositePoints = raf.readUnsignedShort(); 52 maxCompositeContours = raf.readUnsignedShort(); 53 maxZones = raf.readUnsignedShort(); 54 maxTwilightPoints = raf.readUnsignedShort(); 55 maxStorage = raf.readUnsignedShort(); 56 maxFunctionDefs = raf.readUnsignedShort(); 57 maxInstructionDefs = raf.readUnsignedShort(); 58 maxStackElements = raf.readUnsignedShort(); 59 maxSizeOfInstructions = raf.readUnsignedShort(); 60 maxComponentElements = raf.readUnsignedShort(); 61 maxComponentDepth = raf.readUnsignedShort(); 62 } 63 64 public int getMaxComponentDepth() { 65 return maxComponentDepth; 66 } 67 68 public int getMaxComponentElements() { 69 return maxComponentElements; 70 } 71 72 public int getMaxCompositeContours() { 73 return maxCompositeContours; 74 } 75 76 public int getMaxCompositePoints() { 77 return maxCompositePoints; 78 } 79 80 public int getMaxContours() { 81 return maxContours; 82 } 83 84 public int getMaxFunctionDefs() { 85 return maxFunctionDefs; 86 } 87 88 public int getMaxInstructionDefs() { 89 return maxInstructionDefs; 90 } 91 92 public int getMaxPoints() { 93 return maxPoints; 94 } 95 96 public int getMaxSizeOfInstructions() { 97 return maxSizeOfInstructions; 98 } 99 100 public int getMaxStackElements() { 101 return maxStackElements; 102 } 103 104 public int getMaxStorage() { 105 return maxStorage; 106 } 107 108 public int getMaxTwilightPoints() { 109 return maxTwilightPoints; 110 } 111 112 public int getMaxZones() { 113 return maxZones; 114 } 115 116 public int getNumGlyphs() { 117 return numGlyphs; 118 } 119 120 public int getType() { 121 return maxp; 122 } 123 } 124 | Popular Tags |