Behdad Esfahbod
6ccbfabd4f
[paint] Return bool from paint_image()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3974
2022-12-24 10:44:25 -07:00
Matthias Clasen
4816be9ab5
Work around cairo limitations
...
If we just draw an image, cairos recording surface
complains that it is unbounded. Its not true of course.
To make things work, clip to the extents.
2022-12-24 09:16:29 -05:00
Matthias Clasen
76c16095fa
Fix the build on Windows
...
No __BYTE_ORDER there.
2022-12-24 05:30:11 -05:00
Matthias Clasen
13e0cb64f4
hb-view: Interpolate gradients premultiplied
...
This is what the specs demand.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
381d410b1e
[paint] Add HB_PAINT_IMAGE_FORMAT_BGRA and use it in hb-ft
...
Now hb-ft can render color emoji as well.
Just left COLRv2.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
63db0d2aed
[util] Speculatively fix build against non-PNG builds
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
c5f903872f
[paint] Add bitmap width/height to paint_image callback
...
Such that we can add raw data as well.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
237955dffc
[paint] Add slant to image() callback
...
And slant images in hb-view.
2022-12-23 13:37:59 -07:00
Matthias Clasen
6387004cad
[paint] Simplify api
...
Drop the hb_paint_context_t struct from the API, and
only pass the font where we need it.
2022-12-23 13:37:59 -07:00
Matthias Clasen
71bd5a0dfc
[paint] Resolve colors
...
We don't need to pass the index/alpha pairs to
client callbacks, and can just resolve the colors
internally.
Update test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
9be01b6bff
[paint] Pass hb_paint_context_t along
...
Replace the font argument with a hb_paint_context_t
that carries the font, the palette index and the
foreground color.
The hb_font_paint_glyph() api now takes the palette
index and the foreground color as extra arguments.
Update all callers and regenerate test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
b1500babaa
utils: Some cairo helper tweaks
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
cf02d13302
[cairo] Remove unused struct
2022-12-23 13:37:59 -07:00
Matthias Clasen
a3ba723876
Drop an unneeded include
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
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
Matthias Clasen
6c49822cad
wip: Use hb-paint in hb-view
...
This doesn't paint anything yet.
2022-12-23 13:37:59 -07:00