Page 1 of 1

Font tags in drawtext

Posted: Fri Sep 22, 2017 2:47 pm
by rbytes
I like the new font type commands, but it seems to me that you can't change the font type within a drawtext command. Maybe you could modify the type commands to work as tags within a single drawtext statement, the way we can now use #.lf That would add a lot of flexibility to where boldface and italics could be used. Underline would also be a nice type option.

Then to insert a bolded word in a line of text, I would use:

#.drawtext(100,100,"You can "+#.bold+"enrich"+#.norm+" your life.")

That would really shorten the code that I used in my Font Type example.

Re: Font tags in drawtext

Posted: Fri Sep 22, 2017 2:58 pm
by Mr. Kibernetik
Thank you for the suggestion.