Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Solved
    • Unsolved
    1. Home
    2. Recent
    Log in to post
    • All categories
    • Announcements
    • General Questions
    • Feature Requests
    • Problems & Bugs
    • Extensions
    • Documentation
    • Tools Corner
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • StephenNixon

      SOLVED Can I toggle layer visibility in script?
      General Questions • layers • • StephenNixon  

      7
      0
      Votes
      7
      Posts
      330
      Views

      colinmford

      Hi, Just checking in on this thread to note for posterity that "all" works again when setting the Display Option: f = CurrentFont() for layer in f.layers: layer.setDisplayOption("all", False) I'm on Beta Version 3.3b (build 1910021654)
    • abc123

      SOLVED Generating Instances with Rounded Integer Values
      General Questions • interpolation designspace instances • • abc123  

      3
      0
      Votes
      3
      Posts
      189
      Views

      abc123

      Awesome thank you so much!
    • ArrowType

      SOLVED Is there a way to "keep metrics" in digraphs composed via Glyph Construction?
      General Questions • glyph construction accented glyphs • • ArrowType  

      3
      0
      Votes
      3
      Posts
      128
      Views

      ArrowType

      Have you tried stacking horizontally? Ah ha! This is exactly what I was looking for. Didn't expect to see it under that name, though. :D Thanks!
    • Max Ilinov

      SOLVED Non-standard unicode chars and execution from shell
      General Questions • unicode shell command • • Max Ilinov  

      5
      0
      Votes
      5
      Posts
      185
      Views

      Max Ilinov

      Gustavo, thank you a lot! It works!
    • erik

      SOLVED Can I get to the SpaceCenter InputText strings from Python?
      General Questions • scripting space center preferences input text • • erik  

      3
      1
      Votes
      3
      Posts
      275
      Views

      okaytype

      I didn't know about spaceCenterInputSamples and managed to get at them through the space center window itself. I should probably look at updating these: https://gist.github.com/okay-type/6e36bfd93e938f5f98253ab31a27f24e https://gist.github.com/okay-type/85e6f60fc35092d5a6249ee26b2bdd4c
    • RafaŁ Buchner

      UNSOLVED mojo.canvas.Canvas questions:
      General Questions • canvas • • RafaŁ Buchner  

      5
      0
      Votes
      5
      Posts
      296
      Views

      RafaŁ Buchner

      Is the explanation clear?
    • MBurvill

      UNSOLVED Using numpy (and other modules) in robofont
      General Questions • python modules py3 • • MBurvill  

      3
      1
      Votes
      3
      Posts
      131
      Views

      frederik

      FYI: if you need to install a package for a specific python you can use pip3.6 install numpy
    • tal

      Clipboard Snippets
      General Questions • • tal  

      1
      5
      Votes
      1
      Posts
      276
      Views

      tal

      Lately I've been doing this a lot: need some text based on some font data write some code to print some text based on some font data run the code select the text in the output copy the text paste the text where I need the text I got tired of this, so I added some startup code* to RoboREPL that establishes some always-available functions to ease my laziness: from AppKit import NSPasteboard, NSPasteboardTypeString def toclipboard(text): pasteboard = NSPasteboard.generalPasteboard() pasteboard.declareTypes_owner_([NSPasteboardTypeString], None) pasteboard.setString_forType_(text, NSPasteboardTypeString) def fromclipboard(): pasteboard = NSPasteboard.generalPasteboard() text = pasteboard.stringForType_(NSPasteboardTypeString) return text Usage: >>> toclipboard("\n".join(CF().selection)) Then, paste it with ⌘V. Maybe something like this could be injected into the namespace in which all scripts are executed and/or added to mojo†? * >>> settings.editStartupCode() † …if something like this isn't already in mojo.
    • RafaŁ Buchner

      SOLVED checkbox or slider in additionContextualMenuItems?
      General Questions • scripting user interface menu • • RafaŁ Buchner  

      12
      0
      Votes
      12
      Posts
      1607
      Views

      RafaŁ Buchner

      Hey guys, somehow I cannot roll out the popUpButton menu item. Any idea how can I do that? import AppKit import vanilla from mojo.UI import MenuBuilder def callback(sender): print(sender) def popUpButtonCallback(sender): print(sender.get()) popUpButtonMenuItem = AppKit.NSMenuItem.alloc().initWithTitle_action_keyEquivalent_("popUpButton", '', '') popUpButton = vanilla.PopUpButton((0, 0, 100, 30), ['a','b','v'] ,callback=popUpButtonCallback) view = popUpButton.getNSPopUpButton() view.setFrame_(((0, 0), (100, 30))) popUpButtonMenuItem.setView_(view) builder = MenuBuilder([ ("test", callback), ("test 2", callback), ("test 3", callback), popUpButtonMenuItem, ]) menu = builder.getMenu() print(menu) name = "My Menu With popUpButton" # get the menu bar menubar = AppKit.NSApp().mainMenu() newItem = menubar.itemWithTitle_(name) if not newItem: # if not, create one and append it before `Help` newItem = AppKit.NSMenuItem.alloc().initWithTitle_action_keyEquivalent_(name, '', '') menubar.insertItem_atIndex_(newItem, menubar.numberOfItems()-1) menu.setTitle_(name) # set the menu as submenu newItem.setSubmenu_(menu)
    • RafaŁ Buchner

      UNSOLVED 'sorting' script. Not sure about pen
      General Questions • contours components pens • • RafaŁ Buchner  

      1
      1
      Votes
      1
      Posts
      186
      Views

      RafaŁ Buchner

      Hey guys, I created a small script that makes sorting contours easy (at least for me) https://gist.github.com/RafalBuchner/ff73b03d1c2970182d7dbe1d6060d32b Everyone, feel free to use that. I'm not sure about the usage of the Pens though: is drawing in rearrangeOrder function done accordingly to the proper way of using pen-protocol? I was improvising a bit and I'm not sure about it. I'm working from time to time with point labels. The pen object created by me is deleting data like that: Is there any good way to make sure that when redrawing the glyph none of the data like that will be erased? Best, R
    • RafaŁ Buchner

      SOLVED NSPoint's global screen position onto glyph's view coordinate system
      General Questions • • RafaŁ Buchner  

      3
      0
      Votes
      3
      Posts
      221
      Views

      RafaŁ Buchner

      thanks a lot!
    • connor

      UNSOLVED makeOTF and non-ascii characters
      General Questions • afdko test install ufo2fdk makeotf nonascii • • connor  

      4
      0
      Votes
      4
      Posts
      288
      Views

      colinmford

      @connor I think i recall @benkiel had some relevant mastering experience with Vēlo... Any tips, Ben?
    • StephenNixon

      SOLVED Is it possible to add multiple accents to a base glyph with anchors & Glyph Construction?
      General Questions • glyph construction accented glyphs • • StephenNixon  

      3
      0
      Votes
      3
      Posts
      516
      Views

      StephenNixon

      Ahhh very nice. Thank you for letting me know!
    • RafaŁ Buchner

      SOLVED should I remove defcon glyph's observer?
      General Questions • observers defcon coding • • RafaŁ Buchner  

      2
      0
      Votes
      2
      Posts
      211
      Views

      gferreira

      hello @RafaŁ-Buchner, yes, I think it’s a good idea to remove the observer in your code. here’s what the defcon documentation says: Don’t Forget removeObserver The only real gotcha in this is that you must remove the observer from the observed object when the observation is no longer needed. If you don’t do this and the observed object is changed, it will try to post a notification to the object you have discarded. That could lead to trouble. and here’s an example script in which the defcon Glyph.Changed observer is removed when the current glyph changes.
    • erik

      UNSOLVED Something that highlights different segments in a glyph that are almost parallel?
      General Questions • editing tools drawing geometry parallel • • erik  

      2
      0
      Votes
      2
      Posts
      214
      Views

      gferreira

      hi @erik, there’s CheckParallelTool, but it checks only if the lines connecting on-curve and off-curve points in curve segments are parallel. (checking parallel segments is mentioned in the to-do list)
    • mr

      SOLVED Making a font the front window
      General Questions • scripting user interface font window • • mr  

      2
      0
      Votes
      2
      Posts
      217
      Views

      gferreira

      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!
    • erik

      SOLVED Set background image “lock” by script?
      General Questions • scripting images glyph lib • • erik  

      3
      0
      Votes
      3
      Posts
      173
      Views

      erik

      Hi Gustavo, thank you! Ok, that explains it. I assumed the lock was for each glyph separately.
    • connor

      SOLVED bPoint Relative Coordinates
      General Questions • fontparts bpoints • • connor  

      4
      0
      Votes
      4
      Posts
      247
      Views

      frederik

      also see http://fontparts.robotools.dev/en/stable/objectref/objects/bpoint.html
    • StephenNixon

      SOLVED What computer performance metrics are most relevant to RF performance?
      General Questions • performance designspace • • StephenNixon  

      7
      0
      Votes
      7
      Posts
      437
      Views

      StephenNixon

      Thanks for the breakdown, @colinmford! I suspected that to be the case, but it's helpful to have it confirmed. Very good point on the SSD. I haven't had a spinning-disk hard drive for awhile, but yes, I could see that really degrading performance for UFOs. Hmm, interesting hack on running multiple instances of RoboFont! On certain file-processing workflows, I might try to take advantage of that...
    • RafaŁ Buchner

      SOLVED How to create Short Key popover?
      General Questions • user interface keyboard shortcuts • • RafaŁ Buchner  

      8
      0
      Votes
      8
      Posts
      339
      Views

      RafaŁ Buchner

      oh my god, I'm really blind o_O