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.
    • Claudia SvensonC
      Claudia Svenson
      last edited by

      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.

      gerdb42G 1 Reply Last reply Reply Quote 0
      • gerdb42G
        gerdb42 @Claudia Svenson
        last edited by

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

        Alan KilbornA 1 Reply Last reply Reply Quote 2
        • Alan KilbornA
          Alan Kilborn @gerdb42
          last edited by

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

          Claudia SvensonC 1 Reply Last reply Reply Quote 1
          • Claudia SvensonC
            Claudia Svenson @Alan Kilborn
            last edited by

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

            PeterJonesP mpheathM 2 Replies Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @Claudia Svenson
              last edited by

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

              Claudia SvensonC 1 Reply Last reply Reply Quote 2
              • Claudia SvensonC
                Claudia Svenson @PeterJones
                last edited by

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

                Alan KilbornA 1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @Claudia Svenson
                  last edited by

                  @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
                  • mpheathM
                    mpheath @Claudia Svenson
                    last edited by

                    @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
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors