Commit Graph

11713 Commits

Author SHA1 Message Date
Matthias Clasen 9461ab7088 Try paint_glyph for more tables
If the COLR table can't paint the glyph,
try glyf, cff1 and cff2 too.
2022-12-23 13:37:59 -07:00
Matthias Clasen 3e39dd492b cff2: Implement paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen df89b52130 cff1: Implement paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen 2edd771cf5 glyf: Implement paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen 0b33b35eb0 COLRv1: Return bool from paint_glyph
This will let hb_ot_font_paint_glyph() try
multiple tables in turn.
2022-12-23 13:37:59 -07:00
Matthias Clasen 0d890061d1 Rename 'solid' to 'color'
'solid' does not really describe well what
the function does, and there is no strong
reason to stick 1:1 to the terminology used
in the spec.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod 46286275f7 [colr] More dispatch functionality 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 81f232afb5 [colr] Use dispatch machinery for paint_glyph context 2022-12-23 13:37:59 -07:00
Behdad Esfahbod a96300d42c [colr] Hide internal symbols 2022-12-23 13:37:59 -07:00
Behdad Esfahbod b4cab86d94 Fix autotools build 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 0757519092 [colr] Add variation to rest of the paints 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 5bce005346 [colr] Flesh out variations for a few paints 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 9d3440b742 [colr] Add variation infrastructure to paint_glyph
No paint applies variations yet.
2022-12-23 13:37:59 -07:00
Matthias Clasen 5c6329555e Apply root transform
This commit applies scale, slant is still missing.
2022-12-23 13:37:59 -07:00
Matthias Clasen 5afca91ff2 Add some docs 2022-12-23 13:37:59 -07:00
Matthias Clasen 44c68594f1 Some docs 2022-12-23 13:37:59 -07:00
Matthias Clasen d7c2eacf45 Handle COLRv0 layers in paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen 55ca6ed230 minor fixes 2022-12-23 13:37:59 -07:00
Matthias Clasen 1880e54753 Assorted fixes 2022-12-23 13:37:59 -07:00
Matthias Clasen 684df8a82a add some todos 2022-12-23 13:37:59 -07:00
Matthias Clasen a6f813b680 Implement hb_color_line_get_extend 2022-12-23 13:37:59 -07:00
Matthias Clasen 3937d6b0aa Implement hb_color_line_t 2022-12-23 13:37:59 -07:00
Matthias Clasen 64f1b55d01 api fixes: use floats consistently 2022-12-23 13:37:59 -07:00
Matthias Clasen 627c857f8b rename pop_group_and_composite 2022-12-23 13:37:59 -07:00
Matthias Clasen c9350838c7 assorted fixes and changes 2022-12-23 13:37:59 -07:00
Matthias Clasen 42324aef2b hb-paint: annotation fix 2022-12-23 13:37:59 -07:00
Matthias Clasen 8377341b28 wip: implement paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen efe13a191d fix introspection 2022-12-23 13:37:59 -07:00
Matthias Clasen 6a48ac42f4 COLR implementation 2022-12-23 13:37:59 -07:00
Matthias Clasen 71efa0dcf1 wip: hb_font_paint_glyph 2022-12-23 13:37:59 -07:00
Matthias Clasen 83d0a49f71 wip: hb-paint 2022-12-23 13:37:59 -07:00
Matthias Clasen 30c5402e3d Make hb-features.h usable standalone
The intended use for hb-features.h is to
be included standalone, so we can't put
the single-include guards in here.
2022-12-23 12:33:28 -07:00
Behdad Esfahbod d628aff9db [ft] Apply slant in get_glyph_extents 2022-12-22 10:53:37 -07:00
Behdad Esfahbod 9a0ebd2b2a [glyf] Fix slant-scaling in GlyphHeader too 2022-12-22 10:21:50 -07:00
Behdad Esfahbod 392463bff5 [cff] Fix extent rounding
I broke it in b0abbfd868.
2022-12-22 08:34:01 -07:00
Behdad Esfahbod 897c102703 [font] Fix scale_glyph_extents 2022-12-22 08:15:01 -07:00
Behdad Esfahbod 9194e13e25 [font] Apply slant to glyph extents
Fixes https://github.com/harfbuzz/harfbuzz/issues/3952

hb-ft not fixed since doesn't use this code.
2022-12-22 07:32:29 -07:00
Behdad Esfahbod b0abbfd868 [font] Centralize glyph-extents scaling
Needs more testing...

Some rounding was removed, namely in cff1 and cff2.
2022-12-22 07:32:15 -07:00
Behdad Esfahbod 97b8ada865 [varc] Reset component coordinates to that of the font
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/78
2022-12-21 19:52:20 -07:00
Garret Rieger 40342c9437 [subset] check for addition overflow in hdmx size calculation.
Fixes https://oss-fuzz.com/testcase-detail/4877336988483584.
2022-12-21 16:44:06 -07:00
Garret Rieger d77fca997e [subset] when subsetting preprocessor fails, reference the returned face.
The caller of the method is expected to destroy the returned result.
2022-12-21 15:04:27 -07:00
Behdad Esfahbod 9b5b4da0e4 [varc] Set coordinates as absolute values 2022-12-20 09:58:04 -07:00
Behdad Esfahbod 80e68f09c5 [VarC] Change rotation/skew representation
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/77
2022-12-19 19:17:04 -07:00
Garret Rieger 1840b02e6a [subset] Don't gate access to the table repacker.
Any table with an object graph should repack correctly.
2022-12-19 17:57:33 -07:00
Behdad Esfahbod 03a1685693 [VarC] Change representation of scale from 4.12 to 6.10
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/76
2022-12-19 17:12:09 -07:00
Matthias Clasen c292e577ff Fix a typo 2022-12-19 20:04:36 +02:00
Matthias Clasen b795246fff [draw] Clarify the docs
Disambiguate the origin of draw_data and user_data,
this had me confused a few times.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/3955
2022-12-19 20:04:36 +02:00
Matthias Clasen eddb408f9c [draw] Small doc fix 2022-12-19 20:03:57 +02:00
Khaled Hosny bc4c290b75 [doc] Workaround gtk-doc limitation with HB_DEPRECATED_FOR
See https://github.com/harfbuzz/harfbuzz/issues/3957#issuecomment-1356890525
2022-12-19 00:59:50 +02:00
Khaled Hosny f9e1192d58 [ot-tag] Document two deprecated symbols
See https://github.com/harfbuzz/harfbuzz/issues/3957
2022-12-18 23:58:36 +02:00