From 22b172ad42e68f3a3299476c0295fe9d14109573 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 1 Mar 2006 17:26:21 +0000 Subject: 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 --- src/java/org/apache/fop/fonts/truetype/TTFFile.java | 6 +++++- status.xml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFile.java b/src/java/org/apache/fop/fonts/truetype/TTFFile.java index 39fc7073f..d55581098 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFile.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFile.java @@ -1,5 +1,5 @@ /* - * 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"); * you may not use this file except in compliance with the License. @@ -1043,10 +1043,14 @@ public class TTFFile { // This also assumes that psocriptnames exists ("H") // Should look it up int the cmap (that wouldn't help // for charsets without H anyway...) + // Same for xHeight with the letter "x" for (int i = 0; i < mtxTab.length; i++) { if ("H".equals(mtxTab[i].getName())) { capHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1]; } + if ("x".equals(mtxTab[i].getName())) { + xHeight = mtxTab[i].getBoundingBox()[3] - mtxTab[i].getBoundingBox()[1]; + } } } } diff --git a/status.xml b/status.xml index a6e2573f0..0596f50c5 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,11 @@ + + 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.) + Bugfix: When the base URL was specified as a file system path, the constructed URL was wrong. -- cgit v1.2.3