diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-01-23 12:08:08 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-01-23 12:08:08 +0000 |
commit | cfd456f554e0e0d89d8455f9d216850a0cc1765b (patch) | |
tree | 6c21f675be9722d81f8eaade9f5d58bbfbb94c75 /src/java/org/apache | |
parent | 07953c4cf1c21cfd3a430396dcea2847b0e4d29b (diff) | |
download | xmlgraphics-fop-cfd456f554e0e0d89d8455f9d216850a0cc1765b.tar.gz xmlgraphics-fop-cfd456f554e0e0d89d8455f9d216850a0cc1765b.zip |
Bugzilla#52499: non embeddable TTF fonts -- throw exception if trying to embed
Submitted by: Luis Bernardo
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1234761 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java index dc2bec352..d1a55dd20 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java @@ -169,8 +169,13 @@ public class TTFFontLoader extends FontLoader { if (useKerning) { copyKerning(ttf, isCid); } - if (this.embedded && ttf.isEmbeddable()) { - returnFont.setEmbedFileName(this.fontFileURI); + if (this.embedded) { + if (ttf.isEmbeddable()) { + returnFont.setEmbedFileName(this.fontFileURI); + } else { + String msg = "The font " + this.fontFileURI + " is not embedabble."; + throw new RuntimeException(msg); + } } } |