Commit Graph

260 Commits

Author SHA1 Message Date
Khaled Hosny 98da330638 3.3.0 2022-01-31 18:39:06 +02:00
Behdad Esfahbod 24650624c8 [font] Fix build with no-var configs 2022-01-28 13:53:21 -07:00
Khaled Hosny 0acf466c44 [doc] Fix hb_font_set_synthetic_slant param name 2022-01-13 01:29:30 +02:00
Matthias Clasen 72f0b24ee3
docs: Clarify variation apis (#3363)
Make it explicit that the variations setters
replace all existing variations, even if
not all axes are included in the provided
values.

Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-12 11:08:02 -07:00
Matthias Clasen d70825a6d1 docs: Add some details about coordinates
Mention what the effective values are when
coordinates have not been set.
2022-01-08 06:46:22 -08:00
Behdad Esfahbod 165a6073fa
Merge pull request #3338 from harfbuzz/slant
[font] Add public API for synthetic slant
2022-01-02 12:02:20 -07:00
Behdad Esfahbod a7751277e9 [docs] Add hb_font_[gs]et_synthetic_slant() 2022-01-02 11:50:02 -07:00
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
2022-01-02 07:53:45 -07:00
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
2022-01-02 07:45:10 -07:00
Behdad Esfahbod ff697debd8 [GPOS] Apply font synthetic slant
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
2021-12-19 21:20:25 -08:00
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
2021-12-19 21:20:25 -08:00
Behdad Esfahbod a9a607d360 [variations] Support multiple axes with same tag, aka HOI
The axes in fvar are in arbitrary order, NOT sorted. Hence have to
lsearch all entries.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1673
Fixes https://github.com/harfbuzz/harfbuzz/issues/2743

Test from https://github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation
2021-07-23 11:58:58 -07:00
Behdad Esfahbod 233c29b302 [font] Call fvar.find_axis_index instead of find_axis_info in set_variations() 2021-07-22 12:00:24 -07:00
Behdad Esfahbod 0b2280af90 [font] Call fvar table directly, instead of calling public get_axis_info
To lighten it up in next commit.
2021-07-22 11:58:14 -07:00
Behdad Esfahbod 2337f0d047 Internally use hb_malloc/.../hb_free instead of malloc/.../free
Redefining those stock names as macros was conflicting with gcc 10
headers.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Khaled Hosny 051a3c7b9a [docs] Fix typo 2021-01-20 14:22:15 -08:00
Khaled Hosny a44dd339f9 [docs] Missing param docs 2021-01-20 14:22:15 -08:00
Khaled Hosny a64d56a3e5 [introspection] nullable is for pointers 2020-12-30 19:21:49 -08:00
Khaled Hosny 9936490c04 [docs] Invalid use of "optional" annotation
It is valid only for out and inout parameters.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1787
2020-12-30 19:21:49 -08:00
Khaled Hosny aa107e657b [docs] Complete hb-font docs a bit 2020-12-30 19:21:49 -08:00
Khaled Hosny a8e72ee784 [docs] Use %true and %false consistently 2020-12-30 23:28:26 +02:00
Khaled Hosny 35c4a15a67 [docs] Update hb-font documentation 2020-12-24 22:34:26 +02:00
Khaled Hosny f88e845fc7 [docs] Minor fixes 2020-12-24 21:34:14 +02:00
Nathan Willis 82092d4005 [docs] Update gtk-doc comments in hb-font 2020-12-24 21:34:14 +02:00
Nathan Willis ec98730ff6 [docs] regularize whitespace in function params 2020-12-24 21:29:47 +02:00
Ebrahim Byagowi 2dda6dd744 minor, tweak spacing
turn 8 spaces to tab, add space before Null/Crap
2020-04-20 16:18:29 +04:30
Ebrahim Byagowi 9b7fb5c23f Move hb_font_get_var_coords_design behind HB_EXPERIMENTAL_API 2020-04-17 20:29:04 +04:30
Ebrahim Byagowi 352ac63ef9 Fix an unlikely UAF on the deprecated _set_glyph_func API
Fixes https://github.com/harfbuzz/harfbuzz/issues/2168
2020-02-11 03:05:04 +03:30
Ebrahim Byagowi 40166eb0e5 [var] Fix the just introduced hb_font_set_var_coords_design storing bug
The memcpy call was using the current coords count which is zero initially so no copy at all.

Sad that no test has caught it, should see why, will however with the upcoming style API tests.
2020-02-08 13:22:01 +03:30
Ebrahim Byagowi 0b76e8130e Don't use _normalize_variations to avoid twice axis fetch 2020-02-08 11:04:34 +03:30
Ebrahim Byagowi ab2d3ec542 [var] Implement hb_font_get_var_coords_design
Hold design coords and simulate when normalized coords are set directly.
2020-02-08 11:04:34 +03:30
Behdad Esfahbod ce11df1b5b 2.6.3 2019-10-28 14:46:59 -07:00
Behdad Esfahbod 5a59de2b98 Actually add +hb_font_get_nominal_glyphs()
New API:
+hb_font_get_nominal_glyphs()
2019-10-28 14:46:59 -07:00
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod aaa85931f3 [font] Update multipliers when creating sub_font
Fixes https://github.com/harfbuzz/harfbuzz/issues/1910
2019-08-20 13:06:10 -07:00
Behdad Esfahbod dcb4cd400f Minor 2019-08-19 11:35:37 -07:00
Ebrahim Byagowi bc27f86ffe
Move HB_NO_VAR to a better place in hb-font.cc
Needed for other works
2019-08-14 22:37:00 +04:30
Ebrahim Byagowi 6a194b6876
Minor, remove trailing spaces in hb-font.{cc,h} as .editorconfig 2019-08-14 18:49:57 +04:30
Behdad Esfahbod 6461143b44 2.6.0 2019-08-13 22:20:54 -07:00
Ebrahim Byagowi 40a4b6ddbd [var] Add a new API, hb_font_set_var_named_instance 2019-07-29 16:23:47 -07:00
Behdad Esfahbod b847769292 [font] Keep font-space to user-space multiplier
Part of https://github.com/harfbuzz/harfbuzz/issues/1801
2019-07-05 13:52:09 -07:00
Behdad Esfahbod df6edcd44c Make face immutable in hb_font_set_face() 2019-07-05 13:45:15 -07:00
Behdad Esfahbod a849873124 [config] Add HB_NO_VAR to disable variations support, enabled by HB_TINY
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-06-19 19:26:22 -07:00
Behdad Esfahbod 0819f3ca86 Deprecate v_kerning callback again
Part of https://github.com/harfbuzz/harfbuzz/issues/1682
2019-06-17 14:02:47 -07:00
Behdad Esfahbod 2682efb02d Revert "Deprecate font kern API"
This reverts commit d219f899f4.

API change: Un-deprecate font kern API.

Part of https://github.com/harfbuzz/harfbuzz/issues/1682

We should document that this API is only necessary to hook up
non-OpenType kerning.  hb-ot-font will continue to NOT implement them.
2019-06-17 13:38:49 -07:00
Behdad Esfahbod fca2786041 [config] Make HB_DISABLE_DEPRECATED actually compile
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-05-11 00:37:01 -07:00
Behdad Esfahbod 227d85e138 Minor 2019-05-10 23:16:14 -07:00
Behdad Esfahbod 4d31662b5d Don't install ot-font funcs on new fonts if HB_NO_OT_FONT defined
Currently linker cannot GC hb-ot-font completely because we install
it on fonts by default.  Don't do that if HB_NO_OT_FONT defined.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-10 15:40:55 -04:00
Behdad Esfahbod 447323b85a Better fix for -Wcast-align errors 2019-01-22 12:50:12 +01:00
Behdad Esfahbod 81ec543d80 More -Wcast-error fixes 2019-01-22 12:43:12 +01:00