diff options
author | fotis <fotis@unknown> | 2000-11-16 19:19:25 +0000 |
---|---|---|
committer | fotis <fotis@unknown> | 2000-11-16 19:19:25 +0000 |
commit | 349df02eb000327f8c702e24f5410ce1600d4ba5 (patch) | |
tree | 2b203594309b7acc6d58759faaa793ea877d4b83 | |
parent | ff5f56081090a486965e0c766b1a5119dc6ed884 (diff) | |
download | xmlgraphics-fop-349df02eb000327f8c702e24f5410ce1600d4ba5.tar.gz xmlgraphics-fop-349df02eb000327f8c702e24f5410ce1600d4ba5.zip |
AWTRenderer no supports system fonts (Dorothea Wiarda)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193824 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/codegen/font-file.xsl | 23 | ||||
-rw-r--r-- | src/codegen/t1font-file.xsl | 23 |
2 files changed, 24 insertions, 22 deletions
diff --git a/src/codegen/font-file.xsl b/src/codegen/font-file.xsl index 902be25f6..184b656e0 100644 --- a/src/codegen/font-file.xsl +++ b/src/codegen/font-file.xsl @@ -50,20 +50,20 @@ public class <xsl:value-of select="class-name"/> extends Font { return fontName; } - public int getAscender() { - return ascender; + public int getAscender(int size) { + return size * ascender; } - public int getCapHeight() { - return capHeight; + public int getCapHeight(int size) { + return size * capHeight; } - public int getDescender() { - return descender; + public int getDescender(int size) { + return size * descender; } - public int getXHeight() { - return xHeight; + public int getXHeight(int size) { + return size * xHeight; } public int getFirstChar() { @@ -74,13 +74,14 @@ public class <xsl:value-of select="class-name"/> extends Font { return lastChar; } - public int width(int i) { - return width[i]; + public int width(int i,int size) { + return size * width[i]; } - public int[] getWidths() { + public int[] getWidths(int size) { int[] arr = new int[getLastChar()-getFirstChar()+1]; System.arraycopy(width, getFirstChar(), arr, 0, getLastChar()-getFirstChar()+1); + for( int i = 0; i < arr.length; i++) arr[i] *= size; return arr; } } diff --git a/src/codegen/t1font-file.xsl b/src/codegen/t1font-file.xsl index 024fbbb62..3e7eed0e8 100644 --- a/src/codegen/t1font-file.xsl +++ b/src/codegen/t1font-file.xsl @@ -56,20 +56,20 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes return fontName; } - public int getAscender() { - return ascender; + public int getAscender(int size) { + return size * ascender; } - public int getCapHeight() { - return capHeight; + public int getCapHeight(int size) { + return size * capHeight; } - public int getDescender() { - return descender; + public int getDescender(int size) { + return size * descender; } - public int getXHeight() { - return xHeight; + public int getXHeight(int size) { + return size * xHeight; } public int getFlags() { @@ -96,13 +96,14 @@ public class <xsl:value-of select="class-name"/> extends Font implements FontDes return lastChar; } - public int width(int i) { - return width[i]; + public int width(int i, int size) { + return size * width[i]; } - public int[] getWidths() { + public int[] getWidths(int size) { int[] arr = new int[getLastChar()-getFirstChar()+1]; System.arraycopy(width, getFirstChar(), arr, 0, getLastChar()-getFirstChar()+1); + for( int i = 0; i < arr.length; i++) arr[i] *= size; return arr; } } |