From 9354583de510f1aa8babfe7f75bbdb011a291582 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 22 Jun 2025 08:40:44 +0200 Subject: [PATCH] Improve LCD text readability at a distance --- lcd.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lcd.lua b/lcd.lua index 0d2fa47..e267e29 100644 --- a/lcd.lua +++ b/lcd.lua @@ -162,7 +162,11 @@ local generate_line = function(s, ypos) end local generate_texture = function(lines) - local texture = "[combine:"..LCD_WIDTH.."x"..LCD_WIDTH + -- Active Mip Mapping ruins the text due to nearby transparent pixels at a distance. + -- Using `lcd_anyside.png` as base image fixes this (see issue #58) + local texture = ("lcd_anyside.png^[resize:%dx%d^[combine:%dx%d"):format( + LCD_WIDTH, LCD_WIDTH, LCD_WIDTH, LCD_WIDTH + ) local ypos = math.floor((LCD_WIDTH - LINE_HEIGHT*NUMBER_OF_LINES) / 2) for i = 1, #lines do texture = texture..generate_line(lines[i], ypos)