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

Ivan Habunek updated FOP-2312:
------------------------------

    Description: 
When converting FO to PDF, FOP looks for fonts in the directory where the input 
FO file is located, not where <font-base> specifies.

I use nightly builds since I need some new features. This problem did not exist 
in build 20130918, but it does in current builds (tested on 20131107).

To reproduce (on windows, but the same procedure works on linux)

1. Create a working directory (I used D:\Temp\fop)

2. Take the attached config file (fop.xconf), and place it in the working 
directory. It contains: "<font-base>.</font-base>" so it should look for fonts 
in the directory where the config file is located.

3. Download takao fonts from https://launchpad.net/takao-fonts/
   Extract TakaoPGothic.ttf into the working directory.
   Alternatively, use any other ttf font (just change config file).

4. Download fop-20131107 nightly, and extract it to the working directory

5. Take the attached FO file (in.fo) and place it another directory (i used 
D:\Temp\input) - it's important it's not located directly in the working 
directory.

6. Open console, chdir to the working directory and run:
    fop-20131107\fop -c fop.xconf -fo D:\temp\input\in.fo -pdf out.pdf

Expected:
Conversion works

Actual:
Conversion breaks with error: java.io.FileNotFoundException: 
D:\temp\input\takao-pgothic.ttf (The system cannot find the file specified)
Full stack in attached file error.txt.

For some reason it's looking for fonts in the directory where the FO file is 
located.

If you run the same scenario with v1.1 or an older nightly, this error does not 
happen.


  was:
When converting FO to PDF, FOP looks for fonts in the directory where the input 
FO file is located, not where <font-base> specifies.

I use nightly builds since I need some new features. This problem did not exist 
in build 20130918, but it does in current builds (tested on 20131107).

To reproduce (on windows, but the same procedure works on linux)

1. Create a working directory (I used D:\Temp\fop)

2. Take the attached config file (fop.xconf), and place it in the working 
directory. It contains: "<font-base>.</font-base>" so it should look for fonts 
in the directory where the config file is located.

3. Download takao fonts from https://launchpad.net/takao-fonts/
   Extract TakaoPGothic.ttf into D:\Temp\fop.
   Or use any other ttf font (just change config file).

4. Download fop-20131107 nightly, and extract it to the working directory

5. Take the attached FO file (in.fo) and place it another directory (i used 
D:\Temp\input) - it's important it's not located directly in the working 
directory.

6. Open console, chdir to the working directory and run:
    fop-20131107\fop -c fop.xconf -fo D:\temp\input\in.fo -pdf out.pdf

Expected:
Conversion works

Actual:
Conversion breaks with error: java.io.FileNotFoundException: 
D:\temp\input\takao-pgothic.ttf (The system cannot find the file specified)
Full stack in attached file error.txt.

For some reason it's looking for fonts in the directory where the FO file is 
located.

If you run the same scenario with v1.1 or an older nightly, this error does not 
happen.



> font-base configuration setting not working as expected
> -------------------------------------------------------
>
>                 Key: FOP-2312
>                 URL: https://issues.apache.org/jira/browse/FOP-2312
>             Project: Fop
>          Issue Type: Bug
>    Affects Versions: trunk
>         Environment: Tested on Windows, Linux
>            Reporter: Ivan Habunek
>         Attachments: error.txt, fop.xconf, in.fo
>
>
> When converting FO to PDF, FOP looks for fonts in the directory where the 
> input FO file is located, not where <font-base> specifies.
> I use nightly builds since I need some new features. This problem did not 
> exist in build 20130918, but it does in current builds (tested on 20131107).
> To reproduce (on windows, but the same procedure works on linux)
> 1. Create a working directory (I used D:\Temp\fop)
> 2. Take the attached config file (fop.xconf), and place it in the working 
> directory. It contains: "<font-base>.</font-base>" so it should look for 
> fonts in the directory where the config file is located.
> 3. Download takao fonts from https://launchpad.net/takao-fonts/
>    Extract TakaoPGothic.ttf into the working directory.
>    Alternatively, use any other ttf font (just change config file).
> 4. Download fop-20131107 nightly, and extract it to the working directory
> 5. Take the attached FO file (in.fo) and place it another directory (i used 
> D:\Temp\input) - it's important it's not located directly in the working 
> directory.
> 6. Open console, chdir to the working directory and run:
>     fop-20131107\fop -c fop.xconf -fo D:\temp\input\in.fo -pdf out.pdf
> Expected:
> Conversion works
> Actual:
> Conversion breaks with error: java.io.FileNotFoundException: 
> D:\temp\input\takao-pgothic.ttf (The system cannot find the file specified)
> Full stack in attached file error.txt.
> For some reason it's looking for fonts in the directory where the FO file is 
> located.
> If you run the same scenario with v1.1 or an older nightly, this error does 
> not happen.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to