Garret Rieger
b14475d2ae
[subset] further changes to serializer error handling.
...
- Rename enum type and enum members.
- in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker.
- Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
4 years ago
Garret Rieger
73ed59f7a6
[subset] store errors in the serializer as a flag set.
...
Make check_assign/check_equal specify the type of error to set.
4 years ago
Garret Rieger
b9ecc7420d
[subset] init offset_overflow in hb_serialize_context_t.
4 years ago
Garret Rieger
cf79fc342d
[subset] limit priority bumps to 16.
4 years ago
Garret Rieger
0104409959
Fix repack_tests for distcheck.
4 years ago
Garret Rieger
e2f14e81bd
[subset] fix memory leaks in test-repacker.
4 years ago
Garret Rieger
d3e2ba7c01
[subset] comment cleanup in hb-repacker.hh
4 years ago
Garret Rieger
832f2b599b
[subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'.
4 years ago
Garret Rieger
bb5c80a7c2
[subset] add error tracking to the repacker.
...
Also check for allocation failures as needed.
4 years ago
Garret Rieger
b8b8c58b9f
[subset] add tests that check for successful repacking of a real font file.
4 years ago
Garret Rieger
6e9468fcfb
[subset] cleanup memory leaks in the repacker.
4 years ago
Garret Rieger
a7a86a6eb4
[subset] Add prioritization offset resolution.
...
Vertices can now be prioritized to force them to sort closer to their parent. The resolver will attempt to use this for overflows on non-shared vertices.
4 years ago
Garret Rieger
b452b2c76c
[subset] refactor repacker graph to cache edge count and distances of vertices.
4 years ago
Garret Rieger
75414e82b5
[subset] Add table duplication overflow resolution.
4 years ago
Garret Rieger
8286bd8094
[subset] use vectors instead of hashmaps throughout the repacker since all keys will be mapped for these use cases.
4 years ago
Garret Rieger
519ae96617
[subset] switch sort_shortest_distance() to use priority queue.
4 years ago
Garret Rieger
5d3511e5b1
[subset] Change compute_distances() to use a priority queue.
4 years ago
Garret Rieger
59ac0a0d0a
[subset] Use priority for comparison in heap.
4 years ago
Garret Rieger
4c8dd41ed9
[subset] re-write compute distances to use an array lookup for the distance map.
4 years ago
Garret Rieger
5c4e0ffd97
[subset] Add a basic priority queue datastructure (binary heap).
4 years ago
Garret Rieger
dd8e5d0e1b
[subset] Only run the repacker for GSUB/GPOS.
4 years ago
Garret Rieger
aaa7873d42
[subset] add topological sort by closest distance via Dijkstra's algorithm.
4 years ago
Garret Rieger
8ebe5d734f
Implement will_overflow ().
4 years ago
Garret Rieger
6b1ea4cbe7
[subset] hook up the repacker to run if offset overflows are encountered during subsetting.
4 years ago
Garret Rieger
f4c78cc7dd
[subset] Implement Kahn's algo for topological sorting instead of BFS.
4 years ago
Garret Rieger
00f393dc3f
[subset] finish up BFS sort implementation.
4 years ago
Garret Rieger
1584d3cb8f
[subset] Start a proof of concept implementation of the GSUB/GPOS offset overflow resolver.
4 years ago
Behdad Esfahbod
a7d120aeab
Merge pull request #2835 from googlefonts/remove_redundant_sys
...
[subset] Remove redundant LangSys
4 years ago
Qunxin Liu
56ca435787
[subset] fix for collect_features and remove_redundant_lamngsys
...
previously remove_redundant_sys () is missing in harfbuzz, after
redundant langsys removal, some features are removed as well in
prune_features() in fonttools. This change is trying to get the same
result between harfbuzz and fonttools.
4 years ago
Garret Rieger
69d772e522
[subset] Fixed test gsub5 test files.
4 years ago
Qunxin Liu
0e1c0fa404
[subset] optimize glyph closure method: step 5
...
add testcase and some fixes
4 years ago
Qunxin Liu
b8a58a0c0b
[subset] optimize glyph closure method: step 4
...
optimize recurse_lookups in Context/ChainContext
glyph closure, only the glyphs that the parent lookup
can apply the recursion to can participate in recursing
the lookup.
4 years ago
Qunxin Liu
62423504ee
[subset] optimize glyph closure method: step 3
...
Add function intersects_coverage_glyphs that collects
set of matching glyphs in Coverage table
4 years ago
Qunxin Liu
ef78d0f923
[subset] optimize glyph closure method: step 2
...
Add function intersects_class_glyphs that collects
set of glyphs matching class in ClassDef table
4 years ago
Qunxin Liu
b4fc593c3c
[subset] optimize glyph closure method: step1
...
Previous GSUB glyph closure is done by recursively visiting
all reachable lookup tables that apply to any glyphs in the
current/input glyph set, but actually only the glyphs that
the parent lookup can apply the recursion to can participate
in recursing the lookup. This is step 1 for glyph closure
optimization:
1. Add stack of currently active glyph set pointers into hb_closure_context_t
2. Update closure() method in simple GSUB tables to use
this stack in order not to change current glyph set at different stages
of recursion
3. Add function may_have_non_1to1() to GSUB tables
4 years ago
Behdad Esfahbod
5f4c321d4a
Merge pull request #2894 from googlefonts/gpos_2
...
[subset] Update PairPosFormat2 subsetting to match fontTools
4 years ago
Garret Rieger
1b79b8cd2d
[subset] update gpos tests to reflect updated behaviour.
4 years ago
Garret Rieger
2df39bcae7
[subset] don't allocate a set to use as a glyph filter for PairPosFormat2.
4 years ago
Garret Rieger
b1b1486d07
[subset] update expected files to not include cmap12 pruning.
4 years ago
Garret Rieger
bb54e1047d
[subset] Also filter class1 by coverage when collecting variation indices for PairPosFormat2.
4 years ago
Garret Rieger
190b7a98f8
[subset] Update PairPosFormat2 subsetting to match fontTools updated subsetting ( https://github.com/fonttools/fonttools/pull/2221 )
...
- subset class def 1 against the coverage table.
- Don't re-use class 0 in class def 2.
- Ignore class 0 glyphs for the purposes of determing format 1 vs format 2 encoding for ClassDef.
Add an additional test case which demonstrates these issues.
4 years ago
Khaled Hosny
03538e872a
2.8.0
4 years ago
Khaled Hosny
4c34478b28
Merge pull request #2899 from harfbuzz/ci-fix
...
[ci] Don’t install meson from its master branch
4 years ago
Behdad Esfahbod
daeb277346
Merge pull request #2900 from harfbuzz/nodiscard-buffer
...
Mark buffer modification methods that can fail with nodiscard
4 years ago
Khaled Hosny
f2d08578e7
[tests] Increase shape-fuzzer timeout
4 years ago
Khaled Hosny
cad753e20f
[ci] Use known working Ubuntu version
...
GitHub Actions seems to be moving ubuntu-latest from ubuntu-18.04 to
ubuntu-20.04, but gcovr is broken for us in the new version.
4 years ago
Khaled Hosny
ff86c72e09
[ci] Avoid duplicate builds on pull requests
...
Don’t run GitHub Actions on pushing to branches other than master. This
was already the case for the linux-ci workflow.
4 years ago
Behdad Esfahbod
f5356bcb61
[ci] Switch back to c++2a
...
Okay I guess we can be bothered to fix things up for next version of C++.
Reverts meat of c0b3b9b258
4 years ago
Behdad Esfahbod
9e397ff2fb
[buffer] Fix order of HB_INTERNAL HB_DISCARD
...
Sucks that has to be specified in this order. But that is what it is for now.
Was only exhibiting problem on C++>=17 since that's when the [[nodiscard]]
was introduced.
4 years ago
Behdad Esfahbod
9582640eed
[ci] Remove more cruft
...
All were commented out already.
4 years ago