Making a font the front window



  • Is there a way to script choosing a font from AllFonts and making that font the front window?

    Like how selecting a font from the Toolbar > Window menu brings it to the font.


  • admin

    hello @mr,

    this seems to work:

    from mojo.UI import AllFontWindows
    
    f = AllFonts().getFontsByStyleName('Italic')[0]
    
    for fontWindow in AllFontWindows():
        if fontWindow._font == f.naked():
            fontWindow.window().show()
    

    cheers!