Bug 858736 - [Spanish] Stray dotted circle rendered
[Spanish] Stray dotted circle rendered
Product: Fedora
Classification: Fedora
Component: harfbuzz (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Kalev Lember
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-09-19 10:23 EDT by Iván Jiménez
Modified: 2012-10-20 15:52 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-10-20 15:52:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot of dotted circles (44.59 KB, image/png)
2012-09-19 10:23 EDT, Iván Jiménez
no flags Details
screenshot from gnome control center showing Spanish "región" incorrectly rendered (725.08 KB, image/png)
2012-10-11 15:23 EDT, Steve Tyler
no flags Details

  None (edit)
Description Iván Jiménez 2012-09-19 10:23:32 EDT
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):

How reproducible:

Steps to Reproduce:
1. update to harfbuzz-0.9.4-1
2. set Spanish as interface language

Additional info:
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.
Comment 1 Parag Nemade 2012-09-19 11:33:22 EDT
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.
Comment 2 Behdad Esfahbod 2012-09-19 12:09:03 EDT
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.
Comment 3 Behdad Esfahbod 2012-09-25 08:32:08 EDT
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...

To summarize:

- 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.
Comment 4 Behdad Esfahbod 2012-09-25 21:38:00 EDT
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.
Comment 5 Jakub Steiner 2012-09-26 06:01:09 EDT
What glyph is Cantarell actually lacking? We most definitely have o with acute (u00f3 and u00d3) pictured on the screenshot.
Comment 6 Behdad Esfahbod 2012-09-26 12:29:35 EDT
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...
Comment 7 Behdad Esfahbod 2012-09-26 15:45:14 EDT
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.
Comment 8 Steve Tyler 2012-10-11 15:23:16 EDT
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
Comment 9 Iván Jiménez 2012-10-16 21:11:11 EDT
(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.

Note You need to log in before you can comment on or make changes to this bug.