Behdad Esfahbod
75e6498d9a
Don't use M_PI
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4166
Happy Pi Day!
2023-03-14 12:41:46 -06:00
Behdad Esfahbod
651c280d0b
[style] Move the negation into the constant
2022-02-18 18:21:46 -06:00
Matthias Clasen
16b232be0e
[hb-style] Fix the sign of slant ratios
...
We want negative slant angles to yield
positive slant ratios. Fix that.
Test included.
2022-02-18 18:10:34 -06:00
Matthias Clasen
e76061a737
[hb-style] Fix synthetic slant values
...
When reporting the slant ratio of a font
that has synthetic slant set, we were
reporting twice the expected value.
Fix that. Test included.
2022-02-18 17:53:54 -06:00
Behdad Esfahbod
602bd39680
[style] Adjust font slant angle for synthetic slant value
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2021-12-19 21:40:25 -08:00
Behdad Esfahbod
c6557747ef
[style] Use head->macStyle.isExtended in style fallback
...
https://github.com/harfbuzz/harfbuzz/issues/3263
2021-10-21 09:56:47 -06:00
Khaled Hosny
9c387e20d6
3.0.0
2021-09-17 21:32:30 +02:00
Behdad Esfahbod
e0d5fe740a
Centralize math include
...
https://github.com/harfbuzz/harfbuzz/pull/3212
2021-09-17 06:41:07 -06:00
Behdad Esfahbod
ae14537854
[style] Change tag type to hb_style_tag_t
...
https://github.com/harfbuzz/harfbuzz/pull/3201#discussion_r708914354
2021-09-15 07:46:33 -04:00
Behdad Esfahbod
9c27045158
[style] Fix another float conversion warning
2021-09-14 07:50:35 -04:00
Behdad Esfahbod
ad4df20dd6
[style] Fix float conversion warning
2021-09-14 07:11:46 -04:00
Khaled Hosny
d748586a18
[style] Try harder to fix MSVC build
...
https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-160
2021-09-13 10:10:10 -06:00
Khaled Hosny
e275f0d7ed
[style] Try to fix MSVC build
2021-09-13 10:10:10 -06:00
Khaled Hosny
eb4075a1ed
[style] Fix documentation
...
Message documentation a bit to get it working.
2021-09-13 10:10:10 -06:00
Khaled Hosny
4d9b7de0b6
[style] Prepare for release
2021-09-13 10:10:10 -06:00
Khaled Hosny
34ff2d3ea6
Fix build with -Dexperimental_api=true
...
../src/hb-style.cc:102:32: error: no matching function for call to 'hb_style_get_value'
return _hb_angle_to_ratio (hb_style_get_value (HB_STYLE_TAG_SLANT_ANGLE));
^~~~~~~~~~~~~~~~~~
../src/hb-style.cc:99:1: note: candidate function not viable: requires 2 arguments, but 1 was provided
hb_style_get_value (hb_font_t *font, hb_tag_t tag)
^
and
../src/hb-style.cc:80:1: error: unused function '_hb_ratio_to_angle' [-Werror,-Wunused-function]
_hb_ratio_to_angle (float r)
^
2021-09-11 00:12:03 +02:00
Behdad Esfahbod
39c20d2b9e
[style] Add HB_STYLE_TAG_SLANT_RATIO
2021-09-10 04:59:16 -06:00
Behdad Esfahbod
201cbe3c66
[style] Rename HB_STYLE_TAG_SLANT to HB_STYLE_TAG_SLANT_ANGLE
2021-09-10 04:59:16 -06:00
Behdad Esfahbod
a23ce28977
[style] Fall back to GPOS 'size' feature for optical size in style API
2021-09-10 04:59:16 -06:00
Khaled Hosny
a3fe43a410
[docs] Hide private enum values
...
"/*< skip >*/" does not seem to hide them.
2020-12-30 23:06:18 +02:00
Ebrahim Byagowi
a3b9b94b63
[style] Remove fdsc support ( #2541 )
...
It isn't exposed yet and low use between Apple fonts,
32 fdsc table vs 767 OS/2 tables, even Apple doesn't
support it anymore per Ned.
2020-07-06 00:05:21 +04:30
Ebrahim Byagowi
759df46575
[style] Hide behind HB_EXPERIMENTAL_API compile flag
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
de0ec5f4fe
[style] give ptem value when asked for opsz
...
ptem, used for AAT's tracking/`trak` table is equivalent to opsz of variable fonts.
For variable AAT fonts, such as SFNS, ideally variable axis of the hb_font_t
should be set and equivalent to ptem, https://crbug.com/1005969#c37
2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
22037499b4
[style] New experimental API, hb_style_get_value
...
Searches variation axes of a hb_font_t object for a specific axis first,
if not set, then tries to get default style values from different
tables of the font.
2020-06-04 20:33:39 +04:30