Commit Graph

18 Commits

Author SHA1 Message Date
Garret Rieger efda2f14e1 [repacker] fix bug in subgraph isolation.
Prior to this fix id remapping at the end of the isolation operation was fed the old subgraph instead of the new one. Which results in object indices being remapped for the nodes outside of the new subgraph. Adds a test which detects this problem.
2021-09-24 17:53:08 -06:00
Garret Rieger 9247d24d7f [repacker] s/0/HB_TAG_NONE 2021-09-22 18:18:50 -06:00
Garret Rieger d0daa7a59b [repacker] add a couple more complex isolation tests. 2021-09-22 18:18:50 -06:00
Garret Rieger 58facaade1 [repacker] put each 32 bit subgraph into it's own packing space.
Each subgraph pointed to by a 32 bit offset should be packed into it's own space. This adds a space property to vertices which affects the distance calculation. This effectively places the distances for all of the nodes of a 32 bit subgraph into a distinct range. Thus all of the nodes of the subgraph will be packed together.
2021-09-22 18:18:50 -06:00
Garret Rieger 543a3f9733 [repacker] Add repacker test for subgraph isolation. 2021-09-22 18:18:50 -06:00
Garret Rieger 41bbf2812e [repacker] do extension subtable isolation before starting resolution attempts. 2021-09-22 18:18:50 -06:00
Behdad Esfahbod bb48bf52a4 Rename misc uses of "free"
In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
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.
2021-03-17 15:58:34 -07:00
Garret Rieger e2f14e81bd [subset] fix memory leaks in test-repacker. 2021-03-17 15:53:58 -07:00
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.
2021-03-17 15:53:58 -07:00
Garret Rieger b452b2c76c [subset] refactor repacker graph to cache edge count and distances of vertices. 2021-03-17 15:53:57 -07:00
Garret Rieger 75414e82b5 [subset] Add table duplication overflow resolution. 2021-03-17 15:53:57 -07:00
Garret Rieger 4c8dd41ed9 [subset] re-write compute distances to use an array lookup for the distance map. 2021-03-17 15:53:57 -07:00
Garret Rieger aaa7873d42 [subset] add topological sort by closest distance via Dijkstra's algorithm. 2021-03-17 15:53:57 -07:00
Garret Rieger 8ebe5d734f Implement will_overflow (). 2021-03-17 15:53:57 -07:00
Garret Rieger f4c78cc7dd [subset] Implement Kahn's algo for topological sorting instead of BFS. 2021-03-17 15:53:57 -07:00
Garret Rieger 00f393dc3f [subset] finish up BFS sort implementation. 2021-03-17 15:53:57 -07:00
Garret Rieger 1584d3cb8f [subset] Start a proof of concept implementation of the GSUB/GPOS offset overflow resolver. 2021-03-17 15:53:57 -07:00