1 51 package org.apache.fop.pdf; 52 53 55 59 public abstract class PDFFontNonBase14 extends PDFFont { 60 61 64 protected int firstChar; 65 66 69 protected int lastChar; 70 71 74 protected PDFArray widths; 75 76 79 protected PDFFontDescriptor descriptor; 80 81 91 public PDFFontNonBase14(int number, String fontname, byte subtype, 92 String basefont, 93 Object encoding ) { 94 95 96 super(number, fontname, subtype, basefont, encoding); 97 98 this.descriptor = null; 99 } 100 101 108 public void setWidthMetrics(int firstChar, int lastChar, 109 PDFArray widths) { 110 111 this.firstChar = firstChar; 112 this.lastChar = lastChar; 113 this.widths = widths; 114 } 115 116 121 public void setDescriptor(PDFFontDescriptor descriptor) { 122 this.descriptor = descriptor; 123 } 124 125 128 protected void fillInPDF(StringBuffer p) { 129 p.append("\n/FirstChar "); 130 p.append(firstChar); 131 p.append("\n/LastChar "); 132 p.append(lastChar); 133 p.append("\n/Widths "); 134 p.append(this.widths.referencePDF()); 135 if (descriptor != null) { 136 p.append("\n/FontDescriptor "); 137 p.append(this.descriptor.referencePDF()); 138 } 139 } 140 141 } 142 | Popular Tags |