1 31 package org.pdfbox.ttf; 32 33 import java.io.IOException ; 34 35 import org.pdfbox.util.BoundingBox; 36 37 43 public class GlyphData 44 { 45 private static final int FLAG_ON_CURVE = 1; 46 private static final int FLAG_SHORT_X = 1<<1; 47 private static final int FLAG_SHORT_Y = 1<<2; 48 private static final int FLAG_X_MAGIC = 1<<3; 49 private static final int FLAG_Y_MAGIC = 1<<4; 50 51 private BoundingBox boundingBox = new BoundingBox(); 52 private short numberOfContours; 53 private int[] endPointsOfContours; 54 private byte[] instructions; 55 private int[] flags; 56 private short[] xCoordinates; 57 private short[] yCoordinates; 58 59 66 public void initData( TrueTypeFont ttf, TTFDataStream data ) throws IOException 67 { 68 numberOfContours = data.readSignedShort(); 69 boundingBox.setLowerLeftX( data.readSignedShort() ); 70 boundingBox.setLowerLeftY( data.readSignedShort() ); 71 boundingBox.setUpperRightX( data.readSignedShort() ); 72 boundingBox.setUpperRightY( data.readSignedShort() ); 73 95 } 96 97 100 public BoundingBox getBoundingBox() 101 { 102 return boundingBox; 103 } 104 107 public void setBoundingBox(BoundingBox boundingBoxValue) 108 { 109 this.boundingBox = boundingBoxValue; 110 } 111 114 public short getNumberOfContours() 115 { 116 return numberOfContours; 117 } 118 121 public void setNumberOfContours(short numberOfContoursValue) 122 { 123 this.numberOfContours = numberOfContoursValue; 124 } 125 } 126 | Popular Tags |