From 349df02eb000327f8c702e24f5410ce1600d4ba5 Mon Sep 17 00:00:00 2001 From: fotis Date: Thu, 16 Nov 2000 19:19:25 +0000 Subject: [PATCH] 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 --- src/codegen/font-file.xsl | 23 ++++++++++++----------- 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 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 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 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 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; } } -- 2.39.5