Use integer coordinates for the font glyphs rendering.
This commit is contained in:
@@ -540,7 +540,7 @@ Vector2 BitmapFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vecto
|
||||
ERR_FAIL_COND_V(c == nullptr, Vector2());
|
||||
ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
|
||||
if (c->texture_idx != -1) {
|
||||
Point2 cpos = p_pos;
|
||||
Point2i cpos = p_pos;
|
||||
cpos += c->align * (float(p_size) / float(base_size));
|
||||
cpos.y -= ascent * (float(p_size) / float(base_size));
|
||||
if (RenderingServer::get_singleton() != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user