How to change font and size for NFO only?
-
Hello, I currently have Notepad++ always use the Overpass Mono font in size 14. And it respects it in everything I’ve seen, but I would like that if I open an NFO the font changes to Courier New in size 10.
Basically, because I like Overpass Mono better as a mono font…and because in NFOs it works quite badly.
For example, I’m not able to see this correctly: Overpass Mono (14) vs Courier New (10) (Oh yeah, it might look weird because I’ve some zoom 😅)I hope I’ve explained myself well, that’s basically what I want:
- All the files I open, have the Overpass Mono font in size 14.
- All NFO files I open, have the Courier New font in size 10. -
You can only do it per lexer.
if you open a NFO file you should see on the bottom left which lexer is assigned.
Goto Settings->StyleConfigurator- and choose the lexer, then assign the font and
its attributes. Changes should be seen immediately, if this is what you want press
Save & Close. -
@Ekopalypse You mean the MSDOS Style/ASCII Art in the images? If so, the language in use is M -> MS-DOS Style.
Then in the style configuration part, the only one similar to the mentioned names is Dos Style. But it doesn’t allow me to change the font, and the size is always the same (even if I change it).This is my global configuration, in case it affects anything…
-
you shouldn’t use global styles if you want to customize others, use default font instead.
BUT, unfortunate, this won’t help you here as it seems that MSDOS lexer behaves different then other lexers. One possible workaround, after disabling global font, might be to define an UDL which is assigned to nfo extension. As I don’t know what kind of file
nfo is and what the purpose of it is I can only assume that this will do it. -
@Ekopalypse Mmm…I’ve tried many options, and in none do I get what I want…although I really believe that NFO will use a monospaced font by default and the “perfect” size so…great.
My only option was to go edit Monokai.xml to replace all fonts and sizes with nothing (for security, I made a copy).
- Find what : fontName=([“'])(?:(?=(\?))\2.)*?\1
- Replace with : fontName=”"
- [X] Regular expression
* And then change fontName to fontSizeThen I had to go back to Styler Configurator to configure it like this:
* The same with Default StyleI didn’t have to touch anything more than that and that’s it…at least plain text (like .txt), HTML, CSS, JS and XML look like before. While the NFO looks perfect (better than the image I showed you with Courier New in 10).
I’m not sure if it’s a perfect solution, but it seems to work.