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 David Morales <da...@mundivia.net> on 2007/01/18 13:14:37 UTC

Fonts & AWT

Hi...

Can anybody tell me how can i change fonts in fop-awt preview?? i mean, 
if i create a pdf with fop i can configure fonts, but when i do the same 
operation in awt fonts aren't the same...

Does Fonts used in fop-awt are system/jdk fonts?? are they fop 
user-config's file fonts??

I've tried to set system properties to different values but it doesn't 
change....


Thanks in advance and sorry for my english

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


Re: Fonts & AWT

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Through java.awt.Font.createFont(int fontFormat, InputStream fontStream),
you can load custom TrueType fonts (and, since JDK 1.5, Type 1 fonts).
I'm sure this could somehow be integrated into FOP. You'd probably have
to cache the initial Font instances in render.java2d.FontSetup.
Furthermore, you'd have to adjust Java2DFontMetrics so you can derive
other Font instances from the initial ones in FontSetup. Patches welcome.

On 18.01.2007 17:04:37 David Morales wrote:
> Hi Adrian,
> 
> And there isn't a programmatic way to achieve this....???
> 
> I'va tried to set "sun.java2d.fontpath" system property... and also 
> copying mt fonts to $jdk/jre/lib/fonts...
> 
> What about org.apache.fop.render.java2d.FontSetup class???? can i extend 
> this funcionality or anyother to add fonts??
> 
> Thanks.
> 
> 
> 
> Adrian Cumiskey escribió:
> > Hi David,
> >
> > This looks to be reasonably helpful on the subject :-
> >
> > http://java.sun.com/j2se/1.3/docs/guide/intl/addingfonts.html.
> >
> > Basically you just need to install the missing fonts on your operating 
> > system.  If this doesn't work you might have to try tweaking your 
> > fonts.properties file that sits in the jre/lib folder of your java 
> > installation.
> >
> > Adrian.
> >
> > David Morales wrote:
> >> Sorry... i had problems in other apache mailing lists...
> >>
> >> And then... can't i set my own fonts when using awt?? i mean, awt-fop 
> >> stablishes fonts?, or awt-java?
> >>
> >> Thanks again.
> >>
> >>
> >> Chris Bowditch escribió:
> >>> David Morales wrote:
> >>>
> >>>>
> >>>> Hi...
> >>>>
> >>>> Can anybody tell me how can i change fonts in fop-awt preview?? i 
> >>>> mean, if i create a pdf with fop i can configure fonts, but when i 
> >>>> do the same operation in awt fonts aren't the same...
> >>>
> >>> Why do you keep posting the same question. I already answered you here:
> >>>
> >>> http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e 
> >>>
> >>>
> >>> If that doesn't help you then please re-phrase the question.
> >>>
> >>> Thanks,
> >>>
> >>> Chris



Jeremias Maerki


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


Re: Fonts & AWT

Posted by Daniel Noll <da...@nuix.com>.
Adrian Cumiskey wrote:
> Hi David,
> 
> The current implementation of just makes use of java fonts that have 
> been made available from the O/S via a call to 
> GraphicsEnvironment.getLocalGraphicsEnvironment(), it does not call upon 
> and make use of the fonts defined in the fop configuration (as the PDF 
> renderer does).

And also, even when the font exists in both the FOP configuration and 
the local graphics environment, the output will be subtly different due 
to differences in how the metrics are calculated (we've been trying to 
find a workaround for this issue because we need the PDF and the TIFF 
outputs to contain the same content.)

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: Fonts & AWT

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi David,

The current implementation of just makes use of java fonts that have 
been made available from the O/S via a call to 
GraphicsEnvironment.getLocalGraphicsEnvironment(), it does not call upon 
and make use of the fonts defined in the fop configuration (as the PDF 
renderer does).

Getting this to work would not be a small task (not something easily 
extendable).  Its best to log or raise a bug/feature request for this 
feature at http://xmlgraphics.apache.org/fop/bugs.html.

Adrian.

David Morales wrote:
> Hi Adrian,
> 
> And there isn't a programmatic way to achieve this....???
> 
> I'va tried to set "sun.java2d.fontpath" system property... and also 
> copying mt fonts to $jdk/jre/lib/fonts...
> 
> What about org.apache.fop.render.java2d.FontSetup class???? can i extend 
> this funcionality or anyother to add fonts??
> 
> Thanks.
> 
> 
> 
> Adrian Cumiskey escribió:
>> Hi David,
>>
>> This looks to be reasonably helpful on the subject :-
>>
>> http://java.sun.com/j2se/1.3/docs/guide/intl/addingfonts.html.
>>
>> Basically you just need to install the missing fonts on your operating 
>> system.  If this doesn't work you might have to try tweaking your 
>> fonts.properties file that sits in the jre/lib folder of your java 
>> installation.
>>
>> Adrian.
>>
>> David Morales wrote:
>>> Sorry... i had problems in other apache mailing lists...
>>>
>>> And then... can't i set my own fonts when using awt?? i mean, awt-fop 
>>> stablishes fonts?, or awt-java?
>>>
>>> Thanks again.
>>>
>>>
>>> Chris Bowditch escribió:
>>>> David Morales wrote:
>>>>
>>>>>
>>>>> Hi...
>>>>>
>>>>> Can anybody tell me how can i change fonts in fop-awt preview?? i 
>>>>> mean, if i create a pdf with fop i can configure fonts, but when i 
>>>>> do the same operation in awt fonts aren't the same...
>>>>
>>>> Why do you keep posting the same question. I already answered you here:
>>>>
>>>> http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e 
>>>>
>>>>
>>>> If that doesn't help you then please re-phrase the question.
>>>>
>>>> Thanks,
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 


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


Re: Fonts & AWT

Posted by David Morales <da...@mundivia.net>.
Hi Adrian,

And there isn't a programmatic way to achieve this....???

I'va tried to set "sun.java2d.fontpath" system property... and also 
copying mt fonts to $jdk/jre/lib/fonts...

What about org.apache.fop.render.java2d.FontSetup class???? can i extend 
this funcionality or anyother to add fonts??

Thanks.



Adrian Cumiskey escribió:
> Hi David,
>
> This looks to be reasonably helpful on the subject :-
>
> http://java.sun.com/j2se/1.3/docs/guide/intl/addingfonts.html.
>
> Basically you just need to install the missing fonts on your operating 
> system.  If this doesn't work you might have to try tweaking your 
> fonts.properties file that sits in the jre/lib folder of your java 
> installation.
>
> Adrian.
>
> David Morales wrote:
>> Sorry... i had problems in other apache mailing lists...
>>
>> And then... can't i set my own fonts when using awt?? i mean, awt-fop 
>> stablishes fonts?, or awt-java?
>>
>> Thanks again.
>>
>>
>> Chris Bowditch escribió:
>>> David Morales wrote:
>>>
>>>>
>>>> Hi...
>>>>
>>>> Can anybody tell me how can i change fonts in fop-awt preview?? i 
>>>> mean, if i create a pdf with fop i can configure fonts, but when i 
>>>> do the same operation in awt fonts aren't the same...
>>>
>>> Why do you keep posting the same question. I already answered you here:
>>>
>>> http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e 
>>>
>>>
>>> If that doesn't help you then please re-phrase the question.
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: Fonts & AWT

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi David,

This looks to be reasonably helpful on the subject :-

http://java.sun.com/j2se/1.3/docs/guide/intl/addingfonts.html.

Basically you just need to install the missing fonts on your operating 
system.  If this doesn't work you might have to try tweaking your 
fonts.properties file that sits in the jre/lib folder of your java 
installation.

Adrian.

David Morales wrote:
> Sorry... i had problems in other apache mailing lists...
> 
> And then... can't i set my own fonts when using awt?? i mean, awt-fop 
> stablishes fonts?, or awt-java?
> 
> Thanks again.
> 
> 
> Chris Bowditch escribió:
>> David Morales wrote:
>>
>>>
>>> Hi...
>>>
>>> Can anybody tell me how can i change fonts in fop-awt preview?? i 
>>> mean, if i create a pdf with fop i can configure fonts, but when i do 
>>> the same operation in awt fonts aren't the same...
>>
>> Why do you keep posting the same question. I already answered you here:
>>
>> http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e 
>>
>>
>> If that doesn't help you then please re-phrase the question.
>>
>> Thanks,
>>
>> Chris
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 


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


Re: Fonts & AWT

Posted by David Morales <da...@mundivia.net>.
Sorry... i had problems in other apache mailing lists...

And then... can't i set my own fonts when using awt?? i mean, awt-fop 
stablishes fonts?, or awt-java?

Thanks again.


Chris Bowditch escribió:
> David Morales wrote:
>
>>
>> Hi...
>>
>> Can anybody tell me how can i change fonts in fop-awt preview?? i 
>> mean, if i create a pdf with fop i can configure fonts, but when i do 
>> the same operation in awt fonts aren't the same...
>
> Why do you keep posting the same question. I already answered you here:
>
> http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e 
>
>
> If that doesn't help you then please re-phrase the question.
>
> Thanks,
>
> Chris
>
>
>
>
> ---------------------------------------------------------------------
> 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: Fonts & AWT

Posted by Chris Bowditch <bo...@hotmail.com>.
David Morales wrote:

> 
> Hi...
> 
> Can anybody tell me how can i change fonts in fop-awt preview?? i mean, 
> if i create a pdf with fop i can configure fonts, but when i do the same 
> operation in awt fonts aren't the same...

Why do you keep posting the same question. I already answered you here:

http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200701.mbox/%3cBAY117-DAV83AF1E3BA4F537E736325FBAA0@phx.gbl%3e

If that doesn't help you then please re-phrase the question.

Thanks,

Chris




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