Add xg_lfSmallLogFont (LOGFONTW) for small font management with backward compatibility - #94
Merged
Merged
Conversation
…ard compatibility
katahiromz
marked this pull request as ready for review
July 2, 2026 02:15
Copilot
AI
changed the title
[WIP] Add support for small log font management
Add xg_lfSmallLogFont (LOGFONTW) for small font management with backward compatibility
Jul 2, 2026
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.
Adds
xg_lfSmallLogFont(LOGFONTW) as the internal representation for the small font setting, complementing the existingxg_szSmallFontstring. Board rendering now usesxg_lfSmallLogFontdirectly. Font size remains dynamically computed from cell size — theLOGFONTWstruct carries only face name and style properties, never size fields.Changes
New global (
XG_Settings.hpp,GUI.cpp)LOGFONTW xg_lfSmallLogFont = {}— always haslfHeight = lfWidth = 0; size is computed at draw time inXgCreateSmallFont()Drawing (
XWordGiver.cpp)XgCreateSmallFont()now mirrorsXgCreateNormalFont(): starts fromxg_lfSmallLogFont, overrides size fields dynamically, falls back to defaults for weight/quality/charset if unsetLOOKS file I/O (
GUI.cpp,XG_SettingsDialog.cpp)SmallFont(compat) thenSmallLogFont(hex-encodedLOGFONTWviaXgHexToBin);SmallLogFontwins if valid, otherwise falls back toSmallFontface nameSmallFontandSmallLogFont(XgBinToHex) every timeRegistry I/O (
GUI.cpp)SmallLogFontas a struct (size fields zeroed on write, same pattern asCellLogFont)Settings dialog (
XG_SettingsDialog.cpp)xg_lfSmallLogFont.lfFaceNamefrom edt2 alongsidexg_szSmallFontChooseFontWfromxg_lfSmallLogFontinstead of bare face nameDoImportLooks/DoExportLooks: reads/writesSmallLogFontin addition toSmallFontExisting LOOKS files with only
SmallFontcontinue to work unchanged —xg_lfSmallLogFontis populated from the face name string as a fallback.