1 17 18 19 20 package org.apache.fop.render.afp; 21 22 import org.apache.fop.render.afp.fonts.AFPFont; 23 import org.apache.fop.render.afp.tools.BinaryUtils; 24 25 31 public class AFPFontAttributes { 32 33 36 private byte _fontReference; 37 38 41 private String _fontKey; 42 43 46 private AFPFont _font; 47 48 51 private int _pointSize; 52 53 59 public AFPFontAttributes( 60 61 String fontKey, 62 AFPFont font, 63 int pointSize) { 64 65 _fontKey = fontKey; 66 _font = font; 67 _pointSize = pointSize; 68 69 } 70 73 public AFPFont getFont() { 74 return _font; 75 } 76 77 80 public String getFontKey() { 81 82 return _fontKey + _pointSize; 83 84 } 85 86 89 public int getPointSize() { 90 return _pointSize; 91 } 92 93 96 public byte getFontReference() { 97 return _fontReference; 98 } 99 100 104 public void setFontReference(int fontReference) { 105 106 String id = String.valueOf(fontReference); 107 _fontReference = BinaryUtils.convert(id)[0]; 108 109 } 110 111 } 112 | Popular Tags |