Drawing multiple types of text (bold, colored, etc) in a single call? #1723
Answered
by
dlemstra
QuantumToasted
asked this question in
Help
-
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Sep 26, 2024
Replies: 1 comment
-
You could use pango for this. You can read the text as an image and then composite this on top of another image. var readSettings = new MagickReadSettings
{
Font = "Courier New Ultra-Bold",
FontPointsize = 42,
BackgroundColor = MagickColors.None,
};
using var image = new MagickImage("pango:<span foreground='#ffac1c'>Trix</span><span foreground='#fff'> destroys</span><span foreground='#ffac1c'> Nimbus</span><span foreground='#fff'>'s supplies while he is asleep.</span>", readSettings); You can find some docs about the syntax here: https://docs.gtk.org/Pango/pango_markup.html |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
QuantumToasted
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could use pango for this. You can read the text as an image and then composite this on top of another image.
You can find some docs about the syntax here: https://docs.gtk.org/Pango/pango_markup.html