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 craigb321 <cr...@hotmail.com> on 2009/03/12 15:47:24 UTC

Type 1 Custom Fonts problems in Postscript

 Hi,
I am trying to produce PDF and postscript output from XSL:FO using FOP 0.95
- and I need to include some custom fonts.
 The custom fonts are true type currently - and I guessed they needed
converting to Type1 before they would work with PostScript.> I converted
them to .PFA / .PFB + .AFM files using ttf2pt1, and updated the FOP config
file for both PDF and Postscript renderers sections to look in the directory
where these live.

 The PDF picks up the new fonts and they work fine ... (so I am guessing the
conversion worked ok).
 The PostScript runs through FOP with no errors, but the output of the new
fonts is all spaces or characters like ! ( " ) .
 I am wondering if I need to run PFMReader to try and generate the XML
metrics file ?? , but I don't have PFM files ...
 Also, when I have tried to execute PFMReader through MS Dos, it has
returned a ClassNotFoundException.
 I would be really grateful for any thoughts !!
Thanks,
Craig
-- 
View this message in context: http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p22477721.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: Type 1 Custom Fonts problems in Postscript

Posted by craigb321 <cr...@hotmail.com>.


I have used FOP Trunk as opposed to version 0.95, and all the custom fonts I
have tried so far work fine with no need for PRMReader as you said.

Thanks for your help !



Jeremias Maerki-2 wrote:
> 
> On 12.03.2009 15:47:24 craigb321 wrote:
>> 
>>  Hi,
>> I am trying to produce PDF and postscript output from XSL:FO using FOP
>> 0.95
>> - and I need to include some custom fonts.
>>  The custom fonts are true type currently - and I guessed they needed
>> converting to Type1 before they would work with PostScript.> I converted
>> them to .PFA / .PFB + .AFM files using ttf2pt1, and updated the FOP
>> config
>> file for both PDF and Postscript renderers sections to look in the
>> directory
>> where these live.
>> 
>>  The PDF picks up the new fonts and they work fine ... (so I am guessing
>> the
>> conversion worked ok).
>>  The PostScript runs through FOP with no errors, but the output of the
>> new
>> fonts is all spaces or characters like ! ( " ) .
>>  I am wondering if I need to run PFMReader to try and generate the XML
>> metrics file ?? , but I don't have PFM files ...
> 
> But you got an AFM, right? Since you're using FOP 0.95, you don't need
> to create an XML metrics file.
> 
> I've just tried out ttf2pt1 (never used it before). It turns out that by
> default, it generates AFM files with "EncodingScheme FontSpecific". That
> could explain the wrong characters. However, I've tested with FOP Trunk
> which works fine with this AFM (as I've taught FOP a few things about
> AFMs since 0.95). But I've only tested with one single font. Others may
> not work.
> 
> I've used "ttf2pt1 -a -b <ttf-file>". Using "-l adobestd" didn't have an
> effect on the AFM which smells like a bug.
> 
> Anyway, I suggest you try FOP Trunk (from the Subversion repository):
> svn co http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
> 
>>  Also, when I have tried to execute PFMReader through MS Dos, it has
>> returned a ClassNotFoundException.
> 
> Probably a mistake on the classpath, but PFMReader shouldn't really be
> necessary (and will probably also not help at all).
> 
>>  I would be really grateful for any thoughts !!
>> Thanks,
>> Craig
>> -- 
>> View this message in context:
>> http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p22477721.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>> 
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p22534245.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: Type 1 Custom Fonts problems in Postscript

Posted by qnob <ku...@elca.ch>.
Hello,

I've been trying to configure a custom Type 1 font in order to support Arial
font for the Postscript renderer. Though, I don't get it work. I use Ubuntu,
SUN JDK 6 and FOP 0.95. I reproduced the same problem with the FOP trunk.

First, I converted the TrueType Font:

$ sudo ttf2pt1 -a -b /usr/share/fonts/truetype/msttcorefonts/arial.ttf
/usr/share/fonts/type1/converted-mscore-fonts/arial


This results to the files arial.afm and  arial.pfb.

Second, I've added  the directory to the fop.xconfig:

      <fonts>
	<directory>/usr/share/fonts/type1/converted-mscore-fonts</directory>
      </fonts>

Nevertheless, the Arial font isn't applied by the ps renderer. When I run 
it, I get following error:

      [fop] Jul 13, 2009 8:42:37 AM
org.apache.fop.fonts.autodetect.FontInfoFinder find
      [fop] SEVERE: Unable to load font file:
file:/usr/share/fonts/type1/converted-mscore-fonts/arial.pfb. Reason: No PFM
file was found for
file:/usr/share/fonts/type1/converted-mscore-fonts/arial.pfb
      [fop] Jul 13, 2009 8:42:37 AM org.apache.fop.fonts.FontInfo
notifyFontReplacement
      [fop] WARNING: Font 'Arial,normal,400' not found. Substituting with
'any,normal,400'.
      [fop] Jul 13, 2009 8:42:37 AM org.apache.fop.fonts.FontInfo
notifyFontReplacement
      [fop] WARNING: Font 'Arial,normal,700' not found. Substituting with
'any,normal,700'.

The SEVERE message I only get the first time I run it, after the conversion.
For FOP-trunk I don't get at all. 

How do I have to configure this font in order to make it work correctly?

Thanks
Kuno



Jeremias Maerki-2 wrote:
> 
> On 12.03.2009 15:47:24 craigb321 wrote:
>> 
>>  Hi,
>> I am trying to produce PDF and postscript output from XSL:FO using FOP
>> 0.95
>> - and I need to include some custom fonts.
>>  The custom fonts are true type currently - and I guessed they needed
>> converting to Type1 before they would work with PostScript.> I converted
>> them to .PFA / .PFB + .AFM files using ttf2pt1, and updated the FOP
>> config
>> file for both PDF and Postscript renderers sections to look in the
>> directory
>> where these live.
>> 
>>  The PDF picks up the new fonts and they work fine ... (so I am guessing
>> the
>> conversion worked ok).
>>  The PostScript runs through FOP with no errors, but the output of the
>> new
>> fonts is all spaces or characters like ! ( " ) .
>>  I am wondering if I need to run PFMReader to try and generate the XML
>> metrics file ?? , but I don't have PFM files ...
> 
> But you got an AFM, right? Since you're using FOP 0.95, you don't need
> to create an XML metrics file.
> 
> I've just tried out ttf2pt1 (never used it before). It turns out that by
> default, it generates AFM files with "EncodingScheme FontSpecific". That
> could explain the wrong characters. However, I've tested with FOP Trunk
> which works fine with this AFM (as I've taught FOP a few things about
> AFMs since 0.95). But I've only tested with one single font. Others may
> not work.
> 
> I've used "ttf2pt1 -a -b <ttf-file>". Using "-l adobestd" didn't have an
> effect on the AFM which smells like a bug.
> 
> Anyway, I suggest you try FOP Trunk (from the Subversion repository):
> svn co http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
> 
>>  Also, when I have tried to execute PFMReader through MS Dos, it has
>> returned a ClassNotFoundException.
> 
> Probably a mistake on the classpath, but PFMReader shouldn't really be
> necessary (and will probably also not help at all).
> 
>>  I would be really grateful for any thoughts !!
>> Thanks,
>> Craig
>> -- 
>> View this message in context:
>> http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p22477721.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>> 
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p24462316.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


RE: Paging issue

Posted by "Amick, Eric" <Er...@mail.house.gov>.
It sounds like a case of force-page-count and/or initial-page-number
properties not being right, but it's hard to tell without seeing the
page-sequences you're using. 


Eric Amick
Legislative Computer Systems
Office of the Clerk

-----Original Message-----
From: Jeff Griffith [mailto:jgriffith@cssi.org] 
Sent: Thursday, March 12, 2009 12:09
To: fop-users@xmlgraphics.apache.org
Subject: Paging issue

This is likely to be a "read the directions" questions, but I'm short on
time...

How do I tell a page sequence master to not produce an even number of
pages? or rather, to only produce the number of pages required by the
content (and not to worry about whether the back side of the last sheet
has any content).
I'm getting a blank page that I want to suppress.

Thanks,
Jeff Griffith


---------------------------------------------------------------------
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


Paging issue

Posted by Jeff Griffith <jg...@cssi.org>.
This is likely to be a "read the directions" questions, but I'm short on time...

How do I tell a page sequence master to not produce an even number of pages? or
rather, to only produce the number of pages required by the content (and not
to worry about whether the back side of the last sheet has any content).
I'm getting a blank page that I want to suppress.

Thanks,
Jeff Griffith


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


Re: Type 1 Custom Fonts problems in Postscript

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 12.03.2009 15:47:24 craigb321 wrote:
> 
>  Hi,
> I am trying to produce PDF and postscript output from XSL:FO using FOP 0.95
> - and I need to include some custom fonts.
>  The custom fonts are true type currently - and I guessed they needed
> converting to Type1 before they would work with PostScript.> I converted
> them to .PFA / .PFB + .AFM files using ttf2pt1, and updated the FOP config
> file for both PDF and Postscript renderers sections to look in the directory
> where these live.
> 
>  The PDF picks up the new fonts and they work fine ... (so I am guessing the
> conversion worked ok).
>  The PostScript runs through FOP with no errors, but the output of the new
> fonts is all spaces or characters like ! ( " ) .
>  I am wondering if I need to run PFMReader to try and generate the XML
> metrics file ?? , but I don't have PFM files ...

But you got an AFM, right? Since you're using FOP 0.95, you don't need
to create an XML metrics file.

I've just tried out ttf2pt1 (never used it before). It turns out that by
default, it generates AFM files with "EncodingScheme FontSpecific". That
could explain the wrong characters. However, I've tested with FOP Trunk
which works fine with this AFM (as I've taught FOP a few things about
AFMs since 0.95). But I've only tested with one single font. Others may
not work.

I've used "ttf2pt1 -a -b <ttf-file>". Using "-l adobestd" didn't have an
effect on the AFM which smells like a bug.

Anyway, I suggest you try FOP Trunk (from the Subversion repository):
svn co http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

>  Also, when I have tried to execute PFMReader through MS Dos, it has
> returned a ClassNotFoundException.

Probably a mistake on the classpath, but PFMReader shouldn't really be
necessary (and will probably also not help at all).

>  I would be really grateful for any thoughts !!
> Thanks,
> Craig
> -- 
> View this message in context: http://www.nabble.com/Type-1-Custom-Fonts-problems-in-Postscript-tp22477721p22477721.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 



Jeremias Maerki


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