Matthias Clasen
6909701b36
[paint] Update docs
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
Matthias Clasen
eef47f2379
[paint] Fix the docs
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
3c972867b9
More s/hb_font_get_glyph_shape/hb_font_draw_glyph/
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
72a169c846
[ft] Paint COLRv0 glyphs
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
bb807f47d2
[ft] Implement paint_glyph() for outline glyphs
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
91c880503e
[ft] Use new name for draw API
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
c27eefec1d
Revert "Drop the deprecation"
...
This reverts commit 3904e66777339a3d420ece1c2b7d550949aa3946.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
f3985d9482
[paint] Fix drawing non-color glyphs
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
c221933977
[paint] Preserve foreground information
2022-12-23 13:37:59 -07:00
Matthias Clasen
f146299a40
[paint] Drop unnecessary api
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
bd1389bedf
[paint] Add hb_paint_context_t to docs
2022-12-23 13:37:59 -07:00
Matthias Clasen
5d7553d38f
view: Add a --font-palette option
2022-12-23 13:37:59 -07:00
Matthias Clasen
d094e76cbc
hb-view: Pass fg color to hb_font_paint_glyph
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
Behdad Esfahbod
6c71c530ca
[paint] Rename hb_paint_context_t to hb_ot_paint_context_t
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
8495395397
[paint] Fix slant
2022-12-23 13:37:59 -07:00
Matthias Clasen
b1500babaa
utils: Some cairo helper tweaks
2022-12-23 13:37:59 -07:00
Matthias Clasen
97224f3b63
[paint] Pass font to all callbacks
...
This will lead to easier implementations.
At the same time, we change the push_clip_glyph
callback to use the font as-is, no unscaling needed.
Update all callers and expected test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
32ce29f99e
[font] Move hb_font_t typedef
...
This is needed to avoid circular header dependencies.
2022-12-23 13:37:59 -07:00
Matthias Clasen
8364d9130f
Document hb_font_set_draw_glyph_func
2022-12-23 13:37:59 -07:00
Matthias Clasen
a20999b9df
[font] Fix a few documentation mistakes
2022-12-23 13:37:59 -07:00
Matthias Clasen
754528914d
[docs] Reorder paint section
2022-12-23 13:37:59 -07:00
Matthias Clasen
2333a566ed
Drop the deprecation
...
No need to drop hb_font_get_glyph_shape, just
because hb_font_draw_glyph does the same.
Its fine to keep both around.
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
14b026ff86
[draw] Add hb_font_draw_glyph
...
hb_font_draw_glyph(), hb_font_draw_glyph_func_t and
hb_font_funcs_set_draw_glyph_func() are just alternative
names for hb_font_get_glyph_shape and friends, to better
align with hb_font_paint_glyph.
2022-12-23 13:37:59 -07:00
Matthias Clasen
08da126523
[docs] Linkify links
2022-12-23 13:37:59 -07:00
Matthias Clasen
9437f719a7
[paint] Document hb_paint_extend_t
2022-12-23 13:37:59 -07:00
Matthias Clasen
3a2634e27c
[paint] Document hb_font_paint_glyph_func_t
2022-12-23 13:37:59 -07:00
Matthias Clasen
0f287e75ec
[paint] Rename hb_font_get_glyph_paint_func_t
...
The 'get' was just there due to implementation
choices. Work around that and call the vfunc
what it should be: hb_font_paint_glyph_func_t.
2022-12-23 13:37:59 -07:00
Matthias Clasen
b0fa40b2ec
tests: More diagnostics
2022-12-23 13:37:59 -07:00
Matthias Clasen
ddd2039265
[paint] Improve the docs
2022-12-23 13:37:59 -07:00
Matthias Clasen
3a219cfa6a
[config] Make HB_LEAN imply HB_NO_PAINT
2022-12-23 13:37:59 -07:00
Matthias Clasen
0ef2dc9be5
Drop a TODO
...
This was addressed in 61bd602791d801
2022-12-23 13:37:59 -07:00
Matthias Clasen
96cda3886c
[paint] Clarify docs
...
Spell out where the different datas originate.
2022-12-23 13:37:59 -07:00
Matthias Clasen
290bb338bf
Dist test result files
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
74ccc1e76d
tests: Produce useful output on failure
2022-12-23 13:37:59 -07:00
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