Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Solved
    • Unsolved
    1. Home
    2. Categories
    3. General Questions
    Log in to post

    General Questions

    • connor

      SOLVED bPoint Relative Coordinates
      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?
      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?
      user interface keyboard shortcuts • • RafaŁ Buchner  

      8
      0
      Votes
      8
      Posts
      339
      Views

      RafaŁ Buchner

      oh my god, I'm really blind o_O
    • jesentanadi

      SOLVED Adding text to CurrentGlyphView
      user interface observers • • jesentanadi  

      13
      0
      Votes
      13
      Posts
      2263
      Views

      okaytype

      Thanks, Frederik. I couldn't figure that out, but I did figure out I could subclass the vanilla elements. I think this approach will work better for what I'm doing. from vanilla import * from mojo.events import addObserver, removeObserver from AppKit import NSApp, NSColor, NSTextAlignmentCenter, NSTextAlignmentRight, NSTextAlignmentLeft debug = True class OverlayViewController(object): def __init__(self): windowname = 'debug window ui test' if debug == True: self.w = Window((500, 50), windowname) self.w.bind("close", self.windowClose) for window in [w for w in NSApp().orderedWindows() if w.isVisible()]: if window.title() == windowname: window.close() self.w.open() self.view = None addObserver(self, 'addToGlyphView', 'glyphWindowWillOpen') def windowClose(self, sender): print('removing observer') removeObserver(self, "glyphWindowWillOpen") def addToGlyphView(self, notification): self.window = notification["window"] x, y, w, h = xywh = (0, 0, -0, 22) this = self.testGV = Group(xywh) this.text1 = SubClassedEditText(xywh, '-', window=self.window, sizeStyle='mini', continuous=False) self.window.addGlyphEditorSubview(this) class SubClassedEditText(EditText): def __init__(self, *args, **kwargs): self.window = kwargs['window'] del kwargs['window'] super(SubClassedEditText, self).__init__(*args, **kwargs) this = self.getNSTextField() this.setBezeled_(False) this.setBackgroundColor_(NSColor.redColor()) this.setAlignment_(NSTextAlignmentCenter) addObserver(self, "currentGlyphChanged", "currentGlyphChanged") def currentGlyphChanged(self, info): try: g = self.window.getGlyph() if g is None: return f = g.getParent() self.set(f.info.styleName + ' ' + g.name) except: pass def _breakCycles(self): super(SubClassedEditText, self)._breakCycles() removeObserver(self, "currentGlyphChanged") OverlayViewController()
    • RafaŁ Buchner

      SOLVED disable/enable tool without deleting/installing extensions?
      editing tools events • • RafaŁ Buchner  

      4
      2
      Votes
      4
      Posts
      255
      Views

      frederik

      Why do you need those tool objects? Im trying to understand your question ;)
    • RafaŁ Buchner

      SOLVED Is there any way to track what character set was used in sorting?
      scripting sorting glyphs • • RafaŁ Buchner  

      3
      0
      Votes
      3
      Posts
      224
      Views

      RafaŁ Buchner

      thanks! :)
    • bahman

      UNSOLVED Getting the command for a menu item
      keyboard shortcuts • • bahman  

      1
      0
      Votes
      1
      Posts
      153
      Views

      bahman

      Hi, this is a rather odd request! It's possible to get menu shortcuts using the getMenuShortCuts in mojo.UI, I was wondering if I can also access its command? I want to introduce shortcuts through a tool that conflicts with RF default keys like "⌘s" or "⌘⇧s" and I want to replace them to "␣s" or "␣⇧s" when the tool is active. But now I want to fire the command that saves the active UFO when the user hits "␣s", it's possible through font.save() but I'm not sure if it works for "Save as" or other menu items. So I want to access the command itself so I don't have to redefine it. Thanks!
    • StephenNixon

      SOLVED Can I make hidden folders within my robofont scripts folder?
      • StephenNixon  

      9
      0
      Votes
      9
      Posts
      409
      Views

      frederik

      In the case where your script becomes a package, this could idd fail, as import will not find the correct py files. I guess a strategy where the main.py (the symlinked one) adds the package to sys.path and imports the required bits and pieces to be executed...
    • StephenNixon

      UNSOLVED Can I use utf8 characters in script menuTitle strings?
      scripting user interface • • StephenNixon  

      5
      0
      Votes
      5
      Posts
      228
      Views

      StephenNixon

      Amazing, thanks!
    • StephenNixon

      SOLVED Is it possible to export to from Space Center to a multi-page or tall-page PDF?
      space center mojo.ui • • StephenNixon  

      13
      0
      Votes
      13
      Posts
      581
      Views

      gferreira

      @StephenNixon this will give you the current width & height of the Space Center window: from mojo.UI import CurrentSpaceCenter (x, y), (w, h) = CurrentSpaceCenter().getNSView().bounds() print(w, h)
    • StephenNixon

      SOLVED Can UFO-specific extension settings be stored in a property list (.plist) file, in the UFO?
      ufo custom data plist • • StephenNixon  

      7
      0
      Votes
      7
      Posts
      315
      Views

      StephenNixon

      @gferreira Awesome, thanks for making it so clear! Okay, yes, this is very easy to work with, now.
    • StephenNixon

      What backup strategies do UFO-making folks use?
      • StephenNixon  

      6
      2
      Votes
      6
      Posts
      637
      Views

      frederik

      BlackBlaze time machine on network HD Git is used as a version control system, not really a backup
    • gferreira

      SOLVED drag and drop between vanilla lists
      vanilla • • gferreira  

      4
      0
      Votes
      4
      Posts
      269
      Views

      gferreira

      @RafaŁ-Buchner that’s it!! thank you very much.
    • ryan

      SOLVED Smooth corners and handle behavior
      user interface user interaction points handles smooth • • ryan  

      3
      0
      Votes
      3
      Posts
      387
      Views

      ryan

      Amazing! Thanks @gferreira
    • okaytype

      SOLVED mojo canvas mouseEntered
      • okaytype  

      4
      1
      Votes
      4
      Posts
      269
      Views

      okaytype

      This works perfectly. Thanks for the update. If anyone else wants to play, here's a simpler canvas test script : from AppKit import NSApp from vanilla import * from mojo.canvas import CanvasGroup from mojo.drawingTools import rect, fill debug = True class CanvasTest(object): def __init__(self): windowname = 'Canvas Test' if debug == True: for window in [w for w in NSApp().orderedWindows() if w.isVisible()]: if window.title() == windowname: window.close() self.w = Window((500, 500), windowname, fullSizeContentView=False) self.w.g = CanvasGroup((100, 100, -100, -100), delegate=CanvasStuff()) self.w.open() class CanvasStuff(object): def draw(self): fill(.5, .2, 1,1) rect(0, 0, 600, 600) def mouseDown(self, event): print('mouseDown') def mouseUp(self, event): print('mouseUp') def mouseDragged(self, event): print('mouseDragged') def mouseEntered(self, event): print('mouseEntered') def mouseExited(self, event): print('mouseExited') CanvasTest()
    • StephenNixon

      SOLVED Preserve empty glyphs when applying defcon sort order through script
      fontparts template glyphs glyph order sorting glyphs • • StephenNixon  

      3
      0
      Votes
      3
      Posts
      289
      Views

      StephenNixon

      @gferreira said in Preserve empty glyphs when applying defcon sort order through script: newGlyphOrder = f.naked().unicodeData.sortGlyphNames(f.templateGlyphOrder, sortDescriptors=[dict(type="cannedDesign", ascending=True, allowPseudoUnicode=True)]) f.templateGlyphOrder = newGlyphOrder Oh, interesting! Sure enough, changing glyphOrder to templateGlyphOrder fixed my script. It now works just as hoped. :) Thanks so much for point out that difference to me!
    • ddaanniiieeelll

      SOLVED Scale drawings on canvas while zooming
      scale notifications zoom • • ddaanniiieeelll  

      3
      1
      Votes
      3
      Posts
      228
      Views

      ddaanniiieeelll

      Works great! Thanks a lot :)
    • StephenNixon

      SOLVED Sometimes, when I try to run a script, it just opens in the scripting window. Why?
      keyboard shortcuts • • StephenNixon  

      8
      0
      Votes
      8
      Posts
      687
      Views

      StephenNixon

      Interesting solution. Sounds good to me! Thanks for figuring out a way to solve this. :)
    • martin

      SOLVED compileGlyph and glyphConstruction
      components glyph construction accented glyphs • • martin  

      6
      0
      Votes
      6
      Posts
      372
      Views

      martin

      @gferreira thank you, that's perfect. I also noticed you added a my favorite autoUnicodes() function :)
    • StephenNixon

      SOLVED Robofont remote scripting seems to expect python 2 to be the main system python?
      • StephenNixon  

      5
      0
      Votes
      5
      Posts
      239
      Views

      frederik

      Oh yeah, I’ve already changed this in the RF3.3 beta... soon!!