freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] unpatented hinting system


From: David Turner
Subject: Re: [Devel] unpatented hinting system
Date: Sat, 15 Mar 2003 14:36:06 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210

Hi Graham,

Graham Asher wrote:
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):

Sorry for not answering earlier, I'm busy as you probably guess...

Of course, we should make 2.1.4 as soon as possible before introducing
new important improvements. I had not the time to review your new code,
but I'm pretty confident that it is of reasonnably high quality and will
fit with the rest of the engine. Anyway, count on me to make a few
adjustments if they're really needed.

I encourage you to commit your changes to the CVS tree as soon as 2.1.4 is
out, which should be really soon now. I'll try to find a few hours this
weekend to close the last few bugs detailed in the mailing lists and tag
the sources.

As soon as the tag is applied, you'll be able to commit your changes.

I agree with you that having the ability to choose at runtime to select
the native or unpatented hinter is a good thing, and using an additional
parameter to FT_Open_Face is a good idea.

I think that the default build of FreeType should come with the
unpatented hinter compiled by default, but only enabled when the user
explicitely selects it through a FT_Parameter, at least until we get
a way to automatically determine its need.

Note that a few small internal changes to the engine will be needed
when such an algorithm is needed (currently, the decision of choosing
the auto-hinter or the native one is done on a per-driver-flag test
that must be changed somewhat to something a bit more flexible). I'm
of course ready to perform or accept such changes in the engine.

Voila, sorry if I can't help too much currently, and thanks for your
very interesting contribution.

Cheers,

- David Turner
- The FreeType Project  (www.freetype.org)



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


_______________________________________________
Devel mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/devel






reply via email to

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