[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] auto-hinter - separate "rules" from lib
From: |
David Turner |
Subject: |
Re: [Devel] auto-hinter - separate "rules" from lib |
Date: |
Mon, 03 Sep 2001 18:59:49 +0200 |
Hello Vadim,
I must say that I have a hard time understanding what you
mean by separating the auto-hinter *rules* :-(. I'll thus
describe what I've done for the up-coming Postscript hinter
module. I'm currently debugging this thing, and I expect to
release it this week or the next one by the way :-)
- basically, a new module named "pshinter" has been designed.
it provides the following to the type1, cid and cff font
drivers:
- an interface to record the global hints found in
postscript fonts. Input is in PS_Globals format
(simple description of PS global hints). Output
is an opaque pshinter-specific object named
a PSH_Globals object.
the PSH_Globals contains additional data and must
be "reset" each time the character size/scale changes
(it must be bound to a FT_Size by the font driver)
- an interface to record Type 1 hints and store them
in an opaque "uniform format".
- an interface to record Type 2 hints and store them
in the same "uniform format".
- some routines to "apply" the hints to a given glyph
outline, using a given PSH_Globals
Basically, the hinting "intelligence" is completely hidden
to the font drivers. Which means that the hinter can be
replaced without touching the type1, cid and cff drivers
(once they've been modified to use the "pshinter" module
interfaces).
the implementation that is to be released is Postscript
specific for various reasons..
You could extend the module by providing a different hints
recording interface and changing the hinter's internals..
Actually, that's what is planned, but on a much larger
time frame :-)
Hope this helps,
Regards,
- David
Vadim Plessky a écrit :
>
> I know that David Turner was planning rewrite of FT2 auto-hinter module, but
> not aware of it's status.
> Some ideas came to my mind rethinking once more hinting process and typical
> font usage (at least for languages I can speak/write)
>
> What about to separate auto-hinter *rules* from FreeType lib/modules (and
> make it just another module or script in some pseudo-language)?
> Advantages:
> * auto-hinter module can be updated more often than FreeType itself
> * it's possible to make automatic web-based updates for rules (auto-hints),
> so it reduces TCO and provides way for faster, easy updates
> * it's possible to modify rules without re-compilation of FT, which is
> clearly advantage for people who don't want (or can't) to compile FT on their
> own.
>
> As it was already pointed out on FT mailing list, PostScript Type1 hints are
> in general more easy to understand than TrueType hints, and it's easier to
> hint PS T1 fonts than TT.
> Speaking in terminology of programming languages, PS T1 hints are
> declarative, while TT is procedural.
> (from other side, we can think of PS T1 as C language, while TT really
> reminds me pure assembler)
> So, it makes sense IMO to make such external "rules" in pseudo-PostScript
> style.
> hstem, vstem, hstem3, vstem3 PS hints look quite natural to me, we just need
> some mechanism to *measure* extremes (and, may be, to add character
> "semantics" and map results like
> if ( condA )
> { apply hstem3 to ... }
> else
> if (cond B)
> { apply hstem to p1, L1; and hstem to p2, L2 }
>
> Probably, hstem3 and vstem3 hints are not very often used in latin-based
> fonts, but they are very common for many Cyrillic glyphs.
> So I would like to improove auto-hinting for these characters/glyphs, writing
> specific routines in this pseudo-language.
> After manual hinting of several fonts, I found that I am acting like
> computer, doing mechanical work. So, there is clearly a way to improove this
> part :-))
>
> Any ideas, thoughts on auto-hinter "rules" and how (if) it can be implemented?
> Any feedback from you is highly appreciated.
> --
>
> Vadim Plessky
> http://kde2.newmail.ru (English)
> 33 Window Decorations and 6 Widget Styles for KDE
> http://kde2.newmail.ru/kde_themes.html
> Do you have Arial font installed? Just test it!
> http://kde2.newmail.ru/font_test_arial.html
>
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel
- Re: [Devel] auto-hinter - separate "rules" from lib,
David Turner <=