khoj-ai / khoj

Your AI second brain. Get answers to your questions, whether they be online or in your own notes. Use online AI models (e.g gpt4) or private, local LLMs (e.g llama3). Self-host locally or use our cloud instance. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp.
https://khoj.dev
GNU Affero General Public License v3.0
12.63k stars 640 forks source link

Suggestion for Persian Font Improvement #756

Closed Wnb369 closed 3 months ago

Wnb369 commented 3 months ago

Hello,

Your work is outstanding. I have used the web version of Khoj and I would like to suggest changing the Persian font. The current font is not very legible, and there are many issues with the letters being improperly placed next to each other in words. Thank you for all the hard work you put into this. Wishing you success.

sabaimran commented 3 months ago

Hi @Wnb369 ! Thanks for raising this issue. It's really important to us to make sure we're localizing appropriately. Can you confirm that your experience is similar to something in this screenshot? We might need your help in validating whether our solutions work for you as I don't understand Persian/Farsi myself, but I can read/write Urdu, so I can approximately get there 🙂.

Screenshot 2024-05-26 at 20 00 58
sabaimran commented 3 months ago

Ordinarily it would be easiest if we could just use a different css class for the Persian/Arabic/Urdu fonts, but we won't be able to do that in a hard-coded way. We'll probably have to infer dynamically, with something like this.

Wnb369 commented 3 months ago

The problem that exists is that in some words, the letters are displayed separately from each other. As is clear in the picture you sent, there are many connected letters that are displayed separately. I will mark those and also show their correct spelling in another picture so that you can understand better. 1

2

This issue exists only in Persian and Urdu.

bidisha20 commented 3 months ago

You can use Persian-specific fonts like "IranNastaliq" or "Vazir". Adjust Font Size and Spacing. Test with Native Speakers. Specify the new font and provide fallbacks in the CSS. Consider using services like Google Fonts or Adobe Fonts.

Wnb369 commented 3 months ago

Thank you for the changes you've made; it's much better than before.