[poppler] fofi should inspect more indepth part of the font file? (bug#47333)

Albert Astals Cid aacid at kde.org
Tue May 8 11:08:19 PDT 2012


El Dimarts, 8 de maig de 2012, a les 14:45:25, suzuki toshiya va escriure:
> Hi,

Hi,

> Recently I was working with a bug #47333
> 	https://bugs.freedesktop.org/show_bug.cgi?id=47333
> that non-square glyphs are not laid out correctly in vertical
> writing mode. The font dictionary of PDF may have the width(s)
> of the glyphs for horizontal/vertical writing mode, as DW, W
> and DW2, W2 key-value pairs. If these key-value pairs are not
> explicitly written in the PDF, current poppler uses the default
> values defined in PDF spec. The values written in the embedded
> font file stream are not used.
> 
> Reading PDF specs carefully, it was written that the values
> defined by DW, W, DW2, W2 should be consistent with the metrics
> in the embedded font file stream. And, it seems that Adobe Reader
> (and Ghostscript) uses the metric values written in the embedded
> font file stream, if DW, W, DW2, W2 are not explicitly defined.
> 
> So I guess poppler is expected to deal with the metric values
> written in the embedded font file stream. What tools we have now?
> We have FoFi (thin, and light-weight) or FreeType2 (rich, slower-
> than FoFi, and sometimes missing).
> 
> At present, FoFi does not seem to be able retrieve the metric
> values from embedded font file stream. In the case of bug#47333, we
> have to retrieve the metric info from embedded Type1. To do
> such, we have to parse the CharStrings for each glyphs, and
> obtain the metric info. Fortunately, PostScript Type1 CharStrings
> request that the metric info must be written at the beginning
> of the glyph program for each glyphs. Thus, we don't have to
> use a whole interpreter of PostScript Type1 or Type2 CharStrings
> (ah, yet I've not checked the situation in Type3 font).
> 
> So, it might be possible for FoFi to have a feature to retrieve
> the metric info from the embedded font file stream. But is it
> the way to go? Using FreeType2 is easier & safer? I think it
> is related with the situation "when we make a poppler WITHOUT
> FreeType2?".

Personally i'd like it into FoFi unless it's a huge amount of work.

> BTW, this issue is not 0.19.x-specific. It would be long running
> issue and shared with XPDF. If I should discuss with XPDF authors,
> I will do so. Please comment!

That's up to you, XPDF is a totally separate project, if you are interesting 
in discussing with them it's you that have to decide that, not us.

Cheers,
  Albert

> 
> Regards,
> mpsuzuki
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list