Android Studio renders file content with unreadable characters

Any file from any project I open is rendered with these weird unreadable characters.

This is the MainActivity class and it contains unreadable characters all over the file but not in the IDE menus and options.

It seems only constant field names are displayed correctly, as can be seen in view ids scroll and resultados and the layout name activity_main.The rest of texts in the IDE are correctly rendered. But the file contents are displayed with these strange characters.

However, when I copy and paste them somewehere else outside Andrid Studio, (for example, Notepad++ or Word) they are displayed correctly.

I can't fix it any way! I've tried changing the file enconding, opening a new project, creating a new project, restarting and invalidating cache, rebooting my PC. Only thing I'm left to do is reinstalling Android Studio.

Upvotes: 1

Views: 465

Answers (1)

The problem was the font was corrupt. I remembered that I had recently reinstalled the Hack font on my Windows, and it seems there is some issue regarding the way you install it. You cannot copy the font files to the Fonts folder in Windows. You must use an installer provided by Hack developers and restart after installing.

So just either change the font under File > Settings > Editor > Font or use the Hack installer to get it working correctly

Upvotes: 1

Related Questions