Garret Rieger
c6adb90a27
[subset] fix nullptr deref.
4 years ago
Garret Rieger
9a3537e5f6
[subset] invert err() return value. Undo previous change to check_success.
4 years ago
Garret Rieger
a804a0c903
[subset] add fuzzer test case.
4 years ago
Garret Rieger
cdba5d44c2
[subset] fix incorrect handling of return value in check_success in the error case.
4 years ago
Behdad Esfahbod
05e845c49a
Make previous commit gcc-only
4 years ago
Behdad Esfahbod
b5e4032392
-Wno-unused-result
...
GCC doesn't let one turn off the warning using "(void) foo()".
People have introduced macros that do "unused << foo()" instead.
Until we do something similar, silence gcc.
Clang on the other hand understands "(void) foo()".
4 years ago
Khaled Hosny
c30349d54e
[hb-view] Support kitty inline images protocol
...
https://github.com/harfbuzz/harfbuzz/issues/2758
4 years ago
Khaled Hosny
f7d5889b3e
[hb-view] Support iTerm2 inline images protocol
...
https://github.com/harfbuzz/harfbuzz/issues/2758
4 years ago
Khaled Hosny
743baf3543
[build] Don’t look for FontConfig
...
We don’t currently use it anywhere. It was used briefly for the
hb-fc-list tool, but this tool have not been built since 2015:
commit cd042fc8c4
Author: Behdad Esfahbod <behdad@behdad.org>
Date: Thu Jun 18 10:55:13 2015 -0700
[util] Disable hb-fc-list for now
Until I figure out what to do about the API, and finalize
the tool.
4 years ago
Qunxin Liu
95230e291d
[subset] support subsetting GSUB8
4 years ago
David Corbett
d18915f920
Reformat gen-tag-table.py
4 years ago
Garret Rieger
3c8273ab68
Check for alloc failures on the gsub/gpos_langsys maps in subset plan creation.
4 years ago
Behdad Esfahbod
29708e959a
[aat] Fix offsetToIndex math for out-of-bounds values
...
Previously, some bad font data was accidentally being interpretted as
legit if it happened to not fall out of memory bounds. The intention
of the code was what this commit does. I'm surprised we weren't getting
a "arithmetic between signed and unsigned values" warning / error
before.
4 years ago
Behdad Esfahbod
c5d6bdb4bf
Merge pull request #2857 from googlefonts/repacker
...
[subset] add a GSUB/GPOS table repacker to resolve offset overflows.
4 years ago
Garret Rieger
46bf03d691
[subset] add NODISCARD to error checking methods on serializer.
4 years ago
Garret Rieger
3827a3eb56
[subset] rename serializer::set_error() to err().
4 years ago
Garret Rieger
f561fa6e4c
Change priority queue to use (priority, value) instead of (value, priority).
4 years ago
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