util/helper-cairo.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 2ddae771 2024-11-17T00:02:03 [util/cairo] Handle all null matrices
Khaled Hosny 667ce682 2024-09-23T21:08:19 [hb-view] Support cairo script as output format Can be handy for debugging the series of operations cairo performs.
Behdad Esfahbod 7a390b50 2024-09-23T12:13:55 [hb-view] Simplify background drawing Works around a Firefox bug. Fixes https://github.com/harfbuzz/harfbuzz/issues/4811
Behdad Esfahbod 91a174f1 2023-01-24T11:27:35 [hb-view] Hide --annotate and make it alias for --show-extents
Behdad Esfahbod c54a7022 2023-01-21T14:07:41 [hb-view] Require cairo 1.17.5 for HB_DRAW=1 default again Fixes https://github.com/harfbuzz/harfbuzz/issues/4051
Behdad Esfahbod 61719a83 2023-01-20T15:52:09 [hb-view] Support specifying color indices again
Behdad Esfahbod f21b15dc 2023-01-20T13:38:22 [hb-view] Update to alternative cairo custom-palette API
Behdad Esfahbod 638e0ed4 2023-01-20T13:01:22 [paint] Overlay custom-palette on top of chosen palette Got to agree this is more ergonomic.
Behdad Esfahbod 03e2e586 2023-01-20T11:24:35 [hb-view] Improve color parsing Now supports 3, 4, 6, 8 digit colors.
Behdad Esfahbod dc4af478 2023-01-20T11:11:02 [hb-view] Default background to white when parsing
Behdad Esfahbod e998cec1 2023-01-18T23:33:21 [hb-view] Move palette options to --help-view
Behdad Esfahbod 253b4cec 2023-01-18T23:28:25 [hb-view] Simplify palette format
Behdad Esfahbod 52b78d52 2023-01-18T23:06:08 [hb-view] Fix leak
Behdad Esfahbod 5847ec24 2023-01-18T22:37:54 Fix bots
Behdad Esfahbod 0bff5704 2023-01-18T22:33:32 [hb-view] Use custom palette if any set
Matthias Clasen c41892a0 2023-01-18T23:45:53 hb-view: Add a --custom-palette option
Khaled Hosny 00060d99 2022-12-30T22:55:56 [hb-cairo] Silence warning when building with FreeType In file included from ../util/hb-view.cc:33: In file included from ../util/view-cairo.hh:32: ../util/helper-cairo.hh:102:7: warning: variable 'cairo_face' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (use_hb_draw) ^~~~~~~~~~~ ../util/helper-cairo.hh:129:64: note: uninitialized use occurs here cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (cairo_face, ^~~~~~~~~~ ../util/helper-cairo.hh:102:3: note: remove the 'if' if its condition is always true if (use_hb_draw) ^~~~~~~~~~~~~~~~ ../util/helper-cairo.hh:101:32: note: initialize the variable 'cairo_face' to silence this warning cairo_font_face_t *cairo_face; ^ = nullptr We know that cairo_face will always be assigned since use_hb_draw will always be true, but the compiler does not know that.
Behdad Esfahbod 0d98c79b 2022-12-29T21:07:38 [util] Centralize includes again
Behdad Esfahbod d90ccc1c 2022-12-29T21:02:06 [view] More includes
Behdad Esfahbod 969914b2 2022-12-29T21:01:16 [view] Clean up includes
Behdad Esfahbod ab8b9b44 2022-12-29T18:33:12 [view] Streamline cairo-ft face lifecycle management
Behdad Esfahbod 228a4154 2022-12-29T18:19:06 [view-cairo] Minor subpixel-bits
Behdad Esfahbod 74d29cd1 2022-12-29T18:11:41 [helper-cairo] Remove a method
Behdad Esfahbod b1de87b7 2022-12-29T10:34:47 [cairo] Document get_glyphs() arguments as inout
Behdad Esfahbod 5efb3bc6 2022-12-27T17:47:46 [hb-view] Set hb-cairo scale-factor Unused.
Behdad Esfahbod 81c04b0c 2022-12-27T17:46:25 [cairo] Add separate x/y scale factors
Behdad Esfahbod c38abcb3 2022-12-26T16:03:25 [cairo] Add x,y args to get_glyphs
Behdad Esfahbod 847ed695 2022-12-26T15:59:57 [cairo] Reorder arguments of a call
Behdad Esfahbod ea993af8 2022-12-25T19:17:18 [view] Don't double-slant
Behdad Esfahbod cf001f6e 2022-12-25T19:01:28 [cairo] Add constructor from hb_face_t
Behdad Esfahbod 20a50acc 2022-12-25T16:09:26 [hb-cairo] Make hb_cairo_glyphs_from_buffer public
Behdad Esfahbod a230eb8c 2022-12-25T15:49:14 [hb-cairo] Factorize hb_cairo_glyphs_from_buffer To be made public.
Behdad Esfahbod 5c3da76a 2022-12-25T15:04:13 [hb-cairo] Change API again We need to work with a hb-font for variations and font-funcs to be fetched properly.
Behdad Esfahbod 9f7538c2 2022-12-25T13:46:37 [hb-cairo] Change API
Matthias Clasen 0d6ee462 2022-12-25T10:50:56 wip: Make hb-view use hb-cairo This is a quick hack to prove that the hb-cairo apis work
Matthias Clasen 5d7553d3 2022-12-21T15:18:02 view: Add a --font-palette option
Khaled Hosny 6add69a6 2022-12-16T19:54:00 [hb-view] Allow building without cairo-ft Fixes https://github.com/harfbuzz/harfbuzz/issues/3925
Behdad Esfahbod 2e9b270a 2022-11-23T16:17:50 [hb-view] Fix cairo slanting condition hb-draw already does slanting. If NOT hb-draw, we should slant through cairo path. Donno why this was untested before. This was double-slanting with hb-draw, and not slanting without it.
Behdad Esfahbod 0e4f5794 2022-10-31T13:51:24 [util/hb-view] Default HB_DRAW to 1 See comments.
Wez Furlong e3548c20 2022-09-03T08:15:03 hb-view: Detect WezTerm and use iterm2 image protocol Similar to the logic that detects iterm2, but look for TERM_PROGRAM=WezTerm which identifies wezterm is present. This allows hb-view to output an image directly to the terminal.
Behdad Esfahbod c0b2f50c 2022-02-18T12:29:14 [util] Rename template typenames to avoid clashing with actual types Apparently MSVC2015 can confuse them Fixes https://github.com/harfbuzz/harfbuzz/issues/3379
Behdad Esfahbod 9cc9ffe3 2022-02-08T18:18:47 [util/draw] If HB_DRAW is not set, choose depending on cairo version If HB_DRAW=0, don't use it, if HB_DRAW=1, use it, if unset, choose depending on cairo version
Behdad Esfahbod 6a3dec35 2022-02-08T17:39:16 [util/draw] Use hb-draw in hb-view only if HB_DRAW=1
Behdad Esfahbod 5c558586 2022-02-07T18:54:16 [util/draw] Apply slant to non-user-fonts as well
Behdad Esfahbod 542f8269 2022-02-04T18:45:04 [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.
Behdad Esfahbod 5d2df120 2022-02-03T17:18:54 [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.
Behdad Esfahbod c98773eb 2021-08-11T20:22:03 [util/hb-subset] Move output-file validation code into post_parse
Behdad Esfahbod 58bfe407 2021-08-11T19:48:28 [util] Move hb-subset away from main-font-text
Behdad Esfahbod fd0778aa 2021-08-11T18:54:46 [util] Use post_parse in output_options_t
Behdad Esfahbod 24a9d8c7 2021-08-11T18:47:06 [util] Use post_parse in font_options_t
Behdad Esfahbod e4b33d9d 2021-08-11T18:35:11 [util] Use post_parse in face_options_t
Behdad Esfahbod 93bc62e9 2021-08-07T13:13:58 [util] Move output options into output-options.hh
Behdad Esfahbod c5337c43 2021-08-06T19:19:50 [util] Fold helper-cairo.cc into helper-cairo.hh
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Behdad Esfahbod 17f40b7c 2017-10-27T09:22:30 Include hb-private.hh more consistently Part of fixing https://github.com/behdad/harfbuzz/issues/585
Behdad Esfahbod 6c0ebd02 2015-11-05T11:37:48 [util] If font has color, generate PNG with color
Behdad Esfahbod cd4eb96a 2015-01-20T12:30:45 [util] Add --font-size to hb-shape Also makes hb-view to use 8 bits of subpixel precision and shape at requested size, instead of always shaping at upem and scaling results.
Behdad Esfahbod ea5e8a02 2014-03-19T15:38:02 [util] Plug minor leak
Behdad Esfahbod 9815a881 2012-12-21T16:46:53 [util] List supported output formats in --help output
Behdad Esfahbod 95cefdf9 2012-04-16T18:08:20 Add --utf8-clusters Also fix cairo cluster generation.
Behdad Esfahbod 69b84a8f 2012-04-12T15:50:40 Fix hb-view surface size calc for vertical text For some reason it doesn't quite work with IranianNastaliq, but that looks like a font issue.
Behdad Esfahbod 8b8b1905 2011-09-19T16:41:17 [util] Add hb-shape utility Like hb-view, but prints out buffer contents. The output format is kinda cryptic. Suggestions welcome.