Commit Graph

14951 Commits

Author SHA1 Message Date
Matthias Clasen 084291108a Tests: Fix memleak pointed out by valgrind 2022-12-23 13:37:59 -07:00
Matthias Clasen 0800d1879c Try to fix autotools build 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 5ac218865a [paint] A doc fix 2022-12-23 13:37:59 -07:00
Matthias Clasen 5451b78f4a Don't use alloca
It complicates things on Windows, for no
big win. Just preallocate a reasonable amount.
2022-12-23 13:37:59 -07:00
Matthias Clasen 7c12db46ff Try to fix msvc build 2022-12-23 13:37:59 -07:00
Matthias Clasen d2b420589b [docs] Add hb-paint apis 2022-12-23 13:37:59 -07:00
Behdad Esfahbod d8cb7ceefb [test] Try fixing bots with old glib 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 5d1fc9ee9d [paint] Fix annotations 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 3590ee74f4 [util] Fix bot 2022-12-23 13:37:59 -07:00
Behdad Esfahbod ee2204469e [paint] Add get_empty / [sg]et_user_data 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 21a9db875e [draw] Add get_empty / [sg]et_user_data 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 9a7422c5fb [font] Minor doc fix 2022-12-23 13:37:59 -07:00
Behdad Esfahbod a9b37206eb [font] Minor rename 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 815544a1f7 [font] Adapt paint_glyph to parent transform 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 81bf089273 [hb-view] Use color render callback if HB_DRAW >= 2 2022-12-23 13:37:59 -07:00
Matthias Clasen c65f580b93 Drop hb-test
This was a test binary to assist in developing
the hb-paint code. Not needed anymore, now that
hb-view has the same code in the cairo userfont
backend.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod 85917e5b21 [paint] Fix docs 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 14bf3aaa8d [colr] Make paint_image work again 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 9672aa8610 [util] Fix compiler warning 2022-12-23 13:37:59 -07:00
Matthias Clasen 955bd30365 Fix hb-cairo-utils
This was a stupid mistake, and hard to track down.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod 3573956705 [util] Include stdio.h 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 7accbe97d8 [util] Fix argument order and root transform PNGs 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 529dc40d7d [util] Adjust scaling
Still doesn't render PNGs.

Fix a few compiler warnings
2022-12-23 13:37:59 -07:00
Behdad Esfahbod bcc9ab27fc [hb-view] Fix transformation
No need for cairo patch; that patch was wrong.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod c996fc58ec [hb-view] Remove redundant check 2022-12-23 13:37:59 -07:00
Behdad Esfahbod bec5354030 [hb-view] Fix render_color_glyph extents coordinate system
Needs cairo fix:
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/371
2022-12-23 13:37:59 -07:00
Behdad Esfahbod 95ccd66481 [hb-view] Set glyph extents in render_color_glyph
Works around limitation in cairo-recording-surface unboundedness.

Extents are wrong but at least renders something now.
2022-12-23 13:37:59 -07:00
Matthias Clasen 6cadf280f2 Use hb-cairo-utils in hb-test
Just to prove that it works.
2022-12-23 13:37:59 -07:00
Matthias Clasen 8bcd13dd91 small fixup to hb-cairo-utils 2022-12-23 13:37:59 -07:00
Matthias Clasen f1f8d1e855 Small documentation addition 2022-12-23 13:37:59 -07:00
Matthias Clasen 6c49822cad wip: Use hb-paint in hb-view
This doesn't paint anything yet.
2022-12-23 13:37:59 -07:00
Matthias Clasen 021618e91a [colr] Add hb_ot_color_has_paint
This is a counterpart to hb_ot_color_has_layers
for COLRv1 data.
2022-12-23 13:37:59 -07:00
Matthias Clasen 63fcb26c9b Add some more docs 2022-12-23 13:37:59 -07:00
Matthias Clasen 2d4678b647 Add a comment 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 3b32eab38e [colr] Fix compiler warning 2022-12-23 13:37:59 -07:00
Matthias Clasen 30a6fd04d0 [colr] Add some tests 2022-12-23 13:37:59 -07:00
Matthias Clasen 451414a27e [paint] Documentation fixes 2022-12-23 13:37:59 -07:00
Behdad Esfahbod e3153654cb [colr] Fix PNG placement 2022-12-23 13:37:59 -07:00
Behdad Esfahbod f07ce68f9c Remove unused function 2022-12-23 13:37:59 -07:00
Matthias Clasen 0c77f1d9ab [paint] Documentation tweaks 2022-12-23 13:37:59 -07:00
Matthias Clasen 0a2f3673b9 [paint] Use tags for image formats
This fits better with the rest of the
HarfBuzz API.
2022-12-23 13:37:59 -07:00
Matthias Clasen 4c728e952b [colr] Add a todo 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 4b0285bae6 [colr] Use slant_xy 2022-12-23 13:37:59 -07:00
Behdad Esfahbod b9314400ec [colr] Hook up color-line variation 2022-12-23 13:37:59 -07:00
Matthias Clasen a935e4b0c2 [paint] Add synthetic slant to root transform 2022-12-23 13:37:59 -07:00
Behdad Esfahbod edf2738263 [colr] Try fixing bot build
I don't get the error. Let's see.

../../src/harfbuzz/src/hb-ot-color-colr-table.hh:574:66: error: incomplete definition of type 'OT::NoVariable<OT::ColorLine<OT::NoVariable>>'
2022-12-23 13:37:59 -07:00
Matthias Clasen 686e627bdf [paint] Set up root transform in one place
Instead of spreading this in all the tables,
make hb_paint_funcs_t provide a push/pop_root_transform
that does all the setup.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod c6dd56cc64 [colr] Simplify color-stop handling 2022-12-23 13:37:59 -07:00
Matthias Clasen 485ba9beb3 [paint] Spell out rectangle in the API
No need to abbreviate this.
2022-12-23 13:37:59 -07:00
Matthias Clasen 37f3f0fcc2 [paint] Change the image callback
Instead of passing the glyph ID, give
it the image blob, a mimetype, and
glyph extents (if available).

Update all callers.
2022-12-23 13:37:59 -07:00