-
Hey there! I'm new here. I've been playing around with vips to generate images and I'm having super fun to be honest. I've ported all I had from imagemagick and it's loading way faster, so I'm pretty happy with that. However, I'm getting this error when trying this annotate example if I change the text
As you can see in those logs, I'm running ruby 3.1.2 and ruby-vips 2.1.4 (vips-8.12.2) Do I need to scape or encode or something that parameter? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @luctus, The text operator supports pango markup, so yes, you need eg. https://docs.gtk.org/Pango/pango_markup.html https://www.libvips.org/2021/06/04/What's-new-in-8.11.html#full-colour-text-rendering |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, @jcupitt ! So, just to confirm... instead of this: left_text = Vips::Image.text "left & corner", dpi: 300 I should be using this: left_text = Vips::Image.text CGI.escapeHTML("left & corner"), dpi: 300 I just tested it and it worked ;) |
Beta Was this translation helpful? Give feedback.
Hi @luctus,
The text operator supports pango markup, so yes, you need eg.
&
. You'll need to escape<
and>
as well.https://docs.gtk.org/Pango/pango_markup.html
https://www.libvips.org/2021/06/04/What's-new-in-8.11.html#full-colour-text-rendering