You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Klaus Malorny <Kl...@knipp.de> on 2000/11/29 10:59:01 UTC

Some notes on FOP regarding fonts

Hi everybody,

for an urgent project, I hacked FOP to include the metrics of my company's CI
fonts and to embed them unconditionally into the generated PDF file.

Here some notes which might help you on your development (I used the CVS files
at 2000-11-28)

  - the t1font-file.xsl stylesheet does not generate all methods from
    the interface FontDescriptor

  - the charlist.xml file maps multiple characters to the same WinAnsi
    code point (because of the symbol and dingbats characters). As one of my
    fonts contained both "p" and "pi", "p" got the wrong width. For my
    purposes, I created a copy containing only the standard characters.

  - in PDFDocument, the parameters of the PDFFontDescriptor constructor call
    are wrong (italicAngle and stemV are swapped)

  - IMHO it is a bad idea to use a Writer instead of an OutputStream. This
    disables a sane implementation of binary output to the PDF file.

regards,

Klaus Malorny

Re: Some notes on FOP regarding fonts

Posted by Jeremias Maerki <je...@outline.ch>.
> Hi Jeremias
> thanks for your help and to the latest cocoon1.8.1-dev release 
> (from the last week end :-), I was able to run fop0.15 (the previous cocoon release
> was not working with fop > 0.13)
> 
> Now I am facing the problem of finding the PFM file for futura
> (I am a newbie in the font business).
> I understand that Adobe is selling CDROM's with font libraries. 
> Do you know where I can get something like that quickly?
> It's not about paying the fee but about time, I have 1 day left for that!

It sounds to me like you're not having a type 1 font here. Have a look
at your font. Is it something like futura.ttf? Then it's a TrueType font
and you will have to get the Adobe Type 1 equivalent for that font. Type
1 fonts normally get distributed as multiple files (as far as I know):
- *.pfb which contain the actual font
- *.pfm which contain the font metrics (that's what you need to look
for)
- *.pfa (optional)

As far as I know, there are CDROMs from Adobe that contain a lot of
fonts (Like you said). Then, individual fonts can be unlocked for use by
buying a licence on Adobe's website. You will probably get a unlocking
code, so you can extract a funtional copy of the font from the CDROM.
Maybe you can borrow such a CDROM somewhere, maybe in a copyshop or from
someone who does graphical things. 

Try this URL:
http://www.adobe.com/store/products/typeoncall.html

Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
Internet http://www.outline.ch

Re: Some notes on FOP regarding fonts

Posted by Bertrand Vuaridel <bv...@netsystel.ch>.
Hi Jeremias
thanks for your help and to the latest cocoon1.8.1-dev release 
(from the last week end :-), I was able to run fop0.15 (the previous cocoon release
was not working with fop > 0.13)

Now I am facing the problem of finding the PFM file for futura
(I am a newbie in the font business).
I understand that Adobe is selling CDROM's with font libraries. 
Do you know where I can get something like that quickly?
It's not about paying the fee but about time, I have 1 day left for that!

I am sorry to disturb you with that

cheers

Bertrand

Jeremias Maerki wrote:
> 
> Hi Betrand
> 
> > I have to produce pdf documents with "Futura" fonts. So far I never put my hand
> > into fop. However I am ready to start with it. Can somebody
> > tell me what is the status of the font development?
> 
> FOP supports using custom Adobe Type 1 fonts. Have a look at the
> documentation in the docs\xml-docs directory on how to provide support
> for your "Futura" font.
> 
> Jeremias Märki
> 
> mailto:jeremias.maerki@outline.ch
> 
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
> Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
> Internet http://www.outline.ch

Re: Some notes on FOP regarding fonts

Posted by Jeremias Maerki <je...@outline.ch>.
Hi Betrand

> I have to produce pdf documents with "Futura" fonts. So far I never put my hand 
> into fop. However I am ready to start with it. Can somebody 
> tell me what is the status of the font development?

FOP supports using custom Adobe Type 1 fonts. Have a look at the
documentation in the docs\xml-docs directory on how to provide support
for your "Futura" font.

Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
Internet http://www.outline.ch

Re: Some notes on FOP regarding fonts

Posted by Bertrand Vuaridel <bv...@netsystel.ch>.
Hi ,

I have to produce pdf documents with "Futura" fonts. So far I never put my hand 
into fop. However I am ready to start with it. Can somebody 
tell me what is the status of the font development?

Bertrand


Klaus Malorny wrote:
> 
> Hi everybody,
> 
> for an urgent project, I hacked FOP to include the metrics of my company's CI
> fonts and to embed them unconditionally into the generated PDF file.
> 
> Here some notes which might help you on your development (I used the CVS files
> at 2000-11-28)
> 
>   - the t1font-file.xsl stylesheet does not generate all methods from
>     the interface FontDescriptor
> 
>   - the charlist.xml file maps multiple characters to the same WinAnsi
>     code point (because of the symbol and dingbats characters). As one of my
>     fonts contained both "p" and "pi", "p" got the wrong width. For my
>     purposes, I created a copy containing only the standard characters.
> 
>   - in PDFDocument, the parameters of the PDFFontDescriptor constructor call
>     are wrong (italicAngle and stemV are swapped)
> 
>   - IMHO it is a bad idea to use a Writer instead of an OutputStream. This
>     disables a sane implementation of binary output to the PDF file.
> 
> regards,
> 
> Klaus Malorny

Re: Some notes on FOP regarding fonts

Posted by Fotis Jannidis <fo...@lrz.uni-muenchen.de>.
> >Klaus Malorny wrote
> > 
> >   - IMHO it is a bad idea to use a Writer instead of an OutputStream. This
> >     disables a sane implementation of binary output to the PDF file.
> > 

Doro Wiarda:  
> I agree. 

+1  (I have also been there to see how to compress text)

> While looking into what we need to do to have FOP include 
> Unicode support and other than Latin1 fonts, I stumbled over the issue
> of compressing streams. I want to add an option, similar to the -d
> option that, that allows to compress stream objects in the pdf file.

Or we could put that into a pdf config file, because compression 
would probably the default. 

Fotis



Re: Some notes on FOP regarding fonts

Posted by Dorothea Wiarda <wi...@vic.com>.
Hi all 

>Klaus Malorny wrote
> 
>   - IMHO it is a bad idea to use a Writer instead of an OutputStream. This
>     disables a sane implementation of binary output to the PDF file.
> 

I agree. While looking into what we need to do to have FOP include 
Unicode support and other than Latin1 fonts, I stumbled over the issue
of compressing streams. I want to add an option, similar to the -d
option that, that allows to compress stream objects in the pdf file.
This works fine on Linux, (table.pdf shrinks allmost threefold),
however, it does not seem to work on Windows because thebinary data are
written out incorrectly. The image had the same problem, so maybe I set
something wrong on my Windows Java. In any case it would be nice to not
have to go through an extra
conversion of binary data back to character data.

 
  Doro


-- 
________________________________________________________
Dorothea Wiarda

E-Mail:    wiarda@dwiarda.com
Web-Home:  http://www.dwiarda.com
           http://www.techno-info.com

Re: Some notes on FOP regarding fonts

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 10:59 AM 11/29/00 +0100, Klaus Malorny wrote:
>
>  - IMHO it is a bad idea to use a Writer instead of an OutputStream. This
>    disables a sane implementation of binary output to the PDF file.
>
>Klaus Malorny

Ignacio Ortega submitted a proposed patch that deals with much the same issue.

We will obviously have to provide this kind of support. I invite other
comments.

Arved

Senior Developer
e-plicity.com (www.e-plicity.com)
Halifax, Nova Scotia
"B2B Wireless in Canada's Ocean Playground"