Bug 858736 - [Spanish] Stray dotted circle rendered
Summary: [Spanish] Stray dotted circle rendered
Alias: None
Product: Fedora
Classification: Fedora
Component: harfbuzz
Version: 18
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-09-19 14:23 UTC by Iván Jiménez
Modified: 2012-10-20 19:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-10-20 19:52:27 UTC

Attachments (Terms of Use)
screenshot of dotted circles (44.59 KB, image/png)
2012-09-19 14:23 UTC, 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 19:23 UTC, Steve Tyler
no flags Details

Description Iván Jiménez 2012-09-19 14:23:32 UTC
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 15:33:22 UTC
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 16:09:03 UTC
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 12:32:08 UTC
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-26 01:38:00 UTC
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 10:01:09 UTC
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 16:29:35 UTC
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 19:45:14 UTC
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 19:23:16 UTC
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-17 01:11:11 UTC
(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.