How to change font weight of text #189
Replies: 5 comments
-
Also, can I specify a fallbak font, like CSS?
|
Beta Was this translation helpful? Give feedback.
-
Your font has to support multiple weights. I don't know if that font does. Maybe just try bold?
You cannot specify fallback fonts like in CSS. The font you choose has to exist.
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/adobe-fonts/source-han-sans Didn't work:
Win10, textadept_nightly_2022-03-17.win Any idea? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I misread your original message. Textadept's default themes do not allow setting weight via `view:set_theme()`. You will need to modify the actual theme[1]. You can either do this:
styles.default = {font = font, size = size, fore = colors.light_black, back = colors.white, weight = 700}
Or this:
styles.default = {font = font, size = size, fore = colors.light_black, back = colors.white, weight = weight}
and keep your `view:set_theme('light', {..., weight = 700})`.
Try that. Hopefully you'll get better results.
[1]: https://orbitalquark.github.io/textadept/manual.html#themes
|
Beta Was this translation helpful? Give feedback.
-
Thanks for you help, dark.lua did the work for me. "monospace" isn't a real font, so I think it's might be a way to specify a fallback font. I try to add this to
Unfortunately, didn't work. |
Beta Was this translation helpful? Give feedback.
-
I tried this in init.lua
"weight = 500" didn't work, and the default font weight is too thin for CJK chars.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions