Commit graph

18346 commits

Author SHA1 Message Date
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
Behdad Esfahbod
d441b4cbc7
Merge pull request #5140 from harfbuzz/directwrite-loader
[directwrite] Add hb_directwrite_face_create_from_blob_or_fail()
2025-03-14 03:05:26 -06:00
Behdad Esfahbod
e92cd9f769 [directwrite] Massage more
I think this is it!
2025-03-14 02:46:11 -06:00
Behdad Esfahbod
1e9d101ed7 [directwrite] Add hb_directwrite_face_create_from_file_or_fail()
Just loads the blob from file and creates a face from it.

New API:
+hb_directwrite_face_create_from_file_or_fail()
2025-03-14 02:14:23 -06:00
Behdad Esfahbod
c73b54bcca [directwrite] Massage more 2025-03-14 02:09:01 -06:00
Behdad Esfahbod
db93dbb286 [directwrite] More cleanup 2025-03-14 01:50:08 -06:00
Behdad Esfahbod
9e5a767855 [directwrite] Add singleton dwrite_dll 2025-03-14 01:22:05 -06:00
Behdad Esfahbod
64716226d2 [directwrite] Shuffle code around 2025-03-14 01:13:04 -06:00
Behdad Esfahbod
27fc376fe9 [directwrite] Addd lifecycle management to a few of objects 2025-03-13 18:27:59 -06:00
Behdad Esfahbod
aacaa8bba3 [directwrite] Flip loader & stream around 2025-03-13 17:18:31 -06:00
Behdad Esfahbod
2502d0b698 [directwrite] Use blob directly in the interface 2025-03-13 17:00:50 -06:00
Behdad Esfahbod
d0fef9a1fc [directwrite] Don't release the library
It crashes. Going to fix it to use a singleton, but for now
just not crash.
2025-03-13 16:56:47 -06:00
Behdad Esfahbod
ad3225c648 [direcwrite] Make blob immutable 2025-03-13 16:30:09 -06:00
Behdad Esfahbod
00360049e3 [directwrite] Handle failures in new API
Still crashes...
2025-03-13 16:22:45 -06:00
Behdad Esfahbod
f6744c2c73 [ci] Add pkg-config to win cross-compiling environment 2025-03-13 15:55:57 -06:00
Behdad Esfahbod
379688c566 [test-face] Relax on face load failure 2025-03-13 14:47:34 -06:00
Behdad Esfahbod
344915c9ea [face] Hook up directwrite face loader 2025-03-13 14:30:56 -06:00
Behdad Esfahbod
b0a5920d1a [directwrite] Add hb_directwrite_face_create_from_blob_or_fail()
Part of https://github.com/harfbuzz/harfbuzz/issues/5082

New API:
+hb_directwrite_face_create_from_blob_or_fail()
2025-03-13 14:27:37 -06:00
Behdad Esfahbod
7e4698abe2 [coretext] Move more code around 2025-03-13 14:16:08 -06:00
Behdad Esfahbod
471ac1cdc0
Merge pull request #5139 from harfbuzz/set-malloc-fix
[set] Fix reallocation
2025-03-13 13:41:43 -06:00
Behdad Esfahbod
5f61ccf07d [set] Fix reallocation
Was shrinking malloced vectors inadverently.
2025-03-13 13:22:28 -06:00
Behdad Esfahbod
a0fbd25e10
Merge pull request #5138 from harfbuzz/kerx-malloc
[kern/kerx]  zero-malloc
2025-03-13 12:01:01 -06:00
Behdad Esfahbod
c2f8066b2f [aat] Fix another malloc-fail crasher 2025-03-13 11:43:03 -06:00
Behdad Esfahbod
b57d2a2050 [aat] Fix a leak 2025-03-13 11:19:48 -06:00
Behdad Esfahbod
d6f5cbdd8c [aat] Fix a compiler warning 2025-03-13 11:14:54 -06:00
Behdad Esfahbod
64240602b4 [aat] Fix memfail crash 2025-03-13 10:56:39 -06:00
Behdad Esfahbod
7b8ae3d067 [kern/kerx] Make zero-malloc 2025-03-13 10:44:40 -06:00
Behdad Esfahbod
0f18838c69 [mort] Update with morx change 2025-03-13 08:52:19 -06:00
Behdad Esfahbod
a115228329
Merge pull request #5137 from harfbuzz/aat-mallocs
[aat] Reduce mallocs
2025-03-13 08:32:30 -06:00
Behdad Esfahbod
e5a01efd07 [aat] Put back one set of compiled map in the plan
Use it if there's no user features. Reduces mallocs.
2025-03-13 02:47:20 -06:00
Behdad Esfahbod
7b48aa37a7 [aat] Reduce mallocs
Untested.
2025-03-13 01:07:35 -06:00
Behdad Esfahbod
792b9b9337 [bit-vector] Add a has() 2025-03-12 23:56:52 -06:00
Behdad Esfahbod
43d421d388 [aat] Speed up deleted-glyph removal 2025-03-12 23:36:09 -06:00
Behdad Esfahbod
aa233ecedc [bit-vector] Add a hb_bit_vector_t type
Unused.
2025-03-12 23:05:04 -06:00
Behdad Esfahbod
402876d489
Merge pull request #5136 from harfbuzz/kerx-fix
Kerx fix
2025-03-12 22:48:59 -06:00
Behdad Esfahbod
c38d518718 [aat/kerx] Fix initial-glyph collection logic
Test:
$ hb-shape GeezaPro.ttc --unicodes U+064A,U+064E,U+0651,U+0629
2025-03-12 22:39:33 -06:00
Behdad Esfahbod
2449eb0882 [aat] Adjust filtering to match collect_glyphs() 2025-03-12 21:03:24 -06:00
Behdad Esfahbod
6388ce2224 [kerx] We don't need right_set in machine kerning 2025-03-12 20:58:06 -06:00
Behdad Esfahbod
b861b54178 [kerx] Cosmetic 2025-03-12 20:56:16 -06:00
Behdad Esfahbod
7146e5818f [kerx] Remove redundant check 2025-03-12 20:11:30 -06:00
Behdad Esfahbod
41b396c64b [kerx] Setup buffer glyphset 2025-03-12 20:02:58 -06:00
Behdad Esfahbod
83e0944f0f [kerx] Use a machine class cache
Like in morx.
2025-03-12 19:58:35 -06:00
Behdad Esfahbod
02733deded [kerx] Skip machine subtables that don't intersect the buffer
We do this extensively in morx. Do it here too.

Still no machine class cache in kerx.

Speeds up GeezaPro shaping Arabic text by 20%.
2025-03-12 19:44:07 -06:00
Behdad Esfahbod
45b2d28d04 Revert "[aat] Clear buffer glyph set"
This reverts commit b1a9219ac5.

Was unnecessary. collect_codepoints() clears the set.
2025-03-12 19:18:12 -06:00
Behdad Esfahbod
d76a23a3f1 [aat] Micro-optimize 2025-03-12 19:16:59 -06:00
Behdad Esfahbod
b1a9219ac5 [aat] Clear buffer glyph set
Should be clear already but no harm.
2025-03-12 19:13:14 -06:00
Behdad Esfahbod
54962b3fce [morx] Consolidate a check 2025-03-12 19:03:50 -06:00