Commit Graph

72 Commits

Author SHA1 Message Date
Khaled Hosny 0ea8bbd91a [doc] Use XSince for REPLACEME/EXPERIMENTAL
To hide them from gtk-doc so that we can finally enable gtkdoc-check.
2023-02-11 20:59:44 +02:00
Behdad Esfahbod 281db89a68 [cairo] Try to handle failure in set_user_data 2023-01-26 13:05:12 -07:00
Behdad Esfahbod 29a36010a1 [cairo] Adapt to cairo foreground API change again 2023-01-26 14:32:25 -05:00
Matthias Clasen 30d0d9c56c Adapt to cairo changes
Adapt to the api in the cairo MR that will be used,
and make the code build with older cairo.
2023-01-26 14:32:25 -05:00
Behdad Esfahbod 034d4d26f2 [hb-cairo] Minor simplify 2023-01-26 14:32:25 -05:00
Behdad Esfahbod 26d34392e2 [hb-cairo] Fix condition 2023-01-26 14:32:25 -05:00
Matthias Clasen f9b3c79047 Update to different cairo API
The cairo will likely end up begin a getter for
a cairo_pattern_t instead of a color.
2023-01-26 14:32:25 -05:00
Behdad Esfahbod 4afdbcbad5 [hb-cairo] Don't call get_foreground_color unnecessarily
That would invalidate cairo cache on foreground change, even
if the glyph doesn't need that.
2023-01-26 14:32:25 -05:00
Matthias Clasen c37ea4f93e hb-cairo: Fix handling of foreground color
Use the new cairo_user_scaled_font_get_foreground_color
to obtain the foreground color, since the cr's source
can't be trusted.

Requires https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/420
2023-01-26 14:32:25 -05:00
Behdad Esfahbod b684c6edd4 [hb-cairo] Add hb_cairo_context_t 2023-01-24 12:21:12 -07:00
Matthias Clasen 32f9b467d6
Merge pull request #4045 from harfbuzz/custom-palette-cairo
Custom palette cairo
2023-01-21 02:20:39 -05:00
Behdad Esfahbod 7f59bed528 [hb-cairo] Round foreground color 2023-01-20 16:42:55 -07:00
Behdad Esfahbod 76b059cadb [hb-cairo] Simplify foreground color fetching 2023-01-20 16:41:47 -07:00
Behdad Esfahbod f70f7194de [hb-cairo] Remove unused prototype 2023-01-20 16:30:59 -07:00
Behdad Esfahbod ab7c914425 [hb-cairo] Macro shuffle again 2023-01-20 15:43:01 -07:00
Behdad Esfahbod 4759932bcf [hb-cairo] Round colors 2023-01-20 15:33:38 -07:00
Behdad Esfahbod 876675e090 [hb-cairo] Macro shuffling 2023-01-20 15:31:43 -07:00
Behdad Esfahbod 68a73e436a [hb-cairo] Macro hygiene 2023-01-20 15:30:07 -07:00
Khaled Hosny fcb5111cc6 [doc] Fix gtk-doc warning 2023-01-21 00:24:50 +02:00
Behdad Esfahbod 574d9344dc [hb-cairo] Fix build with old cairo 2023-01-20 15:22:50 -07:00
Behdad Esfahbod 4f19c3b3be [hb-cairo] Move color-cache to scaled-font 2023-01-20 15:15:52 -07:00
Behdad Esfahbod beba43eebe [hb-cairo] Fix color cache on not-found 2023-01-20 15:02:24 -07:00
Behdad Esfahbod cc9b55c794 [hb-cairo] Add a color cache 2023-01-20 14:57:57 -07:00
Behdad Esfahbod f21b15dcc3 [hb-view] Update to alternative cairo custom-palette API 2023-01-20 13:57:39 -07:00
Behdad Esfahbod 638e0ed4fd [paint] Overlay custom-palette on top of chosen palette
Got to agree this is more ergonomic.
2023-01-20 13:57:39 -07:00
Matthias Clasen b81db8d3d8 Avoid a compiler warning 2023-01-20 13:57:39 -07:00
Behdad Esfahbod 4fe6ece425 [cairo] Don't fallback to CPAL if cairo doesn't support custom palette 2023-01-20 13:57:39 -07:00
Matthias Clasen ab37ade7e4 Hook up custom palettes for cairo 2023-01-20 13:57:39 -07:00
Behdad Esfahbod f38e35ebc3 [cairo] Internal function renames 2023-01-16 18:07:39 -07:00
Behdad Esfahbod f11271cc03 [cairo] Version-check the variations code 2023-01-16 13:14:58 -07:00
Behdad Esfahbod 5d94eb61b8 [hb-cairo] Fix hb_cairo_glyphs_from_buffer() when utf8 missing
Fixes https://github.com/harfbuzz/harfbuzz/issues/4016
2023-01-08 11:56:01 -07:00
Behdad Esfahbod f2a6643fc1 [cairo] Docs 2022-12-29 18:00:39 -07:00
Behdad Esfahbod bfce4a6046 [cairo] Remove error path
Assume cairo API always returns non-NULL.
2022-12-29 10:43:37 -07:00
Behdad Esfahbod b1de87b7f1 [cairo] Document get_glyphs() arguments as inout 2022-12-29 10:41:35 -07:00
Matthias Clasen 89bd7f64ae [hb-cairo] Small docs fixes 2022-12-29 10:09:50 -07:00
Khaled Hosny 723e7a48e2 [docs] Small fixes 2022-12-29 15:49:21 +02:00
Behdad Esfahbod 81c04b0c21 [cairo] Add separate x/y scale factors 2022-12-27 17:46:25 -07:00
Behdad Esfahbod 50b7fff0c6 [cairo] Fix text_to_glyphs scale factor 2022-12-27 17:37:42 -07:00
Behdad Esfahbod 8f62b8c6bb [cairo] Fix cluster conversion 2022-12-27 17:26:39 -07:00
Behdad Esfahbod fa3fa9422d [cairo] Doc 2022-12-27 11:54:23 -07:00
Behdad Esfahbod bbf6f42d3b [cairo] TODO 2022-12-27 11:50:06 -07:00
Behdad Esfahbod f9fc13287b [hb-cairo] Return hb_font_t* from init-func 2022-12-27 11:08:55 -07:00
Behdad Esfahbod d88787b6ca [cairo] Add func to init fonts on creation
To set, for example, font-funcs.
2022-12-27 10:59:17 -07:00
Behdad Esfahbod c652e8e1b7 [cairo] Docs 2022-12-26 17:01:08 -07:00
Behdad Esfahbod 23980d3cb2 [cairo] Docs 2022-12-26 17:01:08 -07:00
Behdad Esfahbod f5fd46aa3d [cairo] Docs 2022-12-26 17:01:08 -07:00
Behdad Esfahbod 36482b684b [cairo] Err, utf8_clusters 2022-12-26 17:01:08 -07:00
Behdad Esfahbod 48cb25dd36 [cairo] Implement (untested) text_to_glyphs callback 2022-12-26 17:01:08 -07:00
Behdad Esfahbod c38abcb3fb [cairo] Add x,y args to get_glyphs 2022-12-26 17:01:08 -07:00
Behdad Esfahbod 847ed69547 [cairo] Reorder arguments of a call 2022-12-26 17:01:08 -07:00