Text rendering is pixellated?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Oarc
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Text rendering is pixellated?

Post by Oarc »

I don't think this is a bug since it seems others don't have this issue.

I tried rolling back to 0.18.16, and tried versions .19/20/21.

The issue is shown in the attached picture.
font scaling issue.png
font scaling issue.png (896.57 KiB) Viewed 1593 times
The code I am using to generate this is:

Code: Select all

/c rid = rendering.draw_text{text="Welcome...", surface=game.surfaces[1], target=game.player.character, target_offset={1,1}, color={}, scale=10, font="default", time_to_live=0, draw_on_ground=true, orientation=0, alignment=center, scale_with_zoom=false, only_in_alt_mode=false}
If I remove the font parameter, I get what is shown in the bottom right, the thick bold but clean font.
If I specify "default" as the font, or "scenario-message-dialog" I get this pixellated font...

I only noticed this recently. I tried restarting my computer, changing graphics options (everything is maxed out), checking integrity of the steam install...

Any ideas on how to fix this? A complete reinstall maybe?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Text rendering is pixellated?

Post by posila »

You need to use font, that is defined in data prototypes as either having a border, or size greater than 32. Either of those conditions will use signed distance field to render those fonts and will scale well.

Otherwise font atlas will be created for size the font is defined for (+ modified by GUI scale), and when rescaled to any other size, it will look like crap.

Oarc
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Re: Text rendering is pixellated?

Post by Oarc »

What are those fonts that fit your categories?

Code: Select all

default-game
and

Code: Select all

count-font
?

Also, this same lua line USED to work a few weeks ago. Something happened and the exact same stuff no longer works...

Was this changed in a recent update?

I used to be able to use

Code: Select all

scenario-message-dialog
before and it worked for me and lots of other players.

Thanks for the help!

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Text rendering is pixellated?

Post by posila »

Oarc wrote:
Mon Apr 27, 2020 6:38 pm
I used to be able to use

Code: Select all

scenario-message-dialog
before and it worked for me and lots of other players.
I was wrong about size threshold for switching to SDF. It's not larger than 32, but just 16. scenario-message-dialog used to have size 18 and was changed to 16.

Oarc
Fast Inserter
Fast Inserter
Posts: 100
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Re: Text rendering is pixellated?

Post by Oarc »

Thanks for the clarification!

Post Reply

Return to “Technical Help”