Add fontVariation to text drawn in bezierPath?
-
This is kind of a follow-up question to another forumpost of mine.
I have a bezierPath where I draw a letter. After that I scale this shape to a certain size. I just can't find a way to draw the letter with using fontVariations.
(I know how to use fontVariations when I just draw text outside of a bezierPath. So the font is working.)Any ideas on how I can do this?
-
I tried this (B is the bezierPath).
This doesn't work:fontVariations(wdth = self.vw) self.B.text("E", (0, 0), fontSize=100, font='Variabletest-Thin')
Is there another syntax I should be using? I don't get any errors btw.
-
hi. you can use a FormattedString:
txt = FormattedString() txt.append("hello world", font='Skia', fontSize=150, fontVariations=dict(wdth=0.8, wght=1.3)) B = BezierPath() B.text(txt, (100, 100)) drawPath(B)
-
thanks @gferreira!
use aFormattedString
withBezierPath.text
to convert to hard outlines.
-
Hey guys,
Has been a while since the last post, but just wanted to thank you guys again for the help. It all worked out great and the project is live (can I post this here?): https://www.instagram.com/p/Bsx6AhVhlNf/ Thought you guys might enjoy this!
-
super! really cool project!