Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misaligned indentation guides with font ligatures #836

Closed
mlajtos opened this issue Apr 20, 2018 · 2 comments
Closed

Misaligned indentation guides with font ligatures #836

mlajtos opened this issue Apr 20, 2018 · 2 comments

Comments

@mlajtos
Copy link

mlajtos commented Apr 20, 2018

Hi Alexandru :)

monaco-editor version: 0.12.0
Browser: Chrome Canary
OS: macOS 10.13.3

Relevant config:

{
    fontFamily: "Fira Code",
    fontLigatures: true
}

Illustration:
screenshot 2018-04-20 15 33 04

I turned them off for now with:

{
    renderIndentGuides: false
}

Thanks

@mlajtos mlajtos changed the title Misaligned identation lines with font ligatures Misaligned indentation guides with font ligatures Apr 20, 2018
@alexdima
Copy link
Member

alexdima commented Apr 20, 2018

The indent guides are rendered every N space widths.
https://github.com/Microsoft/vscode/blob/01169b16171dd381816f08daec793792be7d9151/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts#L135

https://github.com/Microsoft/vscode/blob/01169b16171dd381816f08daec793792be7d9151/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts#L107

Perhaps you are using a lazy loaded font family i.e. are you running into #392 ?

i.e. perhaps we are computing the width of a space at a time when the font hasn't yet been loaded by the browser ?

@mlajtos
Copy link
Author

mlajtos commented Apr 21, 2018

You are right. Waiting for the font helped. Thank you :)

@mlajtos mlajtos closed this as completed Apr 21, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants