onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.36k stars 301 forks source link

default font not monospaced #2651

Open RichardPalme opened 5 years ago

RichardPalme commented 5 years ago

Oni Version: 0.3.6-1 Neovim Version (Linux only): 0.3.1-1 Operating System: Linux (Manjaro)

Issue1: The default font is not monospaced, i.e. the size of the characters doesn't match up with the position of the cursor. I did a fresh install from the package manager and the fonts look like this: screenshot_2018-10-26_12-04-01 Note that I didn't make excessive use of spaces or anything, but it appears that way because the cursor is wider than the font.

Edit: made Issue 2 a separate issue

oni-bot[bot] commented 5 years ago

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

CrossR commented 5 years ago

I think we need to find a new font that works on some more distros. There is currently a list of ones we use (consolas (Windows), menlo (Mac) DejaVu Sans Mono (Linux)).

That said, I expect that font isn't installed in Manjaro, as the same issue arises for Arch and probably a few more. Does anyone know what is a good font we could use by default on Linux? We should probably add that as a fallback if DejaVu Sans Mono doesn't exist, or just replace it entirely.

keforbes commented 5 years ago

At the very least, we need the last entry in the font list to be mono to fallback to the system default monospace font if none of the specified fonts are found. I thought we had that prior to adding the OS-specific defaults. The DefaultConfiguration.ts is applying PlatformConfigOverride without defining a fallback font.

RichardPalme commented 5 years ago

Thanks CrossR, I installed a dejavu font package in manjaro (ttf-dejavu) which fixed the issue for me.

badosu commented 5 years ago

Perhaps we should append or set monospace to the font? This should always be present as far as I know.