diff options
author | Glenn Adams <gadams@apache.org> | 2014-08-17 18:56:01 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2014-08-17 18:56:01 +0000 |
commit | 49c8708241bc45067382b90d76fdf4a85e5f1cae (patch) | |
tree | 2e43cf24b3cc461b561a2b8683ebd80e0c3da2dc /src/codegen | |
parent | 5f66eef3fe635d61f3e6408d101a87b57409aa5c (diff) | |
download | xmlgraphics-fop-49c8708241bc45067382b90d76fdf4a85e5f1cae.tar.gz xmlgraphics-fop-49c8708241bc45067382b90d76fdf4a85e5f1cae.zip |
Add verbose (-v) flag to FontList tool that shows URI of font resource.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1618496 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/codegen')
-rw-r--r-- | src/codegen/fonts/font-file.xsl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/codegen/fonts/font-file.xsl b/src/codegen/fonts/font-file.xsl index 8723ed960..42f9281bc 100644 --- a/src/codegen/fonts/font-file.xsl +++ b/src/codegen/fonts/font-file.xsl @@ -36,6 +36,7 @@ package org.apache.fop.fonts.base14; import java.awt.Rectangle; +import java.net.URI; <xsl:if test="count(kerning) > 0"> import java.util.Map; </xsl:if> @@ -46,6 +47,7 @@ import org.apache.fop.fonts.CodePointMapping; import org.apache.fop.fonts.Typeface; public class <xsl:value-of select="class-name"/> extends Base14Font { + private final static URI fontFileURI; private final static String fontName = "<xsl:value-of select="font-name"/>"; private final static String fullName = "<xsl:value-of select="full-name"/>"; private final static Set familyNames; @@ -69,6 +71,12 @@ public class <xsl:value-of select="class-name"/> extends Base14Font { private boolean enableKerning = false; static { + URI uri = null; + try { + uri = new URI("base14:" + fontName.toLowerCase()); + } catch (java.net.URISyntaxException e) { + } + fontFileURI = uri; width = new int[256]; boundingBoxes = new Rectangle[256]; <xsl:apply-templates select="char-metrics"/> @@ -94,6 +102,10 @@ public class <xsl:value-of select="class-name"/> extends Base14Font { return encoding; } + public URI getFontURI() { + return fontFileURI; + } + public String getFontName() { return fontName; } |