1

As I understand, it's not possible to change the font Vim uses within terminal since it inherits the font used by terminal. However, Vim seems to use a font different than the font used by terminal. For example, in Zsh, characters are displayed in Cascadia Code font, but in Vim, they seem to be displayed in Noto Sans font.

How is Vim using a font different than the one used by the terminal?

0

1 Answer 1

1

Vim is using the same font as your terminal, but it seems to be different because the characters Vim sends to the terminal are different.

When you type Arabic in a shell, the characters that the shell sends back to the terminal are the standard Arabic Unicode characters. However the characters that Vim by default sends to the terminal are Arabic Forms-B characters.

The reason is Arabic letter shaping. Vim has :set arabicshape by default, which assumes that the terminal does not support Arabic shaping, so it tries to apply letter shaping by its own. If you disable it, then the characters in Vim should show up as they show in the shell.

So the final rendering of Forms-B depends on the font support you have for such characters. See this ArchWiki section for font setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.