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.
Is it possible to change the Console font size?
-
Even if it is programmatically
-
-
@omz Thank you very much
-
@omz Is there a way to change the font size on the command prompt? The text entry section at the bottom of the Console.
Thank you
-
@OI already asked in the past, see topic
see this little script, you have to run it once per editor's tab, for example as a tool, but you can try it by running it and then check the console input font (if I've correctly understood your question):
from objc_util import * @on_main_thread def FindConsoleInput(): global console_tv win = ObjCClass('UIApplication').sharedApplication().keyWindow() main_view = win.rootViewController().view() ret = '' next_is_console = False def analyze(v,indent): global next_is_console ret = None for sv in v.subviews(): if 'UILabel' in str(sv._get_objc_classname()): if str(sv.text()) == '>': next_is_console = sv else: next_is_console = False elif 'OMTextEditorView' in str(sv._get_objc_classname()): if next_is_console: return sv ret = analyze(sv,indent+' ') if ret: return ret ret = analyze(main_view,'') return ret @on_main_thread def main(): ev = FindConsoleInput() PA2UITheme = ObjCClass('PA2UITheme') theme_dict = PA2UITheme.sharedTheme().themeDict().mutableCopy() theme_dict.autorelease() theme_dict['font-family'] = 'Menlo-Regular' theme_dict['font-size'] = 40 OMSyntaxHighlighterTheme = ObjCClass('OMSyntaxHighlighterTheme') theme = OMSyntaxHighlighterTheme.alloc().initWithDictionary_(theme_dict) theme.autorelease() ev.setTheme_(theme) if __name__ == '__main__': main()
-
@cvp Thank you very much.
Why you say that I have to run it per each editor tab? Can I add the code to the pythonista_startup.py script? That way it will always be with the larger fonts after Pythonista start?
-
@OI said
Why you say that I have to run it per each editor tab? Can I add the code to the pythonista_startup.py script? That way it will always be with the larger fonts after Pythonista start?
It has to be run in each editor tab because we change sometimes in OMTextEditorView of the tab.
Thus, no you can't add the code in startup, or I don't see how. -
@cvp But you could put my code in an external imported module and start each of your scripts with an import and call the module
-
@cvp Great idea, thank you
-
@cvp An imported module, is it just a Python file/script stored somewhere or does it need to be stored on a special folder?
-
@OI you can store in Documents, just make sure you name it something unique. .you could also put in site-packages, which can be found in the main folder picker under Modules->site-packages