2

I am trying to write a bash script that uses my native language (Amharic) to echo message but all the letters are overlapping.

I am using Ubuntu 18.04 with Amharic Keyboard Layout

The output should be like this

ከጀፈለ ለከደለጀከለ ለጀፈደለጀፈ ...

(This have a proper space between the letters)

So far I have tried changing the:

  • Terminal's Font
  • System's Font
  • Other Amharic fonts (Different from the current one)
  • It looks like you are using gnome-terminal, which is known to not handle some scripts well. If I was you I'd install the konsole terminal emulator, and see if it makes a difference. – Gunnar Hjalmarsson May 24 at 11:22
  • Awesome. Thank you so much. It worked perfectly. Please make an answer post so that I can accept it. – lulmail May 24 at 18:47
  • Great! Just made an answer of it. – Gunnar Hjalmarsson May 24 at 19:26
0

gnome-terminal is known to not handle some scripts well. Try to install the konsole terminal emulator, and see if it makes a difference.

0

One possible solution is to look for a font where these letters aren't wider than the basic English letters (or to phrase it the other way around: the English letters are also as wide as the Amharic ones).

I'm not familiar with Amharic fonts, nor with fontconfig's details, but chances are that the English and Amharic fonts are taken from two different font files, and some fontconfig rule merges them to appear as one towards applications. You might study fontconfig and somehow tweak its configs to merge the Amharic fonts with slightly larger English ones. I'm not aware of the details, nor am I absolutely certain that this is doable, but I believe it is.

A much simpler workaround is to go to gnome-terminal's preferences, and increase the cell spacing. This option newly appeared in the version shipped by Ubuntu 18.04.

  • I have tried "cell spacing" , it kinda solves it but makes the already working fonts spacing very wide and it looks weird. Anyway, I will use it until I find a better solution or figure out how fontconfig works like you said. – lulmail May 24 at 18:12
  • A terminal emulator has to respect the grid by its very nature, all letters have the exact same amount of space available (well, some have double cells, like CJK). I'm not sure what you expect if the Amharic characters are wider than the English ones in your font. – egmont May 24 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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