lualatex / luaotfload

OpenType font loader for LuaTeX
Other
26 stars 8 forks source link

fontloader ignores kerning with TTC subfonts #252

Closed phi-gamma closed 10 years ago

phi-gamma commented 10 years ago

Happens with Luatex-Fonts too, possibly affecting other features.

Test file: https://bitbucket.org/phg/lua-la-tex-tests/src/885634cba2d2d7a49e5286a081dfc18cf6df643c/pln-subfont-3-kern.tex?at=default

phi-gamma commented 10 years ago

False alarm. In the example the kerns weren’t applied due to the lack of an explicitly requested script. The updated test file does not show any regression between Luatex or fontloader versions:

https://bitbucket.org/phg/lua-la-tex-tests/src/f75da5d9220fb2ce7e5c5e35d6650df97b483dae/pln-subfont-3-kern.tex

The original report on tex-sx appears to pertain only to fonts of the Apple ecosystem. Current conjecture is that the behavior is due to the removal of AAT support, so the engine is working as designed. Closing this until we have evidence to the contrary.

micoloretan commented 10 years ago

Are you sure that the results I've been reporting to you this evening are a sign of no regression between luatex and/or fontloader versions? I thought the results were showing just the opposite.

Separately, is it satisfactory to call the failure of the current version of LuaTeX (but not of XeLaTeX!) to generate proper kerning and ligaturing with certain MacOS system fonts an "as designed" feature?

Thanks, Mico

On Aug 27, 2014, at 20:46, Philipp Gesang notifications@github.com wrote:

False alarm. In the example the kerns weren’t applied due to the lack of an explicitly requested script. The updated test file does not show any regression between Luatex or fontloader versions:

https://bitbucket.org/phg/lua-la-tex-tests/src/f75da5d9220fb2ce7e5c5e35d6650df97b483dae/pln-subfont-3-kern.tex

The original report on tex-sx appears to pertain only to fonts of the Apple ecosystem. Current conjecture is that the behavior is due to the removal of AAT support, so the engine is working as designed. Closing this until we have evidence to the contrary.

— Reply to this email directly or view it on GitHub.

Mico Loretan mico.loretan@mac.com

phi-gamma commented 10 years ago

I have not been able to reproduce a regression with any of the TTC fonts on my system. Since the fonts you mention are shipped with Mac OS it’s likely that they rely on AAT for rendering, which was removed from Luatex since version 0.76.

Try opening the files with FontForge and check the feature tables. (I can’t help you with that: I’ve never encountered an AAT font in the wild.) If they are in fact AAT fonts, then Luatex behaves correctly as documented. Citing Xetex’s “support” for AAT on Mac OS is actually an argument in favor of this decision: The technology has never been portable to begin with so even with Xetex the features aren’t available on other OS.

micoloretan commented 10 years ago

Philip,

I can't tell from your write-up whether you have access to a Mac with MacTeX2014 and simply cannot replicate any of the MWEs showing the regression behavior under MacTeX2014, or is it the case that you don't have a Mac system to begin with? Nobody has been claiming that the regression behavior occurs on systems other than Macs. Do by any chance have access to the files Optima.ttc, Didot.ttc, and Baskerville.ttc. Those would be three ttc fonts "in the wild" whose ligature and kerning properties have deteriorated sharply under LuaTeX 0.79.1.

I find the observation that "LuaTeX behaves correctly as documented" rather hollow. Sure, if AAT support has been abandoned, then it's not surprising that AAT support is gone, isn't it? What troubles me is that anybody would think that it's better to abandon a product altogether rather than to keep it around and warn people that it's not working perfectly. As far as I can tell, kerning and ligaturing with AAT fonts were both working fine up until and including version 0.77 of LuaTeX. Other parts of AAT support may well have been unsatisfactory (though I don't know which parts they may be), but not ligaturing and kerning?

Best,

Mico

On Aug 31, 2014, at 11:31, Philipp Gesang notifications@github.com wrote:

I have not been able to reproduce a regression with any of the TTC fonts on my system. Since the fonts you mention are shipped with Mac OS it’s likely that they rely on AAT for rendering, which was removed from Luatex since version 0.76.

Try opening the files with FontForge and check the feature tables. (I can’t help you with that: I’ve never encountered an AAT font in the wild.) If they are in fact AAT fonts, then Luatex behaves correctly as documented. Citing Xetex’s “support” for AAT on Mac OS is actually an argument in favor of this decision: The technology has never been portable to begin with so even with Xetex the features aren’t available on other OS.

— Reply to this email directly or view it on GitHub.

phi-gamma commented 10 years ago

···<date: 2014-08-31, Sunday>······

I can't tell from your write-up whether you have access to a Mac with MacTeX2014 and simply cannot replicate any of the MWEs showing the regression behavior under MacTeX2014, or is it the case that you don't have a Mac system to begin with?

Sorry, I don’t have one nor do I want one, except maybe a VM for testing.

                                                 Nobody has

been claiming that the regression behavior occurs on systems other than Macs.

The original claim was “a regression with TTC fonts”, which it turned out not to be.

             Do by any chance have access to the files

Optima.ttc, Didot.ttc, and Baskerville.ttc. Those would be three ttc fonts "in the wild" whose ligature and kerning properties have deteriorated sharply under LuaTeX 0.79.1.

I don’t have those files. Just inspect them in Fontforge and find out whether they have the Opentype tables (or kern tables if they’re old enough) required for all these features. If so, then I’ll forward it to Hans. If they only have AAT tables (or however those fonts work), then Luatex is working as advertised.

I find the observation that "LuaTeX behaves correctly as documented" rather hollow. Sure, if AAT support has been abandoned, then it's not surprising that AAT support is gone, isn't it? What troubles me is that anybody would think that it's better to abandon a product altogether rather than to keep it around and warn people that it's not working perfectly. As far as I can tell, kerning and ligaturing with AAT fonts were both working fine up until and including version 0.77 of LuaTeX. Other parts of AAT support may well have been unsatisfactory (though I don't know which parts they may be), but not ligaturing and kerning?

That’s a discussion for the Luatex list. In any case I’d wager that the way to get AAT support back is to convince Apple to open source their AAT libraries in a form that allows linking them statically into the binary.

micoloretan commented 10 years ago

You wrote:

The original claim was “a regression with TTC fonts”, which it turned out not to be.

Let me be clear: I have never made such a broad claim. To the contrary, I thought that it was always quite clear that the problem reports were much more narrowly focused, in that (a) the ligaturing and kerning problems were reported to be happening on MacOSX systems and (b) certain specific ttc font files, but not all of them, were affected. I'm very sorry you apparently got a different impression.

To review:

I'm afraid I don't know any of the persons responsible for LuaTeX's development and I don't even know how to approach them. I'm also not familiar with fontforge (although I do have it on my system), and I have no idea how to "find out whether [the font files] have the Opentype tables (or kern tables if they’re old enough) required for all these features". Would you have some pointers where in fontforge I should go look for these features?

Best,

Mico

On Aug 31, 2014, at 14:15, Philipp Gesang notifications@github.com wrote:

The original claim was “a regression with TTC fonts”, which it turned out not to be.