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*)
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.
New API:
HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
hb-shape / hb-view --remove-default-ignorables
One more text-rendering-tests test passing. Eleven failing.
I like to have a mode where CONTAINS_NOTDEF and CONTAINS_DOTTEDCIRCLE are not
returned. Abused a value of -1 for that. hb-shape now uses it. Fixes two
of the six tests failing with --verify in test/shaping/run-tests.sh.
We break and shape fragments and reconstruct shape result from them.
Remains to compare to original buffer. Going to add some buffer
comparison API and use here, instead of open-coding.
Before, that was printed using --debug (and in both hb-shape and hb-view).
Changed it, now hb-shape has a new command-line argument called --show-messages.
When invoked, it also respects other output formatting options. The messages
are better formatted and printed to te same place that hb-shape output is
directed to. Previously they were written to stderr.
Fixes https://github.com/behdad/harfbuzz/issues/506
Pre-2013 MSVC does not have scalbn() and scalbnf(), which are used in the
utility programs. Add fallback implementations for these, which can be
used when necessary.
Before, if one called hb_shape() without setting script, language, and
direction on the buffer, hb_shape() was calling
hb_buffer_guess_segment_properties() on the user's behalf to guess
these.
This is very dangerous, since any serious user of HarfBuzz must set
these properly (specially important is direction). So now, we don't
guess properties by default. People not setting direction will get
an abort() now. If the old behavior is desired (fragile, good for
simple testing only), users can call
hb_buffer_guess_segment_properties() on the buffer just before calling
hb_shape().