Re: AbiWord and PostScript Type 1

Shaw Terwilliger (sterwill@postman.abisource.com)
Fri, 5 Mar 1999 09:59:15 -0600


On Fri, Mar 05, 1999 at 02:35:43PM +0700, Pawee Lorsuwannarat wrote:
> 1. PFB fonts is used, AbiWords gives no error DEBUG message, but no
> data sent to printer.

Actually, the font system was designed for use with PFA (ASCII)
encoded Type 1 fonts only, with plans to do the conversion before
embedding the data in PostScript output. You can grab the free
Type 1 utilities at http://www.lcdf.org/~eddietwo/type/ to convert
your PostScript Type 1 Binary fonts (PFB) to ASCII fonts (PFA).
I'm not completely sure PFB fonts do not work, but I was just
playing by some examples in the Adobe PostScript language
reference and some results from my own experimentation.

Once built, using them is easy ("t1ascii myfont.pfb myfont.pfa").
You can go the other way if desired.

> 2. Metrics font (.afm) contains a character(s) with its code of
> "-1". (If fonts is converted from TTF with Unicode, this will happen to
> all characters with code above 255)

This is a known problem, and a bug in the database already (some Latin-1
characters in many fonts don't have a "width" when printing). According
to the Type 1 specification, this means the character shouldn't
need one, and Adobe even offers some de facto solutions for this case
when reading metrics file (they just offer up "250" for most characters,
which I think is a poor solution). If anyone has a good idea of
what to do in the width = -1 case, I'd love to know.

> 3. Metrics font contains no "StartKernData" and "EndKernData",
> AbiWord will give DEBUG message saying "Premature EOF when pharsing
> metrics file" or something and "Printing will not continue"

Aah... I hadn't realized people would be using fonts without
kerning pair data. Perhaps I should revisit the "fatalness"
of that error.

> Fonts showing on screen are different to the printed ones:
> I don't know why is this happened, since all of fonts that I have, can
> be used with StarOffice, completely correct. My fonts also consist of
> characters other than English, within code range of 255.
> All characters show on screen correctly, but only English characters
> printed out correctly. I've tried

Do all characters look incorrect when printed, or are you just seeing
the non-ASCII characters with incorrect characters substituted
on print? I think I might know your problem if that's the case.

You didn't mention which version of AbiWord you've been trying.
Recently, I fixed a bug where the incorrect encoding was
used in generated PostScript documents (this was last week, if
I remember correctly, around Thursday). We were using the
"standard encoding" and I added code to use the "ISO Latin 1"
encoding so that all characters were displayed and printed throughout
the ISO-8859-1 range. Things seemed to work well for me, but this
would probably only be in the latest 0.5.0 source code release.

If you're having other problems, please offer some more information.
Thank you for all the information; this was a nicely detailed
bug(s?) report, and I'll try to get some of these bugs out of the
way for the next tarball.

-- 
Shaw Terwilliger


This archive was generated by hypermail 1.03b2.