Summary: | Arabic fallback shaper is not used when it needs to be | ||
---|---|---|---|
Product: | HarfBuzz | Reporter: | Eli Fidler <efidler> |
Component: | src | Assignee: | Behdad Esfahbod <freedesktop> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | major | ||
Priority: | medium | CC: | freedesktop, jfkthame |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
output of "hb-view --direction=rtl --language=ar --features=-liga /usr/share/fonts/truetype/msttcorefonts/Arial.ttf 'لا' "
potential fix |
Description
Eli Fidler
2013-11-14 16:20:51 UTC
Created attachment 89202 [details]
output of "hb-view --direction=rtl --language=ar --features=-liga /usr/share/fonts/truetype/msttcorefonts/Arial.ttf 'لا' "
Created attachment 89205 [details] [review] potential fix Maybe something like this would be acceptable, although it might be nice to separate out the forms substitution fallbacks from the ligature fallbacks. I'm hesitant to make this change. In fact, I'm leaning towards changing the current fallback logic to only kick in if there is no Arab script in GSUB. Jonathan, what do you think? Is there something really bad about the fallback shaper you're trying to avoid? This font is very common, and users often install the msttcorefonts and put them at the top of their fallback list. (In reply to comment #4) > Is there something really bad about the fallback shaper you're trying to > avoid? Yes, it deviates us further from the standard. I'm sure there's someone out there making a alternative Arabic font that doesn't have init/medi/fina/isol forms as we know them... I agree that the fallback shaper typically won't break things, but ti's not something we should promote either. > This font is very common, and users often install the msttcorefonts and put > them at the top of their fallback list. That's fine, as long as they don't go out of their way to turn liga off. (In reply to comment #3) > I'm hesitant to make this change. Yeah, I'm not keen on this either. > In fact, I'm leaning towards changing the > current fallback logic to only kick in if there is no Arab script in GSUB. I think that makes sense. If a font has a GSUB table that supports Arabic, we should simply use that and assume that the font designer has provided whatever features are appropriate. (In reply to comment #0) > The specific case I have is for > https://code.google.com/p/chromium/issues/detail?id=41990, where I want to > disable optional ligatures in the Blink complex text path by default Why would you want to do this? Ligatures in 'liga' should be enabled by default, and only disabled if the user explicitly chooses to disable them. (At which point, the fact that this disables lam-alef in that particular font is simply something the user has to accept as a consequence of their decision to override the default behavior.) Does it change your mind at all that all Arabic fonts from Windows XP have this same structure, where lam-alef is in liga? I checked arial.ttf, simpo.ttf, and trado.ttf. Later versions of these fonts (Windows 7, I guess) changed to using rlig for lam-alef. I know disabling liga is not a totally standard use case, but it seems like a reasonable thing to want to do. Microsoft's OpenType page says: The 'liga' feature is used to map glyphs to their optional ligated form. To me, this means disabling liga should be "safe". Since not ligating lam-alef isn't "safe", it seems we can fix these fonts for the cost of a minor code change. (In reply to comment #7) > Does it change your mind at all that all Arabic fonts from Windows XP have > this same structure, where lam-alef is in liga? I checked arial.ttf, > simpo.ttf, and trado.ttf. Later versions of these fonts (Windows 7, I guess) > changed to using rlig for lam-alef. > > I know disabling liga is not a totally standard use case, but it seems like > a reasonable thing to want to do. Microsoft's OpenType page says: The 'liga' > feature is used to map glyphs to their optional ligated form. To me, this > means disabling liga should be "safe". Since not ligating lam-alef isn't > "safe", it seems we can fix these fonts for the cost of a minor code change. We know all of that. The combination of XP fonts, on Free Software systems, with liga turned off and for a good reason, really is not interesting enough to us. And as I replied to you on the Chromium issue, your usecase is also broken. Ok, thanks for the feedback. I'll resolve WONTFIX. FWIW, the description of the 'liga' feature in the registry[1] says: "This feature serves a critical function in some contexts, and should be active by default." So I stand by the position that Blink should not be disabling it by default. It should only be disabled if a user explicitly chooses to disable it; and if this causes lam-alef breakage with some fonts, so be it. [1] http://www.microsoft.com/typography/otspec/features_ko.htm#liga |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.