Last Comment Bug 754243 - ###!!! ASSERTION: We don't have a glyph, but font indicated that it supported this char in tables?: 'gid != 0', file gfx/thebes/gfxFT2Fonts.cpp, line 641
: ###!!! ASSERTION: We don't have a glyph, but font indicated that it supported...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All Android
: -- normal (vote)
: mozilla15
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks: adbfuzz
  Show dependency treegraph
 
Reported: 2012-05-11 05:49 PDT by Christian Holler (:decoder)
Modified: 2012-05-23 08:04 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch, explicitly select Unicode charmap when we create an FT face (3.09 KB, patch)
2012-05-21 02:33 PDT, Jonathan Kew (:jfkthame)
jd.bugzilla: review+
Details | Diff | Review

Description Christian Holler (:decoder) 2012-05-11 05:49:20 PDT
The following HTML code triggers an assertion on Fennec Native (mozilla-central, debug build, rev 448f554f6acb):


<script>
var x = document.createElementNS("http://www.w3.org/1999/xhtml", "textarea");
document.documentElement.appendChild(x);
x.value = "\uC879\uFE08\"\uF38F\n";
</script>


I verified that this assertion does not trigger on a Firefox desktop debug build.
Comment 1 Jonathan Kew (:jfkthame) 2012-05-21 02:33:53 PDT
Created attachment 625584 [details] [diff] [review]
patch, explicitly select Unicode charmap when we create an FT face

I've also seen this assertion on a desktop linux build with --disable-pango, which causes us to use the "FT2 fonts" backend, similarly to Android.

It seems that when a font contains multiple charmaps, Freetype may not necessarily choose the Unicode one when the face is created; if it picks MacRoman, for example, then characters outside that set will not be found, even though they may be present in the font. So this patch explicitly selects the Unicode charmap after we create the face.
Comment 2 Jonathan Kew (:jfkthame) 2012-05-21 03:03:45 PDT
Tryserver build (Android) is at https://tbpl.mozilla.org/?tree=Try&rev=881c20ceb90f.
Comment 4 Ed Morley [:emorley] 2012-05-23 08:04:16 PDT
https://hg.mozilla.org/mozilla-central/rev/2d57dc085e14

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