Compiling and linking https://gist.github.com/drott/c78215e20bf23648f11a05ff3850a13c against libfreetype_harfbuzz.so from the Chromium tree shows that glyph id 2 loses hinting after HarfBuzz commit a7bd6d7a4c53ff61d7d8286a594aaa0a0e15b1a1.
(from the subsetted test font from https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/third_party/NotoSans/NotoSansDevanagari-Regular-uni091D.ttf
The stack trace for where one of the set function returns false is:
Breakpoint 1, main () at main.cpp:11
11 SkImageInfo image_info = SkImageInfo::Make(100, 100, SkColorType::kRGB_565_SkColorType, SkAlphaType::kOpaque_SkAlphaType);
(gdb) c
Continuing.
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
Breakpoint 3, hb_set_t::add_sorted_array<OT::IntType<unsigned short, 2u> > (this=0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>, array=0x7ffff4c064b2, count=1, stride=2)
at ../../third_party/harfbuzz-ng/src/hb-set-private.hh:287
287 if (unlikely (in_error)) return false;
(gdb) p in_error
$1 = true
(gdb) bt 20
#0 hb_set_t::add_sorted_array<OT::IntType<unsigned short, 2u> > (this=0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>, array=0x7ffff4c064b2, count=1, stride=2)
at ../../third_party/harfbuzz-ng/src/hb-set-private.hh:287
#1 0x00007ffff5bc0dac in OT::CoverageFormat1::add_coverage<hb_set_t> (this=0x7ffff4c064ae, glyphs=0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh:719
#2 0x00007ffff5bc0abd in OT::Coverage::add_coverage<hb_set_t> (this=0x7ffff4c064ae, glyphs=0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh:935
#3 0x00007ffff5bc098c in OT::SingleSubstFormat1::collect_glyphs (this=0x7ffff4c064a8, c=0x7fffffff84d8) at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh:57
#4 0x00007ffff5bc08fd in OT::hb_collect_glyphs_context_t::dispatch<OT::SingleSubstFormat1> (this=0x7fffffff84d8, obj=...) at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh:114
#5 0x00007ffff5bc0234 in OT::SingleSubst::dispatch<OT::hb_collect_glyphs_context_t> (this=0x7ffff4c064a8, c=0x7fffffff84d8) at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh:244
#6 0x00007ffff5bbff0d in OT::SubstLookupSubTable::dispatch<OT::hb_collect_glyphs_context_t> (this=0x7ffff4c064a8, c=0x7fffffff84d8, lookup_type=1)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh:1108
#7 0x00007ffff5bbfdcd in OT::Lookup::dispatch<OT::SubstLookupSubTable, OT::hb_collect_glyphs_context_t> (this=0x7ffff4c064a0, c=0x7fffffff84d8)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout-common-private.hh:624
#8 0x00007ffff5bbfd68 in OT::SubstLookup::dispatch<OT::hb_collect_glyphs_context_t> (this=0x7ffff4c064a0, c=0x7fffffff84d8) at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh:1263
#9 0x00007ffff5bbc36b in OT::SubstLookup::collect_glyphs (this=0x7ffff4c064a0, c=0x7fffffff84d8) at ../../third_party/harfbuzz-ng/src/hb-ot-layout-gsub-table.hh:1170
#10 0x00007ffff5bb5110 in hb_ot_layout_lookup_collect_glyphs (face=0x6093b0, table_tag=1196643650, lookup_index=0, glyphs_before=0x0, glyphs_input=0x0, glyphs_after=0x0, glyphs_output=0x606c30)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout.cc:831
#11 0x00007ffff5af3f66 in af_shaper_get_coverage (globals=0x605cf0, style_class=0x7ffff5a3bfbc <af_deva_dflt_style_class>, gstyles=0x605ff8, default_script=0 '\000')
at ../../third_party/freetype/src/src/autofit/afshaper.c:194
#12 0x00007ffff5b02d0b in af_face_globals_compute_style_coverage (globals=0x605cf0) at ../../third_party/freetype/src/src/autofit/afglobal.c:255
#13 0x00007ffff5b02784 in af_face_globals_new (face=0x609ba0, aglobals=0x7fffffff88e8, module=0x6072c0) at ../../third_party/freetype/src/src/autofit/afglobal.c:371
#14 0x00007ffff5b020a0 in af_loader_reset (loader=0x7fffffff88e0, module=0x6072c0, face=0x609ba0) at ../../third_party/freetype/src/src/autofit/afloader.c:56
#15 0x00007ffff5b01637 in af_loader_load_glyph (loader=0x7fffffff88e0, module=0x6072c0, face=0x609ba0, glyph_index=1, load_flags=5243400) at ../../third_party/freetype/src/src/autofit/afloader.c:304
#16 0x00007ffff5af3c31 in af_autofitter_load_glyph (module=0x6072c0, slot=0x60a520, size=0x60aa10, glyph_index=1, load_flags=5243400) at ../../third_party/freetype/src/src/autofit/afmodule.c:561
#17 0x00007ffff5b04488 in FT_Load_Glyph (face=0x609ba0, glyph_index=1, load_flags=5243400) at ../../third_party/freetype/src/src/base/ftobjs.c:904
#18 0x00007ffff7b404e6 in SkScalerContext_FreeType::generateMetrics (this=0x647e20, glyph=0x605c80) at ../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1103
#19 0x00007ffff7442c3f in SkScalerContext::getMetrics (this=0x647e20, glyph=0x605c80) at ../../third_party/skia/src/core/SkScalerContext.cpp:109
(More stack frames follow...)
From the following
(gdb) f 10
#10 0x00007ffff5bb5110 in hb_ot_layout_lookup_collect_glyphs (face=0x605eb0, table_tag=1196643650, lookup_index=0, glyphs_before=0x0, glyphs_input=0x0, glyphs_after=0x0, glyphs_output=0x606ad0)
at ../../third_party/harfbuzz-ng/src/hb-ot-layout.cc:831
831 l.collect_glyphs (&c);
(gdb) kl
Undefined command: "kl". Try "help".
(gdb) l
826 switch (table_tag)
827 {
828 case HB_OT_TAG_GSUB:
829 {
830 const OT::SubstLookup& l = hb_ot_layout_from_face (face)->gsub->get_lookup (lookup_index);
831 l.collect_glyphs (&c);
832 return;
833 }
834 case HB_OT_TAG_GPOS:
835 {
(gdb) p c
$1 = {<OT::hb_dispatch_context_t<OT::hb_collect_glyphs_context_t, _hb_void_t const*, 0>> = {static max_debug_depth = 0}, face = 0x605eb0, before = 0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>,
input = 0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>, after = 0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>, output = 0x606ad0, recurse_func =
0x7ffff5bbfcd0 <OT::SubstLookup::dispatch_recurse_func<OT::hb_collect_glyphs_context_t>(OT::hb_collect_glyphs_context_t*, unsigned int)>, recursed_lookups = 0x645d50, nesting_level_left = 6,
debug_depth = 0}
(gdb) p c.before
$2 = (hb_set_t *) 0x7ffff5a645e0 <hb_set_get_empty::_hb_set_nil>
(gdb) p c.before.in_error
$3 = true
(gdb) p c.face.in_error
There is no member or method named in_error.
(gdb) p c.input.in_error
$4 = true
(gdb) p c.after.in_error
$5 = true
(gdb) p c.output.in_error
$6 = false
it looks like since in afshaper.c:185 no input, before and after sets are specified, these are the empty sets, which always return true for in_error, is that intended?
Comment 1 by drott@chromium.org
, Dec 19 2017