Michiharu Ariza [Mon, 6 Aug 2018 17:44:12 +0000 (10:44 -0700)]
Silence Codacy
Michiharu Ariza [Mon, 6 Aug 2018 17:04:53 +0000 (10:04 -0700)]
subset FDSelect and FDArray
Added a set of sources hb-subset-cff-common-private.cc & .hh for FDSelect subseting code.
Added FDSelect format 4 (CFF2 only) support. Shared its implementation with format 3 as a template.
Michiharu Ariza [Fri, 3 Aug 2018 22:00:37 +0000 (15:00 -0700)]
silence gcc
Michiharu Ariza [Fri, 3 Aug 2018 21:35:09 +0000 (14:35 -0700)]
Removed parsed hint fields from CFF2PrivateDictValues
Instead moved & stored uniformly in values vector (renamed from opstrs)
This should be fine as we aren't likely going to use them as hints after all
Templatized DictValues whether to parse them out
For subsetter, they aren't parsed
Michiharu Ariza [Thu, 2 Aug 2018 23:28:10 +0000 (16:28 -0700)]
templatized CFF2 accelerator for lean Private dict interpretting for subset
also fixed local subrs serialization
Michiharu Ariza [Thu, 2 Aug 2018 19:23:10 +0000 (12:23 -0700)]
removed TRACE_SERIALIZE from non-member function _write_cff2
Michiharu Ariza [Thu, 2 Aug 2018 18:39:22 +0000 (11:39 -0700)]
Merge branch 'master' into cff-subset
Michiharu Ariza [Thu, 2 Aug 2018 18:22:42 +0000 (11:22 -0700)]
more silencing fixes
Michiharu Ariza [Thu, 2 Aug 2018 17:52:08 +0000 (10:52 -0700)]
silence archlinux
Michiharu Ariza [Thu, 2 Aug 2018 17:18:01 +0000 (10:18 -0700)]
silence Codacy
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
Michiharu Ariza [Thu, 2 Aug 2018 00:34:59 +0000 (17:34 -0700)]
removed unused field OpStr::update
Michiharu Ariza [Wed, 1 Aug 2018 23:32:27 +0000 (16:32 -0700)]
fixed Index::serialize
The bug was causing CharString of the last glyph corrupt
Michiharu Ariza [Wed, 1 Aug 2018 23:06:52 +0000 (16:06 -0700)]
fixed CFF2VariationStore::serialize
also get_size
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)
Michiharu Ariza [Wed, 1 Aug 2018 18:30:38 +0000 (11:30 -0700)]
Implemented hb_subset_cff2
Added serialize functions to CFF2 structs
Fixed issues & bugs & code cleanup
Now subsetting CFF2 table outputs something
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
Michiharu Ariza [Mon, 30 Jul 2018 22:27:20 +0000 (15:27 -0700)]
fixed FDSelect0::sanitize
Michiharu Ariza [Mon, 30 Jul 2018 21:28:40 +0000 (14:28 -0700)]
Added sanitize functions & calls
Added sanitize functions to FDSelect
Added satnitize calls for FDSelect, VariationStore, FDArray, TopDict
Michiharu Ariza [Mon, 30 Jul 2018 19:22:09 +0000 (12:22 -0700)]
Merge branch 'master' into cff-subset
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.
Behdad Esfahbod [Mon, 23 Jul 2018 05:50:58 +0000 (22:50 -0700)]
Remove Sanitizer<>
Behdad Esfahbod [Mon, 23 Jul 2018 05:49:26 +0000 (22:49 -0700)]
Port rest of code away from Sanitizer<>
Behdad Esfahbod [Mon, 23 Jul 2018 05:47:19 +0000 (22:47 -0700)]
Port dump-emoji away from Sanitizer<>
Behdad Esfahbod [Mon, 23 Jul 2018 05:45:26 +0000 (22:45 -0700)]
.
Behdad Esfahbod [Mon, 23 Jul 2018 05:44:22 +0000 (22:44 -0700)]
Minor
Behdad Esfahbod [Mon, 23 Jul 2018 05:40:56 +0000 (22:40 -0700)]
Port sbix off of Sanitizer<>
Behdad Esfahbod [Mon, 23 Jul 2018 05:40:32 +0000 (22:40 -0700)]
Port more off of Sanitizer<>
Behdad Esfahbod [Mon, 23 Jul 2018 05:24:31 +0000 (22:24 -0700)]
Add sanitizer reference_table, also fix clang build
Clang is being really peculiar. Fix with:
- inline hb_blob_t *sanitize (hb_blob_t *blob) { return c->sanitize<Type> (blob); }
+ inline hb_blob_t *sanitize (hb_blob_t *blob) { return c[0].template/*clang idiosyncrasy*/sanitize_blob<Type> (blob); }
David Corbett [Fri, 13 Apr 2018 22:45:37 +0000 (18:45 -0400)]
Order Chakma split vowels in accordance with NFC
Fixes #1105.
Ebrahim Byagowi [Sat, 21 Jul 2018 16:44:48 +0000 (21:14 +0430)]
Add a new API, hb_ot_layout_get_feature_name_ids (#976)
This new API returns cvXX and ssXX related NameId, things like
featUiLabelNameId, featUiTooltipTextNameId, sampleTextNameId, ... of cvXX
and UINameId of ssXX, in a unified way.
However HarfBuzz currently doesn't expose an API for retrieving the actual
information associated with NameId from the `name` table and that should be
done separately.
Michiharu Ariza [Wed, 18 Jul 2018 21:17:52 +0000 (14:17 -0700)]
first push of CFF/CFF2 work
Index, Dict structs
hooked up to hb-subset (takes CFF2, outputs empty CFF2)
Ebrahim Byagowi [Tue, 17 Jul 2018 18:59:16 +0000 (23:29 +0430)]
Remove dump-fon (#1100)
It had interesting stuffs like EXE parsing and
big-endian parsers but added in an attempt to find
a solution for #681 which later found not related.
Ebrahim Byagowi [Tue, 17 Jul 2018 18:02:37 +0000 (22:32 +0430)]
Remove AAT's gcid/fmtx (#1099)
We are not going to use them, at least in the foreseeable future
Behdad Esfahbod [Tue, 17 Jul 2018 17:17:59 +0000 (19:17 +0200)]
Fix hb_face_count() sanitize referencing