1 51 package org.apache.fop.render.mif.fonts; 52 53 import org.apache.fop.render.mif.Font; 54 55 public class TimesBoldItalic extends Font { 56 private final static String fontName = "Times-BoldItalic"; 57 private final static String encoding = "WinAnsiEncoding"; 58 private final static int capHeight = 669; 59 private final static int xHeight = 462; 60 private final static int ascender = 699; 61 private final static int descender = -205; 62 private final static int firstChar = 32; 63 private final static int lastChar = 255; 64 private final static int[] width; 65 66 static { 67 width = new int[256]; 68 width[0x0041] = 667; 69 width[0x00C6] = 944; 70 width[0x00C1] = 667; 71 width[0x00C2] = 667; 72 width[0x00C4] = 667; 73 width[0x00C0] = 667; 74 width[0x00C5] = 667; 75 width[0x00C3] = 667; 76 width[0x0042] = 667; 77 width[0x0043] = 667; 78 width[0x00C7] = 667; 79 width[0x0044] = 722; 80 width[0x0045] = 667; 81 width[0x00C9] = 667; 82 width[0x00CA] = 667; 83 width[0x00CB] = 667; 84 width[0x00C8] = 667; 85 width[0x00D0] = 722; 86 width[0x0046] = 667; 87 width[0x0047] = 722; 88 width[0x0048] = 778; 89 width[0x0049] = 389; 90 width[0x00CD] = 389; 91 width[0x00CE] = 389; 92 width[0x00CF] = 389; 93 width[0x00CC] = 389; 94 width[0x004A] = 500; 95 width[0x004B] = 667; 96 width[0x004C] = 611; 97 width[0x004D] = 889; 98 width[0x004E] = 722; 99 width[0x00D1] = 722; 100 width[0x004F] = 722; 101 width[0x008C] = 944; 102 width[0x00D3] = 722; 103 width[0x00D4] = 722; 104 width[0x00D6] = 722; 105 width[0x00D2] = 722; 106 width[0x00D8] = 722; 107 width[0x00D5] = 722; 108 width[0x0050] = 611; 109 width[0x0051] = 722; 110 width[0x0052] = 667; 111 width[0x0053] = 556; 112 width[0x008A] = 556; 113 width[0x0054] = 611; 114 width[0x00DE] = 611; 115 width[0x0055] = 722; 116 width[0x00DA] = 722; 117 width[0x00DB] = 722; 118 width[0x00DC] = 722; 119 width[0x00D9] = 722; 120 width[0x0056] = 667; 121 width[0x0057] = 889; 122 width[0x0058] = 667; 123 width[0x0059] = 611; 124 width[0x00DD] = 611; 125 width[0x009F] = 611; 126 width[0x005A] = 611; 127 width[0x0061] = 500; 128 width[0x00E1] = 500; 129 width[0x00E2] = 500; 130 width[0x00B4] = 333; 131 width[0x00E4] = 500; 132 width[0x00E6] = 722; 133 width[0x00E0] = 500; 134 width[0x0026] = 778; 135 width[0x00E5] = 500; 136 width[0x005E] = 570; 137 width[0x007E] = 570; 138 width[0x002A] = 500; 139 width[0x0040] = 832; 140 width[0x00E3] = 500; 141 width[0x0062] = 500; 142 width[0x005C] = 278; 143 width[0x007C] = 220; 144 width[0x007B] = 348; 145 width[0x007D] = 348; 146 width[0x005B] = 333; 147 width[0x005D] = 333; 148 width[0x00A6] = 220; 149 width[0x0095] = 350; 150 width[0x0063] = 444; 151 width[0x00E7] = 444; 152 width[0x00B8] = 333; 153 width[0x00A2] = 500; 154 width[0x0088] = 333; 155 width[0x003A] = 333; 156 width[0x002C] = 250; 157 width[0x00A9] = 747; 158 width[0x00A4] = 500; 159 width[0x0064] = 500; 160 width[0x0086] = 500; 161 width[0x0087] = 500; 162 width[0x00B0] = 400; 163 width[0x00A8] = 333; 164 width[0x00F7] = 570; 165 width[0x0024] = 500; 166 width[0x0065] = 444; 167 width[0x00E9] = 444; 168 width[0x00EA] = 444; 169 width[0x00EB] = 444; 170 width[0x00E8] = 444; 171 width[0x0038] = 500; 172 width[0x0085] = 1000; 173 width[0x0097] = 1000; 174 width[0x0096] = 500; 175 width[0x003D] = 570; 176 width[0x00F0] = 500; 177 width[0x0021] = 389; 178 width[0x00A1] = 389; 179 width[0x0066] = 333; 180 width[0x0035] = 500; 181 width[0x0083] = 500; 182 width[0x0034] = 500; 183 width[0xA4] = 167; 184 width[0x0067] = 500; 185 width[0x00DF] = 500; 186 width[0x0060] = 333; 187 width[0x003E] = 570; 188 width[0x00AB] = 500; 189 width[0x00BB] = 500; 190 width[0x008B] = 333; 191 width[0x009B] = 333; 192 width[0x0068] = 556; 193 width[0x002D] = 333; 194 width[0x0069] = 278; 195 width[0x00ED] = 278; 196 width[0x00EE] = 278; 197 width[0x00EF] = 278; 198 width[0x00EC] = 278; 199 width[0x006A] = 278; 200 width[0x006B] = 500; 201 width[0x006C] = 278; 202 width[0x003C] = 570; 203 width[0x00AC] = 606; 204 width[0x006D] = 778; 205 width[0x00AF] = 333; 206 width[0x2D] = 606; 207 width[0x00B5] = 576; 208 width[0x00D7] = 570; 209 width[0x006E] = 556; 210 width[0x0039] = 500; 211 width[0x00F1] = 556; 212 width[0x0023] = 500; 213 width[0x006F] = 500; 214 width[0x00F3] = 500; 215 width[0x00F4] = 500; 216 width[0x00F6] = 500; 217 width[0x009C] = 722; 218 width[0x00F2] = 500; 219 width[0x0031] = 500; 220 width[0x00BD] = 750; 221 width[0x00BC] = 750; 222 width[0x00B9] = 300; 223 width[0x00AA] = 266; 224 width[0x00BA] = 300; 225 width[0x00F8] = 500; 226 width[0x00F5] = 500; 227 width[0x0070] = 500; 228 width[0x00B6] = 500; 229 width[0x0028] = 333; 230 width[0x0029] = 333; 231 width[0x0025] = 833; 232 width[0x002E] = 250; 233 width[0x00B7] = 250; 234 width[0x0089] = 1000; 235 width[0x002B] = 570; 236 width[0x00B1] = 570; 237 width[0x0071] = 500; 238 width[0x003F] = 500; 239 width[0x00BF] = 500; 240 width[0x0022] = 555; 241 width[0x0084] = 500; 242 width[0x0093] = 500; 243 width[0x0094] = 500; 244 width[0x0091] = 333; 245 width[0x0092] = 333; 246 width[0x0082] = 333; 247 width[0x0027] = 278; 248 width[0x0072] = 389; 249 width[0x00AE] = 747; 250 width[0x00B0] = 333; 251 width[0x0073] = 389; 252 width[0x009A] = 389; 253 width[0x00A7] = 500; 254 width[0x003B] = 333; 255 width[0x0037] = 500; 256 width[0x0036] = 500; 257 width[0x002F] = 278; 258 width[0x0020] = 250; 259 width[0x00A0] = 250; 260 width[0x00A3] = 500; 261 width[0x0074] = 278; 262 width[0x00FE] = 500; 263 width[0x0033] = 500; 264 width[0x00BE] = 750; 265 width[0x00B3] = 300; 266 width[0x0098] = 333; 267 width[0x0099] = 1000; 268 width[0x0032] = 500; 269 width[0x00B2] = 300; 270 width[0x0075] = 556; 271 width[0x00FA] = 556; 272 width[0x00FB] = 556; 273 width[0x00FC] = 556; 274 width[0x00F9] = 556; 275 width[0x005F] = 500; 276 width[0x0076] = 444; 277 width[0x0077] = 667; 278 width[0x0078] = 500; 279 width[0x0079] = 444; 280 width[0x00FD] = 444; 281 width[0x00FF] = 444; 282 width[0x00A5] = 500; 283 width[0x007A] = 389; 284 width[0x0030] = 500; 285 286 } 287 288 public String encoding() { 289 return encoding; 290 } 291 292 public String fontName() { 293 return fontName; 294 } 295 296 public int getAscender(int size) { 297 return size * ascender; 298 } 299 300 public int getCapHeight(int size) { 301 return size * capHeight; 302 } 303 304 public int getDescender(int size) { 305 return size * descender; 306 } 307 308 public int getXHeight(int size) { 309 return size * xHeight; 310 } 311 312 public int getFirstChar() { 313 return firstChar; 314 } 315 316 public int getLastChar() { 317 return lastChar; 318 } 319 320 public int width(int i, int size) { 321 return size * width[i]; 322 } 323 324 public int[] getWidths(int size) { 325 int[] arr = new int[getLastChar() - getFirstChar() + 1]; 326 System.arraycopy(width, getFirstChar(), arr, 0, 327 getLastChar() - getFirstChar() + 1); 328 for (int i = 0; i < arr.length; i++) 329 arr[i] *= size; 330 return arr; 331 } 332 333 } 334 335 | Popular Tags |