Created attachment 614404 [details]
screenshot of dotted circles
Description of problem:
A dotted circle is rendered after some (but not all) accented vowels (like ó) and in place of the letter "ñ". The screenshot shows three occurrences in System Settings, but it happens also in GNOME Shell.
The sequence "sión" appears to always render the circle.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. update to harfbuzz-0.9.4-1
2. set Spanish as interface language
It only happens in harfbuzz-0.9.4-1.fc18.x86_64, if I downgrade to harfbuzz-0.9.2-1.fc18.x86_64, rendering of text is correct.
Confirm this bug exists in 0.9.4 release. But its not present in 0.9.3 release. I think this bug is caused by upstream 6912e476dd92639c3ddf07ca51c8d4a262c8b3a5 or b85800f9de8976a7418ef9df467d3080c6ab0199 commit. Both added dotted circle.
Can someone confirm that the accent is being rendered using a different font from the text itself?
I'll work around it eventually, but lets first make sure that that is exactly the situation here.
The fontconfig orth file for Spanish only lists a few precomposed sequences, which /does/ include LATIN CAPITAL LETTER O WITH ACUTE and other problematic cases seen in the screenshot. So, it's in one sense a translation bug, until we fix pango to do harfbuzz-style normalization during pango_itemize()...
I'll go ahead and fix the dottedcircle insertion, but that will just make it look right accidentally...
- It's a translation bug: use precomposed sequence for now,
- It's a font bug: add accents. It's almost 2013,
- It's a fontconfig bug: require accents in Latin orth files?
- It's a pango bug: do integrate normalization during itemization.
- It's a harfbuzz bug: don't insert dottedcircle in mid-text items.
Ok, I pushed out the HarfBuzz fixes for this. Now to fix Pango to pass the textual context to HarfBuzz...
Font fix in the works at the same time.
What glyph is Cantarell actually lacking? We most definitely have o with acute (u00f3 and u00d3) pictured on the screenshot.
Lemme explain what's going on:
Spanish uses a few letters with accent combinations. Cantarell has those. The translations however are using decomposed accents put on top of regular ascii letters. Cantarell does not have those separate combining-mark accents. As such, Pango ends up rendering those using a fallback font. Now, in HarfBuzz 0.9.4 I made the change to insert a dotted-circle if a combining mark comes at the beginning of the text. Since the combining mark is not being rendered as a separate run of text, harfbuzz is adding the dotted-circle.
Now, I fixed harfbuzz to not do that if we know the run of text is not at the beginning of paragraph. Today I'm fixing Pango to pass the entire paragraph as context to harfbuzz. That should "fix" the bug, as in, no dotted circle will be inserted and the accent marks from the fallback font sometimes happen to, by pure luck, be positioned such that it looks acceptable.
For Cantarell to grow beyond simple Latin scripts, we need full combining marks and 'mark' and 'mkmk' GPOS tables. That's a lot of work though. Think about Bitstream Vera vs DejaVu...
Pushed out the Pango changes now. With HarfBuzz and Pango from master, this should "work" like before.
I suggest that Cantarell be worked on for longer term benefits, and I'll continue working on normalization support in fontconfig+pango independently.
Created attachment 625656 [details]
screenshot from gnome control center showing Spanish "región" incorrectly rendered
$ echo $LANG
$ rpm -qa harfbuzz control-center pango '*cantarell*' fontconfig | sort
(In reply to comment #2)
> Can someone confirm that the accent is being rendered using a different font
> from the text itself?
> I'll work around it eventually, but lets first make sure that that is
> exactly the situation here.
It's "fixed" in harfbuzz-0.9.5-1.fc18.x86_64. I remember testing accented vowels in gedit and they looked fine.