1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-10-06 12:57:17 +03:00
This commit is contained in:
Anuken 2022-07-28 09:30:19 -04:00
parent 5fb7c2a916
commit c1971cb5b1

View File

@ -118,12 +118,14 @@ public class Fonts{
unicodeIcons.put(nametex[0], ch); unicodeIcons.put(nametex[0], ch);
stringIcons.put(nametex[0], ((char)ch) + ""); stringIcons.put(nametex[0], ((char)ch) + "");
Vec2 out = Scaling.fit.apply(region.width, region.height, size, size);
Glyph glyph = new Glyph(); Glyph glyph = new Glyph();
glyph.id = ch; glyph.id = ch;
glyph.srcX = 0; glyph.srcX = 0;
glyph.srcY = 0; glyph.srcY = 0;
glyph.width = size; glyph.width = (int)out.x;
glyph.height = (int)((float)region.height / region.width * size); glyph.height = (int)out.y;
glyph.u = region.u; glyph.u = region.u;
glyph.v = region.v2; glyph.v = region.v2;
glyph.u2 = region.u2; glyph.u2 = region.u2;