Behdad Esfahbod
53847dba92
[algs] Call std::hash from hb_hash()
3 years ago
Behdad Esfahbod
74811c501d
[map] Map == / != use correct types
3 years ago
Timo Suoranta
b8c2c1ab37
Use freetype from CMake target when present ( #3361 )
...
Add check for Freetype CMake target. If it is found:
- enable HB_HAVE_FREETYPE option
- add HAVE_FREETYPE=1 define
- bypass finding Freetype as cmake package
- add Freetype CMake target as dependency to harfbuzz
3 years ago
Behdad Esfahbod
ce7f19a2cc
Revert "[map] Actually use k/v invalid types for declaration!"
...
This reverts commit 6f559346ac
.
Err. My bad.
3 years ago
Behdad Esfahbod
6f559346ac
[map] Actually use k/v invalid types for declaration!
3 years ago
Behdad Esfahbod
a45a630539
Fix unintentional locale dependency ( #3358 )
...
Avoid unintentional locale dependency
hb_variation_to_string uses sprintf with %g, which will produce
a locale-dependent decimal point, which is not desired here.
The output is supposed to be compatible with CSS syntax, and
that always uses '.' for the decimal point.
Fix this by changing the per-thread locale to "C" around sprintf call.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3355
Fixes https://github.com/harfbuzz/harfbuzz/pull/3357
Fixes https://github.com/harfbuzz/harfbuzz/pull/3358
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
3 years ago
Matthias Clasen
d70825a6d1
docs: Add some details about coordinates
...
Mention what the effective values are when
coordinates have not been set.
3 years ago
Behdad Esfahbod
0a5c1c9705
[failing-alloc] Make it compile as C++ as well
3 years ago
Behdad Esfahbod
bea5369c6d
[buffer] Rename swap_buffers() to sync()
3 years ago
Behdad Esfahbod
c5e5d5e0bc
Merge pull request #3353 from harfbuzz/buffer-create-similar
...
Add `hb_buffer_create_similar()`; use it in util
3 years ago
Behdad Esfahbod
d1e7df5c3f
[buffer] Add enter()/leave() pair around shape()
3 years ago
Behdad Esfahbod
43be5ba442
[buffer] Group shape-related members together
3 years ago
Behdad Esfahbod
52f5711ed0
[buffer] Add hb_buffer_create_similar()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
f643b81ffc
[buffer] Clean up internal state bookkeeping
...
hb_buffer_reset() was NOT resetting cluster_level. Ouch! Fix that.
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
d0c3515ce4
[util] Copy unicode_funcs in copy_buffer_properties()
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
34f5b855aa
[util] Simplify copy_buffer_properties()
...
Now that hb_buffer_append() overlays segment_properties we can do this.
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
101d07efd9
[util] Move copy_buffer_properties() out of loop
...
Now that hb_buffer_append() overlays properties, we can do this.
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
36e9f467a4
[buffer] Overlay segment-properties in hb_buffer_append()
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
3 years ago
Behdad Esfahbod
6a66992842
Add hb_segment_properties_overlay()
...
New API:
+ hb_segment_properties_overlay()
3 years ago
Behdad Esfahbod
165a6073fa
Merge pull request #3338 from harfbuzz/slant
...
[font] Add public API for synthetic slant
3 years ago
Behdad Esfahbod
3fc2e654c0
[metrics] Fix slant calc
3 years ago
Behdad Esfahbod
a7751277e9
[docs] Add hb_font_[gs]et_synthetic_slant()
3 years ago
Behdad Esfahbod
4ab94443bb
[metrics] Ouch. Fix slant code
3 years ago
Behdad Esfahbod
f7d49d9c2b
[metrics] Simplify
3 years ago
Behdad Esfahbod
f1ba1f940f
[metrics] Only scale caret rise/run if font is slanted
3 years ago
Behdad Esfahbod
45c2b6e384
[metrics] Harden math
3 years ago
Behdad Esfahbod
fa008a021f
[metrics] Implement synthetic slant for caret slope
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
3 years ago
Behdad Esfahbod
fc329f665f
[metrics] Scale up horizontal caret rise/run
...
Eg. if rise/run are 1/0, we now return upem/0. This is equivalent.
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
3 years ago
Behdad Esfahbod
a3265e1e07
Typo
3 years ago
Behdad Esfahbod
0df83f52a1
Fix test
3 years ago
Behdad Esfahbod
6356da88ee
[docs] Update
3 years ago
Behdad Esfahbod
5b87c30d6b
[font] Mark hb_font_get_var_coords_design() non-experimental
...
Any remaining issue with the API will address later by deprecating it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1865
3 years ago
Behdad Esfahbod
2d42fc9fbb
[font] Load named-instance if face index top bits are set
...
This matches FreeType behavior.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3348
3 years ago
Behdad Esfahbod
da7dba0002
[face] Clarify face_index handling
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3347
3 years ago
Behdad Esfahbod
6da4b80e5f
[hb-ot-var] Specify normalized 2.14 docs
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3345
3 years ago
Behdad Esfahbod
1b51be57dc
[hb-ot-var] Actually set in/out argument
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/3344
3 years ago
Behdad Esfahbod
06ee40213c
Use invisible-glyph for spaces if font has no ASCII space
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3340
Should add tests ideally.
3 years ago
Behdad Esfahbod
602bd39680
[style] Adjust font slant angle for synthetic slant value
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
3 years ago
Behdad Esfahbod
ff697debd8
[GPOS] Apply font synthetic slant
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
3 years ago
Behdad Esfahbod
810f5d71c7
[font] Add public API for slant
...
Not hooked up internally to anything.
New API:
+ hb_font_set_synthetic_slant()
+ hb_font_get_synthetic_slant()
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
3 years ago
Garret Rieger
067f90a820
[subset] Fix for fuzzer timeout.
...
Fixes https://oss-fuzz.com/testcase-detail/5549945449480192
In prune_langsys: move LangSys visited check up before any work is done for a LangSys. In this particular case the compare() method is responsible for the majority of the time spent and wasn't being guarded with a visisted check.
3 years ago
Garret Rieger
c4573c2ec7
[repacker] don't infinite loop if visited or roots is in error.
...
Fixes https://oss-fuzz.com/testcase-detail/5205038086094848
3 years ago
Khaled Hosny
449c4296a1
[ci] Try harder to fix this randomly failing job
...
The default --num-processes is the number of CPUs multiplied by 5,
which seems to give this VM a hard-time. Even the number of CPUs is too
much, so lets use half of that (I’m adding one just in case the division
gives zero).
3 years ago
Khaled Hosny
52a33a15a4
[ci] Try to fix the randomly failing valgrind job
3 years ago
Khaled Hosny
be91d2917d
3.2.0
3 years ago
Garret Rieger
77507a1d8d
[subset] Don't double count visit lookups in closure_lookups
...
Each recursed lookup was getting counted once in closure_lookups() and then again in hb_closure_lookups_context_t::recurse.
3 years ago
Garret Rieger
d67025705f
[subset] reset the visited lookup count before each closure iteration.
3 years ago
Behdad Esfahbod
23159084b4
[morx] Reverse graphemese, not whole buffer
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3314
Supersedes https://github.com/harfbuzz/harfbuzz/pull/3315
3 years ago
Behdad Esfahbod
5b995526f7
[buffer] Fix reverse_group() to reverse() at the end
3 years ago
Behdad Esfahbod
21c4fc1011
[buffer] Add optional merge_clusters arg to reverse_groups()
3 years ago