Commit Graph
14496 Commits
Author SHA1 Message Date
Khaled Hosny 8d62ad3b35 [directwrite] Don’t release IDWriteFace pass to hb_directwrite_font_create
That was a leftover from previous code and is incorrect now as we would
be double releasing it.
2025-03-23 15:40:41 +02:00
Behdad Esfahbod 2421efc17b Merge pull request #5192 from harfbuzz/dwrite-font-vars
[directwrite] Clean up API / font handling and make variations work on font-funcs
2025-03-22 20:23:29 -06:00
Behdad Esfahbod 45a724b90c [coretext] Make font-funcs respond to font changes
Fixes https://github.com/harfbuzz/harfbuzz/issues/5173
2025-03-22 17:20:07 -06:00
Behdad Esfahbod b159f5c74e [directwrite] Fix docs 2025-03-22 16:46:43 -06:00
Behdad Esfahbod 24a23aca69 [directwrite] Make font-funcs respond to font changes 2025-03-22 16:41:39 -06:00
Behdad Esfahbod 91bd6bf0df [directwrite] Make variations work on font-funcs 2025-03-22 16:38:56 -06:00
Behdad Esfahbod c274ee7b3e [directwrite] Add hb_font_t setter/getter from IDWriteFontFace
Changed API:
+hb_directwrite_font_create()

New API:
+hb_directwrite_font_get_dw_font_face()
2025-03-22 16:02:39 -06:00
Behdad Esfahbod f0b0d92ab5 [directwrite] Deprecate hb_directwrite_font_get_dw_font() 2025-03-22 15:44:50 -06:00
Behdad Esfahbod 201a0fe361 [coretext] Fix a warning 2025-03-22 15:32:22 -06:00
Behdad Esfahbod 6509414227 [fontations] Make serial tracking atomic
Would shut up tsan if we ever tried it on this.
2025-03-22 14:19:34 -06:00
Behdad Esfahbod 977e4f94e0 [font] Simplify changed mechanism 2025-03-22 14:09:26 -06:00
Behdad Esfahbod cfb962d73c [fontations] Use the proposed pop_layer_with_mode
Reduces the last Vec use.

https://github.com/googlefonts/fontations/pull/1419
2025-03-21 15:03:28 -06:00
Behdad Esfahbod 9fa31d1ed2 [fontations] Enable lto in dev builds as well
Otherwise our check-symbols test will fail.
2025-03-21 14:44:03 -06:00
Behdad Esfahbod 852f66a418 [fontations] Implement fill-glyph
Gets rid of one Vec.

Supersedes:
https://github.com/harfbuzz/harfbuzz/pull/5180
https://github.com/harfbuzz/harfbuzz/pull/5184
2025-03-21 14:14:12 -06:00
Behdad Esfahbod cc0451c949 [cff2] Malloc-free draw of var blends 2025-03-20 20:57:31 -06:00
Behdad Esfahbod b2f7f6db1a Merge pull request #5165 from harfbuzz/fontations-glyph-name
Fontations glyph name
2025-03-20 14:35:55 -06:00
Behdad Esfahbod 64dcece342 [fontations] Clean up atomic initialization based on review 2025-03-20 14:05:57 -06:00
Behdad Esfahbod 4107cceea1 [fontations] Roll skrifa forward
Tests pass now.
2025-03-20 14:00:06 -06:00
Behdad Esfahbod c84b9dca24 Merge pull request #5170 from harfbuzz/directwrite-shape-variations
[directwrite] Copy font variations when shaping
2025-03-20 11:18:58 -06:00
Khaled Hosny 686503e2e0 [directwrite] Copy font variations when shaping 2025-03-20 01:59:56 +02:00
Behdad Esfahbod 24ad0dd46b [fontations] Implement glyph_from_name (with caching) 2025-03-19 16:09:05 -06:00
Behdad Esfahbod b3d48c2c1b [coretext] Only try setting variations if a variable font
Seems to fix https://github.com/harfbuzz/harfbuzz/issues/5163
2025-03-19 15:16:11 -06:00
Behdad Esfahbod 82e0ff6da0 [fontations] Implement get_glyph_name 2025-03-19 12:52:22 -06:00
Behdad Esfahbod 1a8352cfdb [fontations] Roll skrifa to 0.29 2025-03-19 12:51:29 -06:00
Khaled Hosny 59aee7f3e8 [directwrite] Fix copying variations in hb_directwrite_font_create()
I missed the endianness mismatch between HarfBuzz and DirectWrite tags.
2025-03-19 14:47:22 +02:00
Behdad Esfahbod 38889c3ad6 [coretext] Fix loading named instances
Needs tests...

TTC indices > 0 can't be loaded with CoreText API it seems.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5158
2025-03-18 03:28:44 -06:00
Behdad Esfahbod 472e65dd0f [cff] Allow empty private dict (again)
Fixes https://github.com/harfbuzz/harfbuzz/issues/5162
2025-03-18 03:17:49 -06:00
Behdad Esfahbod 0ebcc66506 [coretext] Fix glyph bounds 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 630bc9b45d [coretext] Disable variation-selectors test :-( 2025-03-17 21:05:21 -06:00
Behdad Esfahbod 38db0f4c12 [coretext] Always set all variation axes 2025-03-17 08:51:39 -06:00
Behdad Esfahbod 422ffff15c [coretext] Always set all variations
Even when at default, looks like this is necessary.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5142
2025-03-16 21:03:46 -06:00
Behdad Esfahbod a9a3fd33a2 [trak] Fix track finding logic 2025-03-16 17:10:19 -06:00
Behdad Esfahbod 14e5a046c8 [font] Move synthetic glyph extents into font layer
So it applies to all font-funcs.
2025-03-16 01:02:55 -06:00
Behdad Esfahbod 8d8fe19099 [dwrite] Add font-funcs sketch
Small steps.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5144
2025-03-15 21:03:30 -06:00
Behdad Esfahbod 08781f6f7d [dwrite] Set face index / glyph_count on hb-face 2025-03-15 20:05:01 -06:00
Behdad Esfahbod 93f8cbf4fa [meson] Add missing .hh files to sources
Manually checked with find and grep...
2025-03-15 19:23:52 -06:00
Behdad Esfahbod 000a0ad7a6 [paint] Add push_font_transform() / push_inverse_font_transform()
Fixes https://github.com/harfbuzz/harfbuzz/issues/5146
2025-03-15 18:35:32 -06:00
Behdad Esfahbod e1d395f4b5 [dwrite] Minor cleanup 2025-03-15 14:13:02 -06:00
Behdad Esfahbod db8d099d4d [dwrite] Split shape code into its own file 2025-03-15 13:59:16 -06:00
Behdad Esfahbod 13849d4205 [dwrite] More cleanup 2025-03-15 13:25:49 -06:00
Behdad Esfahbod e9d5ecca1d [directwrite] Simplify more 2025-03-15 13:15:03 -06:00
Behdad Esfahbod d2b722803f [directwrite] Rely on more reference-counting for lifetime 2025-03-15 12:55:27 -06:00
Behdad Esfahbod 41d722c3d2 [directwrite] Remove unused member 2025-03-15 12:52:24 -06:00
Behdad Esfahbod 9d6e24a1d2 [draw] Fix build 2025-03-14 22:32:17 -06:00
Behdad Esfahbod c1ed463195 [fontations] rustfmt 2025-03-14 22:14:28 -06:00
Behdad Esfahbod bd05b260af [draw] Document slant_xy 2025-03-14 22:10:29 -06:00
Behdad Esfahbod da4758e791 [draw] Apply synthetic slant to hb_draw_move_to() etc
Makes fontations draw slanted as well.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5145
2025-03-14 22:07:45 -06:00
Behdad Esfahbod b3a293813a [directwrite] Minor cleanup 2025-03-14 17:26:33 -06:00
Behdad Esfahbod bda5b832b0 [directwrite] Mutex for font registration 2025-03-14 03:40:15 -06:00
Behdad Esfahbod 09d983258b [directwrite] Rename a function 2025-03-14 03:13:32 -06:00