1 17 18 19 20 package org.apache.fop.render.afp.fonts; 21 22 import org.apache.fop.fonts.Typeface; 23 24 27 public class FopCharacterSet extends CharacterSet { 28 29 30 private Typeface _characterSet = null; 31 private int _size = 0; 32 33 42 public FopCharacterSet( 43 String codePage, 44 String encoding, 45 String name, 46 int size, 47 Typeface characterSet) { 48 super(codePage, encoding, name, null); 49 _characterSet = characterSet; 50 _size = size * 1000; 51 } 52 53 65 public int getAscender() { 66 return _characterSet.getAscender(_size); 67 } 68 69 75 public int getCapHeight() { 76 return _characterSet.getCapHeight(_size); 77 } 78 79 85 public int getDescender() { 86 return _characterSet.getDescender(_size); 87 } 88 89 93 public int getFirstChar() { 94 return 0; 95 } 96 97 101 public int getLastChar() { 102 return 0; 103 } 104 105 109 public int[] getWidths() { 110 return _characterSet.getWidths(); 111 } 112 113 117 public int getXHeight() { 118 return _characterSet.getXHeight(_size); 119 } 120 121 127 public int width(int character) { 128 return _characterSet.getWidth(character, _size); 129 } 130 131 136 public char mapChar(char c) { 137 return _characterSet.mapChar(c); 138 } 139 140 } | Popular Tags |