freetype-devel
[Top][All Lists]
Advanced

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

[Devel] submission of unpatented hinting system to CVS


From: Graham Asher
Subject: [Devel] submission of unpatented hinting system to CVS
Date: Fri, 14 Mar 2003 10:26:22 -0000

David (and other FreeType developers),

I have now completed the first working version of the new unpatented hinting
system and I'd like to submit it to the FreeType CVS repository. Before
doing so I'd be interested in any comments. Here are the key facts about the
system.

1. This system allows the TrueType bytecode interpreter to be used even if
the relevant patents are not licensed from Apple. It replaces code that
infringes the patents with non-infringing code. It is designed to supersede
the earlier NO_APPLE_PATENT macro, which did not actually circumvent the
patents (it stored freedom and projection vectors, and did not disable delta
hinting - the deltac and deltap instructions). The unpatented hinting system
is useful only for typefaces that either don't use the freedom and
projection vectors, or always set them both to the x axis or the y axis, and
which require the hinting system to create correct glyph shapes. These
include Chinese typefaces from Dynalab such as the MingLiu family. It should
not be used for typefaces that require the full, patented, hinting system,
such as the Arial typeface supplied by Microsoft on Windows installations.

2. The unpatented hinting system need not be compiled at all. It becomes
part of the FreeType build only if
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in ftoption.h.

3. Unpatented hinting can be selected either at compile-time or run-time. If
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING is defined in ftoption.h, the
unpatented system is always used if hinting is turned on. If
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING is not defined, unpatented hinting
can be selected for a typeface by using the tag
FT_PARAM_TAG_UNPATENTED_HINTING, defined in the new header file ftunpat.h,
as an optional parameter passed to FT_Open_Face. Selection of the system is
for a whole typeface, not an individual glyph, because certain bytecode
instructions are executed for the typeface as a whole when the size is set.

4. The run-time option allows hinting to be turned off for typefaces that
would be displayed incorrectly if the unpatented hinting system were used.
Future versions may have some (optional) way of automatically deciding
whether unpatented hinting could be used. At present, however, this must be
decided by the caller.

I have put copies of the files that are affected by the new system in
http://www.graham.asher.btinternet.co.uk/unpat.zip. Naturally I will merge
these changes with any changes that have been made by others in the
meantime, but they are based on a very recent version of FreeType, so there
should not be too many differences.

The files are:

include\freetype\ttunpat.h (new file)
include\freetype\config\ftheader.h
include\freetype\config\ftoption.h
include\freetype\internal\tttypes.h
src\truetype\ttinterp.c
src\truetype\ttobjs.c
src\truetype\ttobjs.h

All the important material is in ttinterp.c.

Best regards,

Graham Asher








reply via email to

[Prev in Thread] Current Thread [Next in Thread]