@@ -31,6 +31,8 @@ import com.lambda.util.math.MathUtils.toInt
3131import com.lambda.util.math.Vec2d
3232import com.lambda.util.math.a
3333import com.lambda.util.math.setAlpha
34+ import net.minecraft.client.gui.hud.ChatHud.getHeight
35+ import sun.java2d.SunGraphicsEnvironment.getScaleFactor
3436import java.awt.Color
3537
3638/* *
@@ -105,9 +107,7 @@ object FontRenderer : AbstractGUIRenderer(VertexAttrib.Group.FONT, shader("rende
105107 val pos1 = Vec2d (0.0 , posY) * actualScale
106108 val pos2 = pos1 + scaledSize
107109
108- upload {
109- buildGlyph(glyph, position, pos1, pos2, color)
110- }
110+ upload { buildGlyph(glyph, position, pos1, pos2, color) }
111111 }
112112
113113 /* *
@@ -131,20 +131,12 @@ object FontRenderer : AbstractGUIRenderer(VertexAttrib.Group.FONT, shader("rende
131131 val x2 = pos2.x + origin.x
132132 val y2 = pos2.y + origin.y
133133
134- buildQuad(
135- vertex {
136- vec3m(x1, y1).vec2(glyph.uv1.x, glyph.uv1.y).color(color)
137- },
138- vertex {
139- vec3m(x1, y2).vec2(glyph.uv1.x, glyph.uv2.y).color(color)
140- },
141- vertex {
142- vec3m(x2, y2).vec2(glyph.uv2.x, glyph.uv2.y).color(color)
143- },
144- vertex {
145- vec3m(x2, y1).vec2(glyph.uv2.x, glyph.uv1.y).color(color)
146- }
147- )
134+ val upLeft = vertex { vec3m(x1, y1).vec2(glyph.uv1.x, glyph.uv1.y).color(color) }
135+ val downLeft = vertex { vec3m(x1, y2).vec2(glyph.uv1.x, glyph.uv2.y).color(color) }
136+ val upRight = vertex { vec3m(x2, y2).vec2(glyph.uv2.x, glyph.uv2.y).color(color) }
137+ val downRight = vertex { vec3m(x2, y1).vec2(glyph.uv2.x, glyph.uv1.y).color(color) }
138+
139+ buildQuad(upLeft, downLeft, upRight, downRight)
148140 }
149141
150142 /* *
0 commit comments