Skip to content

Refactor _GetProposedFont into a static function #11763

@DHowett

Description

@DHowett

Ported from MSFT-21254947

With Dart/OpenConsole!3129098, I instantiate an entire DxEngine just to get the initial size of the control.

Turns out there's only two things that _GetProposedFont really needs from the instance - the dwriteFactory, and the _chainMode. If we make those params, then we could make GetProposedFont a public static function, and not need to instantiate an entire engine (including all the dx resources it needs) just to get the font size.

We should not be spinning up an entire DX Renderer to ask it how big a cell should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Area-PerformancePerformance-related issueHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Priority-2A description (P2)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions