Behdad Esfahbod [Tue, 9 Oct 2018 19:07:04 +0000 (15:07 -0400)]
[ot/ft] Implement get_nominal_glyphs() callback
Some more measurable speedup. The recent commits' speedups are as follows:
Testing with Roboto, ****when disabling kern and liga****:
Before:
FT --features=-kern,-liga
user↦ 0m0.521s
OT --features=-liga,-kern
user↦ 0m0.568s
After:
FT --features=-liga,-kern
user↦ 0m0.428s
OT --features=-liga,-kern
user↦ 0m0.470s
So, 17% speedup.
Note that FT callbacks are faster than OT these days since we added an advance
cache to FT. I don't think the difference is enough to justify adding a cache
to OT.
When not disabling kern, the thing is three times slower, so the speedups
are three times less impressive... Still, 5% not bad for a codebase that I
otherwise thought is optimized out.
Note that, because of this and other optimiztions in our main shaper,
disabling kern and liga, the OT shaper is now *faster* than the fallback
shaper. So, that's my recommendation to clients that need the absolute
fastest...
Behdad Esfahbod [Tue, 9 Oct 2018 18:50:57 +0000 (14:50 -0400)]
Call get_nominal_glyphs() for runs of simple clusters at a time
Even without FT or OT font funcs implementing get_nominal_glyphs(), there's measurable
speedup.
Behdad Esfahbod [Tue, 9 Oct 2018 18:38:23 +0000 (14:38 -0400)]
Whitespace
Behdad Esfahbod [Tue, 9 Oct 2018 18:37:08 +0000 (14:37 -0400)]
Avoid sort and recompose stages if all clusters simple
Even has measurable speedup...
Behdad Esfahbod [Tue, 9 Oct 2018 18:36:25 +0000 (14:36 -0400)]
Fix warning
How come this one is not generated by clang everything bot?!
../../../test/api/test-multithread.c:37:26: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
static char *font_path = "fonts/Inconsolata-Regular.abc.ttf";
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/api/test-multithread.c:38:21: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Behdad Esfahbod [Tue, 9 Oct 2018 18:33:24 +0000 (14:33 -0400)]
Rewrite main normalizer loop to isolate runs of simple clusters
Behdad Esfahbod [Tue, 9 Oct 2018 18:12:59 +0000 (14:12 -0400)]
Inline decompose_cluster
Towards separating the common case into its own loop.
Behdad Esfahbod [Tue, 9 Oct 2018 13:23:51 +0000 (09:23 -0400)]
[font] Add get_nominal_glyphs() callback (note the plural)
Unused as of now. To be wired up to normalizer, which would remove
overhead and allow hb-ot-font initialization to become a no-op, so
we can enable it by default.
Behdad Esfahbod [Tue, 9 Oct 2018 13:06:07 +0000 (09:06 -0400)]
Minor
Chun-wei Fan [Wed, 25 Jul 2018 10:26:10 +0000 (18:26 +0800)]
test/api/test-subset-*.c: Fix build on pre-C99
Ensure that we have the variables at the beginning of the block. These
are the only fixes that we need for building HarfBuzz on older
compilers.
Chun-wei Fan [Wed, 25 Jul 2018 10:12:34 +0000 (18:12 +0800)]
builds: Fix and clean up MSVC DLL builds
Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio. Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.
Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs. Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
Behdad Esfahbod [Tue, 9 Oct 2018 12:28:07 +0000 (08:28 -0400)]
Another old bot fix
Behdad Esfahbod [Tue, 9 Oct 2018 12:20:10 +0000 (08:20 -0400)]
Try fixing older bots
Behdad Esfahbod [Tue, 9 Oct 2018 12:01:49 +0000 (08:01 -0400)]
Add const to get_*_advances API
Ouch!
Behdad Esfahbod [Tue, 9 Oct 2018 11:48:52 +0000 (07:48 -0400)]
Port test off deprecated API
Behdad Esfahbod [Tue, 9 Oct 2018 05:10:15 +0000 (01:10 -0400)]
Minor
Behdad Esfahbod [Tue, 9 Oct 2018 05:07:36 +0000 (01:07 -0400)]
[icu] Unbreak
Behdad Esfahbod [Tue, 9 Oct 2018 05:05:28 +0000 (01:05 -0400)]
Remove test for deprecated hb_set_invert()
Behdad Esfahbod [Tue, 9 Oct 2018 04:56:33 +0000 (00:56 -0400)]
Properly remove deprecated stuff
Behdad Esfahbod [Tue, 9 Oct 2018 04:39:42 +0000 (00:39 -0400)]
Remove deprecated decompose_compatibility stuff
Behdad Esfahbod [Tue, 9 Oct 2018 04:33:30 +0000 (00:33 -0400)]
Remove deprecated eastasian_width
Behdad Esfahbod [Tue, 9 Oct 2018 04:30:45 +0000 (00:30 -0400)]
[ft/ot] Remove implementation of deprecated kerning funcs
Behdad Esfahbod [Tue, 9 Oct 2018 04:22:08 +0000 (00:22 -0400)]
[kern] Minor
Behdad Esfahbod [Tue, 9 Oct 2018 04:20:35 +0000 (00:20 -0400)]
[kern] Minor
Behdad Esfahbod [Tue, 9 Oct 2018 04:01:09 +0000 (00:01 -0400)]
Deprecate font kern API
Behdad Esfahbod [Tue, 9 Oct 2018 03:57:45 +0000 (23:57 -0400)]
Apply TrueType/OpenType kern table when GPOS kern feature is not available
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
Behdad Esfahbod [Tue, 9 Oct 2018 03:30:24 +0000 (23:30 -0400)]
Separate fallback kern vs mark positioning
Behdad Esfahbod [Tue, 9 Oct 2018 03:26:26 +0000 (23:26 -0400)]
[kern] Add kerning driver to TT kern table
Behdad Esfahbod [Tue, 9 Oct 2018 03:09:48 +0000 (23:09 -0400)]
[kern] Abstract away kerning machine
Behdad Esfahbod [Tue, 9 Oct 2018 02:44:16 +0000 (22:44 -0400)]
Add HB_DEPRECATED
Fixes https://github.com/harfbuzz/harfbuzz/issues/1232
Behdad Esfahbod [Tue, 9 Oct 2018 02:41:08 +0000 (22:41 -0400)]
[kerx] Process coverage flags
Behdad Esfahbod [Tue, 9 Oct 2018 02:31:35 +0000 (22:31 -0400)]
Deprecate decompose_compatibility stuff
Behdad Esfahbod [Tue, 9 Oct 2018 02:26:39 +0000 (22:26 -0400)]
Deprecate eastasian_width stuff
Behdad Esfahbod [Mon, 8 Oct 2018 20:41:08 +0000 (16:41 -0400)]
Minor
Behdad Esfahbod [Mon, 8 Oct 2018 20:32:44 +0000 (16:32 -0400)]
Minor
Behdad Esfahbod [Mon, 8 Oct 2018 20:10:54 +0000 (16:10 -0400)]
[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Mon, 8 Oct 2018 03:08:39 +0000 (23:08 -0400)]
[kerx] Minor
Behdad Esfahbod [Mon, 8 Oct 2018 02:58:06 +0000 (22:58 -0400)]
[kern] Shout less
Behdad Esfahbod [Mon, 8 Oct 2018 02:52:53 +0000 (22:52 -0400)]
[kerx] Clean up Format2
Behdad Esfahbod [Mon, 8 Oct 2018 02:43:59 +0000 (22:43 -0400)]
[kern/kerx] Fix Format2 offsetting
"The values in the right class table are stored pre-multiplied by the
number of bytes in a single kerning value, and the values in the left
class table are stored pre-multiplied by the number of bytes in one
row. This eliminates needing to multiply the row and column values
together to determine the location of the kerning value. The array can
be indexed by doing the right- and left-hand class mappings, adding the
class values to the address of the array, and fetching the kerning
value to which the new address points."
Behdad Esfahbod [Mon, 8 Oct 2018 02:33:41 +0000 (22:33 -0400)]
[kerx] Clean up Format0
Behdad Esfahbod [Mon, 8 Oct 2018 02:30:42 +0000 (22:30 -0400)]
Support HBUINT32 BinSearchArrayOf
Behdad Esfahbod [Mon, 8 Oct 2018 02:28:45 +0000 (22:28 -0400)]
Move code
Behdad Esfahbod [Mon, 8 Oct 2018 02:27:00 +0000 (22:27 -0400)]
[aat] Rename
Behdad Esfahbod [Mon, 8 Oct 2018 00:46:11 +0000 (20:46 -0400)]
Rename invisible_codepoint to invisible_glyph in API
Deleted recently added API:
hb_buffer_set_invisible_codepoint()
hb_buffer_get_invisible_codepoint()
hb-shape / hb-view --invisible-codepoint
New API:
hb_buffer_set_invisible_glyph()
hb_buffer_get_invisible_glyph()
hb-shape / hb-view --invisible-glyph
Fixes https://github.com/harfbuzz/harfbuzz/issues/1216
Behdad Esfahbod [Mon, 8 Oct 2018 00:36:46 +0000 (20:36 -0400)]
Revert "[morx] Fix MORX-35"
This reverts commit
f62f6e90ad1f1a83f77771ad65ee1ffb79470a8a.
Behdad Esfahbod [Mon, 8 Oct 2018 00:35:06 +0000 (20:35 -0400)]
[buffer] Improve shift_forward()
"Improve" is a strong word in this case though, I understand.
Behdad Esfahbod [Sun, 7 Oct 2018 22:06:53 +0000 (18:06 -0400)]
[morx] Fix MORX-35
Fixes https://github.com/harfbuzz/harfbuzz/issues/1224
Behdad Esfahbod [Sun, 7 Oct 2018 22:52:12 +0000 (18:52 -0400)]
Remove some code
We use scratch-flags to short-circuit this function. No need for previous
early loop.
Behdad Esfahbod [Sun, 7 Oct 2018 22:00:14 +0000 (18:00 -0400)]
[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Sun, 7 Oct 2018 18:01:33 +0000 (14:01 -0400)]
[kerx] Clean up kerx and KerxTable structures
Behdad Esfahbod [Sun, 7 Oct 2018 16:41:52 +0000 (18:41 +0200)]
Add API for setting invisible-codepoint
Fixes https://github.com/harfbuzz/harfbuzz/issues/1216
New API:
hb_buffer_set_invisible_codepoint()
hb_buffer_get_invisible_codepoint()
hb-shape / hb-view --invisible-codepoint
Behdad Esfahbod [Sun, 7 Oct 2018 16:23:45 +0000 (18:23 +0200)]
[ot-font] Load hmtx/vmtx lazily
Since we have get_*_advanes() API now, the overhead is once per shape,
not once per glyph.
Only cmap is warmed-up at set_funcs() time now.
Behdad Esfahbod [Sun, 7 Oct 2018 16:21:15 +0000 (18:21 +0200)]
Minor
Behdad Esfahbod [Sun, 7 Oct 2018 15:51:50 +0000 (17:51 +0200)]
Minor
Behdad Esfahbod [Sun, 7 Oct 2018 14:31:33 +0000 (16:31 +0200)]
[coretext] Fix OS X check
Fixes https://github.com/harfbuzz/harfbuzz/issues/1230
Behdad Esfahbod [Sat, 6 Oct 2018 19:31:44 +0000 (21:31 +0200)]
[morx] Fix memory access issues with unsafe_to_break
Ebrahim Byagowi [Sat, 6 Oct 2018 19:12:56 +0000 (22:42 +0330)]
Make msan output a little more readable
Ebrahim Byagowi [Sat, 6 Oct 2018 08:49:33 +0000 (12:19 +0330)]
Use tempfile in run-tests as a fix for Windows CI fails (#1228)
Behdad Esfahbod [Sat, 6 Oct 2018 00:40:57 +0000 (02:40 +0200)]
[uniscribe/coretext] Fix for previous change
Behdad Esfahbod [Fri, 5 Oct 2018 16:39:48 +0000 (18:39 +0200)]
[vector] Make hb_vector_t relocatable / nestable
Ugly, but...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1227
Behdad Esfahbod [Fri, 5 Oct 2018 16:21:08 +0000 (18:21 +0200)]
Add hb_vector_t::fini_deep ()
Behdad Esfahbod [Fri, 5 Oct 2018 16:14:13 +0000 (18:14 +0200)]
[morx] Fix memory access issue
If buffer was enlarged, info was being outdated.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
Behdad Esfahbod [Fri, 5 Oct 2018 09:33:19 +0000 (11:33 +0200)]
[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Fri, 5 Oct 2018 00:49:29 +0000 (02:49 +0200)]
Change vendor features from Harf/Buzz to HARF/BUZZ
https://github.com/harfbuzz/harfbuzz/commit/
a01194aaf4c15160330b4042066263b2c963b658#commitcomment-
30772041
"The tag space of tags consisting of four uppercase letters (A-Z) with no punctuation,
spaces, or numbers, is reserved as a vendor space. Font vendors may use such tags to
identify private features."
Behdad Esfahbod [Thu, 4 Oct 2018 14:36:42 +0000 (16:36 +0200)]
More bot fixes
Behdad Esfahbod [Thu, 4 Oct 2018 14:31:14 +0000 (16:31 +0200)]
Fix a warning
Behdad Esfahbod [Thu, 4 Oct 2018 14:23:42 +0000 (16:23 +0200)]
[test] Choose 'ot' shaper specifically
Now that we added morx support, our OS X bot is running them through CoreText
and failing (with a DoS / infinite loop no less!). Always run tests through
our own shaper.
Behdad Esfahbod [Thu, 4 Oct 2018 11:28:13 +0000 (13:28 +0200)]
[TODO] Clean up
Behdad Esfahbod [Thu, 4 Oct 2018 11:00:37 +0000 (13:00 +0200)]
Enable two OpenType features, 'Harf' and 'Buzz'
One early, before script-specific features, one late, after. Allows font
developers to detect us and behave differently if needed.
Behdad Esfahbod [Thu, 4 Oct 2018 10:13:55 +0000 (12:13 +0200)]
[test/text-rendering-tests] Update from upstream
Behdad Esfahbod [Thu, 4 Oct 2018 10:09:45 +0000 (12:09 +0200)]
Minor
Behdad Esfahbod [Thu, 4 Oct 2018 09:34:21 +0000 (11:34 +0200)]
Apply morx if there's no GSUB!
Behdad Esfahbod [Thu, 4 Oct 2018 09:08:15 +0000 (11:08 +0200)]
[aat] Add +hb_aat_layout_has_substitution
Sascha Brawer [Thu, 4 Oct 2018 07:17:08 +0000 (09:17 +0200)]
Minor: Fix autoconf warning
Before this change, autoconf was emitting the following warnings:
```
configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:368: AC_USE_SYSTEM_EXTENSIONS is expanded from...
configure.ac:22: the top level
```
Sascha Brawer [Thu, 4 Oct 2018 07:24:08 +0000 (09:24 +0200)]
[morx] Only insert glyphs at mark when a mark has been set before
This reverts commit
f4072e8cb81072cd6d51a2607efedb76c02e7db1.
https://github.com/harfbuzz/harfbuzz/issues/1195
Ebrahim Byagowi [Wed, 3 Oct 2018 22:44:18 +0000 (02:14 +0330)]
Minor, fix double-promotion warnings (#1221)
Ebrahim Byagowi [Wed, 3 Oct 2018 20:59:40 +0000 (00:29 +0330)]
State our graphite2 dependency no-deprecated compile flag (#1220)
mhosken [Wed, 3 Oct 2018 19:33:26 +0000 (02:33 +0700)]
Update Graphite API to latest (#1215)
Behdad Esfahbod [Wed, 3 Oct 2018 19:30:48 +0000 (21:30 +0200)]
Add emoji test for recent work
Ebrahim Byagowi [Wed, 3 Oct 2018 19:19:02 +0000 (22:49 +0330)]
[ci] Delete azure-pipelines
End of experiment, we might get back to it later
Behdad Esfahbod [Wed, 3 Oct 2018 19:17:59 +0000 (21:17 +0200)]
Clean Fitzpatrick hack
Behdad Esfahbod [Wed, 3 Oct 2018 19:11:13 +0000 (21:11 +0200)]
Unbreak Fitzpatrick
Fixes https://github.com/harfbuzz/harfbuzz/issues/1159
Behdad Esfahbod [Wed, 3 Oct 2018 19:02:16 +0000 (21:02 +0200)]
Rewrite grapheme-formation in terms of new work
Also, don't attach ZWNJ to previous cluster. Closer to Unicode graphemes.
Behdad Esfahbod [Wed, 3 Oct 2018 18:50:12 +0000 (20:50 +0200)]
Minor
Behdad Esfahbod [Wed, 3 Oct 2018 18:45:19 +0000 (20:45 +0200)]
[test] Split a test
Ebrahim Byagowi [Wed, 3 Oct 2018 18:22:15 +0000 (21:52 +0330)]
Update azure-pipelines.yml
Behdad Esfahbod [Wed, 3 Oct 2018 18:19:17 +0000 (20:19 +0200)]
Fix distcheck
Behdad Esfahbod [Wed, 3 Oct 2018 18:16:03 +0000 (20:16 +0200)]
[thai] Set continuation on decomposed nikhahit
Behdad Esfahbod [Wed, 3 Oct 2018 18:13:20 +0000 (20:13 +0200)]
[indic] Reset continuation on inserted dottedcircle
Behdad Esfahbod [Wed, 3 Oct 2018 18:09:14 +0000 (20:09 +0200)]
[buffer] Inline some more
Behdad Esfahbod [Wed, 3 Oct 2018 18:06:32 +0000 (20:06 +0200)]
Add code
Behdad Esfahbod [Wed, 3 Oct 2018 18:05:28 +0000 (20:05 +0200)]
[indic] Simplify dottedcircle
Behdad Esfahbod [Wed, 3 Oct 2018 17:44:15 +0000 (19:44 +0200)]
[emoji] Mark emoji contination sequences as continuation
This adds a new grapheme bit. Not used yet.
Part of https://github.com/harfbuzz/harfbuzz/issues/1159
Behdad Esfahbod [Wed, 3 Oct 2018 17:19:51 +0000 (19:19 +0200)]
Dotted-circle all marks, not just non-spacing, at text beginning
Ebrahim Byagowi [Wed, 3 Oct 2018 17:56:58 +0000 (21:26 +0330)]
[test] Use an in-repo font for test-multithread (#1218)
As Khaled's suggestion, hard-coded font paths was only for my own testing.
azure-pipelines[bot] [Wed, 3 Oct 2018 17:47:05 +0000 (17:47 +0000)]
[ci] Add a test Azure Pipelines Linux bot
Related #1219
Behdad Esfahbod [Wed, 3 Oct 2018 17:10:28 +0000 (19:10 +0200)]
Fix build
Behdad Esfahbod [Wed, 3 Oct 2018 16:07:49 +0000 (18:07 +0200)]
[indic] Fix clang everything
Behdad Esfahbod [Wed, 3 Oct 2018 15:54:09 +0000 (17:54 +0200)]
Minor