Re: tcpdf fonts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Le Dim 15 novembre 2009 01:14, Oron Peled a écrit :


> I packaged TCEXAM ( for review:
> One of the issues I (and the reviewer) have is that the
> included TCPDF ( application is using embedded fonts for
> rendering the PDF.

This is not good at all :(

> As a result, I have several questions for the members of this list:
> 1. From a brief look, it seems the bundled fonts are free and included
>    in Fedora. How about the almohanad and ZarBold, anybody knows?

No idea

> 2. Better substitutes? Defaults?

Usually, using the system defaults as computed by fontconfig works best
(however it is worth locating the upstream of the missing fonts and packaging
them if their licensing is fedora-compatible)

> 3. For use by tcpdf, the fonts are converted as described in:
>    a. One tools which is bundled is afm2pfm (and its inverse pfm2afm):
>       * The upstream of these tools:
>           -
>    b. Another bundled tool is ttf2ufm:
>       * Looks like a modified copy of ttf2pt1 which is packaged in Fedora.

You should not ask yourself "how to generate afm files from ttf fonts" but
"how to use system ttf fonts directly". AFM/PFM/PFB/PFA are legacy formats and
you can't convert reliably ttf/otf/otf fonts to them (for one, they don't have
the same glyph number limits, and fonts like DejaVu Sans or Free Sans are way
over PS limits).

Granted, adapting the pdf engine to use modern fonts (or finding a
replacement) is likely to be less trivial than butchering fonts, but the
current hack will cause you no end of problems and I suspect a solution would
help clean up bad code in many projects.

IIRC cairo had some pdf capabilities, the poppler people or Behdad could
probably tell you more.

> 4. While doing a search for this mail I found that moodle (packaged in
>    Fedora) bundles TCPDF (and the fonts). So it seems we have
>    a common problem...

Yes, moodle is no good :( Should not have passed review at all.

If you choose to keep a conversion step, please make sure you convert from
fonts packaged in Fedora (exact version in Fedora that passed legal review),
and that you re-convert each time the Fedora version changes (either by
converting dynamically or by pegging in deps the exact font package version
you used in build)


Nicolas Mailhot

Fedora-fonts-list mailing list

[Index of Archives]     [Fedora Users]     [Font Configuration]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux