0

This is a screenshot of notepad++ when I close it:

enter image description here

and this is a screenshot from just after reopening it:

enter image description here

As can be seen, Notepad++ sees fit to ignore my font settings when restoring an old session. A workaround that I'm using is to switch to the default theme and then back to the Obsidian theme and this rectifies the issue, but I would like a more permanent solution and all my google searches just result in guides on how to change indentation settings. One "solution" I've seen is to start Notepad++ as an Administrator and then save my settings, but after doing so Notepad++ still behaves the way I have described.

I am using Notepad++ version 6.9.2 with the build time May 18 2016 00:34:05 and I have not installed any plugins. I have also made no changes to the Obsidian theme outside of a few highlight options. Both the default theme and the Obsidian theme have the same font settings (Courier New @ size 10)

  • The font settings seem to work just fine - at least for me they do. You should update your N++ to version 7.2.2. There's a reason software gets updated and you should not request help for an outdated version that could contain a bug that may already been fixed. – farosch Jan 22 '17 at 15:26
2

I think I have just figured out what is the reason for the "bug" in the theme. It seems to be related to a missing attribute in the theme xml. It affects only the Obsidian theme - I've tested and looked through them all.

In the Notepad++ installation folder (typically C:\Program Files (x86)\Notepad++\), inside the folder /themes, there is a .xml file for each one of the themes.

In the Obsidian xml file, named Obsidian.xml, inside the tag <GlobalStyles> (at the end of the file), look at the tag <Widget Style> name="Default Style". It should have the attributes fontName and fontSize filled, otherwise the theme will present the previous theme font configuration or the system default one.

So, to fix the issue, fill these attributes in the .xml file with the desired font, as following (used Courier New font with size 10 in the example):

FROM:

<WidgetStyle name="Default Style" styleID="32" fgColor="E0E2E4" bgColor="293134" fontName="" fontStyle="0" fontSize="" />

TO:

<WidgetStyle name="Default Style" styleID="32" fgColor="E0E2E4" bgColor="293134" fontName="Courier New" fontStyle="0" fontSize="10" />

PS1: You can create a new .xml with a customized theme, if you want. The easiest way is to copy and paste an existing one (in the folder /themes) and modify it as you wish.

PS2: It's important to note that all theme customization require correct file permissions to be saved. Refer to:

[1] How to save font settings in Notepad++

[2] https://stackoverflow.com/questions/9983048/where-does-notepad-store-style-configurator-settings

[3] https://stackoverflow.com/questions/10655501/how-to-keep-my-style-theme-in-np

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.