You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Mr. Povarnitsyn (JIRA)" <ji...@apache.org> on 2015/12/18 12:00:48 UTC
[jira] [Created] (FOP-2554) FopConfig permits file URI for fonts
only
Mr. Povarnitsyn created FOP-2554:
------------------------------------
Summary: FopConfig permits file URI for fonts only
Key: FOP-2554
URL: https://issues.apache.org/jira/browse/FOP-2554
Project: FOP
Issue Type: Bug
Components: font/unqualified
Affects Versions: 2.0
Environment: all flatforms
Reporter: Mr. Povarnitsyn
Priority: Minor
config has following:
<fonts>
<font metrics-url="classpath:///fonts/arialuni.xml" kerning="yes" embed-url="classpath:///fonts/arialuni.ttf">
<font-triplet name="arialuni" style="normal" weight="normal"/>
</font>
Exception on FontCache.java (line 335)
File fontFile = new File(fontUri);
My proposal:
Instead:
File fontFile = new File(fontUri);
long lastModified = fontFile.lastModified();
cachedFontFile = new CachedFontFile(lastModified);
Write:
long lastModified = 0L;
if(fontUri.getScheme().equals("file")){
File fontFile = new File(fontUri);
lastModified = fontFile.lastModified();
}
cachedFontFile = new CachedFontFile(lastModified);
This code is working.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)