diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2010-08-27 18:40:49 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2010-08-27 18:40:49 +0000 |
commit | 519ac01c92c11a0305f13b7124fe2242cfb5b922 (patch) | |
tree | f5b07da5fb23e3b08bb1b863f929a4778cf01784 /test/java/org/apache/fop/render | |
parent | 001ddbb84ad0805b8112a861df08f9ca7d56fc3e (diff) | |
download | xmlgraphics-fop-519ac01c92c11a0305f13b7124fe2242cfb5b922.tar.gz xmlgraphics-fop-519ac01c92c11a0305f13b7124fe2242cfb5b922.zip |
Added possibility to use glyphs outside WinAnsiEncoding for TrueType fonts that are not embedded in the PostScript file, and that don't have a list of glyph names ('post' table version 3).
This is done by creating glyph names using Adobe's convention (/u1234) and adding a CharStrings table that maps those glyph names to the actual glyph index.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@990225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/render')
-rw-r--r-- | test/java/org/apache/fop/render/ps/HexEncoderTestCase.java | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/test/java/org/apache/fop/render/ps/HexEncoderTestCase.java b/test/java/org/apache/fop/render/ps/HexEncoderTestCase.java deleted file mode 100644 index 75aee060f..000000000 --- a/test/java/org/apache/fop/render/ps/HexEncoderTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.render.ps; - -import junit.framework.TestCase; - -/** - * Test case for the conversion of characters into hex-encoded strings. - */ -public class HexEncoderTestCase extends TestCase { - - private static char successor(char d) { - if (d == '9') { - return 'A'; - } else if (d == 'F') { - return '0'; - } else { - return (char) (d + 1); - } - } - - private static void increment(char[] digits) { - int d = 4; - do { - d--; - digits[d] = successor(digits[d]); - } while (digits[d] == '0' && d > 0); - } - - /** - * Tests that characters are properly encoded into hex strings. - */ - public void testEncodeChar() { - char[] digits = new char[] {'0', '0', '0', '0'}; - for (int c = 0; c <= 0xFFFF; c++) { - assertEquals(new String(digits), HexEncoder.encode((char) c)); - increment(digits); - } - } - -} |