You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
319 views
in Script help by (170 points)
How can I change the font size of a text that is created over a SpriteStack, with the #with_surface() method?

1 Answer

1 like 0 dislike
by (28.0k points)
selected by
 
Best answer

Hello, when you use with_surface the 4th parameter is about size it's the ID of the size to use.
0 (default value) is for the normal font size and 1 is for the big font size.

You can define other size in Data/project_identity.yml in the layout section part alt_sizes or ttf_files (if you need to use another font).

Example with very big text:

with_surface(114, 19, 95, 1) do

  add_line(0, texts[2]) # Nom

  # ...
end

...