Font names...

2006-09-17 Thread Luis Ferro

The test is simple...

Prepare a font (tested with TTF fonts) for importing, one that has some
"attributes" like "light".

Make a document which uses that font and produce a PDF.

Edit the PDF with acrobat pro.

What will happen is that the name the font has isn't the same name as the
embed font.

The render will work ok, but the edit will mean a "warning" of font to
become "unembed". That isn't a problem, except that as the font name is
wrong (the font name listed in the pdf doesn't match the font name in the
TTF file, what will happen is that acrobat can't find it and allow the
"reembed" of it).

If needed will post files that exemplify this effect (i'm not sure if this
is a FOP problem yet - will do more tests next week).

Cheers,
LF
-- 
View this message in context: 
http://www.nabble.com/Font-names...-tf2287650.html#a6354261
Sent from the FOP - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-18 Thread Luis Ferro



Luis Ferro wrote:
> 
> The test is simple...
> 

Not that simple i'm afraid... i think i'm in a goose chase here regarding
font names... The font that is in use by FOP (thru the config options)
either gets a diferent name in windows or isn't recognized by it (even thru
it's a ttf font, albeit can be in a format that windows can't use).

So, naturally all tries to edit the document in Acrobat are doomed to fail.

Cheers,
LF

-- 
View this message in context: 
http://www.nabble.com/Font-names...-tf2287650.html#a6360276
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-18 Thread Jeremias Maerki
I assume the problem comes from FOP's embedding only a subset of the
TrueType font in the PDF. In that case we cannot use the original font
name because we don't embed the full font. If you have to be able to
edit the PDF you'd need to embed the full font in which case we could
use the original name. FOP currently doesn't support that, though.

On 17.09.2006 22:51:41 Luis Ferro wrote:
> 
> The test is simple...
> 
> Prepare a font (tested with TTF fonts) for importing, one that has some
> "attributes" like "light".
> 
> Make a document which uses that font and produce a PDF.
> 
> Edit the PDF with acrobat pro.
> 
> What will happen is that the name the font has isn't the same name as the
> embed font.
> 
> The render will work ok, but the edit will mean a "warning" of font to
> become "unembed". That isn't a problem, except that as the font name is
> wrong (the font name listed in the pdf doesn't match the font name in the
> TTF file, what will happen is that acrobat can't find it and allow the
> "reembed" of it).
> 
> If needed will post files that exemplify this effect (i'm not sure if this
> is a FOP problem yet - will do more tests next week).



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-18 Thread Luis Ferro

One of the things that appeared from the properties of the document is the
"actual" font values.

The config i used is:

  


And i created the font metrics with the following class call (a short fused
version based on the fop.bat):

org.apache.fop.fonts.apps.TTFReader -enc ansi %FOP_CMD_LINE_ARGS%

With those parameters, i assume that the "full" font is embedded... as it is
looselly refered in the import font documentation of fop...

The actual font parameters aren't setup in the PDF. Mayhappen with the
addition of those "actual" font file, pointing the url file, the PDF could
be editable...

Just a tought...

Cheers,
LF





Jeremias Maerki-2 wrote:
> 
> I assume the problem comes from FOP's embedding only a subset of the
> TrueType font in the PDF. In that case we cannot use the original font
> name because we don't embed the full font. If you have to be able to
> edit the PDF you'd need to embed the full font in which case we could
> use the original name. FOP currently doesn't support that, though.
> 
> On 17.09.2006 22:51:41 Luis Ferro wrote:
>> 
>> The test is simple...
>> 
>> Prepare a font (tested with TTF fonts) for importing, one that has some
>> "attributes" like "light".
>> 
>> Make a document which uses that font and produce a PDF.
>> 
>> Edit the PDF with acrobat pro.
>> 
>> What will happen is that the name the font has isn't the same name as the
>> embed font.
>> 
>> The render will work ok, but the edit will mean a "warning" of font to
>> become "unembed". That isn't a problem, except that as the font name is
>> wrong (the font name listed in the pdf doesn't match the font name in the
>> TTF file, what will happen is that acrobat can't find it and allow the
>> "reembed" of it).
>> 
>> If needed will post files that exemplify this effect (i'm not sure if
>> this
>> is a FOP problem yet - will do more tests next week).
> 
> 
> 
> Jeremias Maerki
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Font-names...-tf2287650.html#a6361198
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-18 Thread Luis Ferro


Jeremias Maerki-2 wrote:
> 
> In that case we cannot use the original font
> name because we don't embed the full font.

2 questions then...

a) What happens if with a partial embed font it's used the same name as the
original font name?

b) What happens if with a full embed font (with use of -ansi when building
the metrics) it's used the same name as the original font name?

The questions have some significance, because the PDF file that resulted
from fop was edited with Acrobat pro 6 (which "unembeds" the font and allows
the edit to continue, showing a warning regarding this) and when it was
tryed to export to ps, acrobat just refused to work because the font's didnt
match (there was a diference between the names like "Arial,light" in the
PDF, when the true font name is "Arial-light").

This little diference had no side-effects on the PDF, but forfeited the use
of the PDF for anything. The PDF restarted to work well after we grabed a
font editor and changed in the internal properties of the font the "-" for a
",".

Mayhappen the reasons for changing the font names when working with
full/partial embed fonts aren't relevant anymore...

Would like to take the oportunity to suggest that a switch like "-fullembed"
(or something like that) be used instead of the "-ansi", as a
"clarification" of what the switch do.

Cheers,
LF

P.S.- get rid of the font metrics would just be perfect. Also perfect would
be to note in the config file how one wants the font to be placed on the pdf
(partial embed, full embed or reference only).

-- 
View this message in context: 
http://www.nabble.com/Font-names...-tf2287650.html#a6365457
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-19 Thread Jeremias Maerki
Yes, this way the whole font is embedded but you only have access to the
WinAnsi subset of characters.

On 18.09.2006 12:28:40 Luis Ferro wrote:
> 
> One of the things that appeared from the properties of the document is the
> "actual" font values.
> 
> The config i used is:
>  kerning="yes" 
>   embed-url="D:\sites\mapaterapeutico\fonts\SWZ721l.TTF">
>   
> 
> 
> And i created the font metrics with the following class call (a short fused
> version based on the fop.bat):
> 
> org.apache.fop.fonts.apps.TTFReader -enc ansi %FOP_CMD_LINE_ARGS%
> 
> With those parameters, i assume that the "full" font is embedded... as it is
> looselly refered in the import font documentation of fop...
> 
> The actual font parameters aren't setup in the PDF. Mayhappen with the
> addition of those "actual" font file, pointing the url file, the PDF could
> be editable...
> 
> Just a tought...
> 
> Cheers,
> LF
> 
> 
> 
> 
> 
> Jeremias Maerki-2 wrote:
> > 
> > I assume the problem comes from FOP's embedding only a subset of the
> > TrueType font in the PDF. In that case we cannot use the original font
> > name because we don't embed the full font. If you have to be able to
> > edit the PDF you'd need to embed the full font in which case we could
> > use the original name. FOP currently doesn't support that, though.
> > 
> > On 17.09.2006 22:51:41 Luis Ferro wrote:
> >> 
> >> The test is simple...
> >> 
> >> Prepare a font (tested with TTF fonts) for importing, one that has some
> >> "attributes" like "light".
> >> 
> >> Make a document which uses that font and produce a PDF.
> >> 
> >> Edit the PDF with acrobat pro.
> >> 
> >> What will happen is that the name the font has isn't the same name as the
> >> embed font.
> >> 
> >> The render will work ok, but the edit will mean a "warning" of font to
> >> become "unembed". That isn't a problem, except that as the font name is
> >> wrong (the font name listed in the pdf doesn't match the font name in the
> >> TTF file, what will happen is that acrobat can't find it and allow the
> >> "reembed" of it).
> >> 
> >> If needed will post files that exemplify this effect (i'm not sure if
> >> this
> >> is a FOP problem yet - will do more tests next week).


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-19 Thread Jeremias Maerki

On 18.09.2006 17:05:09 Luis Ferro wrote:
> 
> 
> Jeremias Maerki-2 wrote:
> > 
> > In that case we cannot use the original font
> > name because we don't embed the full font.
> 
> 2 questions then...
> 
> a) What happens if with a partial embed font it's used the same name as the
> original font name?

I don't know. We're just following the PDF specification:
"For a font subset, the PostScript name of the font—the value of the
font’s BaseFont entry and the font descriptor’s FontName entry—begins
with a tag followed by a plus sign (+). The tag consists of exactly six
uppercase letters; the choice of letters is arbitrary, but different
subsets in the same PDF file must have different tags. For example,
EOODIA+Poetica is the name of a subset of Poetica®, a Type 1 font."

> b) What happens if with a full embed font (with use of -ansi when building
> the metrics) it's used the same name as the original font name?
> 
> The questions have some significance, because the PDF file that resulted
> from fop was edited with Acrobat pro 6 (which "unembeds" the font and allows
> the edit to continue, showing a warning regarding this) and when it was
> tryed to export to ps, acrobat just refused to work because the font's didnt
> match (there was a diference between the names like "Arial,light" in the
> PDF, when the true font name is "Arial-light").
> 
> This little diference had no side-effects on the PDF, but forfeited the use
> of the PDF for anything. The PDF restarted to work well after we grabed a
> font editor and changed in the internal properties of the font the "-" for a
> ",".

Well, it could be that FOP does something wrong here. We'd have to
investigate that closely. Not sure when I'd have time for this. Do you
have time?

> Mayhappen the reasons for changing the font names when working with
> full/partial embed fonts aren't relevant anymore...
> 
> Would like to take the oportunity to suggest that a switch like "-fullembed"
> (or something like that) be used instead of the "-ansi", as a
> "clarification" of what the switch do.

Suggestion noted but someone actually has to implement it. Not sure who
that will be.

> Cheers,
> LF
> 
> P.S.- get rid of the font metrics would just be perfect. Also perfect would
> be to note in the config file how one wants the font to be placed on the pdf
> (partial embed, full embed or reference only).

That's in the works. Date? Unknown. Chances rising in the near future. I
have some insider info about someone who'll have more time to work on
FOP (not me). ;-)


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-20 Thread Vincent Hennebert

>> Mayhappen the reasons for changing the font names when working with
>> full/partial embed fonts aren't relevant anymore...
>>
>> Would like to take the oportunity to suggest that a switch like "-fullembed"
>> (or something like that) be used instead of the "-ansi", as a
>> "clarification" of what the switch do.
> 
> Suggestion noted but someone actually has to implement it. Not sure who
> that will be.

This issue will soon disappear. The current font library will be
replaced with another one (FOrayFont), which handles that completely
differently.


>> P.S.- get rid of the font metrics would just be perfect. Also perfect would

There will also be no intermediate XML file anymore, the font file will
be directly used.


>> be to note in the config file how one wants the font to be placed on the pdf
>> (partial embed, full embed or reference only).

This possibility will be available.


> That's in the works. Date? Unknown. Chances rising in the near future. I
> have some insider info about someone who'll have more time to work on
> FOP (not me). ;-)

Mmmh, I wonder who you're talking about??
Ok, this won't appear in the next release (Fop 0.93) because this is to
big of a change. Probably the release after.

Luis, would you mind summarizing your problems in a Bugzilla entry? So
that we can more easily track them, and ensure they will actually be
corrected in the new font library. Thanks!

Vincent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-20 Thread Luis Ferro


Vincent Hennebert-3 wrote:
> 
> Luis, would you mind summarizing your problems in a Bugzilla entry? So
> that we can more easily track them, and ensure they will actually be
> corrected in the new font library. Thanks!
> 

Will do...

I think it's about time i create a bugzilla login in FOP as it seams that i
will be working more and more with it ;)

And gratz on all the feedback from you all...

Cheers,
LF

-- 
View this message in context: 
http://www.nabble.com/Font-names...-tf2287650.html#a6404011
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Font names...

2006-09-20 Thread Karl Roberts
Hi Vincent,

>> This issue will soon disappear. The current font library will be
replaced with another one (FOrayFont), which
>> handles that completely differently.

Do you know how soon the FOrayFont stuff will be in the trunk? I'm
waiting on it to fix the Bug where you can't copy and paste characters
from the PDF document.

I presume there'll be a big splash when it happens so we'll all know how
to configure it?

Cheers

Karl Roberts

NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font names...

2006-09-21 Thread Vincent Hennebert
Hi Karl,


Karl Roberts a écrit :
> Hi Vincent,
> 
>>> This issue will soon disappear. The current font library will be
> replaced with another one (FOrayFont), which
>>> handles that completely differently.
> 
> Do you know how soon the FOrayFont stuff will be in the trunk? I'm

Well, if everything goes right it should be there by the end of this
year.


> waiting on it to fix the Bug where you can't copy and paste characters
> from the PDF document.

Actually this does not depend on the integration of FOrayFont. There is
another developer (Bertrand Delacrétaz) who will work on this in the
next days so the fix should be available soon.


> I presume there'll be a big splash when it happens so we'll all know how
> to configure it?

Copy&paste support won't be configurable. It will simply be available
;-) As for the configuration of fonts, sure, we will try to provide the
necessary documentation.

Vincent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Font names...

2006-09-21 Thread Karl Roberts
Thanks Vincent,

As always it's a pleasure to use FOP, knowing that the developers are so active 
at squashing bugs and implementing new features. One of the benefits of 
OpenSource I suppose.

Keep up the good work!

Cheers

Karl

PS, I've just seen Bertrand Delacrétaz' commits in the source. I'll give it a 
few days then try it out ! :-)

-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 21 September 2006 5:22 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Font names...

Hi Karl,


Karl Roberts a écrit :
> Hi Vincent,
> 
>>> This issue will soon disappear. The current font library will be
> replaced with another one (FOrayFont), which
>>> handles that completely differently.
> 
> Do you know how soon the FOrayFont stuff will be in the trunk? I'm

Well, if everything goes right it should be there by the end of this year.


> waiting on it to fix the Bug where you can't copy and paste characters 
> from the PDF document.

Actually this does not depend on the integration of FOrayFont. There is another 
developer (Bertrand Delacrétaz) who will work on this in the next days so the 
fix should be available soon.


> I presume there'll be a big splash when it happens so we'll all know 
> how to configure it?

Copy&paste support won't be configurable. It will simply be available
;-) As for the configuration of fonts, sure, we will try to provide the 
necessary documentation.

Vincent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Determine font names to use

2011-05-11 Thread Theresa Jayne Forster
I am slowly getting through this minefield, 

 

For the AutoReg fonts, how do we determine the names to use in the XML

I have been trying the following and am getting annoying and conflicting
results.

 

The text in the xsl is 



This is supposed to be in Frutiger Normal to test the auto-detect fonts



 

Error is 

2011-05-11 09:01:21,837 [main] WARN  org.apache.fop.apps.FOUserAgent - Font
"FrutigerNormal,normal,400" not found. Substituting with "any,normal,400".

 

Next change.

 

Text in the xsl is changed to 



This is supposed to be in Frutiger Normal to test the auto-detect
fonts

 

FOP works fine, 

 

Adobe responds however with a large bullet on the page and the popup "Cannot
find or create the font 'FrutigerLight'. Some Characters may not display or
print correctly.

 

FOP log shows 

2011-05-11 09:04:11,918 [main] WARN  org.apache.fop.apps.FOUserAgent - Font
"Frutiger,normal,400" not found. Substituting with Frutiger,normal,200".

 

 

Ok lets try it one more time.

 

This is supposed to be in Frutiger Normal to test the auto-detect fonts


 

Popup the same, 

 

Log the same 

2011-05-11 09:07:31,919 [main] WARN  org.apache.fop.apps.FOUserAgent - Font
"Frutiger,normal,400" not found. Substituting with "Frutiger,normal,200".

 

Ok that's strange its not accepting the font-weight param anymore (the old
version of Fop worked fine.)

 

Change the XSL to font-weight="200" and there is no error in the FOP logs
but still the same error on the PDF.

 

So, how do we use these fonts and how do you find the names needed to use
them properly ?

 

The fopconfig.xml is as follows.

 





C:/Runtime/Fonts







 

Kindest regards

 


Theresa Forster

Senior Software Developer

  ther...@inbrand.co.uk
  www.inbrand.co.uk

Tel: 01483 266500

 



 

IMPORTANT NOTE: This transmission has been sent by or on behalf of In Brand
Software Ltd. The information in this transmission is for the intended
addressee only and is confidential to that intended addressee. If either you
know or you ought reasonably to conclude that you are not, or may not be,
the intended addressee, you are hereby given notice that any unauthorised
dissemination or copying of this transmission and any disclosure or use of
the information
transmitted is strictly prohibited and may be illegal. In such circumstances
we ask for your assistance in notifying us immediately by e-mail, telephone
or letter.

InBrand Software Ltd Registered in England No. 5131004 Registered Office:
The Old Barn, Ewhurst Road, Cranleigh GU6 7EF 

 

<>

Re: Determine font names to use

2011-05-11 Thread Pascal Sancho
Hi Theresa,

perhaps this link can help you:
http://xmlgraphics.apache.org/fop/1.0/fonts.html#font-list


Le 11/05/2011 10:16, Theresa Jayne Forster a écrit :
> I am slowly getting through this minefield,
> 
>  
> 
> For the AutoReg fonts, how do we determine the names to use in the XML
> 
> I have been trying the following and am getting annoying and conflicting
> results.
> 
>  
> 
> The text in the xsl is
> 
>  font-style="normal" font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect fonts
> 
> 
> 
>  
> 
> Error is
> 
> 2011-05-11 09:01:21,837 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "FrutigerNormal,normal,400" not found. Substituting with
> "any,normal,400".
> 
>  
> 
> Next change.
> 
>  
> 
> Text in the xsl is changed to
> 
>  font-style="normal" font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect
> fonts
> 
>  
> 
> FOP works fine,
> 
>  
> 
> Adobe responds however with a large bullet on the page and the popup
> “Cannot find or create the font ‘FrutigerLight’. Some Characters may not
> display or print correctly.
> 
>  
> 
> FOP log shows
> 
> 2011-05-11 09:04:11,918 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "Frutiger,normal,400" not found. Substituting with
> Frutiger,normal,200".
> 
>  
> 
>  
> 
> Ok lets try it one more time…
> 
>  font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect fonts 
> 
> 
>  
> 
> Popup the same,
> 
>  
> 
> Log the same
> 
> 2011-05-11 09:07:31,919 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "Frutiger,normal,400" not found. Substituting with
> "Frutiger,normal,200".
> 
>  
> 
> Ok that’s strange its not accepting the font-weight param anymore (the
> old version of Fop worked fine.)
> 
>  
> 
> Change the XSL to font-weight=”200” and there is no error in the FOP
> logs but still the same error on the PDF.
> 
>  
> 
> So, how do we use these fonts and how do you find the names needed to
> use them properly ?
> 
>  
> 
> The fopconfig.xml is as follows.
> 
>  
> 
> 
> 
> 
> 
>  recursive="true">C:/Runtime/Fonts
> 
> 
> 
> 
> 
> 
> 
>  
> 
> Kindest regards
> 
>  
> 
> 
> Theresa Forster

-- 
Pascal

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



RE: Determine font names to use

2011-05-11 Thread Theresa Jayne Forster
Thanks for the information but I am using FOP as an api within a tomcat app so 
while it may help as a standalone thing, I was hoping to be able to get the 
actual names programmatically so that I could generate a list in the app of 
installed fonts on the JS editor.

Theresa

-Original Message-
From: Pascal Sancho [mailto:pascal.san...@takoma.fr] 
Sent: 11 May 2011 09:37
To: fop-users@xmlgraphics.apache.org
Subject: Re: Determine font names to use

Hi Theresa,

perhaps this link can help you:
http://xmlgraphics.apache.org/fop/1.0/fonts.html#font-list


Le 11/05/2011 10:16, Theresa Jayne Forster a écrit :
> I am slowly getting through this minefield,
> 
>  
> 
> For the AutoReg fonts, how do we determine the names to use in the XML
> 
> I have been trying the following and am getting annoying and conflicting
> results.
> 
>  
> 
> The text in the xsl is
> 
>  font-style="normal" font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect fonts
> 
> 
> 
>  
> 
> Error is
> 
> 2011-05-11 09:01:21,837 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "FrutigerNormal,normal,400" not found. Substituting with
> "any,normal,400".
> 
>  
> 
> Next change.
> 
>  
> 
> Text in the xsl is changed to
> 
>  font-style="normal" font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect
> fonts
> 
>  
> 
> FOP works fine,
> 
>  
> 
> Adobe responds however with a large bullet on the page and the popup
> “Cannot find or create the font ‘FrutigerLight’. Some Characters may not
> display or print correctly.
> 
>  
> 
> FOP log shows
> 
> 2011-05-11 09:04:11,918 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "Frutiger,normal,400" not found. Substituting with
> Frutiger,normal,200".
> 
>  
> 
>  
> 
> Ok lets try it one more time…
> 
>  font-size="15pt" text-align="left">
> 
> This is supposed to be in Frutiger Normal to test the auto-detect fonts 
> 
> 
>  
> 
> Popup the same,
> 
>  
> 
> Log the same
> 
> 2011-05-11 09:07:31,919 [main] WARN  org.apache.fop.apps.FOUserAgent -
> Font "Frutiger,normal,400" not found. Substituting with
> "Frutiger,normal,200".
> 
>  
> 
> Ok that’s strange its not accepting the font-weight param anymore (the
> old version of Fop worked fine.)
> 
>  
> 
> Change the XSL to font-weight=”200” and there is no error in the FOP
> logs but still the same error on the PDF.
> 
>  
> 
> So, how do we use these fonts and how do you find the names needed to
> use them properly ?
> 
>  
> 
> The fopconfig.xml is as follows.
> 
>  
> 
> 
> 
> 
> 
>  recursive="true">C:/Runtime/Fonts
> 
> 
> 
> 
> 
> 
> 
>  
> 
> Kindest regards
> 
>  
> 
> 
> Theresa Forster

-- 
Pascal

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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3628 - Release Date: 05/10/11



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



Getting a list of font names without the memory hit...

2013-07-30 Thread Bernard Giannetti
Hi,
I'm making a call to org.apache.fop.tools.fontlist.FontListGenerator.listFonts( 
... ) to get a list of font names for my desktop application.  To get the font 
names, I take the keys from the returned fontFamilies SortedMap; the actual 
data is junked.
I hadn't realised just how much memory is used by listfont( ... ) - on some 
platforms such as Windows 7, in excess of 250 MB.  In this case I'm hitting out 
of memory errors.
I was wondering if there's a simpler way (uses less memory) to get just the 
font names (first family names)?  As I said, I don't make use of the metrics 
and other font details...just the first family name for each font.  Digging 
down into  listfont( ... ), I was wondering if it's safe to take the 
firstFamilyName and place it into a list say and then drop the following lines 
for the containers/sort?
Iterator iter = fontInfo.getFontTriplets().entrySet().iterator();while 
(iter.hasNext()) {Map.Entry entry = (Map.Entry)iter.next();FontTriplet 
triplet = (FontTriplet)entry.getKey();String key = 
(String)entry.getValue();FontSpec container;if (keyBag.contains(key)) { 
   keyBag.remove(key);
FontMetrics metrics = (FontMetrics)fonts.get(key);
container = new FontSpec(key, metrics);
container.addFamilyNames(metrics.getFamilyNames());keys.put(key, 
container);String firstFamilyName = 
(String)container.getFamilyNames().first();List containers = 
(List)fontFamilies.get(firstFamilyName);if (containers == null) {   
 containers = new java.util.ArrayList();
fontFamilies.put(firstFamilyName, containers);}
containers.add(container);Collections.sort(containers);} else { 
   container = (FontSpec)keys.get(key);}container.addTriplet(triplet);}
I'm guessing a lot of memory is chewed up in the containers/sort section...but 
really I can't be sure as I don't fully follow what's going on!
Ideally I'd just up the amount of memory supplied to the desktop application, 
but I don't have that option and besides, it just delays the problem of running 
out of memory.

Thanks in advance,Bernard.

Getting a list of font names without the memory hit...‏

2013-07-30 Thread Bernard Giannetti
(apologies for the double post...somehow my email got tagged to the end of an 
unrelated post)

Hi,
I'm making a call to org.apache.fop.tools.fontlist.FontListGenerator.listFonts( 
... ) to get a list of font names for my desktop application.  To get the font 
names, I take the keys from the returned fontFamilies SortedMap; the actual 
data is junked.I hadn't realised just how much memory is used by listfont( ... 
) - on some platforms such as Windows 7, in excess of 250 MB.  In this case I'm 
hitting out of memory errors.
I was wondering if there's a simpler way (uses less memory) to get just the 
font names (first family names)?  As I said, I don't make use of the metrics 
and other font details...just the first family name for each font.  Digging 
down into  listfont( ... ), I was wondering if it's safe to take the 
firstFamilyName and place it into a list say and then drop the following lines 
for the containers/sort?Iterator iter = 
fontInfo.getFontTriplets().entrySet().iterator();while (iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();FontTriplet triplet = 
(FontTriplet)entry.getKey();String key = (String)entry.getValue();
FontSpec container;if (keyBag.contains(key)) {keyBag.remove(key);   
 FontMetrics metrics = (FontMetrics)fonts.get(key);container = new 
FontSpec(key, metrics);
container.addFamilyNames(metrics.getFamilyNames());keys.put(key, 
container);String firstFamilyName = 
(String)container.getFamilyNames().first();List containers = 
(List)fontFamilies.get(firstFamilyName);if (containers == null) {   
 containers = new java.util.ArrayList();
fontFamilies.put(firstFamilyName, containers);}
containers.add(container);Collections.sort(containers);} else { 
   container = (FontSpec)keys.get(key);}
container.addTriplet(triplet);}I'm guessing a lot of memory is chewed up in the 
containers/sort section...but really I can't be sure as I don't fully follow 
what's going on!Ideally I'd just up the amount of memory supplied to the 
desktop application, but I don't have that option and besides, it just delays 
the problem of running out of memory.
Thanks in advance,Bernard.

Re: Getting a list of font names without the memory hit...‏

2013-07-30 Thread Luis Bernardo
Are you using FOP in your Desktop app (meaning you feed and FO file and 
output one of the supported formats) or you just want to use some 
classes to get the list of fonts in your system?


On 7/30/13 5:42 PM, Bernard Giannetti wrote:
(apologies for the double post...somehow my email got tagged to the 
end of an unrelated post)



Hi,

I'm making a call to 
org.apache.fop.tools.fontlist.FontListGenerator.listFonts( ... ) to 
get a list of font names for my desktop application. To get the font 
names, I take the keys from the returned fontFamilies SortedMap; the 
actual data is junked.


I hadn't realised just how much memory is used by listfont( ... ) - on 
some platforms such as Windows 7, in excess of 250 MB.  In this case 
I'm hitting out of memory errors.


I was wondering if there's a simpler way (uses less memory) to get 
just the font names (first family names)?  As I said, I don't make use 
of the metrics and other font details...just the first family name for 
each font. Digging down into listfont( ... ), I was wondering if it's 
safe to take the firstFamilyName and place it into a list say and then 
drop the following lines for the containers/sort?


Iterator iter = fontInfo.getFontTriplets().entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();
FontTriplet triplet = (FontTriplet)entry.getKey();
String key = (String)entry.getValue();
FontSpec container;
if (keyBag.contains(key)) {
keyBag.remove(key);

FontMetrics metrics = (FontMetrics)fonts.get(key);

container = new FontSpec(key, metrics);
container.addFamilyNames(metrics.getFamilyNames());
keys.put(key, container);
String firstFamilyName = (String)container.getFamilyNames().first();
List containers = (List)fontFamilies.get(firstFamilyName);
if (containers == null) {
containers = new java.util.ArrayList();
fontFamilies.put(firstFamilyName, containers);
}
containers.add(container);
Collections.sort(containers);
} else {
container = (FontSpec)keys.get(key);
}
container.addTriplet(triplet);
}

I'm guessing a lot of memory is chewed up in the containers/sort 
section...but really I can't be sure as I don't fully follow what's 
going on!


Ideally I'd just up the amount of memory supplied to the desktop 
application, but I don't have that option and besides, it just delays 
the problem of running out of memory.



Thanks in advance,

Bernard.




RE: Getting a list of font names without the memory hit...‏

2013-07-30 Thread Bernard Giannetti
I'm using FOP inside my desktop app.  I use FOP to combine .xml data files and 
.xsl template files into PDFs.  I wanted to give the user the choice of font to 
use for the PDF text and so I am calling FOP code to get that list of fonts.

Date: Tue, 30 Jul 2013 21:41:10 -0500
From: lmpmberna...@gmail.com
To: fop-users@xmlgraphics.apache.org
Subject: Re: Getting a list of font names without the memory hit...‏


  

  
  
Are you using FOP in your Desktop app
  (meaning you feed and FO file and output one of the supported
  formats) or you just want to use some classes to get the list of
  fonts in your system?

  

  On 7/30/13 5:42 PM, Bernard Giannetti wrote:



  
  
(apologies for the double post...somehow
my email got tagged to the end of an unrelated post)


  

  


  Hi,


  

  I'm making a call to 
org.apache.fop.tools.fontlist.FontListGenerator.listFonts(
  ... ) to get a list of font names
  for my desktop application.  To get the font names, I take the 
keys from the
  returned fontFamilies
  SortedMap; the actual data is
  junked.
  
  
  I hadn't
realised just how much memory is used by listfont(
... ) - on some platforms such as Windows 7, in
excess of 250 MB.  In this case I'm hitting out of
memory errors.
  

  
  I was
wondering if there's a simpler way (uses less memory) to
    get just the font names (first family names)?  As I
said, I don't make use of the metrics and other font
details...just the first family name for each font.  Digging 
down into  listfont(
... ), I was wondering if it's safe to take the firstFamilyName 
and place it
  into a list say and then drop the following lines for the 
containers/sort?
  

  
Iterator iter =
fontInfo.getFontTriplets().entrySet().iterator();
while (iter.hasNext()) {
 
Map.Entry
  entry = (Map.Entry)iter.next();
 
FontTriplet
  triplet = (FontTriplet)entry.getKey();
 
String
  key = (String)entry.getValue();
 
FontSpec
  container;
 
if
  (keyBag.contains(key)) {
 
   
  keyBag.remove(key);

  
 
   
  FontMetrics metrics = (FontMetrics)fonts.get(key);

  
 
container = new FontSpec(key,
  metrics);
 
container.addFamilyNames(metrics.getFamilyNames());
 
keys.put(key, container);
 
String firstFamilyName =
  (String)container.getFamilyNames().first();
 
List containers =
  (List)fontFamilies.get(firstFamilyName);
 
if (containers == null) {
 
 
containers = new
  java.util.ArrayList();
 
 
fontFamilies.put(firstFamilyName,
  containers);
 
}
 
containers.add(container);
 
Collections.sort(containers);
 
} else {
 
container =
  (FontSpec)keys.get(key);
 
}
 
container.addTriplet(triplet);
}
  
  

  I'm guessing a lot
  of memory is chewed up in the containers/sort
  section...but really I can't be sure as I don't fully
  follow what's going on!
  

  Ideally I'd just up
  the amount of memory supplied to the desktop application,
  but I don't have that option and besides, it just delays
  the problem of running out of memory.
  

  

  
  
Thanks in advance,

  
Bernard.
  

  


  

RE: Getting a list of font names without the memory hit...‏

2013-07-31 Thread Bonekrusher
Why don't you just read the config file which list all the available fonts?



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Getting-a-list-of-font-names-without-the-memory-hit-tp38952p38958.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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



RE: Getting a list of font names without the memory hit...‏

2013-07-31 Thread Bernard Giannetti
I've done some more digging/testing and noticed that when I get the fonts 
map... 
FontInfo fontInfo = new FontInfo();configurator.setupFontInfo( documentHandler, 
fontInfo );Map fonts = fontInfo.getFonts();
(the above essentially comes straight out of listfonts() and its subcalls)
the fontInfo.getFonts() was returning a Collections.unmodifiableMap(this.fonts) 
which I initially thought was the memory hog.  Well it sort of is, but it is 
not the main culprit.
Noticing that this.fonts is private, I used reflection to access the this.fonts 
directly (so no copy took place) and still the memory was excessive 
(essentially little difference to what I've initially seen).
On digging deeper, the big memory hit is happening within 
configurator.setupFontInfo( documentHandler, fontInfo );.
Let me back up and ask a couple of sanity questions...first, to reiterate: my 
desktop Java application allows a user to create PDF reports (from XML and XSL) 
by making direct Java calls to FOP (that is, I do NOT invoke FOP from the 
command line).
1) I want the user to be able to choose the name of a font for a given report.  
Should I be getting the font names by calling FontListGenerator.listFonts()?
2) I noticed in the guts of configurator.setupFontInfo(),  there is a font 
cache file which is written.  Is it possible to get the fonts names from this 
file instead?
In short, I am not fussed on how I get the font names so long as the memory 
doesn't go through the roof!


From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 13:17:32 +1000




I'm using FOP inside my desktop app.  I use FOP to combine .xml data files and 
.xsl template files into PDFs.  I wanted to give the user the choice of font to 
use for the PDF text and so I am calling FOP code to get that list of fonts.

Date: Tue, 30 Jul 2013 21:41:10 -0500
From: lmpmberna...@gmail.com
To: fop-users@xmlgraphics.apache.org
Subject: Re: Getting a list of font names without the memory hit...‏


  

  
  
Are you using FOP in your Desktop app
  (meaning you feed and FO file and output one of the supported
  formats) or you just want to use some classes to get the list of
  fonts in your system?

  

  On 7/30/13 5:42 PM, Bernard Giannetti wrote:



  
  
(apologies for the double post...somehow
my email got tagged to the end of an unrelated post)


  

  


  Hi,


  

  I'm making a call to 
org.apache.fop.tools.fontlist.FontListGenerator.listFonts(
  ... ) to get a list of font names
  for my desktop application.  To get the font names, I take the 
keys from the
  returned fontFamilies
  SortedMap; the actual data is
  junked.
  
  
  I hadn't
realised just how much memory is used by listfont(
... ) - on some platforms such as Windows 7, in
excess of 250 MB.  In this case I'm hitting out of
memory errors.
  

  
  I was
wondering if there's a simpler way (uses less memory) to
get just the font names (first family names)?  As I
said, I don't make use of the metrics and other font
details...just the first family name for each font.  Digging 
down into  listfont(
... ), I was wondering if it's safe to take the firstFamilyName 
and place it
  into a list say and then drop the following lines for the 
containers/sort?
  

  
Iterator iter =
fontInfo.getFontTriplets().entrySet().iterator();
while (iter.hasNext()) {
 
Map.Entry
  entry = (Map.Entry)iter.next();
 
FontTriplet
  triplet = (FontTriplet)entry.getKey();
 
String
  key = (String)entry.getValue();
 
FontSpec
  container;
 
if
  (keyBag.contains(key)) {
 
   
  keyBag.remove(key);

  
 
   
  FontMetrics metrics = (FontMetrics)fonts.get(key);

  
 
container = new FontSpec(key,
  metrics);
 
container.addFamilyNames(metrics.getFamilyNames());
 
keys.put(key, container);
 
String firstFamilyName =

RE: Getting a list of font names without the memory hit...‏

2013-07-31 Thread Bernard Giannetti
The config file or the cache file?
My config file has no fonts listed for PDF:
  flate  



> Date: Wed, 31 Jul 2013 04:26:33 -0700
> From: djs...@yahoo.com
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Getting a list of font names without the memory hit...‏
> 
> Why don't you just read the config file which list all the available fonts?

  

RE: Getting a list of font names without the memory hit...‏

2013-07-31 Thread Bernard Giannetti
I'm reading org.apache.fop.fonts.FontCache now...red-faced and fingers crossed!



From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 21:29:59 +1000




The config file or the cache file?
My config file has no fonts listed for PDF:
  flate  



> Date: Wed, 31 Jul 2013 04:26:33 -0700
> From: djs...@yahoo.com
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Getting a list of font names without the memory hit...‏
> 
> Why don't you just read the config file which list all the available fonts?


  

RE: Getting a list of font names without the memory hit...‏

2013-07-31 Thread Bernard Giannetti
Now I'm chasing my tail...looking at FontCache has gotten me back to 
FontInfo.getFonts()!
Any other ideas please?!

From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 21:33:14 +1000




I'm reading org.apache.fop.fonts.FontCache now...red-faced and fingers crossed!



From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 21:29:59 +1000




The config file or the cache file?
My config file has no fonts listed for PDF:
  flate  



> Date: Wed, 31 Jul 2013 04:26:33 -0700
> From: djs...@yahoo.com
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Getting a list of font names without the memory hit...‏
> 
> Why don't you just read the config file which list all the available fonts?


  

Re: Getting a list of font names without the memory hit...‏

2013-08-01 Thread Chris Bowditch
The auto-detect feature creates the font cache, to save time on 
sunsequent calls to FOP, you can disable the cache using the setting: 
false in your fop.xconf.


I suspect the reason for the high memory consumption is your use of 
auto-detect feature. Though I've not replicated the issue. If your 
intention  is to allow the user to pick any font installed on the 
Operating System, why not use the java.awt classes to list the available 
fonts instead? I've not tried it but I suspect it will use less memory 
as it doesn't need to load the full contents of every font in the system.


Thanks,

Chris

On 31/07/2013 12:53, Bernard Giannetti wrote:
Now I'm chasing my tail...looking at FontCachehas gotten me back to 
FontInfo.getFonts()!


Any other ideas please?!



From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 21:33:14 +1000

I'm readingorg.apache.fop.fonts.FontCache now...red-faced and fingers 
crossed!





From: thebernmeis...@hotmail.com
To: fop-users@xmlgraphics.apache.org
Subject: RE: Getting a list of font names without the memory hit...‏
Date: Wed, 31 Jul 2013 21:29:59 +1000

The config file or the cache file?

My config file has no fonts listed for PDF:



flate








> Date: Wed, 31 Jul 2013 04:26:33 -0700
> From: djs...@yahoo.com
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Getting a list of font names without the memory hit...‏
>
> Why don't you just read the config file which list all the available 
fonts?





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



RE: Getting a list of font names without the memory hit...‏

2013-08-01 Thread Bernard Giannetti



Thanks Chris - simplest solution is often the best:
String fonts[] = 
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
Getting a list of fonts this way does NOT appear to impact memory at all...so 
much better!
I don't have the  tag in my config file, so I assume the cache is on 
by default.  I did a test run of creating a PDF:
With no  present: memory used 111 MBWith 
false present: memory used 330 MB
I think I'll stick with the default!
Thanks again,
Bernard.

> Date: Thu, 1 Aug 2013 13:58:57 +0100
> From: bowditch_ch...@hotmail.com
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Getting a list of font names without the memory hit...‏
> 
> The auto-detect feature creates the font cache, to save time on 
> sunsequent calls to FOP, you can disable the cache using the setting: 
> false in your fop.xconf.
> 
> I suspect the reason for the high memory consumption is your use of 
> auto-detect feature. Though I've not replicated the issue. If your 
> intention  is to allow the user to pick any font installed on the 
> Operating System, why not use the java.awt classes to list the available 
> fonts instead? I've not tried it but I suspect it will use less memory 
> as it doesn't need to load the full contents of every font in the system.