[222_46] : Fix Decimal Font Size Display and added Roundoff#2880
Open
git-lakshy wants to merge 3 commits intoMoganLab:mainfrom
Open
[222_46] : Fix Decimal Font Size Display and added Roundoff#2880git-lakshy wants to merge 3 commits intoMoganLab:mainfrom
git-lakshy wants to merge 3 commits intoMoganLab:mainfrom
Conversation
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.
Fix decimal font size display in status bar and input roundoff
Fixes decimal font size display inconsistency between top bar and status bar. Font sizes now properly round to nearest 0.5 multiples and display correctly in both locations.
How to Test
Enter a decimal font size in the font size input field and check if the font size is displayed correctly in the status bar.
(multiple of 0.5)
Screencast.From.2026-02-27.08-39-26.mp4
Issue #2808 :
Decimal font sizes were not displayed correctly in the status bar.
What
To fix, modified the font size input and status bar to display correct decimal font sizes.
Changes made:
TeXmacs/progs/generic/document-edit.scm: Modified
set-init-envfunction to automatically round font-base-size inputs to the nearest 0.5 (e.g., 10.3 → 10.5, 10.7 → 10.5). Added type safety checks to ensure only valid string inputs are processed.src/Edit/Interface/edit_footer.cpp:
get_env_int(FONT_BASE_SIZE)toget_env_double(FONT_BASE_SIZE)to preserve decimal values(int)((base_sz + 0.5) * sz)and replaced with direct decimal displaybase_sz * szWhy
This fixes both issues at their source: