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
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
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
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
7c12db46ff
Try to fix msvc build
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
5d1fc9ee9d
[paint] Fix annotations
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
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
7accbe97d8
[util] Fix argument order and root transform PNGs
2022-12-23 13:37:59 -07:00
Matthias Clasen
f1f8d1e855
Small documentation addition
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
451414a27e
[paint] Documentation fixes
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
Matthias Clasen
ea48d6c292
Move hb_glyph_extents_t definition
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
b722039c48
[colr] Simplify
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
452cfb9599
[colr] Simplify loop using iterators
...
Or complexify?!
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
601a596ca0
[paint] Fix include path
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
8a9069d55f
[colr] Fix radial gradient
...
Broke it when adding variations.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
e799c33bb5
[paint] Fix function prototype
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
1953d26a8a
[colr] Limit recursion depth
2022-12-23 13:37:59 -07:00
Matthias Clasen
378bbeea01
Add more docs
2022-12-23 13:37:59 -07:00
Matthias Clasen
6079173a52
Try paint_glyph for more tables
...
If the COLR table does not paint the glyph,
try SVG, CBDT and sbix too, before giving up
on color.
2022-12-23 13:37:59 -07:00
Matthias Clasen
e6c5a616aa
SVG Implement paint-glyph
2022-12-23 13:37:59 -07:00
Matthias Clasen
23c60fd9b2
sbix: Implement paint_glyph
2022-12-23 13:37:59 -07:00
Matthias Clasen
7996ae4c3d
CBDT: Implement paint glyph
2022-12-23 13:37:59 -07:00
Matthias Clasen
82e23f322a
paint: Add a paint-image callback
...
This will be used for image blobs like pngs and svgs.
FIXME: nail down and document sizing.
2022-12-23 13:37:59 -07:00