You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix subpixel layouts in text rendering
This commit is contained in:
@@ -1104,15 +1104,15 @@ _FORCE_INLINE_ TextServerAdvanced::FontGlyph TextServerAdvanced::rasterize_bitma
|
||||
case FT_PIXEL_MODE_LCD: {
|
||||
int ofs_color = i * bitmap.pitch + (j * 3);
|
||||
if (p_bgra) {
|
||||
wr[ofs + 0] = bitmap.buffer[ofs_color + 0];
|
||||
wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
|
||||
wr[ofs + 2] = bitmap.buffer[ofs_color + 2];
|
||||
wr[ofs + 3] = 255;
|
||||
} else {
|
||||
wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
|
||||
wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
|
||||
wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
|
||||
wr[ofs + 3] = 255;
|
||||
} else {
|
||||
wr[ofs + 0] = bitmap.buffer[ofs_color + 0];
|
||||
wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
|
||||
wr[ofs + 2] = bitmap.buffer[ofs_color + 2];
|
||||
wr[ofs + 3] = 255;
|
||||
}
|
||||
} break;
|
||||
case FT_PIXEL_MODE_LCD_V: {
|
||||
|
||||
Reference in New Issue
Block a user