Behdad Esfahbod
9c0c31dfaa
[buffer] When deleting glyphs, check cluster backwards as well
2022-06-01 04:52:10 -06:00
Behdad Esfahbod
0384f80e78
[buffer-verify] If shaping buffers failed during verification, pass the test
2022-06-01 04:50:15 -06:00
Behdad Esfahbod
eba626ff6a
[shape-plan] Return empty plan if buffer direction is invalid
...
Happens if buffer creation failed.
2022-06-01 04:49:46 -06:00
Behdad Esfahbod
a441c6c16b
[shape] Only verify if text_buffer is successful
2022-06-01 04:49:39 -06:00
Behdad Esfahbod
f7f61aeb6f
[buffer] Add TODO item
2022-06-01 04:48:59 -06:00
Behdad Esfahbod
d72d37008d
[shape] Allow null buffer
...
Ouch!
2022-06-01 04:48:40 -06:00
Behdad Esfahbod
45a2252607
[flags] Fix undefined-behavior
...
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/hb-buffer.hh:60:1 in
failure on clusterfuzz-testcase-minimized-hb-subset-get-codepoints-fuzzer-5736539338833920
2022-05-31 06:35:42 -06:00
Behdad Esfahbod
f3f9fc1544
[buffer] Mark glyph_flags_t as flags
2022-05-31 06:35:42 -06:00
Behdad Esfahbod
ab143e85c3
[buffer] Add HB_BUFFER_FLAG_DEFINED and HB_BUFFER_SERIALIZE_FLAG_DEFINED
...
New API:
+ HB_BUFFER_FLAG_DEFINED
+ HB_BUFFER_SERIALIZE_FLAG_DEFINED
2022-05-31 06:35:42 -06:00
Behdad Esfahbod
9a2a857043
[ot-shape] Don't verify buffer if shaping failed
...
Fixes all of fuzzing verify failures, which were result of buffer failure
on super-long results, which fails unsafe-to-break because shorter strings
don't fail shaping.
2022-05-31 06:35:42 -06:00
Behdad Esfahbod
f8b26f43ec
Merge pull request #3606 from harfbuzz/32bit-varstore
...
32bit varstore
2022-05-31 11:22:32 +01:00
Behdad Esfahbod
5af5a56593
[VarStore] Implement writing 32bit var-store
...
Untested.
Finishes fixing https://github.com/harfbuzz/harfbuzz/issues/2965
2022-05-31 03:58:35 -06:00
Behdad Esfahbod
75112098ac
[VarStore] Implement reading 32bit var-store
...
Untested.
Part of https://github.com/harfbuzz/harfbuzz/issues/2965
Serializing is incomplete.
2022-05-31 03:58:29 -06:00
Xavier Claessens
334bd013d9
Skip warning when building as subproject and ragel is missing
...
It is unlikely to be a developer build in that case.
2022-05-30 18:27:33 +02:00
Behdad Esfahbod
e5d6da7905
[varStore] rename shortCount to wordCount
2022-05-30 07:48:58 -06:00
Behdad Esfahbod
d11455f285
[blob] Fix strncpy() use in Mac resource opening code
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3616
2022-05-30 06:59:03 -06:00
Behdad Esfahbod
ea2dd54b68
[map] Place item hash between key and value, not after them
...
This way if only one of key and value is 64bit (eg. pointer), and other is 32bit,
the whole item will fit in 128bit, whereas before it would have been bumped up to
196 if only value was 64bit (a common use-case for us.)
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
ec6cefc46a
[repacker] Simplify map types
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
cbcdf442c5
[map] Speed up map's own hash()
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
de33ef61b7
[map] Add TODO item
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
fc5739ea90
[test-map] Whitespace
2022-05-30 05:54:20 -06:00
Behdad Esfahbod
3e64abd5d6
Merge pull request #3613 from harfbuzz/threads-test
...
Threads test
2022-05-30 05:52:21 -06:00
Behdad Esfahbod
efa4385b16
Merge pull request #3615 from harfbuzz/gir-freetype
...
[gi] Add freetype2-2.0 for g-i-r includes
2022-05-30 05:40:56 -06:00
Behdad Esfahbod
f4a8b70016
More member initialization
2022-05-30 05:30:37 -06:00
Behdad Esfahbod
484cc18732
[test-shape-threads] Set language
2022-05-30 05:09:53 -06:00
Behdad Esfahbod
315ef83b4e
Revert "Revert "[ot-lang] Use atomic int for cache""
...
This reverts commit c56ce8681c
.
The revert was not intentional. Ouch!
2022-05-30 05:09:26 -06:00
Khaled Hosny
3427511988
[gi] Add freetype2-2.0 for g-i-r includes
...
Fixes the warnings:
../src/hb-ft.cc:810: Warning: HarfBuzz: hb_ft_face_create: argument ft_face: Unresolved type: 'FT_Face'
../src/hb-ft.cc:886: Warning: HarfBuzz: hb_ft_face_create_cached: argument ft_face: Unresolved type: 'FT_Face'
../src/hb-ft.cc:855: Warning: HarfBuzz: hb_ft_face_create_referenced: argument ft_face: Unresolved type: 'FT_Face'
../src/hb-ft.cc:920: Warning: HarfBuzz: hb_ft_font_create: argument ft_face: Unresolved type: 'FT_Face'
../src/hb-ft.cc:1029: Warning: HarfBuzz: hb_ft_font_create_referenced: argument ft_face: Unresolved type: 'FT_Face'
../src/hb-ft.cc:240: Warning: HarfBuzz: hb_ft_font_get_face: return value: Unresolved type: 'FT_Face'
../src/hb-ft.cc:262: Warning: HarfBuzz: hb_ft_font_lock_face: return value: Unresolved type: 'FT_Face'
2022-05-30 04:48:22 +02:00
Behdad Esfahbod
97aa1ce6ba
[gsubgpos] Move some member initialization
2022-05-29 10:56:41 -06:00
Behdad Esfahbod
0bb4c1f021
[cache] Set default values for cache template parameters
2022-05-29 10:23:19 -06:00
Behdad Esfahbod
3957d2927d
[layout] Remove stale comment
2022-05-29 07:30:58 -06:00
Behdad Esfahbod
b6fed6f711
[set-digest] Minor don't use !! when auto bool conversion happens
2022-05-29 06:33:34 -06:00
Behdad Esfahbod
371e14d99c
Combine uses of map has() then get() with has(.., &..)
2022-05-28 13:40:30 -06:00
Behdad Esfahbod
b99efa6c8d
[map] Minor: use const reference in has()
2022-05-28 05:16:34 -06:00
Behdad Esfahbod
24d5a11dcb
[bimap] Add unlikely and minor optimization in is_empty()
2022-05-28 05:14:16 -06:00
Behdad Esfahbod
c56ce8681c
Revert "[ot-lang] Use atomic int for cache"
...
This reverts commit d61b207491
.
2022-05-28 04:25:51 -06:00
Behdad Esfahbod
63bc6be0cf
Merge pull request #3603 from harfbuzz/font-serial
...
Add font serial API
2022-05-27 08:25:22 -06:00
Behdad Esfahbod
e2aa29907d
[set] Use relaxed atomic ops for last_page_index
...
Since iterating a set from multiple threads is supported.
2022-05-27 07:06:02 -06:00
Behdad Esfahbod
d61b207491
[ot-lang] Use atomic int for cache
...
Fixes(?) https://github.com/harfbuzz/harfbuzz/issues/3612
2022-05-26 18:24:43 -06:00
Behdad Esfahbod
67bd147c73
Merge pull request #3610 from googlefonts/subset_create_tables_face
...
[subset] fix subsetting of faces created via hb_face_create_for_tables.
2022-05-26 05:16:07 -06:00
Behdad Esfahbod
a719e67887
[ot-font] Use atomic ops for cache serial number
...
This guarantees the cache is coherent.
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
5248b2567b
[ot-font/h-advance] Adjust varStore cache condition
...
This gives best performance for short strings, now that we have a h-advance cache as well.
The en-words benchmark in particular, now ot-font is faster than ft.
Second to last line is of interest:
Before:
-----------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------------------------------------------------------
BM_Shape/en-words.txt/Roboto-Regular.ttf/hb 29.8 ms 29.8 ms 23
BM_Shape/en-words.txt/Roboto-Regular.ttf/ft 30.4 ms 30.4 ms 23
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/hb 16.3 ms 16.3 ms 43
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/ft 16.5 ms 16.5 ms 42
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/var/hb 18.0 ms 18.0 ms 39
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/var/ft 17.8 ms 17.8 ms 39
After:
behdad@Behdads-MacBook-Pro harfbuzz % ninja -Cbuild && build/perf/benchmark-shape --benchmark_filter=en-words
-----------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------------------------------------------------------
BM_Shape/en-words.txt/Roboto-Regular.ttf/hb 30.0 ms 30.0 ms 23
BM_Shape/en-words.txt/Roboto-Regular.ttf/ft 30.3 ms 30.3 ms 23
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/hb 16.3 ms 16.3 ms 43
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/ft 16.4 ms 16.4 ms 43
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/var/hb 17.6 ms 17.6 ms 40
BM_Shape/en-words.txt/SourceSerifVariable-Roman.ttf/var/ft 17.8 ms 17.8 ms 39
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
12fff976b6
[ot-var] Use atomic int for cached-serial
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
0919eaa6e8
[ot-font] Remove lock around cache
...
Not needed.
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
3548b6025f
[ot-font] Cache h-advances for variable fonts
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
39a07bf3eb
[ot-font] Rename cache to varStore_cache
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
970e03ecae
[ot-font] Add a hb_ot_font_t struct
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
80c49933c6
[hb-ft] Adjust serial signature
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
56e0ff9ea1
[ft] If hb_font changed, update FT_Face
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2270
Rather untested.
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
d0de389de8
[font] Fix test
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
a2015cd300
[font] Add a separate serial_coords
2022-05-26 05:02:50 -06:00