freetype-devel
[Top][All Lists]
Advanced

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

[Devel] unpatented hinting system


From: Graham Asher
Subject: [Devel] unpatented hinting system
Date: Sat, 15 Mar 2003 10:43:04 -0000

David,

did you see my remarks about the 'unpatented hinting system' I have
developed while working for Artifex? No comments, adverse ort otherwise,
have been made about it, and so, unless you object, I would like to submit
the changes to CVS. I am satisfied with the way it works, and it imposes no
costs unless it is compiled into the library by setting a macro.

Here is a copy of the mesage I sent yesterday, which might not have reached
you (because I used a different e-mail address):

<<<<<<
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




reply via email to

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