How to get label font name?
I want to get some labels' font name. But there is no such api provided. Any suggestions?
|
Hmmm, don't believe there is a way to get the font. The only idea I'd have would be to get the text's height and width and then use a dummy label and loop over all fonts to get a match. But I doubt that would even be remotely accurate :/
|
Quote:
|
I don't think so but here is somethign I found about a combobox's font "ratio" which uses GetFontInfo() function:
https://github.com/esoui/esoui/blob/...ommon.lua#L574 Maybe you can adopt this code somehow if you get the label's font info in any way :confused: Or, depending on your language, you could always overwrite the label's font with a selected one (LAM menu combobox with font entries e.g.) and le the user choose the font + size maybe. |
Is this your own label? You can make a Font, assign a default to it, then if you see someone is using another language, do FontName:SetFont(<font>)
|
You can supply a .str file which will load with the language file and allow you to override strings or fonts. I'd take a look at the RuESO addon for an example.
|
Quote:
|
Quote:
|
You maybe could overwrite the font definitions in total if you need it to be exchanged:
https://github.com/esoui/esoui/blob/...s_keyboard.xml Which overall would be the .str stuff Chip already said |
Quote:
|
All times are GMT -6. The time now is 03:08 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI