xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qnob <kuno.baeris...@elca.ch>
Subject Re: Type 1 Custom Fonts problems in Postscript
Date Mon, 13 Jul 2009 14:03:08 GMT

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


Mime
View raw message