omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Increase Console Font size

    Pythonista
    2
    9
    7468
    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.
    • OI
      OI last edited by

      Is it possible to increase the size of the fonts used in the console? I am using an iPad Pro and the standard fonts are pretty small, at least to me, I know in the edit I can change the fonts in settings but I did not see anything regarding the console, thanks

      1 Reply Last reply Reply Quote 0
      • Webmaster4o
        Webmaster4o last edited by

        console.set_font does what you're looking for.

        OI 1 Reply Last reply Reply Quote 0
        • OI
          OI @Webmaster4o last edited by

          @Webmaster4o said:

          console.set_font does what you're looking for.

          Thank you, will this be a command I will do at the console bottom line? will this be a permanent even if I close Pythonista?

          1 Reply Last reply Reply Quote 0
          • Webmaster4o
            Webmaster4o last edited by Webmaster4o

            @OI no, it won't be permanent. What you can do to make it semi-permanent is to create a file in site-packages called pythonista-startup.py. This will be run every time you launch pythonista. If you put your font setting in this file, then your change will be more permanent. Of course, other scripts can still change this setting with console.set_font

            OI 1 Reply Last reply Reply Quote 0
            • OI
              OI @Webmaster4o last edited by

              @Webmaster4o said:

              @OI no, it won't be permanent. What you can do to make it semi-permanent is to create a file in site-packages called pythonista-startup.py. This will be run every time you launch pythonista. If you put your font setting in this file, then your change will be more permanent. Of course, other scripts can still change this setting with console.set_font

              Thanks, I was looking for the console.py file to look into the standard parameters for name and size, but did not find it, do you know where can I get that information, I need the default name and size parameters and what are the possible values,

              1 Reply Last reply Reply Quote 0
              • Webmaster4o
                Webmaster4o last edited by

                @OI No, there's nothing like console.get_font(). There might have been someone with this question before, search the forums. I may be misremembering.

                1 Reply Last reply Reply Quote 0
                • Webmaster4o
                  Webmaster4o last edited by Webmaster4o

                  @OI Yes, I remembered correctly. @JonB had a solution here. Code you can use to get current name and size is

                  from objc_util import *
                  
                  app=ObjCClass('UIApplication').sharedApplication()
                  d=app.delegate()
                  cvc=d.consoleViewController()
                  
                  cvc.view()
                  font=cvc.outputFont()
                  print font
                  
                  1 Reply Last reply Reply Quote 0
                  • OI
                    OI last edited by

                    thanks, I found the default font is Menlo-Regular 14pt, I have create the following script:

                    import console
                    console.set_font("Menlo-Regular", 18)

                    It works fine if I execute the script myself, but if I save it in site-packages as pythonista-startup.py, nonetheless it doesn't work after I restart Pythonista, it always default to 14pt, are you sure that's the correct file name?

                    1 Reply Last reply Reply Quote 0
                    • OI
                      OI last edited by

                      found it on the documentation is pythonista_startup.py, thanks a lot

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB Forums | Contributors