[
https://issues.apache.org/jira/browse/FOP-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ilya Obshadko updated FOP-3099:
-------------------------------
Summary: Embedding fonts in JAR no longer possible in 2.x (was: Embedding
fonts in JAR doesn't seem possible in 2.x)
> Embedding fonts in JAR no longer possible in 2.x
> ------------------------------------------------
>
> Key: FOP-3099
> URL: https://issues.apache.org/jira/browse/FOP-3099
> Project: FOP
> Issue Type: Wish
> Reporter: Ilya Obshadko
> Priority: Major
>
> Prior to upgrading to version 2, I've been successfully using 1.1 with font
> files embedded directly in JAR.
> After upgrade, this doesn't seem possible any longer, because the JAR
> resource base is an opaque URI, and URI resolution for fonts embedded in JAR
> files does not work.
> For example:
> * font file is stored as {{fonts/myfont.ttf}}
> * JAR resource base looks like {{jar:file:/path/to/application.jar!/}}
> (opaque URI!)
> Calling {{URI.resolve()}} on base returns a relative font path (as [per
> spec|https://docs.oracle.com/javase/6/docs/api/java/net/URI.html#relativize%28java.net.URI%29],
> because the base is opaque), and then FOP fails with the error "URI is not
> absolute".
> Is there any way to overcome this problem other than offloading fonts outside
> the JAR? This was working before just fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)