Behdad Esfahbod
38db1facf2
[paint] Change back return type of paint_glyph() to void
...
Add new "_or_fail" variants of draw_glyph and paint_glyph
New API:
+hb_font_draw_glyph_or_fail_func_t
+hb_font_paint_glyph_or_fail_func_t
+hb_font_funcs_set_draw_glyph_or_fail_func()
+hb_font_funcs_set_paint_glyph_or_fail_func()
+hb_font_draw_glyph_or_fail()
+hb_font_paint_glyph_or_fail()
Deprecated API:
-hb_font_draw_glyph_func_t
-hb_font_paint_glyph_func_t
-hb_font_funcs_set_draw_glyph_func()
-hb_font_funcs_set_paint_glyph_func()
2025-04-23 18:23:51 -06:00
Behdad Esfahbod
eb226383a0
[font] Synthesize glyph extents if needed
...
See code for logic.
Fixes https://github.com/harfbuzz/harfbuzz/issues/5273
2025-04-23 01:20:48 -06:00
Behdad Esfahbod
e78310bfaa
[paint] Change return type to bool, and return false for outline glyphs
...
It was impossible to get synthetic bold/slant correctly with the
previous API. This is a minor API break, but one I'm willing to take.
2025-04-23 01:02:15 -06:00
Behdad Esfahbod
a23021e168
[COLRv1] Simplify paint_glyph()
...
Pass a non-synthetic font to the client, so they don't have
to worry about it.
The only issue left, is that now when paint_glyph() paints
an outline glyph (not color glyph), it would be double-slanted.
I'm leaning towards removing painting of outline glyphs from
the paint API and change the paint API to return a boolean.
2025-04-23 00:43:56 -06:00
Behdad Esfahbod
023e229470
[cairo] Solely use public API
...
I actually don't know how hb-font.hh is pulled into hb-cairo.cc.
I can't figure it out!
2025-04-22 23:09:47 -06:00
Behdad Esfahbod
6f6d6e8c86
[cairo] Remove redundant include
2025-04-22 23:04:31 -06:00
Behdad Esfahbod
5d9cff80ec
[font] Move is_synthetic() to .hh
2025-04-22 23:01:28 -06:00
Behdad Esfahbod
b9a1cd7011
[cairo] Use hb_font_is_synthetic() to speed up clip_glyph
2025-04-22 22:54:34 -06:00
Behdad Esfahbod
bf28ca5f5c
[paint] Mention hb_font_is_synthetic()
2025-04-22 22:53:09 -06:00
Behdad Esfahbod
853720ead4
[font] Add hb_font_is_synthetic()
...
New API:
+hb_font_is_synthetic()
2025-04-22 22:51:40 -06:00
Behdad Esfahbod
4c0a925ee9
[paint] Document clip_glyph vs synthetic shapes hurdle
2025-04-22 22:36:28 -06:00
Behdad Esfahbod
01e9c77e30
[COLR] Fix clip-box
...
Was slanting it. Was wrong with new code.
2025-04-22 21:57:02 -06:00
Behdad Esfahbod
9445778e18
[test-paint] Update expectations for recent slant changes
2025-04-22 21:33:15 -06:00
Behdad Esfahbod
c57f49f772
[ft] Return false from get_extents for COLR glyphs
2025-04-22 21:32:35 -06:00
Behdad Esfahbod
fcbe76760f
[fontations] Return false from get_extents for COLR glyphs
2025-04-22 21:32:31 -06:00
Behdad Esfahbod
e9ae6cc524
[cairo] Draw unsynthetic glyphs during COLRv1
...
Fixes the double-slanting issue of COLRv1 glyphs.
2025-04-22 21:14:50 -06:00
Behdad Esfahbod
395bc27659
[font] Fix draw_glyph default implementation to new scheme
2025-04-22 21:05:53 -06:00
Behdad Esfahbod
a69713b520
[color] Move slanting to font layer
...
COLRv1 is still being double-slanted. Investigating.
2025-04-22 21:02:45 -06:00
Behdad Esfahbod
9dbb84e6fd
[font] Don't apply synthetic bold/slant to parent
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5274
2025-04-22 20:25:44 -06:00
Behdad Esfahbod
1a9e21758d
[font/draw] Move slanting to font layer
...
I moved it to the draw layer in 11.0.0; That was a bad design:
font-funcs should NOT be responsible for synthetic bold & slant.
This design reverts that and makes the font layer apply it,
using a recording.
This is a minor API change from 11.0.0 since hb_draw_state_t::slant_xy
which was introduced in 11.0.0, is removed now. I believe no client
had started using it. It was only relevant to other font-funcs draw
implementations.
2025-04-22 19:52:21 -06:00
Behdad Esfahbod
9ef82f8926
[font] Embolden font_v_extents
2025-04-22 19:35:34 -06:00
Behdad Esfahbod
5ebd740ee8
[font] Move font_h_extents emboldening to font layer
2025-04-22 19:29:02 -06:00
Behdad Esfahbod
0d8717275a
[buffer] Limit the extent of set_flags range
...
We can easily get into O(n^2) otherwise.
2025-04-22 15:40:06 -06:00
JordanTheToaster
b0f4979d47
[cmake] Fix missing sources
2025-04-22 01:48:26 -06:00
dependabot[bot]
ad36480bad
Bump setuptools from 78.1.0 to 79.0.0 in /.ci
...
Bumps [setuptools](https://github.com/pypa/setuptools ) from 78.1.0 to 79.0.0.
- [Release notes](https://github.com/pypa/setuptools/releases )
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst )
- [Commits](https://github.com/pypa/setuptools/compare/v78.1.0...v79.0.0 )
---
updated-dependencies:
- dependency-name: setuptools
dependency-version: 79.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-04-21 14:28:17 +02:00
Khaled Hosny
fa791a3425
[ci/msys2] Drop mingw32 build
...
Upstream is dropping it, and mingw-w64-i686-icu package is already gone.
https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages
https://github.com/msys2/MINGW-packages/discussions/19326
2025-04-20 15:34:01 +02:00
Behdad Esfahbod
12457498af
[meson] Report Fontations status
2025-04-20 05:18:38 -06:00
Behdad Esfahbod
0536254885
Merge pull request #5294 from harfbuzz/paint-bounds
...
[COLRv1] `paint-bounds`
2025-04-20 05:06:54 -06:00
Behdad Esfahbod
c62af2c360
[paint-unbounded] Minor tweak
...
I like it better this way.
2025-04-20 04:53:33 -06:00
Behdad Esfahbod
6e2806e46c
[paint-bounded] Reduce vector use
...
Keep current drawing's boundedness outside of the vector
(common case).
Again, no speedup because of the scratch pattern.
2025-04-20 04:47:58 -06:00
Behdad Esfahbod
27b2e16ac0
[atomic] Make cmpexch() non-const
...
Was a mistake. Make the affected members mutable instead.
2025-04-20 04:34:40 -06:00
Behdad Esfahbod
7aa3ab933b
[paint-bounded] Remove one vector
...
Doesn't make things faster though because of the scratch pattern.
2025-04-20 04:28:28 -06:00
Behdad Esfahbod
78822b6336
Revert "[COLRv1] Move paint boundedness check to font layer"
...
This reverts commit c9a26fbf47 .
2025-04-20 04:23:35 -06:00
Behdad Esfahbod
c9a26fbf47
[COLRv1] Move paint boundedness check to font layer
...
This way it will apply to fontations and future implementations
as well.
But this slows down things apparently, specially if the font
does use clipboxes. So I'm going to revert.
2025-04-20 04:22:32 -06:00
Behdad Esfahbod
8aa88aa416
[COLRv1:ot/ft] Use paint-bounded instead of paint-extents
...
Faster. Note that this also means that if there is no clip-box,
we don't compute the bounds and emit an initial clip anymore.
That was totally unnecessary and against the COLRv1 rendering
algorithm.
This makes painting of COLRv1 fonts without clipboxes *much*
faster, as previously we were computing bounds using all subglyph
outlines. Not anymore.
Before:
BM_Font/paint_glyph/Nupuram-Color.colrv1.ttf/ot 1.78 ms
After:
BM_Font/paint_glyph/Nupuram-Color.colrv1.ttf/ot 0.155 ms
2025-04-20 04:11:07 -06:00
Behdad Esfahbod
d175e2214e
[paint-bounded] Add new code to compute boundedness of paintings
...
This is faster than using paint-extents to just compute boundedness.
Unused right now.
2025-04-20 04:02:05 -06:00
Behdad Esfahbod
4a9ac263c6
[draw] Move draw_extents form paint-extents to draw
2025-04-20 02:12:40 -06:00
Behdad Esfahbod
4fc84b0e99
[ot-font] Fix order of COLR vs VARC extents
...
COLR can reference VARC, not the other way around.
2025-04-20 00:36:28 -06:00
Behdad Esfahbod
01793d3eaf
[fontations] Pop font transform
2025-04-20 00:32:44 -06:00
jfkthame
4e7b178f3c
Avoid unannotated-fallthrough in hb-ot-layout-base-table.hh
2025-04-17 11:57:15 -06:00
jfkthame
2602f7292c
Avoid unannotated-fallthrough warning in COLR.hh
2025-04-17 11:56:46 -06:00
Khaled Hosny
416e6b6921
11.1.0
11.1.0
2025-04-16 20:35:58 +02:00
Behdad Esfahbod
32b36fa84c
[atexit] Fix extra semicolon
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5290
2025-04-15 12:37:43 -06:00
Behdad Esfahbod
bc15ebdea1
[font] Fix abs of int value
2025-04-15 12:37:11 -06:00
Behdad Esfahbod
8f413a533c
[layout] Docs
2025-04-15 10:03:16 -06:00
Behdad Esfahbod
21516f74d2
[cmake] Add hb-script-list.h
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5288
2025-04-15 09:58:42 -06:00
Behdad Esfahbod
7bb3000a31
[font] Allow negative emboldening strength to enlighten
2025-04-15 09:58:42 -06:00
dependabot[bot]
4da8671b50
Bump github/codeql-action from 3.28.14 to 3.28.15
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.28.14 to 3.28.15.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/codeql-action/compare/fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2...45775bd8235c68ba998cffa5171334d58593da47 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.15
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-04-15 17:02:15 +02:00
Khaled Hosny
e192a584a8
[check-symbols] Ignore another rust symbol
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/5287
2025-04-15 16:59:46 +02:00
robxnano
cf7bffb690
meson: Use full path in HBSOURCES
...
Using the file object directly in a format string is broken
and now deprecated.
2025-04-13 02:59:31 +02:00