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]
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...
This reverts commit 94bfea0ce6.
This reverts commit 4e62627831.
We might reintroduce it later, but for now remove, as it was unused.
Some things that should have been in this object (drop_hints, etc)
are already in hb_subset_input_t. So, for now, keep everything there.
This checks if the blob isn't empty and uses `hb_face_count`
to see if the font file passes the simple font file sanitization
so can detect if the input is actually a font and checks also
whether input font-index is out of range.
We were passing the font path directly to freetype so rendering
was broken when we are getting the font from stdin.
This fixes it by using FT_New_Memory_Face instead.
This fixes:
* build/util/hb-view /dev/stdin text < font.ttf
* build/util/hb-view - text < font.ttf
* cat font.ttf | build/util/hb-view - text
but doesn't work on
* cat font.ttf | build/util/hb-view /dev/stdin text
which I will try to fix separately.