You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Thomas Zastrow <li...@thomas-zastrow.de> on 2007/04/14 17:41:48 UTC

Problem with custom fonts

Hi there,

I try to use another TTF font with the FOP. As described here:
http://xmlgraphics.apache.org/fop/0.93/fonts.html, I build the metric
file which seems to have worked without problems (LinLibertine.xml).
Now, I added the following to the font-section of conf/fop.xconf:

<font metrics-url="LinLibertine.xml" kerning="yes"
embed-url="LinLibertineU-Re-2.2.5.ttf">
          <font-triplet name="LinLibertine" style="normal"
weight="normal"/>         
</font>

The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
root-directory of the FOP (version 0.93). The base-tag in the
config-file is untouched, it is still   <base>.</base>

But when trying to use the font LinLibertine, I got the error:

14.04.2007 17:36:15 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNUNG: Font 'LinLibertine,normal,400' not found. Substituting with
'any,normal,400'.
Process ended with exit code: 0

I think, I have to put the fonts somewhere else?

Thanks!

Tom


-- 
----------------------------
http://www.thomas-zastrow.de

German Forum - DTP under Linux:

http://www.opendtp.de
----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Apr 14, 2007, at 23:12, Thomas Zastrow wrote:

> Andreas L Delmelle wrote:
>> In any case, now that you mention it, it does seem to lean towards  
>> bad
>> practice to use a relative url as base-url for anything... :/
<snip />

>
> I solved the "problem": I used absolute paths, which is - in my  
> oppinion
> - just a workaround :-)

Note that I don't mean that hardcoding absolute urls in (inherently  
relocatable) config files is such a good idea, but the fact alone  
that it made you ask the question what the "." points to seems to  
demonstrate that it is not in the interest of clarity to do so. :-)


Cheers,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Thomas Zastrow <li...@thomas-zastrow.de>.
Andreas L Delmelle wrote:
> On Apr 14, 2007, at 20:55, Thomas Zastrow wrote:
>
>> Andreas L Delmelle wrote:
>>> On Apr 14, 2007, at 17:41, Thomas Zastrow wrote:
>>>
>>>> <snip />
>>>> The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
>>>> root-directory of the FOP (version 0.93). The base-tag in the
>>>> config-file is untouched, it is still   <base>.</base>
>>>
>>> Keep in mind that they are influenced by <font-base>. I /think/ both
>>> of them. At least, I hope so... :/
>>>
>> OK, I added <font-base>.</font-base> to the fop.xconf. But the result is
>> the same ... btw., I'm not sure which directory is meant with "."?
>
> Errm, if I'm correct then the "." is to be interpreted as relative to
> the source document...
> In any case, now that you mention it, it does seem to lean towards bad
> practice to use a relative url as base-url for anything... :/
>
>> Is it the conf-directory? Or the root-directory? I copied both the
>> metric xml
>> file and the ttf-file also to conf, but FOP still can't find them.
>>
>> Is conf/fop.xconf read by default or have I to specify it as
>> config-file?
>
> You have to specify it. The fop.xconf file contains the settings that
> are used by FOP if no config file is specified, but the file itself is
> not used unless you tell FOP to use it. If you leave it unchanged, and
> start FOP with "-c conf/fop.xconf", then the result is the same as if
> no config file has been used.
>
Andreas, again, thank you :-)

I solved the "problem": I used absolute paths, which is - in my oppinion
- just a workaround :-)

But now it works. Take a look at the "Using LinuxLibertine with the
Apache FOP" on my examples page:

http://www.thomas-zastrow.de/st/examples.php

Best,

Tom



-- 
----------------------------
http://www.thomas-zastrow.de

German Forum - DTP under Linux:

http://www.opendtp.de
----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: File sizes under Win and Linux

Posted by Manuel Strehl <ma...@physik.uni-regensburg.de>.
Ok, updating JRE to 1.6 fixes that. Files are now identical. Thanks!

Manuel


Jeremias Maerki schrieb:
> Ok, I see. It's the color profile again. FOP seems to have embedded the
> overly big Sun sRGB color profile. This is weird since I've added code
> that should explicitely use the much smaller profile that comes with FOP
> (as happens in your Linux case). At least on my Windows machines, this
> works perfectly. What I see, however, is that you use an ancient JRE on
> Windows. Can you please check if the same problem appears with the
> latest JRE 1.5 or 6?
>
> On 03.05.2007 21:26:03 Manuel Strehl wrote:
>   
>> I can't figure out, where the problem lies. I append a very simple FO 
>> file to this mail. These settings are made:
>>
>> * FOP 0.93
>> * JRE 1.5.0_01 (Win), JRE 1.5.0_07 (Lin)
>> * Win XP, Linux Deb Sarge
>> * No config file used, hence no special fonts embedded
>> * No internal fancy stuff like inline SVG and so on
>>
>> Results: I uploaded them to my webspace:
>>
>> * <http://www.manuel-strehl.de/fop/testcase4-win.pdf> (filesize 105 kB)
>> * <http://www.manuel-strehl.de/fop/testcase4-lin.pdf> (filesize 5 kB)
>>
>> differing in filesize by 2100% ;-) Opening them in Acrobat gives the 
>> exactly same result, including embedded fonts (only Helvetica).
>>
>> You'll find a ready made diff file there as well:
>>
>> * <http://www.manuel-strehl.de/fop/testcase.diff> (filesize 108 kB)
>>
>> but since some stuff is binary, the file looks rather weird.
>>
>> Best regards
>> Manuel
>>
>> PS: The FO file I used to produce above files:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>
>>     <fo:layout-master-set>
>>         <fo:simple-page-master
>>                     margin-top="0cm" margin-bottom="0cm"
>>                     margin-left="0cm" margin-right="0cm"
>>                     page-width="21cm" page-height="29.7cm"
>>                     master-name="A4">
>>             <fo:region-body
>>                     margin-bottom="0cm" margin-top="0cm"/>
>>         </fo:simple-page-master>
>>     </fo:layout-master-set>
>>    
>>     <fo:page-sequence master-reference="A4">
>>        
>>         <fo:title>Testcase file sizes</fo:title>
>>
>>         <fo:flow flow-name="xsl-region-body">
>>            
>>             <fo:block margin-top="14.1mm" font-size="4.9mm" 
>> letter-spacing="1.6" text-align="center">
>>                 F<fo:inline font-size="80%">ile</fo:inline> S<fo:inline 
>> font-size="80%">izes</fo:inline>
>>             </fo:block>
>>            
>>             <fo:block-container position="absolute" top="56mm" left="41mm"
>>                                                     >
>>                 <fo:block-container position="absolute" top="0mm">
>>                     <fo:block>1</fo:block>
>>                 </fo:block-container>
>>                 <fo:block-container position="absolute" top="58mm">
>>                     <fo:block>2</fo:block>
>>                 </fo:block-container>
>>                 <fo:block-container position="absolute" top="121mm">
>>                     <fo:block>3</fo:block>
>>                 </fo:block-container>
>>                 <fo:block-container position="absolute" top="173mm">
>>                     <fo:block>4</fo:block>
>>                 </fo:block-container>
>>             </fo:block-container>
>>            
>>         </fo:flow>
>>
>>     </fo:page-sequence>
>>
>> </fo:root>
>>
>>
>> Jeremias Maerki schrieb:
>>     
>>> How about doing a diff between the two PDFs to get an idea what's going
>>> on?
>>>
>>> I wouldn't normally expect any size difference between platforms for a
>>> PDF file if all the variables concerning FOP (especially the
>>> configuration) are the same.
>>>
>>> On 25.04.2007 08:53:57 Manuel Strehl wrote:
>>>   
>>>       
>>>> Hi.
>>>>
>>>> Just a point I noticed last night: Has someone experienced, too, that
>>>> PDF file sizes with Fop 0.93 under *Windows* are approx. 70% larger than
>>>> the ones of FOP 0.93 under *Linux*? It's in both cases the same JRE version.
>>>>
>>>> Was this just a quaint FO file I had, or is this a general result? Btw:
>>>> I had inline SVG (in both cases handled by Batik 1.6), two PNGs and 3
>>>> TTF fonts to be embedded. Could the SVG be the reason?
>>>>
>>>> Best
>>>> Manuel
>>>>     
>>>>         
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: File sizes under Win and Linux

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Ok, I see. It's the color profile again. FOP seems to have embedded the
overly big Sun sRGB color profile. This is weird since I've added code
that should explicitely use the much smaller profile that comes with FOP
(as happens in your Linux case). At least on my Windows machines, this
works perfectly. What I see, however, is that you use an ancient JRE on
Windows. Can you please check if the same problem appears with the
latest JRE 1.5 or 6?

On 03.05.2007 21:26:03 Manuel Strehl wrote:
> I can't figure out, where the problem lies. I append a very simple FO 
> file to this mail. These settings are made:
> 
> * FOP 0.93
> * JRE 1.5.0_01 (Win), JRE 1.5.0_07 (Lin)
> * Win XP, Linux Deb Sarge
> * No config file used, hence no special fonts embedded
> * No internal fancy stuff like inline SVG and so on
> 
> Results: I uploaded them to my webspace:
> 
> * <http://www.manuel-strehl.de/fop/testcase4-win.pdf> (filesize 105 kB)
> * <http://www.manuel-strehl.de/fop/testcase4-lin.pdf> (filesize 5 kB)
> 
> differing in filesize by 2100% ;-) Opening them in Acrobat gives the 
> exactly same result, including embedded fonts (only Helvetica).
> 
> You'll find a ready made diff file there as well:
> 
> * <http://www.manuel-strehl.de/fop/testcase.diff> (filesize 108 kB)
> 
> but since some stuff is binary, the file looks rather weird.
> 
> Best regards
> Manuel
> 
> PS: The FO file I used to produce above files:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> 
>     <fo:layout-master-set>
>         <fo:simple-page-master
>                     margin-top="0cm" margin-bottom="0cm"
>                     margin-left="0cm" margin-right="0cm"
>                     page-width="21cm" page-height="29.7cm"
>                     master-name="A4">
>             <fo:region-body
>                     margin-bottom="0cm" margin-top="0cm"/>
>         </fo:simple-page-master>
>     </fo:layout-master-set>
>    
>     <fo:page-sequence master-reference="A4">
>        
>         <fo:title>Testcase file sizes</fo:title>
> 
>         <fo:flow flow-name="xsl-region-body">
>            
>             <fo:block margin-top="14.1mm" font-size="4.9mm" 
> letter-spacing="1.6" text-align="center">
>                 F<fo:inline font-size="80%">ile</fo:inline> S<fo:inline 
> font-size="80%">izes</fo:inline>
>             </fo:block>
>            
>             <fo:block-container position="absolute" top="56mm" left="41mm"
>                                                     >
>                 <fo:block-container position="absolute" top="0mm">
>                     <fo:block>1</fo:block>
>                 </fo:block-container>
>                 <fo:block-container position="absolute" top="58mm">
>                     <fo:block>2</fo:block>
>                 </fo:block-container>
>                 <fo:block-container position="absolute" top="121mm">
>                     <fo:block>3</fo:block>
>                 </fo:block-container>
>                 <fo:block-container position="absolute" top="173mm">
>                     <fo:block>4</fo:block>
>                 </fo:block-container>
>             </fo:block-container>
>            
>         </fo:flow>
> 
>     </fo:page-sequence>
> 
> </fo:root>
> 
> 
> Jeremias Maerki schrieb:
> > How about doing a diff between the two PDFs to get an idea what's going
> > on?
> >
> > I wouldn't normally expect any size difference between platforms for a
> > PDF file if all the variables concerning FOP (especially the
> > configuration) are the same.
> >
> > On 25.04.2007 08:53:57 Manuel Strehl wrote:
> >   
> >> Hi.
> >>
> >> Just a point I noticed last night: Has someone experienced, too, that
> >> PDF file sizes with Fop 0.93 under *Windows* are approx. 70% larger than
> >> the ones of FOP 0.93 under *Linux*? It's in both cases the same JRE version.
> >>
> >> Was this just a quaint FO file I had, or is this a general result? Btw:
> >> I had inline SVG (in both cases handled by Batik 1.6), two PNGs and 3
> >> TTF fonts to be embedded. Could the SVG be the reason?
> >>
> >> Best
> >> Manuel
> >>     


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: File sizes under Win and Linux

Posted by Manuel Strehl <ma...@stud.uni-regensburg.de>.
I can't figure out, where the problem lies. I append a very simple FO 
file to this mail. These settings are made:

* FOP 0.93
* JRE 1.5.0_01 (Win), JRE 1.5.0_07 (Lin)
* Win XP, Linux Deb Sarge
* No config file used, hence no special fonts embedded
* No internal fancy stuff like inline SVG and so on

Results: I uploaded them to my webspace:

* <http://www.manuel-strehl.de/fop/testcase4-win.pdf> (filesize 105 kB)
* <http://www.manuel-strehl.de/fop/testcase4-lin.pdf> (filesize 5 kB)

differing in filesize by 2100% ;-) Opening them in Acrobat gives the 
exactly same result, including embedded fonts (only Helvetica).

You'll find a ready made diff file there as well:

* <http://www.manuel-strehl.de/fop/testcase.diff> (filesize 108 kB)

but since some stuff is binary, the file looks rather weird.

Best regards
Manuel

PS: The FO file I used to produce above files:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <fo:layout-master-set>
        <fo:simple-page-master
                    margin-top="0cm" margin-bottom="0cm"
                    margin-left="0cm" margin-right="0cm"
                    page-width="21cm" page-height="29.7cm"
                    master-name="A4">
            <fo:region-body
                    margin-bottom="0cm" margin-top="0cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
   
    <fo:page-sequence master-reference="A4">
       
        <fo:title>Testcase file sizes</fo:title>

        <fo:flow flow-name="xsl-region-body">
           
            <fo:block margin-top="14.1mm" font-size="4.9mm" 
letter-spacing="1.6" text-align="center">
                F<fo:inline font-size="80%">ile</fo:inline> S<fo:inline 
font-size="80%">izes</fo:inline>
            </fo:block>
           
            <fo:block-container position="absolute" top="56mm" left="41mm"
                                                    >
                <fo:block-container position="absolute" top="0mm">
                    <fo:block>1</fo:block>
                </fo:block-container>
                <fo:block-container position="absolute" top="58mm">
                    <fo:block>2</fo:block>
                </fo:block-container>
                <fo:block-container position="absolute" top="121mm">
                    <fo:block>3</fo:block>
                </fo:block-container>
                <fo:block-container position="absolute" top="173mm">
                    <fo:block>4</fo:block>
                </fo:block-container>
            </fo:block-container>
           
        </fo:flow>

    </fo:page-sequence>

</fo:root>


Jeremias Maerki schrieb:
> How about doing a diff between the two PDFs to get an idea what's going
> on?
>
> I wouldn't normally expect any size difference between platforms for a
> PDF file if all the variables concerning FOP (especially the
> configuration) are the same.
>
> On 25.04.2007 08:53:57 Manuel Strehl wrote:
>   
>> Hi.
>>
>> Just a point I noticed last night: Has someone experienced, too, that
>> PDF file sizes with Fop 0.93 under *Windows* are approx. 70% larger than
>> the ones of FOP 0.93 under *Linux*? It's in both cases the same JRE version.
>>
>> Was this just a quaint FO file I had, or is this a general result? Btw:
>> I had inline SVG (in both cases handled by Batik 1.6), two PNGs and 3
>> TTF fonts to be embedded. Could the SVG be the reason?
>>
>> Best
>> Manuel
>>     
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: File sizes under Win and Linux

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
How about doing a diff between the two PDFs to get an idea what's going
on?

I wouldn't normally expect any size difference between platforms for a
PDF file if all the variables concerning FOP (especially the
configuration) are the same.

On 25.04.2007 08:53:57 Manuel Strehl wrote:
> Hi.
> 
> Just a point I noticed last night: Has someone experienced, too, that
> PDF file sizes with Fop 0.93 under *Windows* are approx. 70% larger than
> the ones of FOP 0.93 under *Linux*? It's in both cases the same JRE version.
> 
> Was this just a quaint FO file I had, or is this a general result? Btw:
> I had inline SVG (in both cases handled by Batik 1.6), two PNGs and 3
> TTF fonts to be embedded. Could the SVG be the reason?
> 
> Best
> Manuel


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


File sizes under Win and Linux

Posted by Manuel Strehl <ma...@stud.uni-regensburg.de>.
Hi.

Just a point I noticed last night: Has someone experienced, too, that
PDF file sizes with Fop 0.93 under *Windows* are approx. 70% larger than
the ones of FOP 0.93 under *Linux*? It's in both cases the same JRE version.

Was this just a quaint FO file I had, or is this a general result? Btw:
I had inline SVG (in both cases handled by Batik 1.6), two PNGs and 3
TTF fonts to be embedded. Could the SVG be the reason?

Best
Manuel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Daniel Noll <da...@nuix.com>.
Chris Bowditch wrote:
>> I thought the command was basically the same for all fonts, except 
>> where .ttc collections were involved.  I was (and still am) 
>> considering writing some magic code which autocreates the metrics when 
>> a new font is discovered.
> 
> No need ;) such code already exists in FOP trunk.

Convenient I guess, assuming you never need to use AWT.  No more writing 
lines and lines of font config. :-)

> The patch for autodetection of Fonts is only for PDF and PS Renderers. 
> The AWT Renderer gets its Fonts from the JDK which in turn gets its 
> fonts from the Operating System. The difference in font metrics between 
> AWT and PS/PDF exists regardless of the new auto font detection patch.

That's a shame.

I wonder if there is some way to grab the autogenerating metrics from 
the PDF code, and somehow push it into the AWT metrics.

At the moment my hack is sitting in the FontMetricsMapper constructor, 
and it overrides the metrics for only the fonts which I've hard-coded. 
It would be much better if I could just delegate to the PDF metrics 
loader for a given font name.  It may even make the code good enough to 
go into trunk, whereas right now it's very much a hack. :-(

Daniel


-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Chris Bowditch <bo...@hotmail.com>.
Daniel Noll wrote:
> Thomas Zastrow wrote:
> 
>> I agree. I didn't thought of bundling FOP directly with the fonts.
>> Instead, they could be put on another webpage and the user can download
>> them optional. It was just an  idea, as it was some labour to build the
>> metrics for my preferred fonts ;-)
> 
> 
> I thought the command was basically the same for all fonts, except where 
> .ttc collections were involved.  I was (and still am) considering 
> writing some magic code which autocreates the metrics when a new font is 
> discovered.

No need ;) such code already exists in FOP trunk.

> 
>>> We better try to discover the fonts installed on the system and
>>> automatically configure them. Good news, Adrian Cumiskey recently
>>> submitted a patch which does exactly that. Review and application 
>>> pending...
>>
>>
>> Huh, that would be the perfect solution ;-)
> 
> 
> Only if it results in consistent metrics between PDF and AWT renderers. 
> Otherwise we'll just be bypassing all that convenience to make things 
> render right. :-/

The patch for autodetection of Fonts is only for PDF and PS Renderers. 
The AWT Renderer gets its Fonts from the JDK which in turn gets its 
fonts from the Operating System. The difference in font metrics between 
AWT and PS/PDF exists regardless of the new auto font detection patch.

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Daniel Noll <da...@nuix.com>.
Thomas Zastrow wrote:
> I agree. I didn't thought of bundling FOP directly with the fonts.
> Instead, they could be put on another webpage and the user can download
> them optional. It was just an  idea, as it was some labour to build the
> metrics for my preferred fonts ;-)

I thought the command was basically the same for all fonts, except where 
.ttc collections were involved.  I was (and still am) considering 
writing some magic code which autocreates the metrics when a new font is 
discovered.

>> We better try to discover the fonts installed on the system and
>> automatically configure them. Good news, Adrian Cumiskey recently
>> submitted a patch which does exactly that. Review and application pending...
>
> Huh, that would be the perfect solution ;-)

Only if it results in consistent metrics between PDF and AWT renderers. 
Otherwise we'll just be bypassing all that convenience to make things 
render right. :-/

Daniel

-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Thomas Zastrow <li...@thomas-zastrow.de>.
Vincent Hennebert wrote:
> Hi Thomas,
>
> Thomas Zastrow a écrit :
> <snip/>
>   
>> Sorry for that, but I'm not realy satisfied with the fonts which are
>> implemented in the FOP, so I converted some of my most beloved free /
>> OpenSource fonts. When the license of the font allows it, it would be
>> nice to have something like an additional font pack wich could be simply
>> downloaded and integrated into FOP. What do you think about this idea?
>>     
>
> Hmmm, FOP does not really /implement/ any fonts. That's not the wording
> I would use anyway.
> For PDF and PS output, FOP uses the default base 14 PDF fonts (the
> well-known Times, Helvetica, Courier plus Symbol and ZapfDingbats).
> Those are the fonts that are guaranteed to be found on any system, so
> which may be usable everywhere without any configuration. I perfectly
> understand that you don't like those fonts because (1) they are missing
> many (non-western) glyphs; (2) they are seen everywhere so we get tired
> of them. But they work...
> For AWT output FOP relies on the Java font system which to a certain
> extent may use fonts installed on the system.
>
> It's difficult to find fonts distributable with FOP. Many open-source
> fonts have a license incompatible with the Apache license. And even if
> that were possible that would not really make sense, users generally
> just want to use the fonts they have on their systems.
>   

I agree. I didn't thought of bundling FOP directly with the fonts.
Instead, they could be put on another webpage and the user can download
them optional. It was just an  idea, as it was some labour to build the
metrics for my preferred fonts ;-)

> We better try to discover the fonts installed on the system and
> automatically configure them. Good news, Adrian Cumiskey recently
> submitted a patch which does exactly that. Review and application pending...
>
>
>   
Huh, that would be the perfect solution ;-)

Best,

Tom



-- 
----------------------------
http://www.thomas-zastrow.de

German Forum - DTP under Linux:

http://www.opendtp.de
----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Thomas,

Thomas Zastrow a écrit :
<snip/>
> Sorry for that, but I'm not realy satisfied with the fonts which are
> implemented in the FOP, so I converted some of my most beloved free /
> OpenSource fonts. When the license of the font allows it, it would be
> nice to have something like an additional font pack wich could be simply
> downloaded and integrated into FOP. What do you think about this idea?

Hmmm, FOP does not really /implement/ any fonts. That's not the wording
I would use anyway.
For PDF and PS output, FOP uses the default base 14 PDF fonts (the
well-known Times, Helvetica, Courier plus Symbol and ZapfDingbats).
Those are the fonts that are guaranteed to be found on any system, so
which may be usable everywhere without any configuration. I perfectly
understand that you don't like those fonts because (1) they are missing
many (non-western) glyphs; (2) they are seen everywhere so we get tired
of them. But they work...
For AWT output FOP relies on the Java font system which to a certain
extent may use fonts installed on the system.

It's difficult to find fonts distributable with FOP. Many open-source
fonts have a license incompatible with the Apache license. And even if
that were possible that would not really make sense, users generally
just want to use the fonts they have on their systems.

We better try to discover the fonts installed on the system and
automatically configure them. Good news, Adrian Cumiskey recently
submitted a patch which does exactly that. Review and application pending...

Cheers,
Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Thomas Zastrow <li...@thomas-zastrow.de>.
Vincent Hennebert wrote:

<snip />
>
>   
>>> OK, I added <font-base>.</font-base> to the fop.xconf. But the result is
>>> the same ... btw., I'm not sure which directory is meant with "."?
>>>       
>> Errm, if I'm correct then the "." is to be interpreted as relative to
>> the source document...
>>     
>
> Actually it corresponds to the working directory i.e., the directory
> from which you launch the command.
> Which is totally counter-intuitive... According to the URI
> specification, relative URIs inside the fop.xconf file should be
> resolved against the URI of the config file itself, which sounds pretty
> logical.
> This needs to be improved, but meanwhile the workaround is to use
> absolute URIs, as you did.
>   
I agree: for example, I got the FOP somwhere in /opt and symbolic links
from /usr/local/bin to it, my fonts are again in other locations
somewhere in the filesystem :-) - so, this is a little bit confusing and
a little bit complicated to write a good tutorial for adding fonts.

Sorry for that, but I'm not realy satisfied with the fonts which are
implemented in the FOP, so I converted some of my most beloved free /
OpenSource fonts. When the license of the font allows it, it would be
nice to have something like an additional font pack wich could be simply
downloaded and integrated into FOP. What do you think about this idea?

Best,

Tom


-- 
----------------------------
http://www.thomas-zastrow.de

German Forum - DTP under Linux:

http://www.opendtp.de
----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

Andreas L Delmelle a écrit :
> On Apr 14, 2007, at 20:55, Thomas Zastrow wrote:
> 
>> Andreas L Delmelle wrote:
>>> On Apr 14, 2007, at 17:41, Thomas Zastrow wrote:
>>>
>>>> <snip />
>>>> The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
>>>> root-directory of the FOP (version 0.93). The base-tag in the
>>>> config-file is untouched, it is still   <base>.</base>
>>>
>>> Keep in mind that they are influenced by <font-base>. I /think/ both
>>> of them. At least, I hope so... :/

If <font-base> isn't specified, <base> is used. Otherwise it overrides
the value of <base>.


>> OK, I added <font-base>.</font-base> to the fop.xconf. But the result is
>> the same ... btw., I'm not sure which directory is meant with "."?
> 
> Errm, if I'm correct then the "." is to be interpreted as relative to
> the source document...

Actually it corresponds to the working directory i.e., the directory
from which you launch the command.
Which is totally counter-intuitive... According to the URI
specification, relative URIs inside the fop.xconf file should be
resolved against the URI of the config file itself, which sounds pretty
logical.
This needs to be improved, but meanwhile the workaround is to use
absolute URIs, as you did.

<snip/>

HTH,
Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Apr 14, 2007, at 20:55, Thomas Zastrow wrote:

> Andreas L Delmelle wrote:
>> On Apr 14, 2007, at 17:41, Thomas Zastrow wrote:
>>
>>> <snip />
>>> The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
>>> root-directory of the FOP (version 0.93). The base-tag in the
>>> config-file is untouched, it is still   <base>.</base>
>>
>> Keep in mind that they are influenced by <font-base>. I /think/ both
>> of them. At least, I hope so... :/
>>
> OK, I added <font-base>.</font-base> to the fop.xconf. But the  
> result is
> the same ... btw., I'm not sure which directory is meant with "."?

Errm, if I'm correct then the "." is to be interpreted as relative to  
the source document...
In any case, now that you mention it, it does seem to lean towards  
bad practice to use a relative url as base-url for anything... :/

> Is it the conf-directory? Or the root-directory? I copied both the  
> metric xml
> file and the ttf-file also to conf, but FOP still can't find them.
>
> Is conf/fop.xconf read by default or have I to specify it as config- 
> file?

You have to specify it. The fop.xconf file contains the settings that  
are used by FOP if no config file is specified, but the file itself  
is not used unless you tell FOP to use it. If you leave it unchanged,  
and start FOP with "-c conf/fop.xconf", then the result is the same  
as if no config file has been used.

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Thomas Zastrow <li...@thomas-zastrow.de>.
Andreas L Delmelle wrote:
> On Apr 14, 2007, at 17:41, Thomas Zastrow wrote:
>
>> <snip />
>> The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
>> root-directory of the FOP (version 0.93). The base-tag in the
>> config-file is untouched, it is still   <base>.</base>
>
> Keep in mind that they are influenced by <font-base>. I /think/ both
> of them. At least, I hope so... :/
>
OK, I added <font-base>.</font-base> to the fop.xconf. But the result is
the same ... btw., I'm not sure which directory is meant with "."? Is it
the conf-directory? Or the root-directory? I copied both the metric xml
file and the ttf-file also to conf, but FOP still can't find them.

Is conf/fop.xconf read by default or have I to specify it as config-file?

Best,

Tom



-- 
----------------------------
http://www.thomas-zastrow.de

German Forum - DTP under Linux:

http://www.opendtp.de
----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with custom fonts

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Apr 14, 2007, at 17:41, Thomas Zastrow wrote:

> <snip />
> The files LinLibertine.xml and LinLibertineU-Re-2.2.5.ttf are in the
> root-directory of the FOP (version 0.93). The base-tag in the
> config-file is untouched, it is still   <base>.</base>

Keep in mind that they are influenced by <font-base>. I /think/ both  
of them. At least, I hope so... :/


Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org