mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
73787b8478b793725f679564baa0ec2f1c61527d
This commit combs through the logic of computing glyph sizes and positions, attempting to remove all unnecessary rounding and truncation. This is in an effort to help text display consistently when different-length strings are displayed near one another. The specific problem prompting this change was end-aligned text stacked in rows with a common suffix. If the rows displayed different values, they would shape such that those final glyphs were at different fractional x coordinates, and then they would be aligned with rounding that could display them at different x positions in spite of the fact that both suffixes are the same glyphs. By removing rounding from Alignment.Align, the largest problem is fixed, but I'm also removing other unnecessary loss of precision that can circumstantially contribute to this sort of visual issue. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
Gio - https://gioui.org
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD, OpenBSD, Windows, and WebAssembly (experimental).
Installation, examples, documentation
Go to gioui.org.
Issues
File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.
Contributing
Post discussion to the mailing list and patches to gio-patches. No Sourcehut account is required and you can post without being subscribed.
See the contribution guide for more details.
An official GitHub mirror is available.
Description
Languages
Go
89.6%
C
7%
Java
1.7%
Objective-C
1.6%