-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some character combinations aren't rendered #3050
Comments
Debugging reveals that call to
and UBIDI_RTL -> only one item for
@MaxSem - I think the problem is that 'ICU itemizer' sets RTL direction to the whole run even there is a neutral char '+' or '-' etc. I'm not sure if this is expected and we need look at harfbuzz shaping or? Your feedback would be super useful as I'm not an expert on RTL languages. /cc @springmeyer |
I don't know anything about it either, but I have people around who do:) My colleague says that the second example is correct too. |
ICU has
Passing various option combinations ^ result in "א-" rendered or not. But I don't know if we should be using non-default options or .. I feel we need an expert advice here :) |
I have no clue what this bug is about, but playing with bidi settings sounds like the wrong approach. It's definitely a bug in your (mapnik) code. |
These are all correct. No matter what the bidi algorithm returns, if a char is not being displayed, that sounds like a problem in mapnik code. That's regardless of whether the bidi is correct or not. |
Hmmm. I looked into this a bit and it seems to happen with all non-alphanumeric chars, not just minus. See here. Haven't figured out why this happens yet. |
It seems to fail whenever RTL character (aleph) is preceded by the direction-neutral character. |
After some debugging, I think I understand the problem, but not the solution. Script itemizer treats |
You don’t need to change the script itemisation, you need to fix the font fallback mechanism; If mapnik has one it is clearly failing here. |
If i understood it correctly, mapnik only supports the entire sub-string in the same font, because its not drawing it one letter at a time, but one sub-string at a time. That's why I think we would need to split the string further. BUT, I might be wrong here. |
Someone who knows about mapnik font fallback handling (or lack of) needs to chime in here, but one simple and effective way to handle font fallback is what is briefly described in this mailing list post: http://lists.freedesktop.org/archives/harfbuzz/2015-October/005168.html |
I think I finally found and fixed the problem. The Harfbuzz shaper goes through the font face set for each text item, looking for a single font face that can render all glyphs. In the case of a text item containing both hebrew and common scripts, there is no such face. It then falls through, rendering the text item with whatever font face happens to end up last in the list. |
(thinking about it, a simple array would probably have been the better choice for this, instead of a map...) |
Should this issue be closed, now that #3151 has been merged? |
@nyurik - yes, closing. |
Minimum repro: "א-" - that's Hebrew letter aleph and minus sign. This is reproduceable at least with Hebrew, Arabic and Georgian characters, if appropriate fonts are present in fallback chain.
In the sample attached, aleph is not properly rendered in combination with minus sign while it has no problems with being rendered alone or combined with Latin (and that's the same Unicode range as minus) or Chinese characters.
Full XML to reproduce this bug, along with fonts used and C++ and Node.js examples is at https://github.com/MaxSem/mapnik-bug
The text was updated successfully, but these errors were encountered: