latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

punctuation failing in some fonts with fontspec and luatex #222

Closed mewtant closed 8 years ago

mewtant commented 8 years ago

I hope I’m reporting this in the right place. xetex with fontspec or with low-level commands works fine, but a few fonts no longer produce the expected punctuation marks or quotation marks with luatex and fontspec, although they do work with luaotfload and low-level commands.

I’m using a “vanilla” TeX Live, updated daily. I first noticed the problem yesterday, but since it affects only some fonts (Minion Pro, Adobe Jenson Pro, Verdigris MVB Pro Text, Celestia Antiqua MVB Roman, and Calluna), the problem may have started a week or two earlier.

My test files are at https://www.dropbox.com/sh/jl5anbagh7ryhqb/AAACAL3CTA_l5_MDs0ggB1Wca?dl=0

felleb commented 8 years ago

Same here. I updated TeXLive a few days ago (fontspec is now at 2.4e) and now with LuaLatex and Minion Pro all colons and semi colons are replaced by quotation marks.

If you need some more information please let me know.

davidcarlisle commented 8 years ago

This looks like the luaotfload issue here

https://github.com/lualatex/luaotfload/issues/309

which is really an issue with changes in the upstream context font loader.

suggestion there seems to be to configure luaotfload to use the older code for now.

On 20 December 2015 at 10:35, Frank Ellebrecht notifications@github.com wrote:

Same here. I updated TeXLive a few days ago (fontspec is now at 2.4e) and now with LuaLatex and Minion Pro all colons and semi colons are replaced by quotation marks.

If you need some more information please let me know.

— Reply to this email directly or view it on GitHub https://github.com/wspr/fontspec/issues/222#issuecomment-166107613.

http://dpcarlisle.blogspot.com/

mewtant commented 8 years ago

Thanks, David. I copied luaotfload.conf.example to ~/.luaotfloadrc, added fontloader = tl2014 to the [run] section, and ran luaotfload-tool --update --force; now the five fonts affected work perfectly.

felleb commented 8 years ago

Thank you both for your kind help. I followed @mewtant's suggestion and now everything works fine again.

Lenchik commented 8 years ago

@mewtant How to restore this change back at the time this issue will be fixed?

mewtant commented 8 years ago

@Lenchik I imagine that deleting ~/.luaotfloadrc and re-running luaotfload-tool --update --force will suffice. But I’m no expert — I never looked at configuration of luaotfload before today.

phi-gamma commented 8 years ago

The font feature implementation of Luaotfload (really that of a dusty Context) needs updating. This revealed a bug in the dusty implementation of the Context fontloader: Combined ligaturing plus substitution features are broken. This isn’t problematic, I guess, unless you define stuff like tlig (the TeX “ligature”) to comprise both ligatures and substitutions. Context doesn’t do that, providing separate tlig and trep (replacements) features, so the bug never surfaced there.

davidcarlisle commented 8 years ago

On 21 December 2015 at 07:21, Philipp Gesang notifications@github.com wrote:

The font feature implementation of Luaotfload (really that of a dusty Context) needs updating. This revealed a bug in the dusty implementation of the Context fontloader: Combined ligaturing plus substitution features are broken. This isn’t problematic, I guess, unless you define stuff like tlig`(the TeX ligature) to comprise both ligatures and substitutions. Context doesn’t do that, providing separatetligandtrep`` (replacements) features, so the bug never surfaced there.

Philipp, does that mean that fontspec could access the existing luaotfload in a different way and avoid the current issues (which are showing up here, on mail, and on stackexchange etc) to avoid individual users having to configure luaotfload explicitly.

David

mewtant commented 8 years ago

I just undid the change to .luaotfloadrc and tried adding \defaultfontfeatures{RawFeature=-tlig;-trep} to my document, since I always type em-dashes and the like directly, with a compose key. Unfortunately, that doesn’t prevent the bug from appearing.

phi-gamma commented 8 years ago

Philipp, does that mean that fontspec could access the existing luaotfload in a different way and avoid the current issues

No, I’m afraid not. Yesterday I was able to reproduce the bug with Context directly. We’ll have to wait for a fix from Hans.