frederik

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 531 total)
  • Author
    Posts
  • in reply to: shape tool extension #6013

    frederik
    Keymaster

    this is already adjusted :)

    https://github.com/typemytype/RoboFontExtensions/blob/master/shapeTool/ShapeTool.roboFontExt/lib/drawShapesTool.py#L137

    I will touch the version number so mechanic pics it up

    thanks

    in reply to: Layer order preview #6007

    frederik
    Keymaster
    in reply to: 1.6 Transformation tool bug? #6005

    frederik
    Keymaster

    found it, this will be fixed in the next update…

    in reply to: 1.6 Transformation tool bug? #6003

    frederik
    Keymaster

    He Jean François

    I can reproduce this bug, and tested this in RF 1.5 (the previous version) and it seems the bug was in there as well…

    Looking into it

    thanks for reporting

    in reply to: g.copy #5997

    frederik
    Keymaster

    owke, this is idd not working cause a weakref object has to be referenced once or more.

    you could force it with:

    g = CurrentGlyph()
    
    copy = g.copy()
    
    # get the internal font and set it hard in the internal glyph object, even it is a copy
    copy.naked().setParent(g.naked().getParent())
    
    copy.decompose()
    copy.removeOverlap()
    
    
    print copy.components
    
    in reply to: 10.10 Yosemite Bugs #5995

    frederik
    Keymaster

    The beta support already 10.10

    thanks

    in reply to: g.copy #5993

    frederik
    Keymaster

    he

    A copy has no parent anymore… so it cannot find the referenced glyph in a component. So decompose will not work.

    Maybe the best option is to set the parent in the copied glyph:

    source = CurrentGlyph()
    g = source.copy()
    g.setParent(source.getParent())
    
    in reply to: ShowUI #5990

    frederik
    Keymaster

    This will be possible in the next update.

    it is indeed a lot faster to process some glyph data without an UI (it just doesn’t need to update something….)

    thanks

    in reply to: Layer access #5985

    frederik
    Keymaster

    He Roberto,

    you can find the RoboFont add ons for robofab API docs here: http://doc.robofont.com/api/robofab-extras/

    to get access to your layers data:

    
    # get the current glyph from the current layer
    glyph = CurrentGlyph()
    
    # get a layer
    layerGlyph = glyph.getLayer("background")
    # if the layer doesn't exist it will create one
    

    This API is only available in RoboFont. The UFO3 robofab will be able to handle layer data in NonLab
    Other wise you can install the RoboFont shell script that allows you to execute script in RoboFont
    see the Extension / shell tab in the preferences http://doc.robofont.com/documentation/workspace/preferences/extensions/

    good luck

    in reply to: Some Cosmetic RoboFont Enhancements #5983

    frederik
    Keymaster

    He

    Ive added those as hot keys to the prefs, will be available in the next update
    that is idd handy that one can toggle while measuring

    thanks

    Attachments:
    You must be logged in to view attached files.
    in reply to: GlyphCollectionView / GlyphCellView #5982

    frederik
    Keymaster

    he

    you can use

    from lib.UI.fontOverView import DoodleGlyphCollectionView
    

    it is using the same arguments as the GlyphCollectionView from defconAppKit as it is a RoboFont optimised subclass.
    see https://github.com/typesupply/defconAppKit/blob/master/Lib/defconAppKit/controls/glyphCollectionView.py#L77

    The GlyphCellView is only the square tiled view. The GlyphCollectionView has both the list option as the glyphCell option.

    good luck

    in reply to: Copy to composites #5969

    frederik
    Keymaster

    there is no such thing as copy to composites but it is easy to write a script that has such a behaviour

    an example:

    font = CurrentFont()
    
    # grap all the components and there references
    componentMap = font.getReverseComponentMapping()
    
    # take half of the x height
    measurePoint = font.info.xHeight * .5
    
    # loop over it
    for baseGlyphName, referenceGlyphNames in componentMap.items():
        # get the base glyph
        baseGlyph = font[baseGlyphName]
        
        # get the left and right margin based on a specific height
        left = baseGlyph.getRayLeftMargin(measurePoint)
        right = baseGlyph.getRayRightMargin(measurePoint)
        # if there is a left or right margin   
        if left and right:
            # loop over all the reference glyphs
            for name in referenceGlyphNames:
                # get the glyph
                glyph = font[name]
                # set the margins based on the same specific height
                glyph.setRayLeftMargin(measurePoint, left)
                glyph.setRayRightMargin(measurePoint, right)
    

    good luck!

    in reply to: component transformation #5968

    frederik
    Keymaster

    he

    mirror is a combination of translate, scale, translate:)

    simple example:

    g = CurrentGlyph()
    
    g.prepareUndo()
    
    bounds = g.box
    
    for c in g.components:
        if bounds:
            minx, miny, maxx, maxy = bounds
            w = maxx - minx
            h = maxy - miny
            c.scaleTransformation((1, -1), center=(minx, miny))
            c.translate((0, h))
    
    
    g.performUndo()
    

    good luck!

    in reply to: Shapetool Extensions don't draw #5960

    frederik
    Keymaster

    Well I was to quick pushing a new version of the Outliner. The developers and beta version of RoboFont has a warning for a typo in the API. Which is solved in the Outliner, but you don’t have the dev or beta version :)

    thanks and good luck!

    in reply to: Glyph Editor Bugs #5959

    frederik
    Keymaster

    thanks!

Viewing 15 posts - 91 through 105 (of 531 total)