[Pkg-fonts-devel] Common script for conversion of font files

Rogério Brito rtbrito at ig.com.br
Tue Feb 15 20:39:51 UTC 2011


Hi there, Fabian.

On Feb 15 2011, Fabian Greffrath wrote:
> I have seen that in several of our packages (e.g. ttf-freefonts)
> different implementations of fontforge scripts are used to convert
> between font formats, e.g. sfd -> ttf. Personally I tend to use the
> script found in the Examples section of the fontforge documentation
> (the last one before "Other Examples"):
> 
> http://fontforge.sourceforge.net/scripting-tutorial.html

I tend to use a python script, but...

... a BIG but is that we should *not* be recompiling fonts from their
sources, since we can introduce many, many problems (floating pointing
errors are just the beginning) and ruining the layout of the fonts.

We should not be recompiling stuff, unless there is *no* other way or we
need something that we can't get otherwise: for instance, for the installer
disks, where space is limited and we may be interested in stripping some of
the support for large unicode fonts.

I put this in the first proposal for the fonts policy team (gee, I think
that I will put it in some repository, so that others can comment on this).

> It is possible to convert into .ttf, .otf, .pfb or .svg formats
> (from every other format) with this single script and additionally
> it takes care of quirks like unit conversion and integer rounding.

Please, be careful that you will also have to take the kerning tables, font
hinting, substitution tables etc. into account. Some of those are taken care
of by fontforge automatically, but some don't.

Also, by "unit conversion" do you mean the em-measure of a font? Please note
that fonts that contain cubic splines can, usually, contain non-integers as
coordinates of the points.

(Yes, the fonts get bigger, though).

> For your convenience, I have attached the script to this email.

I didn't receive it. Was it eaten by any filter?


Regards, Rogério Brito.

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://rb.doesntexist.org : Packages for LaTeX : algorithms.berlios.de
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br



More information about the Pkg-fonts-devel mailing list