Modifying the font weight or font face after a Text type object is created.
See original GitHub issueHi, I have grown a fondness for the Text class. However, soon I realized that after such an object is created, I could change the color of the object but I was not able to change the font-weight or cant even change the font used. It seems that the constructor for Text object changes these properties and once created cant be modified. I am a new learner so I am not sure. I want something like the following:
text` = Text("But what is...",font="Minion Pro") text.set_font_(font="Berolina").set_weight("bold")
Is this possible? I hope I am not asking for too much!
Any help would be much appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
font-weight - CSS: Cascading Style Sheets - MDN Web Docs
The font-weight CSS descriptor allows authors to specify font weights for the fonts specified in the @font-face rule. The font-weight ...
Read more >How To Define Custom Fonts in CSS with @font-face and font ...
In this step, we will apply our downloaded fonts using the @font-face property. Using nano or your preferred text editor, create and open...
Read more >How to Change Font with HTML - freeCodeCamp
In this article, I will show you how to change the font size, font weight, font style, and font family of text using...
Read more >In CSS @font-face, the font-weight is not to specify what ...
It seems that the font-weight above is not to specify what weight to present using this font file if the user specifies font-family:...
Read more >An Introduction to HTML/CSS Font Weight | Udacity
Font weight is the “value” placed on your font that will determine how bold or light your text will appear. There are many...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Am I…? I’m not really working on text stuff. If you mean the generalized way of applying such stuff like .settattrs (which would apply in this case too) then no, I’m not working on that, I’ve just discussed the format. I would assume it’s also the cfg/attr people who would subsequently work on that. If needed I can look into these things as well, but not until I’m done with #210 at the earliest.
Sure thing.