Browse Source

Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT" table, where a baseline-shift="sub" had no effect due to a missing x-height value.

(Note: This only affects TTFReader, so the font metric file has to be regenerated.)

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@382089 13f79535-47bb-0310-9956-ffa450edef68
pull/35/head
Jeremias Maerki 18 years ago
parent
commit
5a5177664e
2 changed files with 10 additions and 1 deletions
  1. 5
    1
      src/java/org/apache/fop/fonts/truetype/TTFFile.java
  2. 5
    0
      status.xml

+ 5
- 1
src/java/org/apache/fop/fonts/truetype/TTFFile.java View File

/* /*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2004,2006 The Apache Software Foundation.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
// This also assumes that psocriptnames exists ("H") // This also assumes that psocriptnames exists ("H")
// Should look it up int the cmap (that wouldn't help // Should look it up int the cmap (that wouldn't help
// for charsets without H anyway...) // for charsets without H anyway...)
// Same for xHeight with the letter "x"
for (int i = 0; i < mtxTab.length; i++) { for (int i = 0; i < mtxTab.length; i++) {
if ("H".equals(mtxTab[i].getName())) { if ("H".equals(mtxTab[i].getName())) {
capHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1]; capHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1];
} }
if ("x".equals(mtxTab[i].getName())) {
xHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1];
}
} }
} }
} }

+ 5
- 0
status.xml View File



<changes> <changes>
<release version="FOP Trunk"> <release version="FOP Trunk">
<action context="Code" dev="JM" type="fix">
Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT"
table, where a baseline-shift="sub" had no effect due to a missing x-height value.
(Note: This only affects TTFReader, so the font metric file has to be regenerated.)
</action>
<action context="Code" dev="JM" type="fix"> <action context="Code" dev="JM" type="fix">
Bugfix: When the base URL was specified as a file system path, the constructed Bugfix: When the base URL was specified as a file system path, the constructed
URL was wrong. URL was wrong.

Loading…
Cancel
Save