Problem
The current _draw_scaled_text() implementation for scale=2 draws the same text 4 times with a 1px offset, producing a bold/blurry effect rather than a true pixel-scale zoom. The result is difficult to read on the SSD1327 OLED, especially for value() which uses scale=2 by default.
Observed on hardware during testing of hello_world.py example.
Current implementation
if scale == 2:
for dx in range(2):
for dy in range(2):
self._d.text(text, x + dx, y + dy, color)
Possible approaches
- Pixel-by-pixel scaling: render text at 1x into a temporary framebuf, then read each pixel and draw a
scale x scale rect for lit pixels. Requires framebuf.pixel() read support.
- Font bitmap table: embed a larger font (e.g. 16x16) and render directly. More RAM but crisp output.
- Backend-specific: let backends that support scaled text (e.g. GC9A01 with TrueType) handle it natively via
draw_scaled_text().
Reference
The limitation is documented in the README ("Note: scale=2 produces a bold effect, not a true pixel-scale zoom") and in the _draw_scaled_text() docstring.
Problem
The current
_draw_scaled_text()implementation forscale=2draws the same text 4 times with a 1px offset, producing a bold/blurry effect rather than a true pixel-scale zoom. The result is difficult to read on the SSD1327 OLED, especially forvalue()which uses scale=2 by default.Observed on hardware during testing of
hello_world.pyexample.Current implementation
Possible approaches
scale x scalerect for lit pixels. Requiresframebuf.pixel()read support.draw_scaled_text().Reference
The limitation is documented in the README ("Note: scale=2 produces a bold effect, not a true pixel-scale zoom") and in the
_draw_scaled_text()docstring.