• Login
Community
  • Login

How to change font and size for NFO only?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 1.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    SoyRA
    last edited by Jun 3, 2019, 1:57 PM

    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.

    E 1 Reply Last reply Jun 3, 2019, 2:05 PM Reply Quote 0
    • E
      Ekopalypse @SoyRA
      last edited by Jun 3, 2019, 2:05 PM

      @SoyRA

      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.

      1 Reply Last reply Reply Quote 0
      • S
        SoyRA
        last edited by Jun 3, 2019, 2:21 PM

        @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…
        lhttps://i.imgur.com/YGqnCQc.pngt

        E 1 Reply Last reply Jun 3, 2019, 2:36 PM Reply Quote 1
        • E
          Ekopalypse @SoyRA
          last edited by Jun 3, 2019, 2:36 PM

          @SoyRA

          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.

          S 1 Reply Last reply Jun 3, 2019, 3:32 PM Reply Quote 2
          • S
            SoyRA @Ekopalypse
            last edited by Jun 3, 2019, 3:32 PM

            @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 fontSize

            Then I had to go back to Styler Configurator to configure it like this:
            UGVi7Z2.png
            * The same with Default Style

            I 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.

            1 Reply Last reply Reply Quote 2
            1 out of 5
            • First post
              1/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors