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 "simon steiner (JIRA)" <ji...@apache.org> on 2015/12/18 17:12:46 UTC

[jira] [Closed] (FOP-2554) FopConfig permits file URI for fonts only

     [ https://issues.apache.org/jira/browse/FOP-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner closed FOP-2554.
------------------------------
    Resolution: Duplicate

> 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
>              Labels: font, uri
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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)