question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modifying the font weight or font face after a Text type object is created.

See original GitHub issue

Hi, 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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
XorUnisoncommented, Aug 5, 2020

I believe @XorUnison is working on this.

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.

0reactions
Ammar34commented, Aug 10, 2020

Sure thing.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found