You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49ed371
Browse filesBrowse the repository at this point in the historyBrowse files
Arcade's windows use pyglet's "stretch" scaling, so text was rasterized
at the window's size and stretched to fill the larger framebuffer,
which made strokes uneven and blocky. The switch to Liberation Sans made
it more noticeable than Calibri did.
On a scaled display, Text now lays its pyglet label out at the
framebuffer's resolution (dpi and positions multiplied by the pixel
ratio) and draws it back at the same size with a pyglet State on the
label's group that scales the view matrix. The state travels with the
group, so text in a user's Batch is scaled too. Text's positions and
sizes are still in window units. At a ratio of 1 nothing changes.
create_text_sprite keeps laying text out in window units, since its
texture is that size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fixed blocky, uneven text on scaled (HiDPI) displays, such as Windows set to 125% or 150%. Arcade's windows use pyglet's `"stretch"` scaling, so text was rasterized at the window's size and then stretched to fill the larger framebuffer, giving strokes of uneven width. It looked worse after the default font changed to Liberation Sans, which shows the stretching more than Calibri did. `Text`, `draw_text` and GUI text now lay their glyphs out at the framebuffer's resolution and draw them back at the same size, so they're sharp. Nothing changes at a scale of 100%.
10
+
- Positions and sizes on `Text`, such as `x`, `content_width` and `left`, are still in window units. The pyglet label in `Text.label` uses framebuffer pixels on a scaled display.
11
+
- Text can come out a few percent wider, because the font is hinted for the larger size.
12
+
-`create_text_sprite` is unchanged; its texture is the size of the text in window units.
9
13
- Fixed `DefaultTextureAtlas` losing track of textures that share an image, such as every `SpriteSolidColor` size, which share one white image:
10
14
- Once the first texture with a given image was freed while another was still in use, resizing the atlas, which happens when it fills up, raised `RuntimeError: Empty set in unique textures` and left the atlas half-resized.
11
15
- If the last texture's finalizer ran before Python had cleared it from the atlas's records, the atlas kept the texture's name after freeing its slot. Adding another texture with that image then raised `Texture '...' not found in UVData`. This showed up as an occasional CI failure.
0 commit comments