6

My comment font is written in Persian. Because the current font does not display properly, I want to change the font. How do I do this?

screenshot

javad
  • 833
  • 14
  • 37
  • https://www.jetbrains.com/help/phpstorm/configuring-colors-and-fonts.html --- https://www.jetbrains.com/help/phpstorm/configuring-colors-and-fonts.html --- https://stackoverflow.com/questions/17988570/phpstorm-6-03-changing-editor-font-and-size-and-use-of-tab-key --- https://stackoverflow.com/questions/25851308/copy-and-paste-string-persian-arabic-in-phpstorm-is-wrong - One of those could be a possible duplicate. – Funk Forty Niner Aug 22 '17 at 16:37
  • @Fred-ii- I've tested these already. – javad Aug 22 '17 at 16:44
  • What *exactly* you wish to change? You cannot set another font just for comments -- you may only change color and style. Right now I believe you wish to remove *italic* from font style so it's more readable. – LazyOne Aug 22 '17 at 17:18
  • Go to File | Settings | Editor | Color Scheme | Language Defaults, then find Comments > Doc comments > Text: uncheck "Italics". Or uncheck "inherit..." in File | Settings | Editor | Color Scheme | PHP > PHPDoc | Text – Dmitrii Aug 23 '17 at 11:06
  • @LazyOne Can I change the font of the comment, or can I change the default font? – javad Aug 23 '17 at 15:26
  • @Ástþór What you said just for italic the text. – javad Aug 23 '17 at 15:27
  • 1
    @javadaskari As I have already mentioned -- you cannot change the font (font name) for particular elements (e.g. comments only) -- single font is used for all elements. You may only change styles (bold/italic/colors etc). But yes -- you can change the font in general: `Settings/Preferences | Editor | Colors & Fonts | Font`. See https://www.jetbrains.com/help/phpstorm/2017.2/configuring-colors-and-fonts.html – LazyOne Aug 23 '17 at 15:32
  • @LazyOne True, the problem still does not resolve, and Persian characters are not displayed correctly. – javad Aug 23 '17 at 15:39
  • @LazyOne Do you think I need to change the Windows operating system settings? – javad Aug 23 '17 at 15:41
  • 1
    @javadaskari Better explain (for a Western person who is not familiar with Persian or has no real experience with RTL languages) -- what the issue you are facing exactly. What exactly is wrong? The italic font (which makes text hard to read) or the fact that `//` is shown on the right side (and it must be on the left -- just a guess)? For me -- removing "italic" style from comments (e.g. like @Ástþór have suggested) should make it more readable -- not every text/font has good italic. – LazyOne Aug 23 '17 at 15:45

3 Answers3

2

Only one font can be used for the whole editor -- you cannot use different fonts for different elements.

You can only change font effects (in File | Settings | Editor | Color Scheme | Language Defaults > Doc comment of Line comment). You can't assign another font to it.

I suggest for you that use vs code theme for phpstorm : https://github.com/lenny1882/vscode-dark-plus-webstorm

enter image description here

hmahdavi
  • 2,250
  • 3
  • 38
  • 90
1

i have same problem and check system font and find my windows 10 font that create this problem. in windows 10 font 'Aldhabi' have same style and if you want to remove it, it say this font is protected font and can not removed. and i with cmd as admin remove this font from my font folder and every things is ok now.

0

To do this, follow these steps:

File > Settings > Editor > Font (and also: File > Settings > Editor > Color Scheme > Color Scheme Font)

in the right side, unchecked "Show only monospaced fonts" and then select your favorite font from "Fallback font" dropdown list. for example i selected IRANSans Light (you should install that on your windows) you can use "Tahoma" for example.

This will display the Farsi language correctly throughout your project code

sina
  • 181
  • 1
  • 12