Behdad Esfahbod [Tue, 7 Aug 2018 16:44:01 +0000 (09:44 -0700)]
Minor
Behdad Esfahbod [Tue, 7 Aug 2018 16:37:52 +0000 (09:37 -0700)]
Remove get_advances_nil and alias it to get_advances_default
Behdad Esfahbod [Mon, 6 Aug 2018 22:32:13 +0000 (15:32 -0700)]
[iter] Make operator bool explicit
We would need to write:
for (Iter<T> it (...); bool (t); t++)
instead of:
for (Iter<T> it (...); t; t++)
But I think it's an improvement in code readability in the long term.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1127
Behdad Esfahbod [Mon, 6 Aug 2018 16:45:17 +0000 (09:45 -0700)]
Add batch advance width callback function
New API:
+hb_font_funcs_set_glyph_h_advances_func
+hb_font_funcs_set_glyph_v_advances_func
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_h_advances_func_t
+hb_font_get_glyph_v_advances
+hb_font_get_glyph_v_advances_func_t
Koji Ishii [Wed, 1 Aug 2018 04:01:08 +0000 (13:01 +0900)]
batchwidth
Behdad Esfahbod [Mon, 6 Aug 2018 13:30:12 +0000 (06:30 -0700)]
Remove most uses of direct comparison to Null objects
Behdad Esfahbod [Mon, 6 Aug 2018 13:17:48 +0000 (06:17 -0700)]
Port _nil objects to Null() machinery
Finally, unified!
Behdad Esfahbod [Mon, 6 Aug 2018 12:53:35 +0000 (05:53 -0700)]
[BASE] Rename horzi/vert to h/v
Behdad Esfahbod [Mon, 6 Aug 2018 12:52:12 +0000 (05:52 -0700)]
[BASE] Misc fixes
The code was badly broken. In better shape now, but still, needs
a full review before ever working.
Behdad Esfahbod [Mon, 6 Aug 2018 12:29:15 +0000 (05:29 -0700)]
Change null-pool specialization to min_size again
Behdad Esfahbod [Mon, 6 Aug 2018 12:01:52 +0000 (05:01 -0700)]
Move Null system to hb-null.hh
Behdad Esfahbod [Mon, 6 Aug 2018 11:58:34 +0000 (04:58 -0700)]
Remove unused macros
Behdad Esfahbod [Mon, 6 Aug 2018 11:54:31 +0000 (04:54 -0700)]
Minor
Behdad Esfahbod [Mon, 6 Aug 2018 11:51:38 +0000 (04:51 -0700)]
Minor
Behdad Esfahbod [Mon, 6 Aug 2018 11:42:46 +0000 (04:42 -0700)]
Move hb_vector_t to hb-vector-private.hh
Behdad Esfahbod [Mon, 6 Aug 2018 11:32:51 +0000 (04:32 -0700)]
Move some more code around
Behdad Esfahbod [Mon, 6 Aug 2018 04:41:52 +0000 (21:41 -0700)]
Move null data definitions to hb-static.cc
Also remove " " null data for Tag. Just use zeroes.
Behdad Esfahbod [Sat, 4 Aug 2018 02:55:09 +0000 (19:55 -0700)]
Minor
Behdad Esfahbod [Sat, 4 Aug 2018 02:54:33 +0000 (19:54 -0700)]
Make lazy loader deal with OOM
Behdad Esfahbod [Sat, 4 Aug 2018 00:32:00 +0000 (17:32 -0700)]
Rename
Behdad Esfahbod [Sat, 4 Aug 2018 00:06:42 +0000 (17:06 -0700)]
[ot] Comment
Behdad Esfahbod [Sat, 4 Aug 2018 00:03:32 +0000 (17:03 -0700)]
[ot] Add misc tables to tables_t
Most unused.
Behdad Esfahbod [Fri, 3 Aug 2018 23:57:40 +0000 (16:57 -0700)]
[ot] Move GDEF into tables_t
Behdad Esfahbod [Fri, 3 Aug 2018 23:45:57 +0000 (16:45 -0700)]
[ot] Move GSUB/GPOS into tables_t
Behdad Esfahbod [Fri, 3 Aug 2018 23:34:25 +0000 (16:34 -0700)]
[ot] More shuffling
Misc. table loading now properly automated.
Behdad Esfahbod [Fri, 3 Aug 2018 23:22:16 +0000 (16:22 -0700)]
[ot] Minor
Behdad Esfahbod [Fri, 3 Aug 2018 06:13:19 +0000 (23:13 -0700)]
[ot] Move code around
Behdad Esfahbod [Fri, 3 Aug 2018 06:04:42 +0000 (23:04 -0700)]
[ot] Use switch for checking for blacklisted GDEF tables
Faster / more compact code.
Behdad Esfahbod [Fri, 3 Aug 2018 05:56:42 +0000 (22:56 -0700)]
[ot] In GDEF blacklisting logic, remove the glyph index check for Times
Just blacklist based on table sizes like we do for other fonts.
Behdad Esfahbod [Fri, 3 Aug 2018 03:04:37 +0000 (20:04 -0700)]
Move code around
Behdad Esfahbod [Thu, 2 Aug 2018 09:22:38 +0000 (02:22 -0700)]
Minor
Behdad Esfahbod [Thu, 2 Aug 2018 09:04:02 +0000 (02:04 -0700)]
Fix for recent rename
Behdad Esfahbod [Thu, 2 Aug 2018 09:03:13 +0000 (02:03 -0700)]
[uniscribe] Update for recent changes
Behdad Esfahbod [Thu, 2 Aug 2018 08:44:20 +0000 (01:44 -0700)]
Remove unused table reference
Behdad Esfahbod [Thu, 2 Aug 2018 08:41:19 +0000 (01:41 -0700)]
Minor
Behdad Esfahbod [Thu, 2 Aug 2018 08:37:57 +0000 (01:37 -0700)]
Make lazy-loader safe for nil objectification
Behdad Esfahbod [Thu, 2 Aug 2018 08:36:08 +0000 (01:36 -0700)]
Minor
Behdad Esfahbod [Thu, 2 Aug 2018 08:27:40 +0000 (01:27 -0700)]
Reduce storage by sharing face amongst lazy_loaders
Behdad Esfahbod [Thu, 2 Aug 2018 07:38:46 +0000 (00:38 -0700)]
Internal templatization of lazy-loaders
Behdad Esfahbod [Thu, 2 Aug 2018 06:59:09 +0000 (23:59 -0700)]
Remove OT namespace from hb-machinery-private.hh
Behdad Esfahbod [Thu, 2 Aug 2018 05:50:45 +0000 (22:50 -0700)]
Minor
Behdad Esfahbod [Thu, 2 Aug 2018 05:50:06 +0000 (22:50 -0700)]
[face] Sprinkle const in the API
Behdad Esfahbod [Thu, 2 Aug 2018 01:03:32 +0000 (18:03 -0700)]
Rename
Behdad Esfahbod [Thu, 2 Aug 2018 00:53:30 +0000 (17:53 -0700)]
Add comment re (our only) race condition
Behdad Esfahbod [Wed, 1 Aug 2018 21:51:51 +0000 (14:51 -0700)]
1.8.5
Behdad Esfahbod [Wed, 1 Aug 2018 21:13:59 +0000 (14:13 -0700)]
[atomic] Fix Solaris ones to add proper barriers
Behdad Esfahbod [Wed, 1 Aug 2018 21:02:39 +0000 (14:02 -0700)]
[atomic] Remove volatile from IBM impl signature
Behdad Esfahbod [Wed, 1 Aug 2018 21:00:46 +0000 (14:00 -0700)]
[atomic] Oops
Behdad Esfahbod [Wed, 1 Aug 2018 20:59:59 +0000 (13:59 -0700)]
[atomic] Use read-barrier for get()
Behdad Esfahbod [Wed, 1 Aug 2018 20:59:31 +0000 (13:59 -0700)]
[atomic] Some more minor tweaks
Ebrahim Byagowi [Wed, 1 Aug 2018 19:41:43 +0000 (00:11 +0430)]
[ci] Fix Appveyor bot (#1123)
Ebrahim Byagowi [Wed, 1 Aug 2018 07:45:44 +0000 (12:15 +0430)]
Revert "Add a new API, hb_ot_layout_get_feature_name_ids (#976)" (#1121)
This reverts commit
0c1b287b72e91e0898d75acb5d5acf1c6b9a7498.
Behdad Esfahbod [Wed, 1 Aug 2018 07:22:18 +0000 (00:22 -0700)]
[atomic] Fix cast to fallback ptr_get()
Behdad Esfahbod [Wed, 1 Aug 2018 07:19:25 +0000 (00:19 -0700)]
[gobject] Fix copy/paste error
Behdad Esfahbod [Wed, 1 Aug 2018 06:01:05 +0000 (23:01 -0700)]
[atomic] On IBM, use light-weight sync for everything
lwsync() is a full read/write-barrier. That's all we need, never
need sync(). I'm not sure why an isync() was used in fetch_and_add,
but since that's a read-modify-write, I just changed it to have
lwsync() on both sides.
Behdad Esfahbod [Wed, 1 Aug 2018 06:00:15 +0000 (23:00 -0700)]
[atomic] Add XXX items around Solaris ops
Since add_int and cas are both read-modify-write, I wonder if we
also need a barrier after them.
Behdad Esfahbod [Wed, 1 Aug 2018 05:51:38 +0000 (22:51 -0700)]
[atomic] Fix get() impl
Originally, glib's atomic_get was implemented as "memory_barrier; load".
I copied this into cairo, fontconfig, and harfbuzz. However, that's
wrong. Correct way is "load; memory_barrier". The details are long
and hard to fully grasp. Best to read:
https://www.kernel.org/doc/Documentation/memory-barriers.txt
Also see my report against GNOME:
https://gitlab.gnome.org/GNOME/glib/issues/1449
Note that this is irrelevant if C++11-like atomic ops are available.
Behdad Esfahbod [Wed, 1 Aug 2018 05:28:28 +0000 (22:28 -0700)]
[gobject] Hook up hb_map_t
Behdad Esfahbod [Wed, 1 Aug 2018 05:21:21 +0000 (22:21 -0700)]
[atomic] Fix fallback impl
Behdad Esfahbod [Wed, 1 Aug 2018 04:05:51 +0000 (21:05 -0700)]
[atomic] Add get_relaxed / set_relaxed
To help TSan and be more "correct".
Behdad Esfahbod [Wed, 1 Aug 2018 02:33:37 +0000 (19:33 -0700)]
[atomic] Use CONSUME, not ACQUIRE, memory-order for get()
Although, all implementations just elevate that to ACQUIRE.
But requirement for us is just CONSUME.
Behdad Esfahbod [Wed, 1 Aug 2018 02:29:49 +0000 (19:29 -0700)]
Revert "[atomic] Make pointer get op relaxed instead of acquire"
This reverts commit
b1e5650c67266dc158f22355fed206cd1c413f70.
After lots of head-scratching and finally finding the only truly
readable source to be the good old:
https://www.kernel.org/doc/Documentation/memory-barriers.txt
I've convinced myself that we need consume memory-ordering on get().
The location of memory-barrier in a load should be after, not before
the load. That needs fixing. I'll do that separately.
Garret Rieger [Wed, 1 Aug 2018 00:44:02 +0000 (17:44 -0700)]
[subset] limit the max codepoint value to the unicode limit.
When collecting all codepoints in the cmap avoid using large amount of memory for fonts that declare coverage over all 32 bit integers.
Garret Rieger [Wed, 1 Aug 2018 00:59:19 +0000 (17:59 -0700)]
[subset] Add hb_ot_layout_collect_features to harfbuzz-sections.txt.
Add the fuzzer test case for feature collection timeout.
Garret Rieger [Tue, 31 Jul 2018 01:10:43 +0000 (18:10 -0700)]
[subset] use add_array to populate feature_indexes.
This is much faster then calling a bunch of individual add()'s.
Garret Rieger [Tue, 31 Jul 2018 00:17:43 +0000 (17:17 -0700)]
[subset] collect features first, then use those to collect lookups.
Behdad Esfahbod [Tue, 31 Jul 2018 22:27:29 +0000 (15:27 -0700)]
[indic] Flip default logic for double-halants in old-school
Oriya went down from 9 to 2.
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707311 out of 707394 tests passed. 83 failed (0.0117332%)
GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%)
GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
MYANMAR: 1115830 out of 1123883 tests passed. 8053 failed (0.716534%)
ORIYA: 42327 out of 42329 tests passed. 2 failed (0.
00472489%)
SINHALA: 271596 out of 271847 tests passed. 251 failed (0.0923313%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.
00185457%)
Behdad Esfahbod [Tue, 31 Jul 2018 22:19:32 +0000 (15:19 -0700)]
[indic] Allow double-halant in old-spec Devanagari
Fixes https://github.com/harfbuzz/harfbuzz/issues/1071
Behdad Esfahbod [Tue, 31 Jul 2018 21:20:31 +0000 (14:20 -0700)]
[test] Add Khmer tests, with NotoSansKhmer-Regular.ttf
Note that there's minor positioning differences, and ONE reordering
difference between what we get for these and what Uniscribe gets.
Probably same as what's described in commit message for
1a96cc825dc9c8e3b6eef1403fe0864a1cfc0245
Behdad Esfahbod [Tue, 31 Jul 2018 21:10:31 +0000 (14:10 -0700)]
[khmer] Typo
Behdad Esfahbod [Tue, 31 Jul 2018 20:56:55 +0000 (13:56 -0700)]
[test] Add Khmer test texts from recent bugs
Behdad Esfahbod [Tue, 31 Jul 2018 20:55:53 +0000 (13:55 -0700)]
[test] Move things around for shaper updates
Behdad Esfahbod [Tue, 31 Jul 2018 20:38:07 +0000 (13:38 -0700)]
[khmer] Clear syllables before presentation features
Probably not what Uniscribe does, but good idea?
Behdad Esfahbod [Tue, 31 Jul 2018 20:35:10 +0000 (13:35 -0700)]
[khmer] Revert previous change, and remove pauses
This makes test suite happy again (at 44) while fixing the sequences
we were fixing, which were the following with KhmerUI.ttf:
U+1789,U+17BC
U+1789,U+17D2,U+1789
U+1789,U+17D2,U+1789,U+17BC
Fixes rest of https://github.com/harfbuzz/harfbuzz/issues/974
Behdad Esfahbod [Tue, 31 Jul 2018 19:49:02 +0000 (12:49 -0700)]
[khmer] Apply ccmp after basic features
Part of https://github.com/harfbuzz/harfbuzz/issues/974
Behdad Esfahbod [Tue, 31 Jul 2018 18:45:32 +0000 (11:45 -0700)]
[khmer] Rewrite most of shaper to better follow spec
Khmer spec has only one reordering phase, and only simple prebase
matra and Coeng-Ro reordering. Implement that. Specifically,
this was done to address recognizing different orders of the matra
and Coeng-Ro sequence. That said, some combinations are now
reordered differently from Uniscribe. Not clear if that's intended
or a bug in Uniscribe. The following two sequences render the same
in Uniscribe whereas we reorder them differently:
U+17A0,U+17D2,U+179A,U+17C2
U+17A0,U+17C2,U+17D2,U+179A
For that reason, our test suite numbers regressed slightly. Used
to be at 34 for fails, now at:
KHMER: 299080 out of 299124 tests passed. 44 failed (0.0147096%)
But generally a good change, and removed lots of code.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1026
Behdad Esfahbod [Tue, 31 Jul 2018 08:27:04 +0000 (01:27 -0700)]
[shaper] Move code around
Behdad Esfahbod [Tue, 31 Jul 2018 08:15:04 +0000 (01:15 -0700)]
[shaper] Remove a macro
Behdad Esfahbod [Tue, 31 Jul 2018 08:02:31 +0000 (01:02 -0700)]
[atomic] Make pointer get op relaxed instead of acquire
We only use it before cmpexch, so relaxed is fine and faster for
common case.
Behdad Esfahbod [Tue, 31 Jul 2018 00:03:06 +0000 (17:03 -0700)]
[serialize] Increase stage count from 8 to 32
Indic shaper uses many stages. Now we are provably not limiting
functionality whereas the previous limit of 8 was assuming real-world
practices.
Behdad Esfahbod [Mon, 30 Jul 2018 23:59:41 +0000 (16:59 -0700)]
[serialize] Remove unused truncate() method
Garret Rieger [Fri, 27 Jul 2018 00:42:02 +0000 (17:42 -0700)]
[subset] During lookup collection remember the features we've already processed.
Behdad Esfahbod [Fri, 27 Jul 2018 21:55:29 +0000 (14:55 -0700)]
Minor
Behdad Esfahbod [Thu, 26 Jul 2018 00:37:38 +0000 (17:37 -0700)]
[serialize] Allocate for markFilteringSet
Behdad Esfahbod [Thu, 26 Jul 2018 00:22:05 +0000 (17:22 -0700)]
Minor
prrace [Fri, 27 Jul 2018 20:58:27 +0000 (13:58 -0700)]
Fix unlikely leaks
Behdad Esfahbod [Thu, 26 Jul 2018 00:07:17 +0000 (17:07 -0700)]
Add hb-iter-private.hh
Unused so far.
Behdad Esfahbod [Wed, 25 Jul 2018 23:58:47 +0000 (16:58 -0700)]
Move some code from hb-open-type-private.hh to hb-machinery-private.hh
Behdad Esfahbod [Wed, 25 Jul 2018 23:01:37 +0000 (16:01 -0700)]
[closure] Allocate out set on the stack
Behdad Esfahbod [Wed, 25 Jul 2018 21:30:07 +0000 (14:30 -0700)]
Fix compile
Behdad Esfahbod [Wed, 25 Jul 2018 01:00:14 +0000 (18:00 -0700)]
[coretext] Add note
Garret Rieger [Wed, 25 Jul 2018 20:39:17 +0000 (13:39 -0700)]
[subset] Only used reachable lookups for gsub closure.
Behdad Esfahbod [Tue, 24 Jul 2018 16:43:27 +0000 (09:43 -0700)]
[closure] Separate in and out glyphs
Fixes https://github.com/harfbuzz/harfbuzz/issues/1107
Garret Rieger [Mon, 23 Jul 2018 22:37:18 +0000 (15:37 -0700)]
[subset] Limit the iterations of the closure algorithm.
Prevents O(n^2) run times.
Behdad Esfahbod [Mon, 23 Jul 2018 22:01:39 +0000 (15:01 -0700)]
Fix visibility on mingw32
Should fix bots again.
Behdad Esfahbod [Mon, 23 Jul 2018 21:44:10 +0000 (14:44 -0700)]
Fix infinite loop in loading num_glyphs within sanitizer
Behdad Esfahbod [Mon, 23 Jul 2018 20:24:26 +0000 (13:24 -0700)]
One more visibility trick
Should fix Windows build again.
Behdad Esfahbod [Mon, 23 Jul 2018 19:00:02 +0000 (12:00 -0700)]
One more
Behdad Esfahbod [Mon, 23 Jul 2018 18:57:45 +0000 (11:57 -0700)]
Remove unnecessary OT:: namespace specifiers
Behdad Esfahbod [Mon, 23 Jul 2018 18:46:46 +0000 (11:46 -0700)]
Set num glyphs on sanitizer reference_table()
Move out-of-class definitions of two methods to hb-static so they
are accessible in libharfbuzz-subset.