• Login
Community
  • Login

How to increase font-size of marked text by 1 pixel?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 5 Posters 1.9k 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.
  • C
    Claudia Svenson
    last edited by Jan 25, 2024, 7:33 AM

    Assume I loaded a text file into Notepad++.
    Now I mark a certain paragraph.

    How can I increase the current font size of marked text by 1 pixel?

    If possible by hotkey, second best by menu

    If only the font size of a full text file is changeable (all-or-nothing):
    Is there a way to change it for the current session (and file) only.
    I don’t want to have to change it manually back to the old font-size for future usage.

    G 1 Reply Last reply Jan 25, 2024, 11:28 AM Reply Quote 0
    • G
      gerdb42 @Claudia Svenson
      last edited by Jan 25, 2024, 11:28 AM

      @Claudia-Svenson you probably want to read the following FAQ: https://community.notepad-plus-plus.org/topic/24852/faq-notepad-is-a-text-editor-not-a-word-processor.

      You may use the Zoom-Feature (Menu View->Zoom) to temporary enlarge your text.

      A 1 Reply Last reply Jan 25, 2024, 11:57 AM Reply Quote 2
      • A
        Alan Kilborn @gerdb42
        last edited by Jan 25, 2024, 11:57 AM

        @gerdb42 said in How to increase font-size of marked text by 1 pixel?:

        You may use the Zoom-Feature (Menu View->Zoom) to temporary enlarge your text.

        Hold Ctrl while scrolling the mouse wheel is the quickest way.
        Unfortunately, it changes the sizing for every file/tab and you have to set it back to the default setting when you no longer want it.
        Setting it back is best done with the menu option Restore Default Zoom.

        C 1 Reply Last reply Jan 27, 2024, 1:09 PM Reply Quote 1
        • C
          Claudia Svenson @Alan Kilborn
          last edited by Jan 27, 2024, 1:09 PM

          @Alan-Kilborn

          ok, thank you.

          I think I have to be more precise:
          I need no zoom to view the text but I need to increase font for PRINTING it.
          Any solution for that?

          P M 2 Replies Last reply Jan 27, 2024, 3:32 PM Reply Quote 0
          • P
            PeterJones @Claudia Svenson
            last edited by Jan 27, 2024, 3:32 PM

            @Claudia-Svenson ,

            To change the font size for all the text in the files opened in Notepad++, Settings > Style Configurator > Global Styles > Default Style, which will also set font size for printing.

            If you’re still under the misguided impression that you can change the font/size on a per-paragraph basis in a text editor, you need to read and understand the FAQ that @gerdb42 linked you to.

            C 1 Reply Last reply Jan 28, 2024, 11:42 AM Reply Quote 2
            • C
              Claudia Svenson @PeterJones
              last edited by Jan 28, 2024, 11:42 AM

              @PeterJones

              Ok, thank you.

              No, I don’t need to change the font-size on a per-paragraph basis.

              But I prefer an easier way to toggle between (two) font sizes.

              Is there a way to create a (new) toolbar symbol and assign a “set Default font size=10px” action?

              Alternatively when I right click in NP++ window there are context menus like

              “Using 1st Style”
              “Using 2nd Style”

              Can I somehow assign a “set font size=10px” action to these sub menus?

              A 1 Reply Last reply Jan 28, 2024, 11:43 AM Reply Quote 0
              • A
                Alan Kilborn @Claudia Svenson
                last edited by Jan 28, 2024, 11:43 AM

                @Claudia-Svenson said in How to increase font-size of marked text by 1 pixel?:

                Is there a way to create a (new) toolbar symbol and assign a “set Default font size=10px” action?

                No, sorry.

                Can I somehow assign a “set font size=10px” action to these sub menus?

                Again, no, sorry.

                1 Reply Last reply Reply Quote 0
                • M
                  mpheath @Claudia Svenson
                  last edited by Jan 28, 2024, 1:23 PM

                  @Claudia-Svenson said in How to increase font-size of marked text by 1 pixel?:

                  I need no zoom to view the text but I need to increase font for PRINTING it.
                  Any solution for that?

                  PythonScript plugin might help to make printing with a preferred text size easier.

                  # https://community.notepad-plus-plus.org/topic/23039/faq-how-to-install-and-run-a-script-in-pythonscript/1
                  
                  from Npp import editor, notepad
                  
                  def doPrint():
                      lang = notepad.getLangType()
                  
                      if lang == LANGTYPE.TXT:
                          STYLE_DEFAULT = 0
                          STYLE_LINENUMBER = 33
                  
                          # Set print size
                          PRINT_SIZE = 10
                  
                          # Get current sizes
                          default_size = editor.styleGetSize(STYLE_DEFAULT)
                          line_size = editor.styleGetSize(STYLE_LINENUMBER)
                  
                          # Set print sizes
                          editor.styleSetSize(STYLE_DEFAULT, PRINT_SIZE)
                          editor.styleSetSize(STYLE_LINENUMBER, PRINT_SIZE)
                  
                          # Print the doc
                          notepad.menuCommand(MENUCOMMAND.FILE_PRINT)
                  
                          # Restore sizes
                          editor.styleSetSize(STYLE_DEFAULT, default_size)
                          editor.styleSetSize(STYLE_LINENUMBER, line_size)
                      else:
                          notepad.messageBox('Language type {} not setup for printing'.format(lang))
                  
                  doPrint()
                  

                  PRINT_SIZE is set to 10 for printing and will restore to previous size after print is done.

                  This is just setup for text files which only have default style 0. Other language types may have many styles and might be complex to setup for printing.

                  PythonScript configuration can set the script as a toolbar icon for quick access.

                  Tested with XPS document writer as have no actual printer.

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