Now that FontInfo supports >32 characters, make the property sheet and settings support it too #4352

Open
opened 2026-01-30 23:44:56 +00:00 by claunia · 1 comment
Owner

Originally created by @DHowett-MSFT on GitHub (Oct 8, 2019).

branch reference: 49691f891a
followup to #602

To give conhost support for font names greater than 32 characters in length, we need to:

  • Fix the registry deserializer to not blat data directly into memory
    • Consideration: Make the registry value setter a lambda/function pointer, and bind the Settings members into the lambda. Very cool, lets us get rid of the split between s_GetRegDword and s_GetRegString.
  • Figure out what to do with the GetCurrentConsoleFontEx API when font names are long
  • Propagate the wstring and wstring_view changes up through TrueTypeFontList (modernizing it along the way) and propsheet
  • Figure out how to get GDI to comply (LOGFONTW is capped at 32 characters as well)
Originally created by @DHowett-MSFT on GitHub (Oct 8, 2019). branch reference: 49691f891aeabf02dba506d4c5080c49eac3aaba followup to #602 To give conhost support for font names greater than 32 characters in length, we need to: * Fix the registry deserializer to not blat data directly into memory * Consideration: Make the registry value setter a lambda/function pointer, and bind the `Settings` members into the lambda. Very cool, lets us get rid of the split between `s_GetRegDword` and `s_GetRegString`. * Figure out what to do with the `GetCurrentConsoleFontEx` API when font names are long * Propagate the `wstring` and `wstring_view` changes up through `TrueTypeFontList` (modernizing it along the way) and propsheet * Figure out how to get GDI to comply (`LOGFONTW` is capped at 32 characters as well)
claunia added the Product-ConhostArea-SettingsIssue-TaskPriority-3 labels 2026-01-30 23:44:56 +00:00
Author
Owner

@HBelusca commented on GitHub (Jul 5, 2021):

* Figure out what to do with the `GetCurrentConsoleFontEx` API when font names are long

It seems that thanks to its first ULONG cbSize; field, this structure could grow and the implementation of the API could handle this.
For example, and since the last member of it is the WCHAR FaceName[LF_FACESIZE];, this field can be made extendable (its actual size could be calculated from the actual cbSIze value).

@HBelusca commented on GitHub (Jul 5, 2021): > * Figure out what to do with the `GetCurrentConsoleFontEx` API when font names are long It seems that thanks to its first `ULONG cbSize;` field, this structure could grow and the implementation of the API could handle this. For example, and since the last member of it is the `WCHAR FaceName[LF_FACESIZE];`, this field can be made extendable (its actual size could be calculated from the actual `cbSIze` value).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4352