Martin Storsjö
d88269c827
freetype: Fix function signatures to match without casts
...
Clang 16 has got a new stricter warning for casts of function types
(see 1aad641c79
).
This new warning gets included as part of the existing error
diagnostic setting of -Wcast-function-type.
This fixes errors like these:
../src/hb-ft.cc:1011:34: error: cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-10-28 13:49:41 -06:00
Behdad Esfahbod
23461b7502
[hb-ft] Only apply FT_Face's transform if we created FT_Face
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3788
https://github.com/harfbuzz/harfbuzz/issues/3790
2022-08-19 10:28:30 -06:00
Behdad Esfahbod
d7adc55e18
[ot-font] Allow 24bit glyphs in advance cache
2022-08-04 11:40:54 -06:00
Behdad Esfahbod
ec90d1e161
[cache] Add a non-threadsafe version
...
Use in hb-ft, since already mutex'ed.
2022-08-03 13:01:04 -06:00
Behdad Esfahbod
e387b3acd3
[ft] Try harder
2022-08-02 10:02:48 -06:00
Khaled Hosny
40a3468906
hb-ft: cast to float to help windows sqrtf
2022-08-02 10:02:48 -06:00
Behdad Esfahbod
ba9b20534c
[ft] Try working around fonts with transform set
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3772
2022-08-01 12:42:05 -06:00
Behdad Esfahbod
1ac21246a7
[hb-ft] Fix bitmap font rendering with hb_ft_font_changed()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3754
Fixes https://github.com/harfbuzz/harfbuzz/issues/3755
2022-07-25 08:40:02 -06:00
Behdad Esfahbod
61d0c54701
[ft] Pass design, not normalized, coords to freetype
...
Needed for avar2 to work.
2022-07-23 13:26:18 -06:00
Behdad Esfahbod
cb5ca6be29
[ft] Actually call check_changed() from _changed()
...
Ouch!
Fixes https://github.com/harfbuzz/harfbuzz/issues/3746
2022-07-22 05:48:27 -06:00
Behdad Esfahbod
fd535a240b
[ft] Remove check_changed from get_glyph_shape()
...
Leftover.
2022-07-22 05:48:12 -06:00
Behdad Esfahbod
4f22397f05
[ft] A couple of introspection fixes
2022-07-18 11:03:54 -06:00
Behdad Esfahbod
6ed57de15c
[ft] Fix negative font sizes for bitmaps
2022-07-15 15:09:28 -06:00
Behdad Esfahbod
307ee9baff
[ft] Fix bitmap-only vertical metrics
2022-07-15 14:48:29 -06:00
Behdad Esfahbod
87d338eb61
[ft] Fix test
2022-07-15 14:26:47 -06:00
Khaled Hosny
e294200dac
[ft] Check for FT_Get_Transform at build time
2022-07-15 21:59:33 +02:00
Behdad Esfahbod
901236f721
[ft] Implement loading (color) bitmap fonts
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/489
Something about the vertical metrics is still off, not matching
hb-ot. I cannot figure out what.
2022-07-15 13:35:14 -06:00
Behdad Esfahbod
3ac110560d
[ft] Fix scale when font-sizes are negative
2022-07-15 12:48:11 -06:00
Khaled Hosny
98e90cc67c
[docs] Reduce warnings
...
Use markdown syntax for inline code blocks instead of %true, %false, and
%NULL.
2022-06-30 08:44:40 +02:00
Khaled Hosny
8537d68172
4.4.0
2022-06-27 20:51:16 +02:00
Behdad Esfahbod
8c27c51c27
[arabic-pua] Rename symbols
2022-06-19 10:47:38 -06:00
Behdad Esfahbod
7698962911
[arabic-fallback] Disable PUA shaping under HB_NO_OT_SHAPER_ARABIC_FALLBACK
2022-06-19 10:42:06 -06:00
Behdad Esfahbod
55350377b0
[cmap/ft] Only map 0xF000 range if font_page is NONE
2022-06-19 10:42:06 -06:00
Khaled Hosny
189e8c326e
[ft] Remap legacy Arabic PUA codepoints
...
Similar to what ot font finctions does, to support Support legacy
pre-OpenType Windows 3.1-era fonts.
2022-06-19 10:42:05 -06:00
Behdad Esfahbod
d6dbc0d175
[gi/ft] Silence warnings
...
gi doesn't understand that FT_Face is a pointer, and not bare struct.
So it skips these APIs anyway. Mark skip to silense the warning.
../src/hb-ft.cc:242: Warning: HarfBuzz: hb_ft_font_get_face: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
../src/hb-ft.cc:264: Warning: HarfBuzz: hb_ft_font_lock_face: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
2022-06-05 00:58:53 -06:00
Behdad Esfahbod
fc4d42ff99
[ft] Add API to notify that hb_font_t changed
...
New API:
- hb_ft_hb_font_changed()
Mostly reverts 56e0ff9ea1
Related https://github.com/harfbuzz/harfbuzz/issues/2270
Fixes https://github.com/harfbuzz/harfbuzz/issues/3619
2022-06-01 14:12:38 +01: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
8629df188a
[ft] Discard advance cache if font changed
...
Uses newly added font serial API.
Part of https://github.com/harfbuzz/harfbuzz/issues/2270
But doesn't set new coords on the FT_Face. That's a lot more
work :(.
2022-05-26 05:02:50 -06:00
Behdad Esfahbod
05e82aa12e
[ft] Add missing lock to kerning function
2022-05-20 17:36:59 -06:00
Behdad Esfahbod
55804e8d68
[hb-ft] Minor rearrange of struct members
...
To make clear what members the lock protects.
2022-05-20 11:40:44 -06:00
Behdad Esfahbod
6d0e67dee0
[ot-font] Only use vmtx side-bearing if table exists
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:07:28 -06:00
Behdad Esfahbod
59067db9f4
[font/draw] Slant drawings
...
Need to update hb_font_set_synthetic_slant() docs now that we do this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
6d5b998f25
[ft/draw] Implement hb-draw for hb-ft
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
002a1f70b8
[ft] Disable vertical funcs if HB_NO_VERTICAL
2021-12-08 10:45:30 -08:00
Behdad Esfahbod
ed1163208d
Call atexit() via hb_atexit()
...
Part of https://github.com/harfbuzz/harfbuzz/issues/3197
2021-09-14 07:11:46 -04: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
Behdad Esfahbod
12a283d513
m[ft] No need to use atomic ops for cached_x_scale
...
We have added a mutex since, so no need for atomicity.
2021-02-22 12:51:09 -07: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
a31a51cdec
[docs] Complete hb-ft docs a bit
2020-12-30 19:21:49 -08:00
Khaled Hosny
c7b2e64c6d
[docs] make it clear that FT_Face must have size
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2590
2020-12-30 11:50:49 -08:00
Khaled Hosny
22468c8a90
[docs] Give destroy callbacks have (optional) annotation
2020-12-24 22:38:06 +02:00
Behdad Esfahbod
26b9670d99
[ft] Better handle allocation failures
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2513
2020-06-28 14:52:15 -07:00
Sebastian Rasmussen
2267da4ee0
[ft] Do not deference ft_font if it is nullptr ( #2502 )
2020-06-27 20:18:16 -07:00
Sebastian Rasmussen
dbf9896e7a
[ft] Handle nullptr when destroying freetype font ( #2494 )
2020-06-27 19:57:34 -07:00
Behdad Esfahbod
a11db0b9d4
Merge branch 'master' into usermanual-integration
2020-04-23 15:32:43 -07:00
Ebrahim Byagowi
f9bc373381
2.6.5
2020-04-17 23:49:56 +04:30
n8willis
b57b904242
Add detail to hb_ft_font_create inline comments
...
Providing lengthier explanation for how the destroy function works on the hb_font_t but that destroying the FT_Face (and not destroying it too early) remains the client's responsibility.
2020-04-15 18:46:31 +01:00
n8willis
1bca2be256
Rewrite hb_ft_font_set_funcs inline explanation
2020-04-15 18:30:47 +01:00
n8willis
80c01d7687
Update hb-ft.cc
2020-04-15 18:08:55 +01:00