careteditor / issues

Caret issues
https://caret.io
326 stars 12 forks source link

CentOS Cursor Alignment #559

Open Carnivorg opened 6 years ago

Carnivorg commented 6 years ago

The text cursor is aligned properly for short sentences. For longer sentences the cursor appears to become progressively misaligned with text, up to a point where it appears several characters to the left of where text is actually inserted. The effect appears more pronounced in code blocks.

You can reproduce this issue just by typing a sentence into the Caret editor.

For example, in the image below I've double-clicked the word "layout":

centos-caret-cursor

I'm using

useProportionalFontInProse: Roboto # set to false to disable
useLargeFontInHeadings: "Roboto" # set to false to disable
font: "Fira Mono"
fontSize: 15
lineHeight: 1.8
lineWidth: 72
astoilkov commented 6 years ago

Hi @Carnivorg,

What happens if you change the font property in the Preferences with a font you have on your system?

Thanks in advance.

Carnivorg commented 6 years ago

Yep - changing it to something like "Cantarell" seems to fix the issue in code blocks, but not completely in regular text.

astoilkov commented 6 years ago

Have you also tried changing the useProportionalFontInProse in Preferences?

Carnivorg commented 6 years ago

Setting useProportionalFontInProse to false seems to solve most of the issues. In this case, it would be nice if the default preferences for Caret on CentOS were updated!

astoilkov commented 6 years ago

Yes. We will work on that. Thanks for all the information provided.

Carnivorg commented 6 years ago

So far, I've found the best solution is to install a nice coding font such as Fira Code.

cd ~/Downloads
wget https://github.com/tonsky/FiraCode/releases/download/1.205/FiraCode_1.205.zip
unzip FiraCode_1.205.zip -d Fira_Code
mkdir ~/.fonts # create a local font directory
mv Fira_Code/otf/*.otf ~/.fonts/
fc-cache -v # install font