LuaStyle.font_size

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
LotA
Fast Inserter
Fast Inserter
Posts: 117
Joined: Fri Oct 10, 2014 11:41 am
Contact:

LuaStyle.font_size

Post 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

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: LuaStyle.font_size

Post by Klonan »

You can do something like this:

Code: Select all

____  ____   ___   _____  _____   ____      ____  _____  ____  _____  
|_  _||_  _|.'   `.|_   _||_   _| |_  _|    |_  _||_   _||_   \|_   _| 
  \ \  / / /  .-.  \ | |    | |     \ \  /\  / /    | |    |   \ | |   
   \ \/ /  | |   | | | '    ' |      \ \/  \/ /     | |    | |\ \| |   
   _|  |_  \  `-'  /  \ \__/ /        \  /\  /     _| |_  _| |_\   |_  
  |______|  `.___.'    `.__.'          \/  \/     |_____||_____|\____| 

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: LuaStyle.font_size

Post by aubergine18 »

You could always draw something on the map, or create a fireworks entity or something like that?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
LotA
Fast Inserter
Fast Inserter
Posts: 117
Joined: Fri Oct 10, 2014 11:41 am
Contact:

Re: LuaStyle.font_size

Post 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
tl,dr

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: LuaStyle.font_size

Post by aubergine18 »

Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
LotA
Fast Inserter
Fast Inserter
Posts: 117
Joined: Fri Oct 10, 2014 11:41 am
Contact:

Re: LuaStyle.font_size

Post by LotA »

I'm not having the expected results :'(
arf.jpg
arf.jpg (81.67 KiB) Viewed 3491 times

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: LuaStyle.font_size

Post 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...
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Articulating
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Mon Oct 17, 2016 10:33 am
Contact:

Re: LuaStyle.font_size

Post 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.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: LuaStyle.font_size

Post 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).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: LuaStyle.font_size

Post by aubergine18 »

Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Modding interface requests”