Font tags in drawtext

Post Reply
User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Font tags in drawtext

Post 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.
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Font tags in drawtext

Post by Mr. Kibernetik »

Thank you for the suggestion.

Post Reply