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

Bug#364965: Don't load type1 backend by default



Me:

>> I would like to argue that the "type1" backend should not be loaded by
>> default.

Julien:

> To do this, it seems to be sufficient to remove "type1" from the
> DEFAULT_MODULES variable in xserver-xorg.config.in, and maybe from the
> Default line of the xserver-xorg/config/modules debconf template.

And I still recommend that this should be done.  I also recommend that
existing xorg.conf files should be rewritten to remove the line which
loads the "type1" module, which I understand would not be done by
merely doing the above.

Pro memoria, I am the original author of the FreeType backend (not of
the libfreetype library that this uses).  I am also the original
author of the internationalisation code in the XFree86 font backends,
including the Type 1 backend, done in mid-1998.  This is to say that
I am vaguely familiar with the code.

The Type 1 backend in XFree86 and X.Org was contributed by Lexmark and
IBM.  It is not designed for use in a desktop system -- it is designed
for use in embedded devices, such as printers.  Because of that, it
has only one error recovery mechanism -- abort().

Implementing proper error recovery in the Type 1 backend would require
a major restructuring of the code.  Because of that, we have instead
chosen to make sure that errors cannot happen; for example, we fail
requests for large glyphs very early, before even entering the backend.
Needless to say, this set of hacks is unmaintainable and error-prone
-- there is no guarantee that the X server won't crash because the
Type 1 backend decided that it doesn't like the font you gave it.

Instead of fixing that, I have chosen to obsolete the Type 1 backend.
The FreeType backend has proper error recovery, produces better
results than the IBM/Lexmark rasteriser, and its functionality is an
almost complete superset of the latter's functionality -- with the
exception of support for CIDFonts.

CIDFonts, fortunately, have been obsoleted by OpenType/CFF fonts,
which are supported by the FreeType backend.  In case any of our users
still have CIDFonts, there are Free Software tools (notably fontforge,
which is in Debian Main) which are able to losslessly convert a 
Type 1 CIDFont into an OpenType/CFF font.

Please do not load the Type 1 backend by default: doing so might crash
your X server at any time an incorrect or merely unusual font is loaded,
and provides no functionality that our users will need.  I hereby
volunteer to ruthlessly flame anyone who complains about the change.

With my most sincere regards,

                                        Juliusz Chroboczek

Attachment: pgp3hZDG_DeW3.pgp
Description: PGP signature


Reply to: