Skip to content

TPI: setting font size, font family and line height in custom token customization #286137

@aiday-mar

Description

@aiday-mar

Complexity: 3

Create Issue


In relation to https://github.com/microsoft/vscode/pull/263403/files

Last iteration it has been made possible to specify font info (font family, font size and line height) directly within the settings in VS Code for specific textmate scopes.

For example for the debugProcess.ts file, you can make the DebugProcessContribution have a higher font size and line height using the setting:

"editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.type.class",
                "settings": {
                    "fontSize": "20px",
                    "lineHeight": 60
                }
            }
        ]
 },

You may find the name of a textmate scope using the command editor.action.inspectTMScopes under the category textmate scopes and placing the cursor on the token of interest. Currently there is a bug and only the lowest most scope name works. In this case entity.name.function.ts works but not source.ts.

To test please find specific textmate scopes, change the font size, line height and font family and interact with the modified text. File any issues if there is unexpected behavior.

Thank you!!

known issues

  • only the lowest level scope works

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions