MicrosoftDocs / terminal

Creative Commons Attribution 4.0 International
467 stars 170 forks source link

Terminal fonts cannot be modified by code #749

Closed MorphineBlue closed 1 month ago

MorphineBlue commented 4 months ago

Type of issue

Other (describe below)

Feedback

You can't change the font of the terminal through the setCurrentConsoleFont function, you can only manually fix the fontface property of the file setting.json.

Page URL

https://learn.microsoft.com/zh-cn/windows/terminal/customize-settings/profile-appearance

Content source URL

https://github.com/MicrosoftDocs/terminal/blob/main/TerminalDocs/customize-settings/profile-appearance.md

Author

@cinnamon-msft

Document Id

61af649e-60e8-e571-56d4-3d7d1c856dd6

zadjii-msft commented 1 month ago

Yep, that's totally by design. The docs for SetCurrentConsoleFontEx have very big banners that say this isn't supported in all scenarios anymore, Terminal included. It's really only an API supported for the vintage console host (conhost.exe)