Page 1 of 1
LuaStyle.font_size
Posted: Thu Oct 20, 2016 11:07 am
by LotA
As you can't use a data.lua file within a scenario and because font size is defined within the font itself, there is no possibilities for a scenario to define/use a font size that is not in base game. Available fonts in base game have their size range from 12 to 18.
This is a very limited choice and it would be really nice if the font size was just a property of the GuiStyle so that you can use whatever text size you'd like
Currently I'm willing to create a "you win/you loose" popup with a huge font, 18 is definitely not huge enough and I've just spend hours just to find out i can't do anything about that (from a scenario).
Allowing data.lua in scenarios would be great, but that's another subject
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 12:14 pm
by Klonan
You can do something like this:
Code: Select all
____ ____ ___ _____ _____ ____ ____ _____ ____ _____
|_ _||_ _|.' `.|_ _||_ _| |_ _| |_ _||_ _||_ \|_ _|
\ \ / / / .-. \ | | | | \ \ /\ / / | | | \ | |
\ \/ / | | | | | ' ' | \ \/ \/ / | | | |\ \| |
_| |_ \ `-' / \ \__/ / \ /\ / _| |_ _| |_\ |_
|______| `.___.' `.__.' \/ \/ |_____||_____|\____|
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 12:36 pm
by aubergine18
You could always draw something on the map, or create a fireworks entity or something like that?
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 1:21 pm
by LotA
Klonan wrote:You can do something like this:
Code: Select all
____ ____ ___ _____ _____ ____ ____ _____ ____ _____
|_ _||_ _|.' `.|_ _||_ _| |_ _| |_ _||_ _||_ \|_ _|
\ \ / / / .-. \ | | | | \ \ /\ / / | | | \ | |
\ \/ / | | | | | ' ' | \ \/ \/ / | | | |\ \| |
_| |_ \ `-' / \ \__/ / \ /\ / _| |_ _| |_\ |_
|______| `.___.' `.__.' \/ \/ |_____||_____|\____|
ASCII art, actually a well suiting workaround in my case... Damn I completely missed it
Nevertheless ascii art would not work in many cases, i still think more font customization would be welcome (maybe just add a bunch of fonts with size from 8 to 30).
aubergine18 wrote:
You could always draw something on the map, or create a fireworks entity or something like that?
I've thought of that but not what i'm looking for
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 1:37 pm
by aubergine18
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 7:58 pm
by LotA
I'm not having the expected results :'(

- arf.jpg (81.67 KiB) Viewed 4139 times
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 9:15 pm
by aubergine18
The font in game is proportionally spaced IIRC. So it won't work for fixed-width ASCII art...? Although you can add
custom fonts, they only work in GUI elements but
not flying-text. So you're out of luck with flying-text unless you want to spend ages working out the positions of each character...
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 9:34 pm
by Articulating
This also means that in a scenario, you can decrease the size of buttons but the font will be too large so it's pointless.
Re: LuaStyle.font_size
Posted: Thu Oct 20, 2016 10:43 pm
by aubergine18
If flying text could accept fonts and sizes, it would open up all kinds of possibilities, particularly in info overlays (currently graphical sprites and simple entities have to be used for that sort of stuff which is far more effort than it's worth).
Re: LuaStyle.font_size
Posted: Fri Oct 21, 2016 10:42 pm
by aubergine18