jeremias 2003/06/02 12:52:51 Modified: src/org/apache/fop/fonts Tag: fop-0_20_2-maintain Glyphs.java Log: Fix bug in WinAnsiEncoding: trademark was shown as bullet Financed by: CTB/McGraw-Hill Revision Changes Path No revision No revision 1.7.2.3 +33 -22 xml-fop/src/org/apache/fop/fonts/Attic/Glyphs.java Index: Glyphs.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/Attic/Glyphs.java,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -u -r1.7.2.2 -r1.7.2.3 --- Glyphs.java 25 Feb 2003 13:13:21 -0000 1.7.2.2 +++ Glyphs.java 2 Jun 2003 19:52:50 -0000 1.7.2.3 @@ -3,34 +3,34 @@ * ============================================================================ * The Apache Software License, Version 1.1 * ============================================================================ - * + * * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The end-user documentation included with the redistribution, if any, must * include the following acknowledgment: "This product includes software * developed by the Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, if * and wherever such third-party acknowledgments normally appear. - * + * * 4. The names "FOP" and "Apache Software Foundation" must not be used to * endorse or promote products derived from this software without prior * written permission. For written permission, please contact * [EMAIL PROTECTED] - * + * * 5. Products derived from this software may not be called "Apache", nor may * "Apache" appear in their name, without prior written permission of the * Apache Software Foundation. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -42,12 +42,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ============================================================================ - * + * * This software consists of voluntary contributions made by many individuals * on behalf of the Apache Software Foundation and was originally created by * James Tauber <[EMAIL PROTECTED]>. For more information on the Apache * Software Foundation, please see <http://www.apache.org/>. - */ + */ package org.apache.fop.fonts; public class Glyphs { @@ -195,30 +195,30 @@ '\u2022', // bullet '\u2013', // endash '\u2014', // emdash - '~', '\u2022', // bullet + '~', '\u2122', // trademark '\u0161', '\u203a', '\u0153', '\u2022', '\u017e', '\u0178', // 0xA0 - ' ', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5', - '\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab', + ' ', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5', + '\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab', '\u00ac', '\u00ad', '\u00ae', '\u00af', // 0xb0 '\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4', '\u00b5', // This is hand-coded, the rest is assumption '\u00b6', // and *might* not be correct... - '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd', + '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd', '\u00be', '\u00bf', // 0xc0 '\u00c0', '\u00c1', '\u00c2', '\u00c3', '\u00c4', '\u00c5', // Aring '\u00c6', // AE - '\u00c7', '\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', + '\u00c7', '\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', '\u00cd', '\u00ce', '\u00cf', // 0xd0 - '\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5', + '\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5', '\u00d6', '\u00d7', '\u00d8', // Oslash - '\u00d9', '\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', + '\u00d9', '\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', '\u00df', // 0xe0 '\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5', // aring '\u00e6', // ae - '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', + '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', '\u00ed', '\u00ee', '\u00ef', // 0xf0 - '\u00f0', '\u00f1', '\u00f2', '\u00f3', '\u00f4', '\u00f5', - '\u00f6', '\u00f7', '\u00f8', '\u00f9', '\u00fa', '\u00fb', + '\u00f0', '\u00f1', '\u00f2', '\u00f3', '\u00f4', '\u00f5', + '\u00f6', '\u00f7', '\u00f8', '\u00f9', '\u00fa', '\u00fb', '\u00fc', '\u00fd', '\u00fe', '\u00ff' }; @@ -1276,8 +1276,19 @@ "\uF730", "zerooldstyle", "\u2070", "zerosuperior", "\u03B6", "zeta" - + }; + + /** + * Return the glyphname from a character, + * eg, charToGlyphName('\\') returns "backslash" + * + * @param ch glyph to evaluate + * @return the name of the glyph + */ + public static final String charToGlyphName(char ch) { + return stringToGlyph(Character.toString(ch)); + } /** * Return the glyphname from a string,
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]