Commit Graph
14536 Commits
Author SHA1 Message Date
Behdad Esfahbod 4cf4099f07 [ot/ft] Round glyph extents instead of floor/ceil
1. The floor/ceil was being applied in the wrong order for y direction.
2. If the scale is negative, the floor/ceil should be reversed.

Just round them instead. That's what coretext / directwrite / fontations
font-funcs do.
2025-03-30 22:59:54 -06:00
Behdad Esfahbod afa0549dff [fontations] More idiomatic 2025-03-28 18:38:40 -06:00
Behdad Esfahbod 17c875c309 [buffer] Minor add a function 2025-03-28 16:26:27 -06:00
Behdad Esfahbod ef95dc0e7f [vmtx] Fix v_origin when no vmtx available 2025-03-28 15:50:05 -06:00
Behdad Esfahbod c39ac0e171 [ot] Make v_origin work for more glyph formats 2025-03-28 14:24:39 -06:00
Behdad Esfahbod 1358e38154 [fontations] Implement last bits of v_origin 2025-03-28 13:15:37 -06:00
Behdad Esfahbod 1dac21c177 [errors] Add -Wuninitialized
Works with newer clang I think.
2025-03-28 12:44:20 -06:00
Behdad Esfahbod 22f81f70cb [font] Fix var initialization 2025-03-28 12:41:01 -06:00
Behdad Esfahbod aad5780f53 [font] Move outline emboldening to font layer
Such that it works on all font-funcs.
2025-03-28 00:37:20 -06:00
Behdad Esfahbod 83481d65d0 [font] Move emboldening advances to the font layer
Instead of each font-funcs impl.

TODO: Do the same for draw_glyphs.
2025-03-28 00:21:20 -06:00
Behdad Esfahbod a588761198 [font] Fix void return 2025-03-28 00:09:26 -06:00
Behdad Esfahbod 1f6da390e0 [fontations] Implement one fallback case in get_v_origin 2025-03-27 20:05:13 -06:00
Behdad Esfahbod 449752c57c [fontations] Fix get_v_advances() fallback
Was crashing without vmtx before.
2025-03-27 20:02:08 -06:00
Behdad Esfahbod b808d1746d [fontations] Move variable scope 2025-03-27 19:52:42 -06:00
Behdad Esfahbod 9d584c4d3d [fontations] Remove stale comment 2025-03-27 19:34:54 -06:00
Behdad Esfahbod 82d664519c [subset] Fix check-symbols test 2025-03-27 17:47:56 -06:00
Garret Rieger 283ab21841 [subset] remove CFF/CFF2 table presence checks.
Not needed now that we are checking accelerator validity.
2025-03-27 16:35:35 -06:00
Behdad Esfahbod 0752e5852b Merge pull request #5219 from harfbuzz/gid_data
[subset] Add API for retrieving the raw per glyph outline data from CFF and CFF2.
2025-03-27 16:12:14 -06:00
Garret Rieger ae8b288db7 [subset] Correctly handle lifetime of charstrings data blob returned by hb_subset_cff_get_charstring_data. 2025-03-27 22:07:06 +00:00
Behdad Esfahbod c50c0a39e5 Merge pull request #5223 from harfbuzz/trak-back
Revert "[ot-font/trak] Move trak application to ot-font instead of ot…
2025-03-27 15:43:49 -06:00
Behdad Esfahbod b4fd777c23 [aat] Remove hb_aat_layout_get_tracking() again
https://github.com/harfbuzz/harfbuzz/pull/5223
2025-03-27 15:37:01 -06:00
Qunxin Liu 5ebe36e1ac [subset] bug fix for CaretValueFormat3
Don't return false in case of a Hinting Device table
2025-03-27 15:12:42 -06:00
Behdad Esfahbod 208ffb3f1f [coretext-font] Undo tracking in get_[hv]_advances()
Fixes https://github.com/harfbuzz/harfbuzz/issues/5221
2025-03-27 15:10:52 -06:00
Behdad Esfahbod dda1d95af2 Revert "[ot-font/trak] Move trak application to ot-font instead of ot-shape"
This reverts commits ffae5b040d and
17c11ec523.

Plus manual modifications.

See https://github.com/harfbuzz/harfbuzz/issues/5221
2025-03-27 14:44:52 -06:00
Garret Rieger 0d4053b11d [subset] Add hb-subset.h API for retrieving the raw per glyph outline data from CFF and CFF2. 2025-03-27 20:20:52 +00:00
John BamptonandMax Base ba6869848f src: fix spelling in code comments
Co-authored-by: Max Base <MaxBaseCode@gmail.com>
2025-03-27 12:18:07 -06:00
Qunxin Liu 192d264ae7 [subset] remove divisions when computing the cost of binary search 2025-03-25 15:37:14 -06:00
Behdad Esfahbod fea0c0df33 [fontations] More idiomatic 2025-03-25 12:34:00 -06:00
Behdad Esfahbod bb3a55a61a [fontations] Add TODO 2025-03-24 17:05:58 -06:00
Behdad Esfahbod 0affe12785 [fontations] Apply variations to glyph_v_advances 2025-03-24 17:00:57 -06:00
Behdad Esfahbod 83d3ffc5d1 [fontations] Hook up variations to v_origin
Output matches ot backend, but not ft. Not gonna dig down there
right now. I *think* ft doesn't implement VORG table IIRC.
2025-03-24 16:58:12 -06:00
Behdad Esfahbod 0ae4b8f48e [fontations] Implement glyph_v_advances
Without variations for now.
2025-03-24 16:45:35 -06:00
Behdad Esfahbod 589e78cec5 [fontations] Handle recursive clip-glyphs
This reverts 852f66a418 in spirit,
using a malloc-free implementation and keeping the fill-glyph
optimization.
2025-03-24 13:21:56 -06:00
Behdad Esfahbod b114518310 [directwrite] Link to library
Instead of loading at runtime. I just want to see how CI deals with
this. Otherwise, not depending on dwrite is probably desired.
2025-03-24 15:31:36 +02:00
Behdad Esfahbod ba709a385e [dwrite] Fix cast-align error-warning
Fixes https://github.com/harfbuzz/harfbuzz/issues/5197
2025-03-24 02:08:04 -06:00
Behdad Esfahbod 0849d3d8b6 [fontations] Minor shuffle 2025-03-24 02:08:04 -06:00
Behdad Esfahbod 8e1502cce8 [fontations] Implement glyph_v_origin 2025-03-24 02:08:04 -06:00
Khaled Hosny ea6a172f84 11.0.0 2025-03-24 00:33:53 +02:00
Behdad Esfahbod 7612ec44dc [util] Show glyph extents only if available 2025-03-23 13:11:23 -06:00
Behdad Esfahbod 391cbed883 [fontations] Support non-uniform scales 2025-03-23 12:58:34 -06:00
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