Based on experimenting with Uniscribe to extract grammar and categories.
Failures down from 44 to 35:
KHMER: 299089 out of 299124 tests passed. 35 failed (0.0117008%)
We still don't enforce the one-matra rule pre-decomposition, but enforce
an order and one-matra-per-position post-decomposition.
https://github.com/harfbuzz/harfbuzz/issues/667
These are only relevant to Sinhala, because they decompose in other
cases. The USE spec categorizes them all as VPst. No idea why we
weren't following that before.
clang warning:
../../util/options.hh:72:13: warning: destination for this 'memset' call is a pointer to dynamic class
'option_parser_t'; vtable pointer will be overwritten [-Wdynamic-class-memaccess]
memset (this, 0, sizeof (*this));
~~~~~~ ^
../../util/options.hh:72:13: note: explicitly cast the pointer to silence this warning
memset (this, 0, sizeof (*this));
^
(void*)
Sure, gcc knows to warn about this as well:
../../util/options.cc:175:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 1: m.r = m.t;
~~~~^~~~~
../../util/options.cc:176:5: note: here
case 2: m.b = m.t;
^~~~
But HOLY SMOKES, look at clang -Weverything bot message:
options.cc:176:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 2: m.b = m.t;
^
options.cc:176:5: note: insert 'HB_FALLTHROUGH;' to silence this warning
case 2: m.b = m.t;
^
HB_FALLTHROUGH;
Right, it's telling me to insert "HB_FALLTHROUGH;" there!!!!!!!!!
From clang -Weverything bot:
options.cc:39:3: warning: no previous extern declaration for non-static variable 'supported_font_funcs' [-Wmissing-variable-declarations]
Alternative woul have been to resurrect F_COMBINE that I removed in
70136a78cb
But this does it for now. I'm not sure why check-static-inits.sh didn't
catch this before. Clang -Weverything bot did:
CXX libharfbuzz_la-hb-ot-shape-complex-indic.lo
hb-ot-shape-complex-indic.cc:99:1: warning: declaration requires a global constructor [-Wglobal-constructors]
indic_features[] =
^
1 warning generated.
CXX libharfbuzz_la-hb-ot-shape-complex-khmer.lo
hb-ot-shape-complex-khmer.cc:36:1: warning: declaration requires a global constructor [-Wglobal-constructors]
khmer_features[] =
^
1 warning generated.
uint32_t was getting promoted to signed int, which is not what we wanted...
Wow, clang has become good at generating warnings...
../../src/hb-common.h:349:29: warning: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Wshift-sign-overflow]
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/
^~~~~~~~~~
../../src/hb-common.h:93:20: note: expanded from macro 'HB_TAG_MAX'
define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/hb-common.h:89:57: note: expanded from macro 'HB_TAG'
define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4))))
~~~~~~~~~~~~~~~^ ~~
../../src/hb-common.h:349:3: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic]
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/
^ ~~~~~~~~~~
text-rendering-tests test MORX-32 shows that for Insertion, an unset mark is treated
as mark set at 0. This is unlike the Reordering lookup where un unset mark performs
nothing.
Fixes MORX-32.