adding a new font to pycharm on windows 10 computer

已回答

I'm running Pycharm 2020.3.2 on windows 10.

I've created a few ttf files, lets call them My-JetbrainsMono.

I want to be able to see that font in settings->editor->font

I haven't seen a canonical method of doing this, so I just kinda rummaged around, this is what I tried so far:

I've installed them on the machine itself, added them to "JetBrains\PyCharm 2020.3.2\jbr\lib\fonts", edited "JetBrains\PyCharm 2020.3.2\jbr\lib\fonts\fonts.dir" (just copied the JetBrainsMono configuration and added the respective "My-" at the start).

still, no font there :/
so, what else should I do / what should i do instead?

0

Hi,

Try installing that font globally for your system. After that, PyCharm should be able to use it.

See https://stackoverflow.com/questions/53634816/intellij-idea-install-new-fonts?answertab=votes#tab-top

1
Avatar
Permanently deleted user

I tried that, it doesnt seem to be working. Is a font name just the file name or is it some inner property of the file? maybe I made a mistake there.

0

Could you please check whether those fonts appear if you uncheck Show only monospaced fonts under Settings | Editor | Font?

If the problem remains please upload your TTF files and IDE logs at https://uploads.jetbrains.com (do not forget to specify the UploadID)

1
Avatar
Permanently deleted user

The problem still persists.

UploadID: 2021_03_22_L7t6NteYAXuvqYKw

I'm almost certain this has to do with me not understanding font files (as this is literally me testing the creation of a new font for the first time).
So I really appreciate the help.

0

It looks like renaming the file name is not enough to rename the font. I created a small sample project to check how Java load this font and here is what I see in the debugger:

See https://superuser.com/questions/120593/how-do-you-change-a-ttf-font-name on how to rename the font.

2
Avatar
Permanently deleted user

it worked! thank you so much, you're figuratively a lifesaver ;)

0

请先登录再写评论。