[lltx] luamicrotype?
Élie Roux
elie.roux at telecom-bretagne.eu
Mon Feb 22 13:03:01 CET 2010
Hello Robert and all,
Recently we've got microtypography (protrusion and expansion) working
under LuaTeX with OTF fonts, in the development version of luaotfload
(http://github.com/mpg/luaotfload/). It works this way:
- we have some settings in two tables, like :
fonts.expansions.setups['default'] = {
stretch = 2, shrink = 2, step = .5, factor = 1,
[byte('A')] = 0.5, [byte('B')] = 0.7, [byte('C')] = 0.7,
[byte('D')] = 0.5, [byte('E')] = 0.7,
[byte('F')] = 0.7, [byte('G')] = 0.5, [byte('H')] = 0.7,
[byte('K')] = 0.7, [byte('M')] = 0.7,
}
fonts.protrusions.setups['default'] = {
factor = 1, left = 1, right = 1,
[0x002C] = { 0, 1}, -- comma
[0x002E] = { 0, 1}, -- period
[0x003A] = { 0, 1}, -- colon
[0x003B] = { 0, 1}, -- semicolon
[0x002D] = { 0, 1}, -- hyphen
}
- we load fonts and select the settings they will be applied, for example:
\font\testb=file:texgyretermes-regular:script=latn;protrusion=default
- later on we will have (I think?) a fontspec option to enable
certain settings into a font.
The main question is to know the user interface for microtypography:
users are obviously used to microtype doing everything on its own, and
I think such a thing is overall a good idea; but I'm not sure we
should keep microtype for OTF fonts as it will need a lot of changes
to interact with fontspec, and the checks to know if we are in an
"old" configuration (with 8-bit fonts) or in a modern configuration
(with Unicode fonts) will be a mess...
Here is how I see things: a new package (luamicrotype? umicrotype?)
should be created that would only interact with fontspec and provide a
user interface à la microtype, as well as finely tuned data for OT
fonts. On the fontspec side, we should allow such a thing to happen by
providing a "callback" so that when a font is asked it's loaded with
the good microtypographic options.
What do you all think about that?
Thank you,
--
Elie
More information about the lualatex-dev
mailing list