Gitpod: Cursor position / font size off using Chromebook

Created on 26 Feb 2019  路  7Comments  路  Source: gitpod-io/gitpod

Describe the bug
When I open my repository on my Chromebook and type a long line, the cursor position is quite a bit off:
image

To Reproduce
Log in with a Chromebook running 71.0.3578.127 (previous) or 72.0.3626.117 (current). Type a long line like e.g. print("now is the time for all good men to come to the aid of their country")

Expected behavior
The cursor tracks with the text, and new characters are inserted at the point.

bug

Most helpful comment

I had the same problem on my Asus C302. In my case the default zoom had nothing to do with this but it was the used font.

This was the default font setting on my gitpod:

   "editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"

Unfortunately the referenced font Droid Sans Mono is not installed so my Chromebook uses the default monospace font which was Cousine (as I saw in my Chromebooks font settings).

I just changed my font settings in gitpod to another monospace font and the problem disappeared. Even with a zoomed gitpod ide.

   "editor.fontFamily": "'Noto Sans Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"

When I explicitly select the Cousine font for editor.fontFamily I have the same problem. It seems to me, that there is some problem with this specific font.

I think, this problem could be easily addressed directly in gitpod by providing a better font chain as default settings.

All 7 comments

Hi @parsley42, thank you for reporting this bug. We haven't been able to extensively test on Chromebooks yet, so we're very thankful for your feedback.

Note that we've recently made Gitpod's Editor and Terminal fonts configurable, and also picked better default fonts: https://github.com/theia-ide/theia/commit/335f6600f503d4c59a37d21efa98f1c838af035a (this change hasn't yet been deployed to https://gitpod.io in production, but it should be soon, e.g. in the next few days).

If the problem you're seeing is a font problem, it might be resolved by this upcoming change, or by switching to a better default font. I'll try to get back to you after the next deployment to see if we can fix it this way.

So, good(?)-ish news; at least, I found a clue/fix. In my Chromebook settings, somehow the "Internal" display had a "Display Size" set to 110%. I've found other issues with the Chromebook when this kind of display scaling is used. When set to 100%, the issue disappeared. Most likely this is a ChromeOS issue, not gitpod.

I face the same bug. I use Chromebook(Asus C302) and version of ChromeOS is 72.0.3626.122 (Official Build) (64-bit). I set "Display Size" to 100%, however, there is still a font shift.
Screenshot 2019-03-25 at 05 05 36
I find that using backspace when editing changed the size of the font and the cursor and font did not align.
In the screenshot above, the first line is one after using backspace.

@meysholdt would you be able to look into this?

I can repro on my Asus C302. It makes the editor unusable.

I had the same problem on my Asus C302. In my case the default zoom had nothing to do with this but it was the used font.

This was the default font setting on my gitpod:

   "editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"

Unfortunately the referenced font Droid Sans Mono is not installed so my Chromebook uses the default monospace font which was Cousine (as I saw in my Chromebooks font settings).

I just changed my font settings in gitpod to another monospace font and the problem disappeared. Even with a zoomed gitpod ide.

   "editor.fontFamily": "'Noto Sans Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"

When I explicitly select the Cousine font for editor.fontFamily I have the same problem. It seems to me, that there is some problem with this specific font.

I think, this problem could be easily addressed directly in gitpod by providing a better font chain as default settings.

Was this page helpful?
0 / 5 - 0 ratings