Switch font - #528
Merged
Merged
Conversation
PringlesGang
force-pushed
the
switch-font
branch
4 times, most recently
from
August 23, 2026 19:23
a36dec0 to
069916b
Compare
PringlesGang
marked this pull request as ready for review
August 23, 2026 20:08
KKhanhH
reviewed
Aug 28, 2026
KKhanhH
reviewed
Aug 28, 2026
KKhanhH
reviewed
Aug 28, 2026
KKhanhH
reviewed
Aug 28, 2026
KKhanhH
reviewed
Aug 28, 2026
| void Label::SetText(Vm::Sc3Stream& stream, float fontSize, | ||
| RendererOutlineMode outlineMode, | ||
| template <typename T> | ||
| void Label::SetText(T str, float fontSize, RendererOutlineMode outlineMode, |
Collaborator
There was a problem hiding this comment.
use the concept or extend it if needed
PringlesGang
force-pushed
the
switch-font
branch
from
August 28, 2026 20:29
832a4ac to
d9cd72a
Compare
Gunoshozo
approved these changes
Aug 29, 2026
KKhanhH
approved these changes
Aug 29, 2026
PringlesGang
force-pushed
the
switch-font
branch
from
September 2, 2026 16:27
c4a7e4e to
e77d3b8
Compare
It goes unused
PringlesGang
force-pushed
the
switch-font
branch
from
September 2, 2026 18:24
e77d3b8 to
f0db9c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ProcessedTextGlyphLabelclassA large part of this PR is refactoring text and label functions. The Switch font is the first font type implemented in Impacto that does not have fixed cell dimensions for each glyph in the sprite sheet. A lot of the internal code depended on the position of the glyph to be the top left of its
DestRect, which is thus no longer the case, so all these instances had to be fixed.When testing, make sure all of the labels in all of the menus still behave properly. I had to touch just about all of them.
This PR was not built on top of the Switch assets PR, so to test you'd need to manually edit both
fonts.luafiles to have the default fonts resemble this:with the
Fontentry insprites.luaaltered accordingly.