Change Font for this Document Only
-
Win 11
NPP 8.7.1 64 bitI understand how to use the Style Configurator for managing the default font. However, frequently for a selected document I need to change the font without disturbing the default font settings. Usually this is just to increase the font size for easier reading when printing to hard copy.
Is there a way to do this one-off without opening the Style Configurator?
-
Is there a way to do this one-off without opening the Style Configurator?
No, sorry. Font settings (including size) are global, not local; and Style Configurator is the only way to change the font size.
You could open the Style Configurator, change the font size (but without hitting save and close), then open the Print dialog (while Style Configurator is still open), and print the file; then cancel out of the Style Configurator (at which point, it will go back to your previous font-size setting) – but that’s obviously still using the Style Configurator.
As a workaround: if your file type is plain text (or you otherwise don’t care about syntax highlighting) , you could create a dummy User Defined Language (UDL) using Language > User Defined Language > Define Your Language, Create new…, give it a name like
Printer Language
, and then on the Default style: STYLE button (in the UDL definition dialog), you can set the font size. Then, when you want to print, you could do the steps: 1) Language >Printer Language
, (2) File > Print, (3) Language > None (Normal Text). But if you care about keeping the syntax highlighting for your document when you print, that won’t work for you, and the Style Configurator is the only path I can see for you. -
@NotSoBitWise said in Change Font for this Document Only:
Usually this is just to increase the font size for easier reading when printing to hard copy.
Is there a way to do this one-off without opening the Style Configurator?
At least on my system (Windows 10 and Notepad++ 8.7.4 64-bit), the Zoom factor for display does not apply to printing. So, what I do (admittedly, backwards from what you’re asking) is to set the font size in Style Configurator to what I usually want for printing, then use the zoom to set a comfortable display size.
-
@NotSoBitWise Seems like a familar issue with printing that someone else had. Have a look at this doPrint function that I rediscovered by using the PythonScript plugin.