From: arved Date: Sat, 10 Feb 2001 03:29:48 +0000 (+0000) Subject: MIF font X-Git-Tag: fop-0_17_0~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6d03eedd79c1295909f00badd0bbd3892226e23;p=xmlgraphics-fop.git MIF font git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194038 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/render/mif/fonts/Courier.java b/src/org/apache/fop/render/mif/fonts/Courier.java new file mode 100644 index 000000000..f45c1432d --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/Courier.java @@ -0,0 +1,288 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class Courier extends Font { + private final static String fontName = "Courier"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 562; + private final static int xHeight = 426; + private final static int ascender = 629; + private final static int descender = -157; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 600; + width[0x00C6] = 600; + width[0x00C1] = 600; + width[0x00C2] = 600; + width[0x00C4] = 600; + width[0x00C0] = 600; + width[0x00C5] = 600; + width[0x00C3] = 600; + width[0x0042] = 600; + width[0x0043] = 600; + width[0x00C7] = 600; + width[0x0044] = 600; + width[0x0045] = 600; + width[0x00C9] = 600; + width[0x00CA] = 600; + width[0x00CB] = 600; + width[0x00C8] = 600; + width[0x00D0] = 600; + width[0x0046] = 600; + width[0x0047] = 600; + width[0x0048] = 600; + width[0x0049] = 600; + width[0x00CD] = 600; + width[0x00CE] = 600; + width[0x00CF] = 600; + width[0x00CC] = 600; + width[0x004A] = 600; + width[0x004B] = 600; + width[0x004C] = 600; + width[0x004D] = 600; + width[0x004E] = 600; + width[0x00D1] = 600; + width[0x004F] = 600; + width[0x008C] = 600; + width[0x00D3] = 600; + width[0x00D4] = 600; + width[0x00D6] = 600; + width[0x00D2] = 600; + width[0x00D8] = 600; + width[0x00D5] = 600; + width[0x0050] = 600; + width[0x0051] = 600; + width[0x0052] = 600; + width[0x0053] = 600; + width[0x008A] = 600; + width[0x0054] = 600; + width[0x00DE] = 600; + width[0x0055] = 600; + width[0x00DA] = 600; + width[0x00DB] = 600; + width[0x00DC] = 600; + width[0x00D9] = 600; + width[0x0056] = 600; + width[0x0057] = 600; + width[0x0058] = 600; + width[0x0059] = 600; + width[0x00DD] = 600; + width[0x009F] = 600; + width[0x005A] = 600; + width[0x0061] = 600; + width[0x00E1] = 600; + width[0x00E2] = 600; + width[0x00B4] = 600; + width[0x00E4] = 600; + width[0x00E6] = 600; + width[0x00E0] = 600; + width[0x0026] = 600; + width[0x00E5] = 600; + width[0xAB] = 600; + width[0xAF] = 600; + width[0xAC] = 600; + width[0xAE] = 600; + width[0xAD] = 600; + width[0x005E] = 600; + width[0x007E] = 600; + width[0x002A] = 600; + width[0x0040] = 600; + width[0x00E3] = 600; + width[0x0062] = 600; + width[0x005C] = 600; + width[0x007C] = 600; + width[0x007B] = 600; + width[0x007D] = 600; + width[0x005B] = 600; + width[0x005D] = 600; + width[0x00A6] = 600; + width[0x0095] = 600; + width[0x0063] = 600; + width[0x00E7] = 600; + width[0x00B8] = 600; + width[0x00A2] = 600; + width[0x0088] = 600; + width[0x003A] = 600; + width[0x002C] = 600; + width[0x00A9] = 600; + width[0x00A4] = 600; + width[0x0064] = 600; + width[0x0086] = 600; + width[0x0087] = 600; + width[0x00B0] = 600; + width[0x00A8] = 600; + width[0x00F7] = 600; + width[0x0024] = 600; + width[0x0065] = 600; + width[0x00E9] = 600; + width[0x00EA] = 600; + width[0x00EB] = 600; + width[0x00E8] = 600; + width[0x0038] = 600; + width[0x0085] = 600; + width[0x0097] = 600; + width[0x0096] = 600; + width[0x003D] = 600; + width[0x00F0] = 600; + width[0x0021] = 600; + width[0x00A1] = 600; + width[0x0066] = 600; + width[0x0035] = 600; + width[0x0083] = 600; + width[0x0034] = 600; + width[0xA4] = 600; + width[0x0067] = 600; + width[0x00DF] = 600; + width[0x0060] = 600; + width[0x003E] = 600; + width[0x00AB] = 600; + width[0x00BB] = 600; + width[0x008B] = 600; + width[0x009B] = 600; + width[0x0068] = 600; + width[0x002D] = 600; + width[0x0069] = 600; + width[0x00ED] = 600; + width[0x00EE] = 600; + width[0x00EF] = 600; + width[0x00EC] = 600; + width[0x006A] = 600; + width[0x006B] = 600; + width[0x006C] = 600; + width[0x003C] = 600; + width[0x00AC] = 600; + width[0x006D] = 600; + width[0x00AF] = 600; + width[0x2D] = 600; + width[0x00B5] = 600; + width[0x00D7] = 600; + width[0x006E] = 600; + width[0x0039] = 600; + width[0x00F1] = 600; + width[0x0023] = 600; + width[0x006F] = 600; + width[0x00F3] = 600; + width[0x00F4] = 600; + width[0x00F6] = 600; + width[0x009C] = 600; + width[0x00F2] = 600; + width[0x0031] = 600; + width[0x00BD] = 600; + width[0x00BC] = 600; + width[0x00B9] = 600; + width[0x00AA] = 600; + width[0x00BA] = 600; + width[0x00F8] = 600; + width[0x00F5] = 600; + width[0x0070] = 600; + width[0x00B6] = 600; + width[0x0028] = 600; + width[0x0029] = 600; + width[0x0025] = 600; + width[0x002E] = 600; + width[0x00B7] = 600; + width[0x0089] = 600; + width[0x002B] = 600; + width[0x00B1] = 600; + width[0x0071] = 600; + width[0x003F] = 600; + width[0x00BF] = 600; + width[0x0022] = 600; + width[0x0084] = 600; + width[0x0093] = 600; + width[0x0094] = 600; + width[0x0091] = 600; + width[0x0092] = 600; + width[0x0082] = 600; + width[0x0027] = 600; + width[0x0072] = 600; + width[0x00AE] = 600; + width[0x00B0] = 600; + width[0x0073] = 600; + width[0x009A] = 600; + width[0x00A7] = 600; + width[0x003B] = 600; + width[0x0037] = 600; + width[0x0036] = 600; + width[0x002F] = 600; + width[0x0020] = 600; + width[0x00A0] = 600; + width[0x00A3] = 600; + width[0x0074] = 600; + width[0x00FE] = 600; + width[0x0033] = 600; + width[0x00BE] = 600; + width[0x00B3] = 600; + width[0x0098] = 600; + width[0x0099] = 600; + width[0x0032] = 600; + width[0x00B2] = 600; + width[0x0075] = 600; + width[0x00FA] = 600; + width[0x00FB] = 600; + width[0x00FC] = 600; + width[0x00F9] = 600; + width[0x005F] = 600; + width[0x0076] = 600; + width[0x0077] = 600; + width[0x0078] = 600; + width[0x0079] = 600; + width[0x00FD] = 600; + width[0x00FF] = 600; + width[0x00A5] = 600; + width[0x007A] = 600; + width[0x0030] = 600; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/CourierBold.java b/src/org/apache/fop/render/mif/fonts/CourierBold.java new file mode 100644 index 000000000..52f6f6d00 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/CourierBold.java @@ -0,0 +1,288 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class CourierBold extends Font { + private final static String fontName = "Courier-Bold"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 562; + private final static int xHeight = 439; + private final static int ascender = 626; + private final static int descender = -142; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 600; + width[0x00C6] = 600; + width[0x00C1] = 600; + width[0x00C2] = 600; + width[0x00C4] = 600; + width[0x00C0] = 600; + width[0x00C5] = 600; + width[0x00C3] = 600; + width[0x0042] = 600; + width[0x0043] = 600; + width[0x00C7] = 600; + width[0x0044] = 600; + width[0x0045] = 600; + width[0x00C9] = 600; + width[0x00CA] = 600; + width[0x00CB] = 600; + width[0x00C8] = 600; + width[0x00D0] = 600; + width[0x0046] = 600; + width[0x0047] = 600; + width[0x0048] = 600; + width[0x0049] = 600; + width[0x00CD] = 600; + width[0x00CE] = 600; + width[0x00CF] = 600; + width[0x00CC] = 600; + width[0x004A] = 600; + width[0x004B] = 600; + width[0x004C] = 600; + width[0x004D] = 600; + width[0x004E] = 600; + width[0x00D1] = 600; + width[0x004F] = 600; + width[0x008C] = 600; + width[0x00D3] = 600; + width[0x00D4] = 600; + width[0x00D6] = 600; + width[0x00D2] = 600; + width[0x00D8] = 600; + width[0x00D5] = 600; + width[0x0050] = 600; + width[0x0051] = 600; + width[0x0052] = 600; + width[0x0053] = 600; + width[0x008A] = 600; + width[0x0054] = 600; + width[0x00DE] = 600; + width[0x0055] = 600; + width[0x00DA] = 600; + width[0x00DB] = 600; + width[0x00DC] = 600; + width[0x00D9] = 600; + width[0x0056] = 600; + width[0x0057] = 600; + width[0x0058] = 600; + width[0x0059] = 600; + width[0x00DD] = 600; + width[0x009F] = 600; + width[0x005A] = 600; + width[0x0061] = 600; + width[0x00E1] = 600; + width[0x00E2] = 600; + width[0x00B4] = 600; + width[0x00E4] = 600; + width[0x00E6] = 600; + width[0x00E0] = 600; + width[0x0026] = 600; + width[0x00E5] = 600; + width[0xAB] = 600; + width[0xAF] = 600; + width[0xAC] = 600; + width[0xAE] = 600; + width[0xAD] = 600; + width[0x005E] = 600; + width[0x007E] = 600; + width[0x002A] = 600; + width[0x0040] = 600; + width[0x00E3] = 600; + width[0x0062] = 600; + width[0x005C] = 600; + width[0x007C] = 600; + width[0x007B] = 600; + width[0x007D] = 600; + width[0x005B] = 600; + width[0x005D] = 600; + width[0x00A6] = 600; + width[0x0095] = 600; + width[0x0063] = 600; + width[0x00E7] = 600; + width[0x00B8] = 600; + width[0x00A2] = 600; + width[0x0088] = 600; + width[0x003A] = 600; + width[0x002C] = 600; + width[0x00A9] = 600; + width[0x00A4] = 600; + width[0x0064] = 600; + width[0x0086] = 600; + width[0x0087] = 600; + width[0x00B0] = 600; + width[0x00A8] = 600; + width[0x00F7] = 600; + width[0x0024] = 600; + width[0x0065] = 600; + width[0x00E9] = 600; + width[0x00EA] = 600; + width[0x00EB] = 600; + width[0x00E8] = 600; + width[0x0038] = 600; + width[0x0085] = 600; + width[0x0097] = 600; + width[0x0096] = 600; + width[0x003D] = 600; + width[0x00F0] = 600; + width[0x0021] = 600; + width[0x00A1] = 600; + width[0x0066] = 600; + width[0x0035] = 600; + width[0x0083] = 600; + width[0x0034] = 600; + width[0xA4] = 600; + width[0x0067] = 600; + width[0x00DF] = 600; + width[0x0060] = 600; + width[0x003E] = 600; + width[0x00AB] = 600; + width[0x00BB] = 600; + width[0x008B] = 600; + width[0x009B] = 600; + width[0x0068] = 600; + width[0x002D] = 600; + width[0x0069] = 600; + width[0x00ED] = 600; + width[0x00EE] = 600; + width[0x00EF] = 600; + width[0x00EC] = 600; + width[0x006A] = 600; + width[0x006B] = 600; + width[0x006C] = 600; + width[0x003C] = 600; + width[0x00AC] = 600; + width[0x006D] = 600; + width[0x00AF] = 600; + width[0x2D] = 600; + width[0x00B5] = 600; + width[0x00D7] = 600; + width[0x006E] = 600; + width[0x0039] = 600; + width[0x00F1] = 600; + width[0x0023] = 600; + width[0x006F] = 600; + width[0x00F3] = 600; + width[0x00F4] = 600; + width[0x00F6] = 600; + width[0x009C] = 600; + width[0x00F2] = 600; + width[0x0031] = 600; + width[0x00BD] = 600; + width[0x00BC] = 600; + width[0x00B9] = 600; + width[0x00AA] = 600; + width[0x00BA] = 600; + width[0x00F8] = 600; + width[0x00F5] = 600; + width[0x0070] = 600; + width[0x00B6] = 600; + width[0x0028] = 600; + width[0x0029] = 600; + width[0x0025] = 600; + width[0x002E] = 600; + width[0x00B7] = 600; + width[0x0089] = 600; + width[0x002B] = 600; + width[0x00B1] = 600; + width[0x0071] = 600; + width[0x003F] = 600; + width[0x00BF] = 600; + width[0x0022] = 600; + width[0x0084] = 600; + width[0x0093] = 600; + width[0x0094] = 600; + width[0x0091] = 600; + width[0x0092] = 600; + width[0x0082] = 600; + width[0x0027] = 600; + width[0x0072] = 600; + width[0x00AE] = 600; + width[0x00B0] = 600; + width[0x0073] = 600; + width[0x009A] = 600; + width[0x00A7] = 600; + width[0x003B] = 600; + width[0x0037] = 600; + width[0x0036] = 600; + width[0x002F] = 600; + width[0x0020] = 600; + width[0x00A0] = 600; + width[0x00A3] = 600; + width[0x0074] = 600; + width[0x00FE] = 600; + width[0x0033] = 600; + width[0x00BE] = 600; + width[0x00B3] = 600; + width[0x0098] = 600; + width[0x0099] = 600; + width[0x0032] = 600; + width[0x00B2] = 600; + width[0x0075] = 600; + width[0x00FA] = 600; + width[0x00FB] = 600; + width[0x00FC] = 600; + width[0x00F9] = 600; + width[0x005F] = 600; + width[0x0076] = 600; + width[0x0077] = 600; + width[0x0078] = 600; + width[0x0079] = 600; + width[0x00FD] = 600; + width[0x00FF] = 600; + width[0x00A5] = 600; + width[0x007A] = 600; + width[0x0030] = 600; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/CourierBoldOblique.java b/src/org/apache/fop/render/mif/fonts/CourierBoldOblique.java new file mode 100644 index 000000000..1b18f5bb3 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/CourierBoldOblique.java @@ -0,0 +1,288 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class CourierBoldOblique extends Font { + private final static String fontName = "Courier-BoldOblique"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 562; + private final static int xHeight = 439; + private final static int ascender = 626; + private final static int descender = -142; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 600; + width[0x00C6] = 600; + width[0x00C1] = 600; + width[0x00C2] = 600; + width[0x00C4] = 600; + width[0x00C0] = 600; + width[0x00C5] = 600; + width[0x00C3] = 600; + width[0x0042] = 600; + width[0x0043] = 600; + width[0x00C7] = 600; + width[0x0044] = 600; + width[0x0045] = 600; + width[0x00C9] = 600; + width[0x00CA] = 600; + width[0x00CB] = 600; + width[0x00C8] = 600; + width[0x00D0] = 600; + width[0x0046] = 600; + width[0x0047] = 600; + width[0x0048] = 600; + width[0x0049] = 600; + width[0x00CD] = 600; + width[0x00CE] = 600; + width[0x00CF] = 600; + width[0x00CC] = 600; + width[0x004A] = 600; + width[0x004B] = 600; + width[0x004C] = 600; + width[0x004D] = 600; + width[0x004E] = 600; + width[0x00D1] = 600; + width[0x004F] = 600; + width[0x008C] = 600; + width[0x00D3] = 600; + width[0x00D4] = 600; + width[0x00D6] = 600; + width[0x00D2] = 600; + width[0x00D8] = 600; + width[0x00D5] = 600; + width[0x0050] = 600; + width[0x0051] = 600; + width[0x0052] = 600; + width[0x0053] = 600; + width[0x008A] = 600; + width[0x0054] = 600; + width[0x00DE] = 600; + width[0x0055] = 600; + width[0x00DA] = 600; + width[0x00DB] = 600; + width[0x00DC] = 600; + width[0x00D9] = 600; + width[0x0056] = 600; + width[0x0057] = 600; + width[0x0058] = 600; + width[0x0059] = 600; + width[0x00DD] = 600; + width[0x009F] = 600; + width[0x005A] = 600; + width[0x0061] = 600; + width[0x00E1] = 600; + width[0x00E2] = 600; + width[0x00B4] = 600; + width[0x00E4] = 600; + width[0x00E6] = 600; + width[0x00E0] = 600; + width[0x0026] = 600; + width[0x00E5] = 600; + width[0xAB] = 600; + width[0xAF] = 600; + width[0xAC] = 600; + width[0xAE] = 600; + width[0xAD] = 600; + width[0x005E] = 600; + width[0x007E] = 600; + width[0x002A] = 600; + width[0x0040] = 600; + width[0x00E3] = 600; + width[0x0062] = 600; + width[0x005C] = 600; + width[0x007C] = 600; + width[0x007B] = 600; + width[0x007D] = 600; + width[0x005B] = 600; + width[0x005D] = 600; + width[0x00A6] = 600; + width[0x0095] = 600; + width[0x0063] = 600; + width[0x00E7] = 600; + width[0x00B8] = 600; + width[0x00A2] = 600; + width[0x0088] = 600; + width[0x003A] = 600; + width[0x002C] = 600; + width[0x00A9] = 600; + width[0x00A4] = 600; + width[0x0064] = 600; + width[0x0086] = 600; + width[0x0087] = 600; + width[0x00B0] = 600; + width[0x00A8] = 600; + width[0x00F7] = 600; + width[0x0024] = 600; + width[0x0065] = 600; + width[0x00E9] = 600; + width[0x00EA] = 600; + width[0x00EB] = 600; + width[0x00E8] = 600; + width[0x0038] = 600; + width[0x0085] = 600; + width[0x0097] = 600; + width[0x0096] = 600; + width[0x003D] = 600; + width[0x00F0] = 600; + width[0x0021] = 600; + width[0x00A1] = 600; + width[0x0066] = 600; + width[0x0035] = 600; + width[0x0083] = 600; + width[0x0034] = 600; + width[0xA4] = 600; + width[0x0067] = 600; + width[0x00DF] = 600; + width[0x0060] = 600; + width[0x003E] = 600; + width[0x00AB] = 600; + width[0x00BB] = 600; + width[0x008B] = 600; + width[0x009B] = 600; + width[0x0068] = 600; + width[0x002D] = 600; + width[0x0069] = 600; + width[0x00ED] = 600; + width[0x00EE] = 600; + width[0x00EF] = 600; + width[0x00EC] = 600; + width[0x006A] = 600; + width[0x006B] = 600; + width[0x006C] = 600; + width[0x003C] = 600; + width[0x00AC] = 600; + width[0x006D] = 600; + width[0x00AF] = 600; + width[0x2D] = 600; + width[0x00B5] = 600; + width[0x00D7] = 600; + width[0x006E] = 600; + width[0x0039] = 600; + width[0x00F1] = 600; + width[0x0023] = 600; + width[0x006F] = 600; + width[0x00F3] = 600; + width[0x00F4] = 600; + width[0x00F6] = 600; + width[0x009C] = 600; + width[0x00F2] = 600; + width[0x0031] = 600; + width[0x00BD] = 600; + width[0x00BC] = 600; + width[0x00B9] = 600; + width[0x00AA] = 600; + width[0x00BA] = 600; + width[0x00F8] = 600; + width[0x00F5] = 600; + width[0x0070] = 600; + width[0x00B6] = 600; + width[0x0028] = 600; + width[0x0029] = 600; + width[0x0025] = 600; + width[0x002E] = 600; + width[0x00B7] = 600; + width[0x0089] = 600; + width[0x002B] = 600; + width[0x00B1] = 600; + width[0x0071] = 600; + width[0x003F] = 600; + width[0x00BF] = 600; + width[0x0022] = 600; + width[0x0084] = 600; + width[0x0093] = 600; + width[0x0094] = 600; + width[0x0091] = 600; + width[0x0092] = 600; + width[0x0082] = 600; + width[0x0027] = 600; + width[0x0072] = 600; + width[0x00AE] = 600; + width[0x00B0] = 600; + width[0x0073] = 600; + width[0x009A] = 600; + width[0x00A7] = 600; + width[0x003B] = 600; + width[0x0037] = 600; + width[0x0036] = 600; + width[0x002F] = 600; + width[0x0020] = 600; + width[0x00A0] = 600; + width[0x00A3] = 600; + width[0x0074] = 600; + width[0x00FE] = 600; + width[0x0033] = 600; + width[0x00BE] = 600; + width[0x00B3] = 600; + width[0x0098] = 600; + width[0x0099] = 600; + width[0x0032] = 600; + width[0x00B2] = 600; + width[0x0075] = 600; + width[0x00FA] = 600; + width[0x00FB] = 600; + width[0x00FC] = 600; + width[0x00F9] = 600; + width[0x005F] = 600; + width[0x0076] = 600; + width[0x0077] = 600; + width[0x0078] = 600; + width[0x0079] = 600; + width[0x00FD] = 600; + width[0x00FF] = 600; + width[0x00A5] = 600; + width[0x007A] = 600; + width[0x0030] = 600; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/CourierOblique.java b/src/org/apache/fop/render/mif/fonts/CourierOblique.java new file mode 100644 index 000000000..a3ffc9753 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/CourierOblique.java @@ -0,0 +1,288 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class CourierOblique extends Font { + private final static String fontName = "Courier-Oblique"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 562; + private final static int xHeight = 426; + private final static int ascender = 629; + private final static int descender = -157; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 600; + width[0x00C6] = 600; + width[0x00C1] = 600; + width[0x00C2] = 600; + width[0x00C4] = 600; + width[0x00C0] = 600; + width[0x00C5] = 600; + width[0x00C3] = 600; + width[0x0042] = 600; + width[0x0043] = 600; + width[0x00C7] = 600; + width[0x0044] = 600; + width[0x0045] = 600; + width[0x00C9] = 600; + width[0x00CA] = 600; + width[0x00CB] = 600; + width[0x00C8] = 600; + width[0x00D0] = 600; + width[0x0046] = 600; + width[0x0047] = 600; + width[0x0048] = 600; + width[0x0049] = 600; + width[0x00CD] = 600; + width[0x00CE] = 600; + width[0x00CF] = 600; + width[0x00CC] = 600; + width[0x004A] = 600; + width[0x004B] = 600; + width[0x004C] = 600; + width[0x004D] = 600; + width[0x004E] = 600; + width[0x00D1] = 600; + width[0x004F] = 600; + width[0x008C] = 600; + width[0x00D3] = 600; + width[0x00D4] = 600; + width[0x00D6] = 600; + width[0x00D2] = 600; + width[0x00D8] = 600; + width[0x00D5] = 600; + width[0x0050] = 600; + width[0x0051] = 600; + width[0x0052] = 600; + width[0x0053] = 600; + width[0x008A] = 600; + width[0x0054] = 600; + width[0x00DE] = 600; + width[0x0055] = 600; + width[0x00DA] = 600; + width[0x00DB] = 600; + width[0x00DC] = 600; + width[0x00D9] = 600; + width[0x0056] = 600; + width[0x0057] = 600; + width[0x0058] = 600; + width[0x0059] = 600; + width[0x00DD] = 600; + width[0x009F] = 600; + width[0x005A] = 600; + width[0x0061] = 600; + width[0x00E1] = 600; + width[0x00E2] = 600; + width[0x00B4] = 600; + width[0x00E4] = 600; + width[0x00E6] = 600; + width[0x00E0] = 600; + width[0x0026] = 600; + width[0x00E5] = 600; + width[0xAB] = 600; + width[0xAF] = 600; + width[0xAC] = 600; + width[0xAE] = 600; + width[0xAD] = 600; + width[0x005E] = 600; + width[0x007E] = 600; + width[0x002A] = 600; + width[0x0040] = 600; + width[0x00E3] = 600; + width[0x0062] = 600; + width[0x005C] = 600; + width[0x007C] = 600; + width[0x007B] = 600; + width[0x007D] = 600; + width[0x005B] = 600; + width[0x005D] = 600; + width[0x00A6] = 600; + width[0x0095] = 600; + width[0x0063] = 600; + width[0x00E7] = 600; + width[0x00B8] = 600; + width[0x00A2] = 600; + width[0x0088] = 600; + width[0x003A] = 600; + width[0x002C] = 600; + width[0x00A9] = 600; + width[0x00A4] = 600; + width[0x0064] = 600; + width[0x0086] = 600; + width[0x0087] = 600; + width[0x00B0] = 600; + width[0x00A8] = 600; + width[0x00F7] = 600; + width[0x0024] = 600; + width[0x0065] = 600; + width[0x00E9] = 600; + width[0x00EA] = 600; + width[0x00EB] = 600; + width[0x00E8] = 600; + width[0x0038] = 600; + width[0x0085] = 600; + width[0x0097] = 600; + width[0x0096] = 600; + width[0x003D] = 600; + width[0x00F0] = 600; + width[0x0021] = 600; + width[0x00A1] = 600; + width[0x0066] = 600; + width[0x0035] = 600; + width[0x0083] = 600; + width[0x0034] = 600; + width[0xA4] = 600; + width[0x0067] = 600; + width[0x00DF] = 600; + width[0x0060] = 600; + width[0x003E] = 600; + width[0x00AB] = 600; + width[0x00BB] = 600; + width[0x008B] = 600; + width[0x009B] = 600; + width[0x0068] = 600; + width[0x002D] = 600; + width[0x0069] = 600; + width[0x00ED] = 600; + width[0x00EE] = 600; + width[0x00EF] = 600; + width[0x00EC] = 600; + width[0x006A] = 600; + width[0x006B] = 600; + width[0x006C] = 600; + width[0x003C] = 600; + width[0x00AC] = 600; + width[0x006D] = 600; + width[0x00AF] = 600; + width[0x2D] = 600; + width[0x00B5] = 600; + width[0x00D7] = 600; + width[0x006E] = 600; + width[0x0039] = 600; + width[0x00F1] = 600; + width[0x0023] = 600; + width[0x006F] = 600; + width[0x00F3] = 600; + width[0x00F4] = 600; + width[0x00F6] = 600; + width[0x009C] = 600; + width[0x00F2] = 600; + width[0x0031] = 600; + width[0x00BD] = 600; + width[0x00BC] = 600; + width[0x00B9] = 600; + width[0x00AA] = 600; + width[0x00BA] = 600; + width[0x00F8] = 600; + width[0x00F5] = 600; + width[0x0070] = 600; + width[0x00B6] = 600; + width[0x0028] = 600; + width[0x0029] = 600; + width[0x0025] = 600; + width[0x002E] = 600; + width[0x00B7] = 600; + width[0x0089] = 600; + width[0x002B] = 600; + width[0x00B1] = 600; + width[0x0071] = 600; + width[0x003F] = 600; + width[0x00BF] = 600; + width[0x0022] = 600; + width[0x0084] = 600; + width[0x0093] = 600; + width[0x0094] = 600; + width[0x0091] = 600; + width[0x0092] = 600; + width[0x0082] = 600; + width[0x0027] = 600; + width[0x0072] = 600; + width[0x00AE] = 600; + width[0x00B0] = 600; + width[0x0073] = 600; + width[0x009A] = 600; + width[0x00A7] = 600; + width[0x003B] = 600; + width[0x0037] = 600; + width[0x0036] = 600; + width[0x002F] = 600; + width[0x0020] = 600; + width[0x00A0] = 600; + width[0x00A3] = 600; + width[0x0074] = 600; + width[0x00FE] = 600; + width[0x0033] = 600; + width[0x00BE] = 600; + width[0x00B3] = 600; + width[0x0098] = 600; + width[0x0099] = 600; + width[0x0032] = 600; + width[0x00B2] = 600; + width[0x0075] = 600; + width[0x00FA] = 600; + width[0x00FB] = 600; + width[0x00FC] = 600; + width[0x00F9] = 600; + width[0x005F] = 600; + width[0x0076] = 600; + width[0x0077] = 600; + width[0x0078] = 600; + width[0x0079] = 600; + width[0x00FD] = 600; + width[0x00FF] = 600; + width[0x00A5] = 600; + width[0x007A] = 600; + width[0x0030] = 600; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/Helvetica.java b/src/org/apache/fop/render/mif/fonts/Helvetica.java new file mode 100644 index 000000000..b719f4fed --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/Helvetica.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class Helvetica extends Font { + private final static String fontName = "Helvetica"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 718; + private final static int xHeight = 523; + private final static int ascender = 718; + private final static int descender = -207; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 667; + width[0x00C6] = 1000; + width[0x00C1] = 667; + width[0x00C2] = 667; + width[0x00C4] = 667; + width[0x00C0] = 667; + width[0x00C5] = 667; + width[0x00C3] = 667; + width[0x0042] = 667; + width[0x0043] = 722; + width[0x00C7] = 722; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 778; + width[0x0048] = 722; + width[0x0049] = 278; + width[0x00CD] = 278; + width[0x00CE] = 278; + width[0x00CF] = 278; + width[0x00CC] = 278; + width[0x004A] = 500; + width[0x004B] = 667; + width[0x004C] = 556; + width[0x004D] = 833; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 778; + width[0x008C] = 1000; + width[0x00D3] = 778; + width[0x00D4] = 778; + width[0x00D6] = 778; + width[0x00D2] = 778; + width[0x00D8] = 778; + width[0x00D5] = 778; + width[0x0050] = 667; + width[0x0051] = 778; + width[0x0052] = 722; + width[0x0053] = 667; + width[0x008A] = 667; + width[0x0054] = 611; + width[0x00DE] = 667; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 667; + width[0x0057] = 944; + width[0x0058] = 667; + width[0x0059] = 667; + width[0x00DD] = 667; + width[0x009F] = 667; + width[0x005A] = 611; + width[0x0061] = 556; + width[0x00E1] = 556; + width[0x00E2] = 556; + width[0x00B4] = 333; + width[0x00E4] = 556; + width[0x00E6] = 889; + width[0x00E0] = 556; + width[0x0026] = 667; + width[0x00E5] = 556; + width[0x005E] = 469; + width[0x007E] = 584; + width[0x002A] = 389; + width[0x0040] = 1015; + width[0x00E3] = 556; + width[0x0062] = 556; + width[0x005C] = 278; + width[0x007C] = 260; + width[0x007B] = 334; + width[0x007D] = 334; + width[0x005B] = 278; + width[0x005D] = 278; + width[0x00A6] = 260; + width[0x0095] = 350; + width[0x0063] = 500; + width[0x00E7] = 500; + width[0x00B8] = 333; + width[0x00A2] = 556; + width[0x0088] = 333; + width[0x003A] = 278; + width[0x002C] = 278; + width[0x00A9] = 737; + width[0x00A4] = 556; + width[0x0064] = 556; + width[0x0086] = 556; + width[0x0087] = 556; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 584; + width[0x0024] = 556; + width[0x0065] = 556; + width[0x00E9] = 556; + width[0x00EA] = 556; + width[0x00EB] = 556; + width[0x00E8] = 556; + width[0x0038] = 556; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 556; + width[0x003D] = 584; + width[0x00F0] = 556; + width[0x0021] = 278; + width[0x00A1] = 333; + width[0x0066] = 278; + width[0x0035] = 556; + width[0x0083] = 556; + width[0x0034] = 556; + width[0xA4] = 167; + width[0x0067] = 556; + width[0x00DF] = 611; + width[0x0060] = 333; + width[0x003E] = 584; + width[0x00AB] = 556; + width[0x00BB] = 556; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 556; + width[0x002D] = 333; + width[0x0069] = 222; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 222; + width[0x006B] = 500; + width[0x006C] = 222; + width[0x003C] = 584; + width[0x00AC] = 584; + width[0x006D] = 833; + width[0x00AF] = 333; + width[0x2D] = 324; + width[0x00B5] = 556; + width[0x00D7] = 584; + width[0x006E] = 556; + width[0x0039] = 556; + width[0x00F1] = 556; + width[0x0023] = 556; + width[0x006F] = 556; + width[0x00F3] = 556; + width[0x00F4] = 556; + width[0x00F6] = 556; + width[0x009C] = 944; + width[0x00F2] = 556; + width[0x0031] = 556; + width[0x00BD] = 834; + width[0x00BC] = 834; + width[0x00B9] = 333; + width[0x00AA] = 370; + width[0x00BA] = 365; + width[0x00F8] = 611; + width[0x00F5] = 556; + width[0x0070] = 556; + width[0x00B6] = 537; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 889; + width[0x002E] = 278; + width[0x00B7] = 278; + width[0x0089] = 1000; + width[0x002B] = 584; + width[0x00B1] = 584; + width[0x0071] = 556; + width[0x003F] = 556; + width[0x00BF] = 611; + width[0x0022] = 355; + width[0x0084] = 333; + width[0x0093] = 333; + width[0x0094] = 333; + width[0x0091] = 222; + width[0x0092] = 222; + width[0x0082] = 222; + width[0x0027] = 191; + width[0x0072] = 333; + width[0x00AE] = 737; + width[0x00B0] = 333; + width[0x0073] = 500; + width[0x009A] = 500; + width[0x00A7] = 556; + width[0x003B] = 278; + width[0x0037] = 556; + width[0x0036] = 556; + width[0x002F] = 278; + width[0x0020] = 278; + width[0x00A0] = 278; + width[0x00A3] = 556; + width[0x0074] = 278; + width[0x00FE] = 556; + width[0x0033] = 556; + width[0x00BE] = 834; + width[0x00B3] = 333; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 556; + width[0x00B2] = 333; + width[0x0075] = 556; + width[0x00FA] = 556; + width[0x00FB] = 556; + width[0x00FC] = 556; + width[0x00F9] = 556; + width[0x005F] = 556; + width[0x0076] = 500; + width[0x0077] = 722; + width[0x0078] = 500; + width[0x0079] = 500; + width[0x00FD] = 500; + width[0x00FF] = 500; + width[0x00A5] = 556; + width[0x007A] = 500; + width[0x0030] = 556; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/HelveticaBold.java b/src/org/apache/fop/render/mif/fonts/HelveticaBold.java new file mode 100644 index 000000000..48c4362e9 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/HelveticaBold.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class HelveticaBold extends Font { + private final static String fontName = "Helvetica-Bold"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 718; + private final static int xHeight = 532; + private final static int ascender = 718; + private final static int descender = -207; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 722; + width[0x00C6] = 1000; + width[0x00C1] = 722; + width[0x00C2] = 722; + width[0x00C4] = 722; + width[0x00C0] = 722; + width[0x00C5] = 722; + width[0x00C3] = 722; + width[0x0042] = 722; + width[0x0043] = 722; + width[0x00C7] = 722; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 778; + width[0x0048] = 722; + width[0x0049] = 278; + width[0x00CD] = 278; + width[0x00CE] = 278; + width[0x00CF] = 278; + width[0x00CC] = 278; + width[0x004A] = 556; + width[0x004B] = 722; + width[0x004C] = 611; + width[0x004D] = 833; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 778; + width[0x008C] = 1000; + width[0x00D3] = 778; + width[0x00D4] = 778; + width[0x00D6] = 778; + width[0x00D2] = 778; + width[0x00D8] = 778; + width[0x00D5] = 778; + width[0x0050] = 667; + width[0x0051] = 778; + width[0x0052] = 722; + width[0x0053] = 667; + width[0x008A] = 667; + width[0x0054] = 611; + width[0x00DE] = 667; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 667; + width[0x0057] = 944; + width[0x0058] = 667; + width[0x0059] = 667; + width[0x00DD] = 667; + width[0x009F] = 667; + width[0x005A] = 611; + width[0x0061] = 556; + width[0x00E1] = 556; + width[0x00E2] = 556; + width[0x00B4] = 333; + width[0x00E4] = 556; + width[0x00E6] = 889; + width[0x00E0] = 556; + width[0x0026] = 722; + width[0x00E5] = 556; + width[0x005E] = 584; + width[0x007E] = 584; + width[0x002A] = 389; + width[0x0040] = 975; + width[0x00E3] = 556; + width[0x0062] = 611; + width[0x005C] = 278; + width[0x007C] = 280; + width[0x007B] = 389; + width[0x007D] = 389; + width[0x005B] = 333; + width[0x005D] = 333; + width[0x00A6] = 280; + width[0x0095] = 350; + width[0x0063] = 556; + width[0x00E7] = 556; + width[0x00B8] = 333; + width[0x00A2] = 556; + width[0x0088] = 333; + width[0x003A] = 333; + width[0x002C] = 278; + width[0x00A9] = 737; + width[0x00A4] = 556; + width[0x0064] = 611; + width[0x0086] = 556; + width[0x0087] = 556; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 584; + width[0x0024] = 556; + width[0x0065] = 556; + width[0x00E9] = 556; + width[0x00EA] = 556; + width[0x00EB] = 556; + width[0x00E8] = 556; + width[0x0038] = 556; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 556; + width[0x003D] = 584; + width[0x00F0] = 611; + width[0x0021] = 333; + width[0x00A1] = 333; + width[0x0066] = 333; + width[0x0035] = 556; + width[0x0083] = 556; + width[0x0034] = 556; + width[0xA4] = 167; + width[0x0067] = 611; + width[0x00DF] = 611; + width[0x0060] = 333; + width[0x003E] = 584; + width[0x00AB] = 556; + width[0x00BB] = 556; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 611; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 278; + width[0x006B] = 556; + width[0x006C] = 278; + width[0x003C] = 584; + width[0x00AC] = 584; + width[0x006D] = 889; + width[0x00AF] = 333; + width[0x2D] = 584; + width[0x00B5] = 611; + width[0x00D7] = 584; + width[0x006E] = 611; + width[0x0039] = 556; + width[0x00F1] = 611; + width[0x0023] = 556; + width[0x006F] = 611; + width[0x00F3] = 611; + width[0x00F4] = 611; + width[0x00F6] = 611; + width[0x009C] = 944; + width[0x00F2] = 611; + width[0x0031] = 556; + width[0x00BD] = 834; + width[0x00BC] = 834; + width[0x00B9] = 333; + width[0x00AA] = 370; + width[0x00BA] = 365; + width[0x00F8] = 611; + width[0x00F5] = 611; + width[0x0070] = 611; + width[0x00B6] = 556; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 889; + width[0x002E] = 278; + width[0x00B7] = 278; + width[0x0089] = 1000; + width[0x002B] = 584; + width[0x00B1] = 584; + width[0x0071] = 611; + width[0x003F] = 611; + width[0x00BF] = 611; + width[0x0022] = 474; + width[0x0084] = 500; + width[0x0093] = 500; + width[0x0094] = 500; + width[0x0091] = 278; + width[0x0092] = 278; + width[0x0082] = 278; + width[0x0027] = 238; + width[0x0072] = 389; + width[0x00AE] = 737; + width[0x00B0] = 333; + width[0x0073] = 556; + width[0x009A] = 556; + width[0x00A7] = 556; + width[0x003B] = 333; + width[0x0037] = 556; + width[0x0036] = 556; + width[0x002F] = 278; + width[0x0020] = 278; + width[0x00A0] = 278; + width[0x00A3] = 556; + width[0x0074] = 333; + width[0x00FE] = 611; + width[0x0033] = 556; + width[0x00BE] = 834; + width[0x00B3] = 333; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 556; + width[0x00B2] = 333; + width[0x0075] = 611; + width[0x00FA] = 611; + width[0x00FB] = 611; + width[0x00FC] = 611; + width[0x00F9] = 611; + width[0x005F] = 556; + width[0x0076] = 556; + width[0x0077] = 778; + width[0x0078] = 556; + width[0x0079] = 556; + width[0x00FD] = 556; + width[0x00FF] = 556; + width[0x00A5] = 556; + width[0x007A] = 500; + width[0x0030] = 556; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/HelveticaBoldOblique.java b/src/org/apache/fop/render/mif/fonts/HelveticaBoldOblique.java new file mode 100644 index 000000000..6437fd503 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/HelveticaBoldOblique.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class HelveticaBoldOblique extends Font { + private final static String fontName = "Helvetica-BoldOblique"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 718; + private final static int xHeight = 532; + private final static int ascender = 718; + private final static int descender = -207; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 722; + width[0x00C6] = 1000; + width[0x00C1] = 722; + width[0x00C2] = 722; + width[0x00C4] = 722; + width[0x00C0] = 722; + width[0x00C5] = 722; + width[0x00C3] = 722; + width[0x0042] = 722; + width[0x0043] = 722; + width[0x00C7] = 722; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 778; + width[0x0048] = 722; + width[0x0049] = 278; + width[0x00CD] = 278; + width[0x00CE] = 278; + width[0x00CF] = 278; + width[0x00CC] = 278; + width[0x004A] = 556; + width[0x004B] = 722; + width[0x004C] = 611; + width[0x004D] = 833; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 778; + width[0x008C] = 1000; + width[0x00D3] = 778; + width[0x00D4] = 778; + width[0x00D6] = 778; + width[0x00D2] = 778; + width[0x00D8] = 778; + width[0x00D5] = 778; + width[0x0050] = 667; + width[0x0051] = 778; + width[0x0052] = 722; + width[0x0053] = 667; + width[0x008A] = 667; + width[0x0054] = 611; + width[0x00DE] = 667; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 667; + width[0x0057] = 944; + width[0x0058] = 667; + width[0x0059] = 667; + width[0x00DD] = 667; + width[0x009F] = 667; + width[0x005A] = 611; + width[0x0061] = 556; + width[0x00E1] = 556; + width[0x00E2] = 556; + width[0x00B4] = 333; + width[0x00E4] = 556; + width[0x00E6] = 889; + width[0x00E0] = 556; + width[0x0026] = 722; + width[0x00E5] = 556; + width[0x005E] = 584; + width[0x007E] = 584; + width[0x002A] = 389; + width[0x0040] = 975; + width[0x00E3] = 556; + width[0x0062] = 611; + width[0x005C] = 278; + width[0x007C] = 280; + width[0x007B] = 389; + width[0x007D] = 389; + width[0x005B] = 333; + width[0x005D] = 333; + width[0x00A6] = 280; + width[0x0095] = 350; + width[0x0063] = 556; + width[0x00E7] = 556; + width[0x00B8] = 333; + width[0x00A2] = 556; + width[0x0088] = 333; + width[0x003A] = 333; + width[0x002C] = 278; + width[0x00A9] = 737; + width[0x00A4] = 556; + width[0x0064] = 611; + width[0x0086] = 556; + width[0x0087] = 556; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 584; + width[0x0024] = 556; + width[0x0065] = 556; + width[0x00E9] = 556; + width[0x00EA] = 556; + width[0x00EB] = 556; + width[0x00E8] = 556; + width[0x0038] = 556; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 556; + width[0x003D] = 584; + width[0x00F0] = 611; + width[0x0021] = 333; + width[0x00A1] = 333; + width[0x0066] = 333; + width[0x0035] = 556; + width[0x0083] = 556; + width[0x0034] = 556; + width[0xA4] = 167; + width[0x0067] = 611; + width[0x00DF] = 611; + width[0x0060] = 333; + width[0x003E] = 584; + width[0x00AB] = 556; + width[0x00BB] = 556; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 611; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 278; + width[0x006B] = 556; + width[0x006C] = 278; + width[0x003C] = 584; + width[0x00AC] = 584; + width[0x006D] = 889; + width[0x00AF] = 333; + width[0x2D] = 584; + width[0x00B5] = 611; + width[0x00D7] = 584; + width[0x006E] = 611; + width[0x0039] = 556; + width[0x00F1] = 611; + width[0x0023] = 556; + width[0x006F] = 611; + width[0x00F3] = 611; + width[0x00F4] = 611; + width[0x00F6] = 611; + width[0x009C] = 944; + width[0x00F2] = 611; + width[0x0031] = 556; + width[0x00BD] = 834; + width[0x00BC] = 834; + width[0x00B9] = 333; + width[0x00AA] = 370; + width[0x00BA] = 365; + width[0x00F8] = 611; + width[0x00F5] = 611; + width[0x0070] = 611; + width[0x00B6] = 556; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 889; + width[0x002E] = 278; + width[0x00B7] = 278; + width[0x0089] = 1000; + width[0x002B] = 584; + width[0x00B1] = 584; + width[0x0071] = 611; + width[0x003F] = 611; + width[0x00BF] = 611; + width[0x0022] = 474; + width[0x0084] = 500; + width[0x0093] = 500; + width[0x0094] = 500; + width[0x0091] = 278; + width[0x0092] = 278; + width[0x0082] = 278; + width[0x0027] = 238; + width[0x0072] = 389; + width[0x00AE] = 737; + width[0x00B0] = 333; + width[0x0073] = 556; + width[0x009A] = 556; + width[0x00A7] = 556; + width[0x003B] = 333; + width[0x0037] = 556; + width[0x0036] = 556; + width[0x002F] = 278; + width[0x0020] = 278; + width[0x00A0] = 278; + width[0x00A3] = 556; + width[0x0074] = 333; + width[0x00FE] = 611; + width[0x0033] = 556; + width[0x00BE] = 834; + width[0x00B3] = 333; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 556; + width[0x00B2] = 333; + width[0x0075] = 611; + width[0x00FA] = 611; + width[0x00FB] = 611; + width[0x00FC] = 611; + width[0x00F9] = 611; + width[0x005F] = 556; + width[0x0076] = 556; + width[0x0077] = 778; + width[0x0078] = 556; + width[0x0079] = 556; + width[0x00FD] = 556; + width[0x00FF] = 556; + width[0x00A5] = 556; + width[0x007A] = 500; + width[0x0030] = 556; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/HelveticaOblique.java b/src/org/apache/fop/render/mif/fonts/HelveticaOblique.java new file mode 100644 index 000000000..ab146e08c --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/HelveticaOblique.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class HelveticaOblique extends Font { + private final static String fontName = "Helvetica-Oblique"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 718; + private final static int xHeight = 523; + private final static int ascender = 718; + private final static int descender = -207; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 667; + width[0x00C6] = 1000; + width[0x00C1] = 667; + width[0x00C2] = 667; + width[0x00C4] = 667; + width[0x00C0] = 667; + width[0x00C5] = 667; + width[0x00C3] = 667; + width[0x0042] = 667; + width[0x0043] = 722; + width[0x00C7] = 722; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 778; + width[0x0048] = 722; + width[0x0049] = 278; + width[0x00CD] = 278; + width[0x00CE] = 278; + width[0x00CF] = 278; + width[0x00CC] = 278; + width[0x004A] = 500; + width[0x004B] = 667; + width[0x004C] = 556; + width[0x004D] = 833; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 778; + width[0x008C] = 1000; + width[0x00D3] = 778; + width[0x00D4] = 778; + width[0x00D6] = 778; + width[0x00D2] = 778; + width[0x00D8] = 778; + width[0x00D5] = 778; + width[0x0050] = 667; + width[0x0051] = 778; + width[0x0052] = 722; + width[0x0053] = 667; + width[0x008A] = 667; + width[0x0054] = 611; + width[0x00DE] = 667; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 667; + width[0x0057] = 944; + width[0x0058] = 667; + width[0x0059] = 667; + width[0x00DD] = 667; + width[0x009F] = 667; + width[0x005A] = 611; + width[0x0061] = 556; + width[0x00E1] = 556; + width[0x00E2] = 556; + width[0x00B4] = 333; + width[0x00E4] = 556; + width[0x00E6] = 889; + width[0x00E0] = 556; + width[0x0026] = 667; + width[0x00E5] = 556; + width[0x005E] = 469; + width[0x007E] = 584; + width[0x002A] = 389; + width[0x0040] = 1015; + width[0x00E3] = 556; + width[0x0062] = 556; + width[0x005C] = 278; + width[0x007C] = 260; + width[0x007B] = 334; + width[0x007D] = 334; + width[0x005B] = 278; + width[0x005D] = 278; + width[0x00A6] = 260; + width[0x0095] = 350; + width[0x0063] = 500; + width[0x00E7] = 500; + width[0x00B8] = 333; + width[0x00A2] = 556; + width[0x0088] = 333; + width[0x003A] = 278; + width[0x002C] = 278; + width[0x00A9] = 737; + width[0x00A4] = 556; + width[0x0064] = 556; + width[0x0086] = 556; + width[0x0087] = 556; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 584; + width[0x0024] = 556; + width[0x0065] = 556; + width[0x00E9] = 556; + width[0x00EA] = 556; + width[0x00EB] = 556; + width[0x00E8] = 556; + width[0x0038] = 556; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 556; + width[0x003D] = 584; + width[0x00F0] = 556; + width[0x0021] = 278; + width[0x00A1] = 333; + width[0x0066] = 278; + width[0x0035] = 556; + width[0x0083] = 556; + width[0x0034] = 556; + width[0xA4] = 167; + width[0x0067] = 556; + width[0x00DF] = 611; + width[0x0060] = 333; + width[0x003E] = 584; + width[0x00AB] = 556; + width[0x00BB] = 556; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 556; + width[0x002D] = 333; + width[0x0069] = 222; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 222; + width[0x006B] = 500; + width[0x006C] = 222; + width[0x003C] = 584; + width[0x00AC] = 584; + width[0x006D] = 833; + width[0x00AF] = 333; + width[0x2D] = 584; + width[0x00B5] = 556; + width[0x00D7] = 584; + width[0x006E] = 556; + width[0x0039] = 556; + width[0x00F1] = 556; + width[0x0023] = 556; + width[0x006F] = 556; + width[0x00F3] = 556; + width[0x00F4] = 556; + width[0x00F6] = 556; + width[0x009C] = 944; + width[0x00F2] = 556; + width[0x0031] = 556; + width[0x00BD] = 834; + width[0x00BC] = 834; + width[0x00B9] = 333; + width[0x00AA] = 370; + width[0x00BA] = 365; + width[0x00F8] = 611; + width[0x00F5] = 556; + width[0x0070] = 556; + width[0x00B6] = 537; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 889; + width[0x002E] = 278; + width[0x00B7] = 278; + width[0x0089] = 1000; + width[0x002B] = 584; + width[0x00B1] = 584; + width[0x0071] = 556; + width[0x003F] = 556; + width[0x00BF] = 611; + width[0x0022] = 355; + width[0x0084] = 333; + width[0x0093] = 333; + width[0x0094] = 333; + width[0x0091] = 222; + width[0x0092] = 222; + width[0x0082] = 222; + width[0x0027] = 191; + width[0x0072] = 333; + width[0x00AE] = 737; + width[0x00B0] = 333; + width[0x0073] = 500; + width[0x009A] = 500; + width[0x00A7] = 556; + width[0x003B] = 278; + width[0x0037] = 556; + width[0x0036] = 556; + width[0x002F] = 278; + width[0x0020] = 278; + width[0x00A0] = 278; + width[0x00A3] = 556; + width[0x0074] = 278; + width[0x00FE] = 556; + width[0x0033] = 556; + width[0x00BE] = 834; + width[0x00B3] = 333; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 556; + width[0x00B2] = 333; + width[0x0075] = 556; + width[0x00FA] = 556; + width[0x00FB] = 556; + width[0x00FC] = 556; + width[0x00F9] = 556; + width[0x005F] = 556; + width[0x0076] = 500; + width[0x0077] = 722; + width[0x0078] = 500; + width[0x0079] = 500; + width[0x00FD] = 500; + width[0x00FF] = 500; + width[0x00A5] = 556; + width[0x007A] = 500; + width[0x0030] = 556; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/Symbol.java b/src/org/apache/fop/render/mif/fonts/Symbol.java new file mode 100644 index 000000000..4418542bc --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/Symbol.java @@ -0,0 +1,255 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class Symbol extends Font { + private final static String fontName = "Symbol"; + private final static String encoding = "StandardEncoding"; + private final static int capHeight = 1010; + private final static int xHeight = 520; + private final static int ascender = 1010; + private final static int descender = -293; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0020] = 250; + width[0x0021] = 333; + width[0x22] = 713; + width[0x0023] = 500; + width[0x24] = 549; + width[0x0025] = 833; + width[0x0026] = 778; + width[0x27] = 439; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x2A] = 500; + width[0x002B] = 549; + width[0x002C] = 250; + width[0x2D] = 549; + width[0x002E] = 250; + width[0x002F] = 278; + width[0x0030] = 500; + width[0x0031] = 500; + width[0x0032] = 500; + width[0x0033] = 500; + width[0x0034] = 500; + width[0x0035] = 500; + width[0x0036] = 500; + width[0x0037] = 500; + width[0x0038] = 500; + width[0x0039] = 500; + width[0x003A] = 278; + width[0x003B] = 278; + width[0x003C] = 549; + width[0x003D] = 549; + width[0x003E] = 549; + width[0x003F] = 444; + width[0x40] = 549; + width[0x41] = 722; + width[0x42] = 667; + width[0x43] = 722; + width[0x44] = 612; + width[0x45] = 611; + width[0x46] = 763; + width[0x47] = 603; + width[0x48] = 722; + width[0x49] = 333; + width[0x4A] = 631; + width[0x4B] = 722; + width[0x4C] = 686; + width[0x4D] = 889; + width[0x4E] = 722; + width[0x4F] = 722; + width[0x50] = 768; + width[0x51] = 741; + width[0x52] = 556; + width[0x53] = 592; + width[0x54] = 611; + width[0x55] = 690; + width[0x56] = 439; + width[0x57] = 768; + width[0x58] = 645; + width[0x59] = 795; + width[0x5A] = 611; + width[0x005B] = 333; + width[0x5C] = 863; + width[0x005D] = 333; + width[0x5E] = 658; + width[0x005F] = 500; + width[0x60] = 500; + width[0x61] = 631; + width[0x62] = 549; + width[0x63] = 549; + width[0x64] = 494; + width[0x65] = 439; + width[0x66] = 521; + width[0x67] = 411; + width[0x68] = 603; + width[0x69] = 329; + width[0x6A] = 603; + width[0x6B] = 549; + width[0x6C] = 549; + width[0x006D] = 576; + width[0x00B5] = 576; + width[0x6E] = 521; + width[0x6F] = 549; + width[0x70] = 549; + width[0x71] = 521; + width[0x72] = 549; + width[0x73] = 603; + width[0x74] = 439; + width[0x75] = 576; + width[0x76] = 713; + width[0x77] = 686; + width[0x78] = 493; + width[0x79] = 686; + width[0x7A] = 494; + width[0x007B] = 480; + width[0x007C] = 200; + width[0x007D] = 480; + width[0x7E] = 549; + width[0xA1] = 620; + width[0xA2] = 247; + width[0xA3] = 549; + width[0xA4] = 167; + width[0xA5] = 713; + width[0x0083] = 500; + width[0xA7] = 753; + width[0xA8] = 753; + width[0xA9] = 753; + width[0xAA] = 753; + width[0xAB] = 1042; + width[0xAC] = 987; + width[0xAD] = 603; + width[0xAE] = 987; + width[0xAF] = 603; + width[0x00B0] = 400; + width[0x00B1] = 549; + width[0xB2] = 411; + width[0xB3] = 549; + width[0x00D7] = 549; + width[0xB5] = 713; + width[0xB6] = 494; + width[0x0095] = 460; + width[0x00F7] = 549; + width[0xB9] = 549; + width[0xBA] = 549; + width[0xBB] = 549; + width[0x0085] = 1000; + width[0xBD] = 603; + width[0xBE] = 1000; + width[0xBF] = 658; + width[0xC0] = 823; + width[0xC1] = 686; + width[0xC2] = 795; + width[0xC3] = 987; + width[0xC4] = 768; + width[0xC5] = 768; + width[0xC6] = 823; + width[0xC7] = 768; + width[0xC8] = 768; + width[0xC9] = 713; + width[0xCA] = 713; + width[0xCB] = 713; + width[0xCC] = 713; + width[0xCD] = 713; + width[0xCE] = 713; + width[0xCF] = 713; + width[0xD0] = 768; + width[0xD1] = 713; + width[0xD2] = 790; + width[0xD3] = 790; + width[0xD4] = 890; + width[0xD5] = 823; + width[0xD6] = 549; + width[0xD7] = 250; + width[0x00AC] = 713; + width[0xD9] = 603; + width[0xDA] = 603; + width[0xDB] = 1042; + width[0xDC] = 987; + width[0xDD] = 603; + width[0xDE] = 987; + width[0xDF] = 603; + width[0xE0] = 494; + width[0xE1] = 329; + width[0xE2] = 790; + width[0xE3] = 790; + width[0xE4] = 786; + width[0xE5] = 713; + width[0xE6] = 384; + width[0xE7] = 384; + width[0xE8] = 384; + width[0xE9] = 384; + width[0xEA] = 384; + width[0xEB] = 384; + width[0xEC] = 494; + width[0xED] = 494; + width[0xEE] = 494; + width[0xEF] = 494; + width[0xF1] = 329; + width[0xF2] = 274; + width[0xF3] = 686; + width[0xF4] = 686; + width[0xF5] = 686; + width[0xF6] = 384; + width[0xF7] = 384; + width[0xF8] = 384; + width[0xF9] = 384; + width[0xFA] = 384; + width[0xFB] = 384; + width[0xFC] = 494; + width[0xFD] = 494; + width[0xFE] = 494; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/TimesBold.java b/src/org/apache/fop/render/mif/fonts/TimesBold.java new file mode 100644 index 000000000..1ad9c5834 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/TimesBold.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class TimesBold extends Font { + private final static String fontName = "Times-Bold"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 676; + private final static int xHeight = 461; + private final static int ascender = 676; + private final static int descender = -205; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 722; + width[0x00C6] = 1000; + width[0x00C1] = 722; + width[0x00C2] = 722; + width[0x00C4] = 722; + width[0x00C0] = 722; + width[0x00C5] = 722; + width[0x00C3] = 722; + width[0x0042] = 667; + width[0x0043] = 722; + width[0x00C7] = 722; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 778; + width[0x0048] = 778; + width[0x0049] = 389; + width[0x00CD] = 389; + width[0x00CE] = 389; + width[0x00CF] = 389; + width[0x00CC] = 389; + width[0x004A] = 500; + width[0x004B] = 778; + width[0x004C] = 667; + width[0x004D] = 944; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 778; + width[0x008C] = 1000; + width[0x00D3] = 778; + width[0x00D4] = 778; + width[0x00D6] = 778; + width[0x00D2] = 778; + width[0x00D8] = 778; + width[0x00D5] = 778; + width[0x0050] = 611; + width[0x0051] = 778; + width[0x0052] = 722; + width[0x0053] = 556; + width[0x008A] = 556; + width[0x0054] = 667; + width[0x00DE] = 611; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 722; + width[0x0057] = 1000; + width[0x0058] = 722; + width[0x0059] = 722; + width[0x00DD] = 722; + width[0x009F] = 722; + width[0x005A] = 667; + width[0x0061] = 500; + width[0x00E1] = 500; + width[0x00E2] = 500; + width[0x00B4] = 333; + width[0x00E4] = 500; + width[0x00E6] = 722; + width[0x00E0] = 500; + width[0x0026] = 833; + width[0x00E5] = 500; + width[0x005E] = 581; + width[0x007E] = 520; + width[0x002A] = 500; + width[0x0040] = 930; + width[0x00E3] = 500; + width[0x0062] = 556; + width[0x005C] = 278; + width[0x007C] = 220; + width[0x007B] = 394; + width[0x007D] = 394; + width[0x005B] = 333; + width[0x005D] = 333; + width[0x00A6] = 220; + width[0x0095] = 350; + width[0x0063] = 444; + width[0x00E7] = 444; + width[0x00B8] = 333; + width[0x00A2] = 500; + width[0x0088] = 333; + width[0x003A] = 333; + width[0x002C] = 250; + width[0x00A9] = 747; + width[0x00A4] = 500; + width[0x0064] = 556; + width[0x0086] = 500; + width[0x0087] = 500; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 570; + width[0x0024] = 500; + width[0x0065] = 444; + width[0x00E9] = 444; + width[0x00EA] = 444; + width[0x00EB] = 444; + width[0x00E8] = 444; + width[0x0038] = 500; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 500; + width[0x003D] = 570; + width[0x00F0] = 500; + width[0x0021] = 333; + width[0x00A1] = 333; + width[0x0066] = 333; + width[0x0035] = 500; + width[0x0083] = 500; + width[0x0034] = 500; + width[0xA4] = 167; + width[0x0067] = 500; + width[0x00DF] = 556; + width[0x0060] = 333; + width[0x003E] = 570; + width[0x00AB] = 500; + width[0x00BB] = 500; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 556; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 333; + width[0x006B] = 556; + width[0x006C] = 278; + width[0x003C] = 570; + width[0x00AC] = 570; + width[0x006D] = 833; + width[0x00AF] = 333; + width[0x2D] = 570; + width[0x00B5] = 556; + width[0x00D7] = 570; + width[0x006E] = 556; + width[0x0039] = 500; + width[0x00F1] = 556; + width[0x0023] = 500; + width[0x006F] = 500; + width[0x00F3] = 500; + width[0x00F4] = 500; + width[0x00F6] = 500; + width[0x009C] = 722; + width[0x00F2] = 500; + width[0x0031] = 500; + width[0x00BD] = 750; + width[0x00BC] = 750; + width[0x00B9] = 300; + width[0x00AA] = 300; + width[0x00BA] = 330; + width[0x00F8] = 500; + width[0x00F5] = 500; + width[0x0070] = 556; + width[0x00B6] = 540; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 1000; + width[0x002E] = 250; + width[0x00B7] = 250; + width[0x0089] = 1000; + width[0x002B] = 570; + width[0x00B1] = 570; + width[0x0071] = 556; + width[0x003F] = 500; + width[0x00BF] = 500; + width[0x0022] = 555; + width[0x0084] = 500; + width[0x0093] = 500; + width[0x0094] = 500; + width[0x0091] = 333; + width[0x0092] = 333; + width[0x0082] = 333; + width[0x0027] = 278; + width[0x0072] = 444; + width[0x00AE] = 747; + width[0x00B0] = 333; + width[0x0073] = 389; + width[0x009A] = 389; + width[0x00A7] = 500; + width[0x003B] = 333; + width[0x0037] = 500; + width[0x0036] = 500; + width[0x002F] = 278; + width[0x0020] = 250; + width[0x00A0] = 250; + width[0x00A3] = 500; + width[0x0074] = 333; + width[0x00FE] = 556; + width[0x0033] = 500; + width[0x00BE] = 750; + width[0x00B3] = 300; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 500; + width[0x00B2] = 300; + width[0x0075] = 556; + width[0x00FA] = 556; + width[0x00FB] = 556; + width[0x00FC] = 556; + width[0x00F9] = 556; + width[0x005F] = 500; + width[0x0076] = 500; + width[0x0077] = 722; + width[0x0078] = 500; + width[0x0079] = 500; + width[0x00FD] = 500; + width[0x00FF] = 500; + width[0x00A5] = 500; + width[0x007A] = 444; + width[0x0030] = 500; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/TimesBoldItalic.java b/src/org/apache/fop/render/mif/fonts/TimesBoldItalic.java new file mode 100644 index 000000000..e92af2c9e --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/TimesBoldItalic.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class TimesBoldItalic extends Font { + private final static String fontName = "Times-BoldItalic"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 669; + private final static int xHeight = 462; + private final static int ascender = 699; + private final static int descender = -205; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 667; + width[0x00C6] = 944; + width[0x00C1] = 667; + width[0x00C2] = 667; + width[0x00C4] = 667; + width[0x00C0] = 667; + width[0x00C5] = 667; + width[0x00C3] = 667; + width[0x0042] = 667; + width[0x0043] = 667; + width[0x00C7] = 667; + width[0x0044] = 722; + width[0x0045] = 667; + width[0x00C9] = 667; + width[0x00CA] = 667; + width[0x00CB] = 667; + width[0x00C8] = 667; + width[0x00D0] = 722; + width[0x0046] = 667; + width[0x0047] = 722; + width[0x0048] = 778; + width[0x0049] = 389; + width[0x00CD] = 389; + width[0x00CE] = 389; + width[0x00CF] = 389; + width[0x00CC] = 389; + width[0x004A] = 500; + width[0x004B] = 667; + width[0x004C] = 611; + width[0x004D] = 889; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 722; + width[0x008C] = 944; + width[0x00D3] = 722; + width[0x00D4] = 722; + width[0x00D6] = 722; + width[0x00D2] = 722; + width[0x00D8] = 722; + width[0x00D5] = 722; + width[0x0050] = 611; + width[0x0051] = 722; + width[0x0052] = 667; + width[0x0053] = 556; + width[0x008A] = 556; + width[0x0054] = 611; + width[0x00DE] = 611; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 667; + width[0x0057] = 889; + width[0x0058] = 667; + width[0x0059] = 611; + width[0x00DD] = 611; + width[0x009F] = 611; + width[0x005A] = 611; + width[0x0061] = 500; + width[0x00E1] = 500; + width[0x00E2] = 500; + width[0x00B4] = 333; + width[0x00E4] = 500; + width[0x00E6] = 722; + width[0x00E0] = 500; + width[0x0026] = 778; + width[0x00E5] = 500; + width[0x005E] = 570; + width[0x007E] = 570; + width[0x002A] = 500; + width[0x0040] = 832; + width[0x00E3] = 500; + width[0x0062] = 500; + width[0x005C] = 278; + width[0x007C] = 220; + width[0x007B] = 348; + width[0x007D] = 348; + width[0x005B] = 333; + width[0x005D] = 333; + width[0x00A6] = 220; + width[0x0095] = 350; + width[0x0063] = 444; + width[0x00E7] = 444; + width[0x00B8] = 333; + width[0x00A2] = 500; + width[0x0088] = 333; + width[0x003A] = 333; + width[0x002C] = 250; + width[0x00A9] = 747; + width[0x00A4] = 500; + width[0x0064] = 500; + width[0x0086] = 500; + width[0x0087] = 500; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 570; + width[0x0024] = 500; + width[0x0065] = 444; + width[0x00E9] = 444; + width[0x00EA] = 444; + width[0x00EB] = 444; + width[0x00E8] = 444; + width[0x0038] = 500; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 500; + width[0x003D] = 570; + width[0x00F0] = 500; + width[0x0021] = 389; + width[0x00A1] = 389; + width[0x0066] = 333; + width[0x0035] = 500; + width[0x0083] = 500; + width[0x0034] = 500; + width[0xA4] = 167; + width[0x0067] = 500; + width[0x00DF] = 500; + width[0x0060] = 333; + width[0x003E] = 570; + width[0x00AB] = 500; + width[0x00BB] = 500; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 556; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 278; + width[0x006B] = 500; + width[0x006C] = 278; + width[0x003C] = 570; + width[0x00AC] = 606; + width[0x006D] = 778; + width[0x00AF] = 333; + width[0x2D] = 606; + width[0x00B5] = 576; + width[0x00D7] = 570; + width[0x006E] = 556; + width[0x0039] = 500; + width[0x00F1] = 556; + width[0x0023] = 500; + width[0x006F] = 500; + width[0x00F3] = 500; + width[0x00F4] = 500; + width[0x00F6] = 500; + width[0x009C] = 722; + width[0x00F2] = 500; + width[0x0031] = 500; + width[0x00BD] = 750; + width[0x00BC] = 750; + width[0x00B9] = 300; + width[0x00AA] = 266; + width[0x00BA] = 300; + width[0x00F8] = 500; + width[0x00F5] = 500; + width[0x0070] = 500; + width[0x00B6] = 500; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 833; + width[0x002E] = 250; + width[0x00B7] = 250; + width[0x0089] = 1000; + width[0x002B] = 570; + width[0x00B1] = 570; + width[0x0071] = 500; + width[0x003F] = 500; + width[0x00BF] = 500; + width[0x0022] = 555; + width[0x0084] = 500; + width[0x0093] = 500; + width[0x0094] = 500; + width[0x0091] = 333; + width[0x0092] = 333; + width[0x0082] = 333; + width[0x0027] = 278; + width[0x0072] = 389; + width[0x00AE] = 747; + width[0x00B0] = 333; + width[0x0073] = 389; + width[0x009A] = 389; + width[0x00A7] = 500; + width[0x003B] = 333; + width[0x0037] = 500; + width[0x0036] = 500; + width[0x002F] = 278; + width[0x0020] = 250; + width[0x00A0] = 250; + width[0x00A3] = 500; + width[0x0074] = 278; + width[0x00FE] = 500; + width[0x0033] = 500; + width[0x00BE] = 750; + width[0x00B3] = 300; + width[0x0098] = 333; + width[0x0099] = 1000; + width[0x0032] = 500; + width[0x00B2] = 300; + width[0x0075] = 556; + width[0x00FA] = 556; + width[0x00FB] = 556; + width[0x00FC] = 556; + width[0x00F9] = 556; + width[0x005F] = 500; + width[0x0076] = 444; + width[0x0077] = 667; + width[0x0078] = 500; + width[0x0079] = 444; + width[0x00FD] = 444; + width[0x00FF] = 444; + width[0x00A5] = 500; + width[0x007A] = 389; + width[0x0030] = 500; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/TimesItalic.java b/src/org/apache/fop/render/mif/fonts/TimesItalic.java new file mode 100644 index 000000000..0d2dcbaaf --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/TimesItalic.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class TimesItalic extends Font { + private final static String fontName = "Times-Italic"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 653; + private final static int xHeight = 441; + private final static int ascender = 683; + private final static int descender = -205; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 611; + width[0x00C6] = 889; + width[0x00C1] = 611; + width[0x00C2] = 611; + width[0x00C4] = 611; + width[0x00C0] = 611; + width[0x00C5] = 611; + width[0x00C3] = 611; + width[0x0042] = 611; + width[0x0043] = 667; + width[0x00C7] = 667; + width[0x0044] = 722; + width[0x0045] = 611; + width[0x00C9] = 611; + width[0x00CA] = 611; + width[0x00CB] = 611; + width[0x00C8] = 611; + width[0x00D0] = 722; + width[0x0046] = 611; + width[0x0047] = 722; + width[0x0048] = 722; + width[0x0049] = 333; + width[0x00CD] = 333; + width[0x00CE] = 333; + width[0x00CF] = 333; + width[0x00CC] = 333; + width[0x004A] = 444; + width[0x004B] = 667; + width[0x004C] = 556; + width[0x004D] = 833; + width[0x004E] = 667; + width[0x00D1] = 667; + width[0x004F] = 722; + width[0x008C] = 944; + width[0x00D3] = 722; + width[0x00D4] = 722; + width[0x00D6] = 722; + width[0x00D2] = 722; + width[0x00D8] = 722; + width[0x00D5] = 722; + width[0x0050] = 611; + width[0x0051] = 722; + width[0x0052] = 611; + width[0x0053] = 500; + width[0x008A] = 500; + width[0x0054] = 556; + width[0x00DE] = 611; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 611; + width[0x0057] = 833; + width[0x0058] = 611; + width[0x0059] = 556; + width[0x00DD] = 556; + width[0x009F] = 556; + width[0x005A] = 556; + width[0x0061] = 500; + width[0x00E1] = 500; + width[0x00E2] = 500; + width[0x00B4] = 333; + width[0x00E4] = 500; + width[0x00E6] = 667; + width[0x00E0] = 500; + width[0x0026] = 778; + width[0x00E5] = 500; + width[0x005E] = 422; + width[0x007E] = 541; + width[0x002A] = 500; + width[0x0040] = 920; + width[0x00E3] = 500; + width[0x0062] = 500; + width[0x005C] = 278; + width[0x007C] = 275; + width[0x007B] = 400; + width[0x007D] = 400; + width[0x005B] = 389; + width[0x005D] = 389; + width[0x00A6] = 275; + width[0x0095] = 350; + width[0x0063] = 444; + width[0x00E7] = 444; + width[0x00B8] = 333; + width[0x00A2] = 500; + width[0x0088] = 333; + width[0x003A] = 333; + width[0x002C] = 250; + width[0x00A9] = 760; + width[0x00A4] = 500; + width[0x0064] = 500; + width[0x0086] = 500; + width[0x0087] = 500; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 675; + width[0x0024] = 500; + width[0x0065] = 444; + width[0x00E9] = 444; + width[0x00EA] = 444; + width[0x00EB] = 444; + width[0x00E8] = 444; + width[0x0038] = 500; + width[0x0085] = 889; + width[0x0097] = 889; + width[0x0096] = 500; + width[0x003D] = 675; + width[0x00F0] = 500; + width[0x0021] = 333; + width[0x00A1] = 389; + width[0x0066] = 278; + width[0x0035] = 500; + width[0x0083] = 500; + width[0x0034] = 500; + width[0xA4] = 167; + width[0x0067] = 500; + width[0x00DF] = 500; + width[0x0060] = 333; + width[0x003E] = 675; + width[0x00AB] = 500; + width[0x00BB] = 500; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 500; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 278; + width[0x006B] = 444; + width[0x006C] = 278; + width[0x003C] = 675; + width[0x00AC] = 675; + width[0x006D] = 722; + width[0x00AF] = 333; + width[0x2D] = 675; + width[0x00B5] = 500; + width[0x00D7] = 675; + width[0x006E] = 500; + width[0x0039] = 500; + width[0x00F1] = 500; + width[0x0023] = 500; + width[0x006F] = 500; + width[0x00F3] = 500; + width[0x00F4] = 500; + width[0x00F6] = 500; + width[0x009C] = 667; + width[0x00F2] = 500; + width[0x0031] = 500; + width[0x00BD] = 750; + width[0x00BC] = 750; + width[0x00B9] = 300; + width[0x00AA] = 276; + width[0x00BA] = 310; + width[0x00F8] = 500; + width[0x00F5] = 500; + width[0x0070] = 500; + width[0x00B6] = 523; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 833; + width[0x002E] = 250; + width[0x00B7] = 250; + width[0x0089] = 1000; + width[0x002B] = 675; + width[0x00B1] = 675; + width[0x0071] = 500; + width[0x003F] = 500; + width[0x00BF] = 500; + width[0x0022] = 420; + width[0x0084] = 556; + width[0x0093] = 556; + width[0x0094] = 556; + width[0x0091] = 333; + width[0x0092] = 333; + width[0x0082] = 333; + width[0x0027] = 214; + width[0x0072] = 389; + width[0x00AE] = 760; + width[0x00B0] = 333; + width[0x0073] = 389; + width[0x009A] = 389; + width[0x00A7] = 500; + width[0x003B] = 333; + width[0x0037] = 500; + width[0x0036] = 500; + width[0x002F] = 278; + width[0x0020] = 250; + width[0x00A0] = 250; + width[0x00A3] = 500; + width[0x0074] = 278; + width[0x00FE] = 500; + width[0x0033] = 500; + width[0x00BE] = 750; + width[0x00B3] = 300; + width[0x0098] = 333; + width[0x0099] = 980; + width[0x0032] = 500; + width[0x00B2] = 300; + width[0x0075] = 500; + width[0x00FA] = 500; + width[0x00FB] = 500; + width[0x00FC] = 500; + width[0x00F9] = 500; + width[0x005F] = 500; + width[0x0076] = 444; + width[0x0077] = 667; + width[0x0078] = 444; + width[0x0079] = 444; + width[0x00FD] = 444; + width[0x00FF] = 444; + width[0x00A5] = 500; + width[0x007A] = 389; + width[0x0030] = 500; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/TimesRoman.java b/src/org/apache/fop/render/mif/fonts/TimesRoman.java new file mode 100644 index 000000000..87c5c1a0d --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/TimesRoman.java @@ -0,0 +1,283 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class TimesRoman extends Font { + private final static String fontName = "Times-Roman"; + private final static String encoding = "WinAnsiEncoding"; + private final static int capHeight = 662; + private final static int xHeight = 450; + private final static int ascender = 683; + private final static int descender = -217; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0041] = 722; + width[0x00C6] = 889; + width[0x00C1] = 722; + width[0x00C2] = 722; + width[0x00C4] = 722; + width[0x00C0] = 722; + width[0x00C5] = 722; + width[0x00C3] = 722; + width[0x0042] = 667; + width[0x0043] = 667; + width[0x00C7] = 667; + width[0x0044] = 722; + width[0x0045] = 611; + width[0x00C9] = 611; + width[0x00CA] = 611; + width[0x00CB] = 611; + width[0x00C8] = 611; + width[0x00D0] = 722; + width[0x0046] = 556; + width[0x0047] = 722; + width[0x0048] = 722; + width[0x0049] = 333; + width[0x00CD] = 333; + width[0x00CE] = 333; + width[0x00CF] = 333; + width[0x00CC] = 333; + width[0x004A] = 389; + width[0x004B] = 722; + width[0x004C] = 611; + width[0x004D] = 889; + width[0x004E] = 722; + width[0x00D1] = 722; + width[0x004F] = 722; + width[0x008C] = 889; + width[0x00D3] = 722; + width[0x00D4] = 722; + width[0x00D6] = 722; + width[0x00D2] = 722; + width[0x00D8] = 722; + width[0x00D5] = 722; + width[0x0050] = 556; + width[0x0051] = 722; + width[0x0052] = 667; + width[0x0053] = 556; + width[0x008A] = 556; + width[0x0054] = 611; + width[0x00DE] = 556; + width[0x0055] = 722; + width[0x00DA] = 722; + width[0x00DB] = 722; + width[0x00DC] = 722; + width[0x00D9] = 722; + width[0x0056] = 722; + width[0x0057] = 944; + width[0x0058] = 722; + width[0x0059] = 722; + width[0x00DD] = 722; + width[0x009F] = 722; + width[0x005A] = 611; + width[0x0061] = 444; + width[0x00E1] = 444; + width[0x00E2] = 444; + width[0x00B4] = 333; + width[0x00E4] = 444; + width[0x00E6] = 667; + width[0x00E0] = 444; + width[0x0026] = 778; + width[0x00E5] = 444; + width[0x005E] = 469; + width[0x007E] = 541; + width[0x002A] = 500; + width[0x0040] = 921; + width[0x00E3] = 444; + width[0x0062] = 500; + width[0x005C] = 278; + width[0x007C] = 200; + width[0x007B] = 480; + width[0x007D] = 480; + width[0x005B] = 333; + width[0x005D] = 333; + width[0x00A6] = 200; + width[0x0095] = 350; + width[0x0063] = 444; + width[0x00E7] = 444; + width[0x00B8] = 333; + width[0x00A2] = 500; + width[0x0088] = 333; + width[0x003A] = 278; + width[0x002C] = 250; + width[0x00A9] = 760; + width[0x00A4] = 500; + width[0x0064] = 500; + width[0x0086] = 500; + width[0x0087] = 500; + width[0x00B0] = 400; + width[0x00A8] = 333; + width[0x00F7] = 564; + width[0x0024] = 500; + width[0x0065] = 444; + width[0x00E9] = 444; + width[0x00EA] = 444; + width[0x00EB] = 444; + width[0x00E8] = 444; + width[0x0038] = 500; + width[0x0085] = 1000; + width[0x0097] = 1000; + width[0x0096] = 500; + width[0x003D] = 564; + width[0x00F0] = 500; + width[0x0021] = 333; + width[0x00A1] = 333; + width[0x0066] = 333; + width[0x0035] = 500; + width[0x0083] = 500; + width[0x0034] = 500; + width[0xA4] = 167; + width[0x0067] = 500; + width[0x00DF] = 500; + width[0x0060] = 333; + width[0x003E] = 564; + width[0x00AB] = 500; + width[0x00BB] = 500; + width[0x008B] = 333; + width[0x009B] = 333; + width[0x0068] = 500; + width[0x002D] = 333; + width[0x0069] = 278; + width[0x00ED] = 278; + width[0x00EE] = 278; + width[0x00EF] = 278; + width[0x00EC] = 278; + width[0x006A] = 278; + width[0x006B] = 500; + width[0x006C] = 278; + width[0x003C] = 564; + width[0x00AC] = 564; + width[0x006D] = 778; + width[0x00AF] = 333; + width[0x2D] = 324; + width[0x00B5] = 500; + width[0x00D7] = 564; + width[0x006E] = 500; + width[0x0039] = 500; + width[0x00F1] = 500; + width[0x0023] = 500; + width[0x006F] = 500; + width[0x00F3] = 500; + width[0x00F4] = 500; + width[0x00F6] = 500; + width[0x009C] = 722; + width[0x00F2] = 500; + width[0x0031] = 500; + width[0x00BD] = 750; + width[0x00BC] = 750; + width[0x00B9] = 300; + width[0x00AA] = 276; + width[0x00BA] = 310; + width[0x00F8] = 500; + width[0x00F5] = 500; + width[0x0070] = 500; + width[0x00B6] = 453; + width[0x0028] = 333; + width[0x0029] = 333; + width[0x0025] = 833; + width[0x002E] = 250; + width[0x00B7] = 250; + width[0x0089] = 1000; + width[0x002B] = 564; + width[0x00B1] = 564; + width[0x0071] = 500; + width[0x003F] = 444; + width[0x00BF] = 444; + width[0x0022] = 408; + width[0x0084] = 444; + width[0x0093] = 444; + width[0x0094] = 444; + width[0x0091] = 333; + width[0x0092] = 333; + width[0x0082] = 333; + width[0x0027] = 180; + width[0x0072] = 333; + width[0x00AE] = 760; + width[0x00B0] = 333; + width[0x0073] = 389; + width[0x009A] = 389; + width[0x00A7] = 500; + width[0x003B] = 278; + width[0x0037] = 500; + width[0x0036] = 500; + width[0x002F] = 278; + width[0x0020] = 250; + width[0x00A0] = 250; + width[0x00A3] = 500; + width[0x0074] = 278; + width[0x00FE] = 500; + width[0x0033] = 500; + width[0x00BE] = 750; + width[0x00B3] = 300; + width[0x0098] = 333; + width[0x0099] = 980; + width[0x0032] = 500; + width[0x00B2] = 300; + width[0x0075] = 500; + width[0x00FA] = 500; + width[0x00FB] = 500; + width[0x00FC] = 500; + width[0x00F9] = 500; + width[0x005F] = 500; + width[0x0076] = 500; + width[0x0077] = 722; + width[0x0078] = 500; + width[0x0079] = 500; + width[0x00FD] = 500; + width[0x00FF] = 500; + width[0x00A5] = 500; + width[0x007A] = 444; + width[0x0030] = 500; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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/org/apache/fop/render/mif/fonts/ZapfDingbats.java b/src/org/apache/fop/render/mif/fonts/ZapfDingbats.java new file mode 100644 index 000000000..0727484a6 --- /dev/null +++ b/src/org/apache/fop/render/mif/fonts/ZapfDingbats.java @@ -0,0 +1,268 @@ + + +package org.apache.fop.render.mif.fonts; + +import org.apache.fop.render.mif.Font; + +public class ZapfDingbats extends Font { + private final static String fontName = "ZapfDingbats"; + private final static String encoding = "StandardEncoding"; + private final static int capHeight = 820; + private final static int xHeight = 426; + private final static int ascender = 820; + private final static int descender = -143; + private final static int firstChar = 32; + private final static int lastChar = 255; + private final static int[] width; + + static { + width = new int[256]; + width[0x0020] = 278; + width[0x0021] = 974; + width[0x0022] = 961; + width[0x0023] = 974; + width[0x0024] = 980; + width[0x0025] = 719; + width[0x0026] = 789; + width[0x0027] = 790; + width[0x0028] = 791; + width[0x0029] = 690; + width[0x002A] = 960; + width[0x002B] = 939; + width[0x002C] = 549; + width[0x002D] = 855; + width[0x002E] = 911; + width[0x002F] = 933; + width[0x0030] = 911; + width[0x0031] = 945; + width[0x0032] = 974; + width[0x0033] = 755; + width[0x0034] = 846; + width[0x0035] = 762; + width[0x0036] = 761; + width[0x0037] = 571; + width[0x0038] = 677; + width[0x0039] = 763; + width[0x003A] = 760; + width[0x003B] = 759; + width[0x003C] = 754; + width[0x003D] = 494; + width[0x003E] = 552; + width[0x003F] = 537; + width[0x0040] = 577; + width[0x0041] = 692; + width[0x0042] = 786; + width[0x0043] = 788; + width[0x0044] = 788; + width[0x0045] = 790; + width[0x0046] = 793; + width[0x0047] = 794; + width[0x0048] = 816; + width[0x0049] = 823; + width[0x004A] = 789; + width[0x004B] = 841; + width[0x004C] = 823; + width[0x004D] = 833; + width[0x004E] = 816; + width[0x004F] = 831; + width[0x0050] = 923; + width[0x0051] = 744; + width[0x0052] = 723; + width[0x0053] = 749; + width[0x0054] = 790; + width[0x0055] = 792; + width[0x0056] = 695; + width[0x0057] = 776; + width[0x0058] = 768; + width[0x0059] = 792; + width[0x005A] = 759; + width[0x005B] = 707; + width[0x005C] = 708; + width[0x005D] = 682; + width[0x005E] = 701; + width[0x005F] = 826; + width[0x0060] = 815; + width[0x0061] = 789; + width[0x0062] = 789; + width[0x0063] = 707; + width[0x0064] = 687; + width[0x0065] = 696; + width[0x0066] = 689; + width[0x0067] = 786; + width[0x0068] = 787; + width[0x0069] = 713; + width[0x006A] = 791; + width[0x006B] = 785; + width[0x006C] = 791; + width[0x006D] = 873; + width[0x006E] = 761; + width[0x006F] = 762; + width[0x0070] = 762; + width[0x0071] = 759; + width[0x0072] = 759; + width[0x0073] = 892; + width[0x0074] = 892; + width[0x0075] = 788; + width[0x0076] = 784; + width[0x0077] = 438; + width[0x0078] = 138; + width[0x0079] = 277; + width[0x007A] = 415; + width[0x007B] = 392; + width[0x007C] = 392; + width[0x007D] = 668; + width[0x007E] = 668; + width[0x00A1] = 732; + width[0x00A2] = 544; + width[0x00A3] = 544; + width[0x00A4] = 910; + width[0x00A5] = 667; + width[0x00A6] = 760; + width[0x00A7] = 760; + width[0x00A8] = 776; + width[0x00A9] = 595; + width[0x00AA] = 694; + width[0x00AB] = 626; + width[0x00AC] = 788; + width[0x00AD] = 788; + width[0x00AE] = 788; + width[0x00AF] = 788; + width[0x00B0] = 788; + width[0x00B1] = 788; + width[0x00B2] = 788; + width[0x00B3] = 788; + width[0x00B4] = 788; + width[0x00B5] = 788; + width[0x00B6] = 788; + width[0x00B7] = 788; + width[0x00B8] = 788; + width[0x00B9] = 788; + width[0x00BA] = 788; + width[0x00BB] = 788; + width[0x00BC] = 788; + width[0x00BD] = 788; + width[0x00BE] = 788; + width[0x00BF] = 788; + width[0x00C0] = 788; + width[0x00C1] = 788; + width[0x00C2] = 788; + width[0x00C3] = 788; + width[0x00C4] = 788; + width[0x00C5] = 788; + width[0x00C6] = 788; + width[0x00C7] = 788; + width[0x00C8] = 788; + width[0x00C9] = 788; + width[0x00CA] = 788; + width[0x00CB] = 788; + width[0x00CC] = 788; + width[0x00CD] = 788; + width[0x00CE] = 788; + width[0x00CF] = 788; + width[0x00D0] = 788; + width[0x00D1] = 788; + width[0x00D2] = 788; + width[0x00D3] = 788; + width[0x00D4] = 894; + width[0x00D5] = 838; + width[0x00D6] = 1016; + width[0x00D7] = 458; + width[0x00D8] = 748; + width[0x00D9] = 924; + width[0x00DA] = 748; + width[0x00DB] = 918; + width[0x00DC] = 927; + width[0x00DD] = 928; + width[0x00DE] = 928; + width[0x00DF] = 834; + width[0x00E0] = 873; + width[0x00E1] = 828; + width[0x00E2] = 924; + width[0x00E3] = 924; + width[0x00E4] = 917; + width[0x00E5] = 930; + width[0x00E6] = 931; + width[0x00E7] = 463; + width[0x00E8] = 883; + width[0x00E9] = 836; + width[0x00EA] = 836; + width[0x00EB] = 867; + width[0x00EC] = 867; + width[0x00ED] = 696; + width[0x00EE] = 696; + width[0x00EF] = 874; + width[0x00F1] = 874; + width[0x00F2] = 760; + width[0x00F3] = 946; + width[0x00F4] = 771; + width[0x00F5] = 865; + width[0x00F6] = 771; + width[0x00F7] = 888; + width[0x00F8] = 967; + width[0x00F9] = 888; + width[0x00FA] = 831; + width[0x00FB] = 873; + width[0x00FC] = 927; + width[0x00FD] = 970; + width[0x00FE] = 918; + width[0x0089] = 410; + width[0x0087] = 509; + width[0x008C] = 334; + width[0x0086] = 509; + width[0x0080] = 390; + width[0x008A] = 234; + width[0x0084] = 276; + width[0x0081] = 390; + width[0x0088] = 410; + width[0x0083] = 317; + width[0x0082] = 317; + width[0x0085] = 276; + width[0x008D] = 334; + width[0x008B] = 234; + + } + + public String encoding() { + return encoding; + } + + public String fontName() { + return fontName; + } + + public int getAscender(int size) { + return size * ascender; + } + + public int getCapHeight(int size) { + return size * capHeight; + } + + public int getDescender(int size) { + return size * descender; + } + + public int getXHeight(int size) { + return size * xHeight; + } + + public int getFirstChar() { + return firstChar; + } + + public int getLastChar() { + return lastChar; + } + + public int width(int i,int size) { + return size * width[i]; + } + + 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; + } +} +