[PR #10433] [MERGED] Group font options in the json into a single object #28048

Open
opened 2026-01-31 09:25:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10433
Author: @PankajBhojwani
Created: 6/15/2021
Status: Merged
Merged: 7/1/2021
Merged by: @DHowett

Base: mainHead: dev/pabhoj/font_config


📝 Commits (10+)

📊 Changes

13 files changed (+319 additions, -39 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+57 -6)
📝 src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp (+41 -5)
📝 src/cascadia/TerminalSettingsEditor/Profiles.h (+3 -3)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+11 -3)
src/cascadia/TerminalSettingsModel/FontConfig.cpp (+86 -0)
src/cascadia/TerminalSettingsModel/FontConfig.h (+46 -0)
src/cascadia/TerminalSettingsModel/FontConfig.idl (+20 -0)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+7 -0)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters (+1 -0)
📝 src/cascadia/TerminalSettingsModel/Profile.cpp (+38 -13)
📝 src/cascadia/TerminalSettingsModel/Profile.h (+3 -3)
📝 src/cascadia/TerminalSettingsModel/Profile.idl (+3 -3)
📝 src/cascadia/TerminalSettingsModel/TerminalSettings.cpp (+3 -3)

📄 Description

Summary of the Pull Request

Introduces FontConfig, an object that isolates font-related settings in our profiles

Users can now define font settings in their json as so:

"font":{
    "face": "Consolas",
    "size": 12
}

Backwards compatible with the currently expected way of defining font settings in the json, note however that upon hitting 'Save' in the SUI, these settings will be rewritten to the font-object style in the json (as above).

References

#1790

PR Checklist

  • Closes #6049
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I work here

Validation Steps Performed

Existing functionality works, new functionality works


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10433 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 6/15/2021 **Status:** ✅ Merged **Merged:** 7/1/2021 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/pabhoj/font_config` --- ### 📝 Commits (10+) - [`f4a3027`](https://github.com/microsoft/terminal/commit/f4a3027ade4e824063a77ca616ca32cb54203fab) initial - [`50b595d`](https://github.com/microsoft/terminal/commit/50b595dd3efbf62f7313cc683004cbd4773c8c11) complete - [`d91275f`](https://github.com/microsoft/terminal/commit/d91275f2289ab386c2208f417bd164b12c8c76d7) remove remnant - [`c1540dc`](https://github.com/microsoft/terminal/commit/c1540dc685e3dfa9810314ac47c109731b481311) Merge branch 'main' of https://github.com/microsoft/terminal into dev/pabhoj/font_config - [`ae7b350`](https://github.com/microsoft/terminal/commit/ae7b350d77a642e9fb9021926274cda086b31290) Merge branch 'main' of https://github.com/microsoft/terminal into dev/pabhoj/font_config - [`a9dd675`](https://github.com/microsoft/terminal/commit/a9dd675e31cf6667e4709cada7db870309c30141) change keys, update tests, add test for legacy keys - [`861390c`](https://github.com/microsoft/terminal/commit/861390c4ca8d2f243c8e24ebd6dd61e6ef6ee805) abstract - [`e72495d`](https://github.com/microsoft/terminal/commit/e72495df3de26ceb35005a1be95b14ddbcbad68a) format - [`57b22b1`](https://github.com/microsoft/terminal/commit/57b22b1832df4c7a53abfd4ab2f4600356e94fd2) no more empty font in json - [`6297d33`](https://github.com/microsoft/terminal/commit/6297d33a7cd3457df56c2d4d54fb5212ae8c5806) const ### 📊 Changes **13 files changed** (+319 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+57 -6) 📝 `src/cascadia/LocalTests_SettingsModel/SerializationTests.cpp` (+41 -5) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.h` (+3 -3) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+11 -3) ➕ `src/cascadia/TerminalSettingsModel/FontConfig.cpp` (+86 -0) ➕ `src/cascadia/TerminalSettingsModel/FontConfig.h` (+46 -0) ➕ `src/cascadia/TerminalSettingsModel/FontConfig.idl` (+20 -0) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+7 -0) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/Profile.cpp` (+38 -13) 📝 `src/cascadia/TerminalSettingsModel/Profile.h` (+3 -3) 📝 `src/cascadia/TerminalSettingsModel/Profile.idl` (+3 -3) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettings.cpp` (+3 -3) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Introduces `FontConfig`, an object that isolates font-related settings in our profiles Users can now define font settings in their json as so: ``` "font":{ "face": "Consolas", "size": 12 } ``` Backwards compatible with the currently expected way of defining font settings in the json, note however that upon hitting 'Save' in the SUI, these settings **will be rewritten to the font-object style in the json (as above)**. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #1790 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes [#6049](https://github.com/microsoft/terminal/issues/6049) * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I work here <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Existing functionality works, new functionality works --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28048