Group Details Private

extension developers

all extension developers (open-source and commercial)

Member List

  • RE: Copy / Swap to Layer deletes local guides

    hi Dave, thanks for reporting it. I think it’s a bug, and I’ve created an issue for it.

    in the meantime, here’s a workaround so you can flip layers and keep guides:

    glyph = CurrentGlyph()
    
    layer1 = 'foreground'
    layer2 = 'background'
    
    guides1 = glyph.getLayer(layer1).guidelines
    guides2 = glyph.getLayer(layer2).guidelines
    
    glyph.flipLayers(layer1, layer2)
    
    for guide in guides2:
        glyph.getLayer(layer1).appendGuideline((guide.x, guide.y), guide.angle, color=guide.color)
    
    for guide in guides1:
        glyph.getLayer(layer2).appendGuideline((guide.x, guide.y), guide.angle, color=guide.color)
    
    posted in Problems & Bugs
  • RE: Missing certain letters in exported file when trying to generate font

    hi @JessePimenta,

    as @frederik said, the problem with your font is that some glyphs have incorrect unicode values.

    when you’re creating a new font from scratch, or adding new glyphs to an existing font, RoboFont will add unicodes automatically for standard glyph names.

    but unicodes can get messed up if you rename a glyph and keep the old unicode value, for example.

    here’s a script to fix the unicodes in your font:

    font = CurrentFont()
    
    # loop over all glyphs in the font
    for glyph in font:
    
        # store the old unicode in a variable for comparison later
        oldUnicode = glyph.unicode
    
        # sets unicode value automatically for glyph
        glyph.autoUnicodes()
    
        # if old and new unicodes are different from each other:
        if oldUnicode != glyph.unicode:
    
            # paint the glyph cell red
            glyph.markColor = 1, 0, 0, 0.3
    
            # print old/new unicodes for glyph
            print(glyph.name, oldUnicode, '✘', glyph.unicode, '✔︎')
    

    0_1542278573377_Screen Shot 2018-11-15 at 08.42.36.png

    a 229 ✘ 97 ✔︎
    e 235 ✘ 101 ✔︎
    E 203 ✘ 69 ✔︎
    O 216 ✘ 79 ✔︎
    A 197 ✘ 65 ✔︎
    n 241 ✘ 110 ✔︎
    c 231 ✘ 99 ✔︎
    Y 221 ✘ 89 ✔︎
    y 255 ✘ 121 ✔︎
    u 252 ✘ 117 ✔︎
    C 199 ✘ 67 ✔︎
    s 223 ✘ 115 ✔︎
    N 209 ✘ 78 ✔︎
    U 220 ✘ 85 ✔︎
    o 248 ✘ 111 ✔︎
    I 207 ✘ 73 ✔︎
    i 239 ✘ 105 ✔︎
    

    cheers!

    posted in Problems & Bugs
  • RE: Missing certain letters in exported file when trying to generate font

    hello @JessePimenta,

    this is strange… the glyphs are not included in the font at all? if you open the generated OTF in RoboFont: can you see these glyphs in the Font Overview?

    it’s also possible that the glyphs are included in the font, and you just can’t see them when you type. maybe missing unicodes, or the paths are open…

    posted in Problems & Bugs
  • RE: vanilla Window opening 2nd Window

    depending on what you’re trying to build, you might also consider using a vanilla Sheet or Drawer. they work like separate windows attached to the parent window.

    posted in General Questions
  • RE: Find out what part of a glyph is selected

    maybe worth adding: list comprehensions are handy for creating this kind of lists:

    g = CurrentGlyph()
    
    selectedSegments = [s for c in g for s in c if s.selected]
    selectedPoints   = [p for c in g for p in c.points if p.selected]
    
    print(selectedSegments)
    print(selectedPoints)
    
    posted in General Questions
  • RE: Find out what part of a glyph is selected

    @jesentanadi the FontParts object selection API was introduced in RF 3.2 (currently in beta). I think you are running RF 3.1?

    posted in General Questions
  • RE: vanilla.Slider width/height

    hmm, I'm getting a horizontal slider in Demo1

    you are right — it was a typo 🙂 (fixed in the code sample, thanks!)

    I get the same results (macOS 10.13 / RF 3.2b):

    0_1541023696155_Screen Shot 2018-10-31 at 19.08.01.png 1_1541023696159_Screen Shot 2018-10-31 at 19.08.04.png

    posted in Problems & Bugs
  • RE: vanilla.Slider width/height

    @jesentanadi good point. looking closer into it, I see that the Slider gets a different orientation if the width is specified as a positive or negative integer:

    from vanilla import Window, Slider
    
    class SliderDemo1(object):
    
        # width as negative number (relative to parent object)
        # slider is horizontal = CORRECT
    
        def __init__(self):
            self.w = Window((200, 100), title='demo 1')
            self.w.slider = Slider((10, 10, -10, -10))
            self.w.open()
    
    class SliderDemo2(object):
    
        # width as positive number (absolute value)
        # slider is vertical = WRONG!
    
        def __init__(self):
            self.w = Window((200, 100), title='demo 2')
            self.w.slider = Slider((10, 10, 180, -10))
            self.w.open()
    
    SliderDemo1()
    SliderDemo2()
    

    I think it really is a bug, and we need to reopen issue #58

    posted in Problems & Bugs
  • RE: vanilla.Slider width/height

    some background info: How can I make a vertical slider?

    posted in Problems & Bugs
  • RE: vanilla.Slider width/height

    hi. I also came across this bug some time ago… you can temporarily fix it like this:

    self.w.slider.getNSSlider().setVertical_(True) # or False
    

    which version of macOS are you running? which version of RF3?

    I think this problem happens only in macOS 10.12 (??) – it’s working fine for me on macOS 10.13 using the latest 3.2 beta.

    posted in Problems & Bugs

Looks like your connection to RoboFont ● Forum was lost, please wait while we try to reconnect.