Commit Graph

12652 Commits

Author SHA1 Message Date
Khaled Hosny 628847b5c8 [doc] Link to respective draw callback functions 2022-02-13 13:21:14 -06:00
Khaled Hosny 7245298e25 [doc] Document HB_DRAW_STATE_DEFAULT 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 8f519d55ac [meson] Put back Experimental-API infrastructure
Just unused for now.
2022-02-13 13:21:14 -06:00
Khaled Hosny 8e892bdb54 [doc] Message draw documentation a bit 2022-02-13 13:21:14 -06:00
Khaled Hosny cf28821337 [meson] fix building with Cairo subproject
We can’t pass internal (subproject) dependency to cpp.has_function(), so
we manually hard-code the result.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod cdf1cb35db [draw] Destroy callback data 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 5c558586eb [util/draw] Apply slant to non-user-fonts as well 2022-02-13 13:21:14 -06:00
Behdad Esfahbod c56c13756b [draw] Document more 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 2376230523 [draw] Flesh out docs a bit 2022-02-13 13:21:14 -06:00
Behdad Esfahbod bc6c3b8401 [font] Update get_glyph_shape() doc 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 732c749ef7 [font] Adjust synthetic-slant docs 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 4818b7ed72 [util] Add --font-slant 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 59067db9f4 [font/draw] Slant drawings
Need to update hb_font_set_synthetic_slant() docs now that we do this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod aa5c7a3811 [draw-session] Add slant 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 4f2704adb6 [draw] Add more reserved items to hb_draw_state_t
Since these are free basically.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod 2ce19f2868 [font/draw] Fetch shape from parent font if not implemented in font 2022-02-13 13:21:14 -06:00
Behdad Esfahbod d6b61dff95 [draw] Minor cleanup 2022-02-13 13:21:14 -06:00
Behdad Esfahbod cfc06c24d5 [util/draw] Render color glyphs if cairo API available 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 542f8269cb [util/draw/ft] Use hb-draw for font-funcs=ft as well
If cairo is >= 1.17.5.

This essentially breaks emoji and bitmap fonts for now.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod 6d5b998f25 [ft/draw] Implement hb-draw for hb-ft 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 370bec938b [draw] Rename internal draw_session_t to hb_draw_session_t 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 5d2df1208a [util] Use hb-draw to render alternatively to cairo-ft
Is automatically enabled if cairo is recent enough, and font-funcs are
not 'ft'.

Uses cairo-user-font backend internally.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod a357e5d889 [draw] Do quadratic-to-cubic conversion in nil quadratic implementation 2022-02-13 13:21:14 -06:00
Behdad Esfahbod c681331c3f [draw] Rename internal draw_helper_t to draw_session_t 2022-02-13 13:21:14 -06:00
Behdad Esfahbod f1a9a9ccaf [draw-state] Pass state down to callbacks 2022-02-13 13:21:14 -06:00
Behdad Esfahbod a9dd9f0bae [draw] Add public move_to/line_to/... API that take a draw-state 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 9f05362d43 [test-draw] Fix compiler warning 2022-02-13 13:21:14 -06:00
Behdad Esfahbod ebc2a133c3 [draw] Rename internal methods 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 86fcd4fe98 [draw] Simplify start_path 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 1740916ede [draw] Remove check for no-op
This is unnecessary overhead. Up to rasterizers to handle this.  Plus,
this throws off point-numbers in uses that rely on it.

Disabled one test that broke with this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod fc78592e67 [draw-state] Add type and use in draw-helper 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 5610fa1da0 [test-draw] Re-enable two disabled tests 2022-02-13 13:21:14 -06:00
Behdad Esfahbod a755f93e8d [draw] Add TODO 2022-02-13 13:21:14 -06:00
Behdad Esfahbod cdb1a1fc06 [draw] Add REPLACEME 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 8b4f429000 [draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape()
To be implemented in hb-ft.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod 92e6e53b30 [draw] Rename user_data to draw_data 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 3b915389b5 [draw] Remove unneeded roundf() calls 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 2bed4f46fb [draw] Fix draw signatures 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 08e1096609 [draw-fuzzer] Fix signatures 2022-02-13 13:21:14 -06:00
Behdad Esfahbod e0ac6c587b Remove remaining traces of HB_EXPERIMENTAL_API 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 5207ce828a [draw] Enable draw tests
Disable two failing ones.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod 157caf254e [test-draw] Fix compiler warning 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 27dfd69fc7 [draw] Another Since: tag update 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 7ac23f4e78 [draw] Whitespace 2022-02-13 13:21:14 -06:00
Behdad Esfahbod e157b50345 [draw] Remove return value of hb_font_draw_glyph() 2022-02-13 13:21:14 -06:00
Behdad Esfahbod ddc36df332 [draw] Move hb_font_draw_glyph() to hb-draw-glyph.cc 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 9a1508a2be [draw] Replace API Since tags with REPLACEME 2022-02-13 13:21:14 -06:00
Behdad Esfahbod a428c1193c [main] Fix compiler warnings 2022-02-13 13:21:14 -06:00
Behdad Esfahbod 35190dc961 [draw] Convert API to float instead of hb_position_t 2022-02-13 13:21:14 -06:00
Behdad Esfahbod d6e49b8278 [font] Add em_fscalef_[xy] That take and return float 2022-02-13 13:21:14 -06:00