Garret Rieger
52d59bf150
[perf] Make subset benchmark data driven.
3 years ago
Behdad Esfahbod
0a42410dc8
[cff2] Change extents/shape stack to be just a number
...
Do the blending immediately.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3559
Benchmark on AdobeVFPrototype shows 35% speedup. Now we're faster
than FreeType:
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/glyph_extents/AdobeVFPrototype.otf/hb -0.3792 -0.3792 1584 983 1581 982
BM_Font/glyph_extents/AdobeVFPrototype.otf/ft +0.0228 +0.0224 1220 1248 1218 1245
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/hb -0.3513 -0.3518 1616 1048 1613 1046
BM_Font/glyph_extents/AdobeVFPrototype.otf/var/ft +0.0172 +0.0169 1232 1254 1230 1251
3 years ago
Garret Rieger
5277a5772b
[perf] Add benchmarks for CFF subsetting.
3 years ago
Garret Rieger
8f9f0c494b
[subset] Enforce cmap12 group ordering constraints in collect_mapping.
...
Fixes fuzzer issue: https://oss-fuzz.com/testcase-detail/6365271012540416
3 years ago
Behdad Esfahbod
c99ad0f015
Merge pull request #3572 from harfbuzz/cff-stack
...
Cff stack
3 years ago
Behdad Esfahbod
1b14d2ff13
[cff] Fix arg-stack peek() impl
3 years ago
Behdad Esfahbod
6106ef8c0f
[cff] Tighten up arg-stack access
3 years ago
Behdad Esfahbod
8c616a6efe
[cff] Allocate stack inline instead of using hb_vector_t
...
Speeds up glyph_extents and glyph_shape benchmarks for CFF by 10
to 16 percent!
3 years ago
Behdad Esfahbod
c941ece60f
[cff] Use using instead of typedef
3 years ago
Behdad Esfahbod
64d63cebe2
[cff-common] Use existing types for str_buff_vec_t
3 years ago
Behdad Esfahbod
e1838ec1f8
[cff-common] Remove unused method
3 years ago
Behdad Esfahbod
8aa54aaca2
[cff] Replace byte_str_t with hb_bytes_t use
3 years ago
Behdad Esfahbod
fe1d85a55a
[cff] Remove custom byte_str_t impl
3 years ago
Behdad Esfahbod
c8a5f1e3c0
[cff-common] Indent
3 years ago
Behdad Esfahbod
be7b2905cb
[cff-common] Remove unused INDEX::serialize() method
3 years ago
Behdad Esfahbod
60390169b6
[cff-common] Write str_buf_t::total_size() as dagger
3 years ago
Behdad Esfahbod
258afb45b7
[cff-common] Use range-based loop in str_buff_vec_t
3 years ago
Behdad Esfahbod
8bb1a3ce9a
[cff-common] Write INDEX offset-size calc using hb_bit_storage()
3 years ago
Behdad Esfahbod
2ccfe84eff
[cff-common] Add assert to INDEX::set_offset_at()
3 years ago
Behdad Esfahbod
4bcab9e99a
[cff-common] Use byte_str_t() instead of Null(byte_str_t)
3 years ago
Behdad Esfahbod
94f7a26322
[cff-common] Fix get_size() for Null object
...
The special-casing didn't make sense.
3 years ago
Behdad Esfahbod
c9cc7d5d21
[cff-common] Inline once-used method in INDEX
3 years ago
Behdad Esfahbod
11482a3a39
[cff-common] Remove unused method from INDEX
3 years ago
Behdad Esfahbod
d1bb3b08f6
[cff-common] Hide more INDEX internals
3 years ago
Behdad Esfahbod
d3b21387fd
[cff-common] Remove redundant operator implementation
3 years ago
Behdad Esfahbod
a96b408d80
[cff-common] Hide INDEX internals
3 years ago
Behdad Esfahbod
335b1d83cf
[cff-common] No need to check max-offset in INDEX
...
The length_at() function makes sure out-of-range offsets
are discarded. We just need to check the last offset.
3 years ago
Garret Rieger
b051f3fa83
[subset] Fix cpal subsetting when there are partial palette overlaps.
...
The existing code doesn't correctly handle the case where palettes partially overlap in the color record array. This changes the subsetting to only share entries in the color record array when palettes have the same first color index. Partially overlapping palettes will be converted to disjoint segments in the color record array.
Updates one of the color tests to use multiple palettes.
Also fixes fuzzer: https://oss-fuzz.com/testcase-detail/5568200165687296 .
3 years ago
Behdad Esfahbod
2884eb97bf
[cff-common] Remove special-casing of count=0 in INDEX serialize
...
The generic code-path now can handle count=0.
3 years ago
Behdad Esfahbod
fc7f51aece
[cff-common] Reduce iterator calls
3 years ago
Behdad Esfahbod
c857b8e3c6
[cff-common] Set INDEX min_size to 2
...
That is what it is, for an empty INDEX.
3 years ago
Behdad Esfahbod
dd71d2c1c3
[gvar] Protect against offset underflow
3 years ago
Behdad Esfahbod
9a6dabd61a
[gvar] Remove sanitize check for data array
...
We are not checking in sanitize that offset array is ascending,
so this check was bogus.
3 years ago
Behdad Esfahbod
38478d1061
[gvar] DEFINE_SIZE_ARRAY instead of DEFINE_SIZE_MIN
3 years ago
Behdad Esfahbod
90d278c92e
[gvar] Remove requirement that num_glyphs matches the font's
3 years ago
Behdad Esfahbod
ca8a0f3ea3
[gvar] Protect against out-of-range access
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47281
Fixes https://oss-fuzz.com/testcase-detail/5508865908670464
3 years ago
Behdad Esfahbod
f10ddb8dd8
[cmap] Use -1 as Unicode sentinel, not U+FFFF in Format12 serialize
3 years ago
Behdad Esfahbod
8a19968c8b
[cmap] Use iterator bool operator
3 years ago
Behdad Esfahbod
8bfeea4828
[subset] Compute set max using previous()
3 years ago
Behdad Esfahbod
00cb8c629d
[subset] Don't go into glyf table if it's empty
3 years ago
Behdad Esfahbod
4fe69bc413
[subset] Use del_range in _remove_invalid_gids
3 years ago
Behdad Esfahbod
2a42edccbe
[subset] Cosmetic; use set bulk array population instead of for loop
3 years ago
Garret Rieger
bc5129d7fa
[perf] use option_t in subset benchmark to select between glyphs and codepoint subset.
3 years ago
Behdad Esfahbod
43938ecdc2
[subset] Remove outdated comment
...
I tried something like that. It was slower because of the allocations.
3 years ago
Garret Rieger
6212856ce8
[perf] benchmark subsetting via glyphs.
3 years ago
Behdad Esfahbod
6829dd30ad
Merge pull request #3562 from harfbuzz/subset-cmap-no-qsort
...
[subset] In cmap planning, remove a qsort()
3 years ago
Behdad Esfahbod
50db78ba83
[subset] In cmap planning, remove a qsort()
3 years ago
Behdad Esfahbod
052812b6ba
Merge pull request #3561 from googlefonts/cmap_opt
...
[subset] Further cmap subsetting speed optimizations
3 years ago
Garret Rieger
7cb36e4222
[subset] Re-introduce size threshold in choosing unicode collection method.
...
Threshold is needed since the unicodes set might be an inverted set.
3 years ago
Garret Rieger
42c54eba83
[subset] Presize unicode to gid list to unicodes + glyphs size.
3 years ago