From the commit:
+ /* For ChainContextFormat2 we cache the LookaheadClassDef instead of InputClassDef.
+ * The reason is that most heavy fonts want to identify a glyph in context and apply
+ * a lookup to it. In this scenario, the length of the input sequence is one, whereas
+ * the lookahead / backtrack are typically longer. The one glyph in input sequence is
+ * looked-up below and no input glyph is looked up in individual rules, whereas the
+ * lookahead and backtrack glyphs are tried. Since we match lookahead before backtrack,
+ * we should cache lookahead. This decisions showed a 20% improvement in shaping of
+ * the Gulzar font.
https://github.com/harfbuzz/harfbuzz/pull/3636
This commit adds a per-lookup caching infrastructure to GSUB/GPOS, and
uses it to cache input ClassDef.get_class value for (Chain)ContextLookupFormat2.
For fonts heavy on use of heave class-based2 context matching, this shows
a good speedup. For NotoNastaliqUrdu for example, I observe 17% speedup.
Unfortunately not many other lookups can use a cache like this :(.
https://github.com/harfbuzz/harfbuzz/pull/3636
When harfbuzz is a subproject paths are in the form
"subprojects/harfbuzz/src/...". Instead of removing "src/" prefix, take
the absolute path and make it relative to current source dir.
This fix regression introduced in
https://github.com/harfbuzz/harfbuzz/pull/3394.
Weird. Somehow our HB_TINY bot started erring as this var being unused
in non-debug builds. Not sure why now...
In file included from src/hb-ot-map.hh:32:0,
from src/hb-ot-shape.hh:32,
from src/hb-aat-layout.hh:32,
from src/hb-aat-layout.cc:30,
from src/harfbuzz.cc:1:
src/hb-buffer.hh: In member function ‘void hb_buffer_t::assert_var(unsigned int, unsigned int)’:
src/hb-buffer.hh:192:18: error: unused variable ‘bits’ [-Werror=unused-variable]
unsigned int bits = (1u<<end) - (1u<<start);
^~~~
cc1plus: some warnings being treated as errors
Error: Process completed with exit code 1.
gi doesn't understand that FT_Face is a pointer, and not bare struct.
So it skips these APIs anyway. Mark skip to silense the warning.
../src/hb-ft.cc:242: Warning: HarfBuzz: hb_ft_font_get_face: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
../src/hb-ft.cc:264: Warning: HarfBuzz: hb_ft_font_lock_face: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
These texts were never hooked into the test suite, they however
represent a good collection of test texts, but one can always access
them from git history.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3123
Adopted from texts/in-house/shaper-use/script-javanese/misc.txt.
I don’t know what font this was originally tested against, so I used
Noto Sans Javanese.