frederik

Forum Replies Created

Viewing 15 posts - 241 through 255 (of 531 total)
  • Author
    Posts
  • in reply to: Highlighting glyphs in the font window #5435

    frederik
    Keymaster

    The mark color is saved in the lib and is actually changing the font data, so it makes sense that the save state of the document will update.

    There are some options:

    set the change count of the document to zero after changing the font data, just be careful with data loss, of unsaved fonts

    from AppKit import NSChangeCleared
    
    font = CurrentFont()
    
    for glyphName in font.selection + font.templateSelection:
        glyph = font[glyphName]
        glyph.mark = (1, 0, 0, 1)
    
    document = font.document()
    if document:
        # set the document change count to zero
        document.updateChangeCount_(NSChangeCleared)
    

    Adding an L or N (for glyph.note) is a bit more difficult cause you have to overwrite the defcon representation factory generating the glyph cell.
    Adding smart sets is probably the easiest.

    But I guess your proposed solutions are not the best options for the problem…

    however, good luck!

    in reply to: On-Curve tangent point: state report? #5432

    frederik
    Keymaster

    when holding cmd down on a “smooth” point, tangent points are smooth points, will not move the bcp(s) but only the anchor points across the angle of the bcp(s)

    a small script that “corrects” wrong smooht points by toggling the smooth flag of each point

    # get the current glyph
    g = CurrentGlyph()
    
    # loop over all contours
    for c in g:
        # loop over all points
        for p in c.points:
            # deslect all points
            p.selected = False
            # if the point is an off curve don't do anything
            if p.type == "offCurve":
                continue
            # if the point is smooth
            if p.smooth:
                # set smooth to false
                p.smooth = False
                # select the point
                p.selected = True
    
    
    # get the naked selection object and toggle the smoothness
    g.naked().selection.toggleSmoothness()
    
    # whoehoe, done
    g.update()
    
    

    good luck

    in reply to: Interpolate script #5430

    frederik
    Keymaster

    you are asking the font for a glyph that doesnt exist

    # robothon 2009
    # interpolate two glyphs in the same font a bunch of times
    from robofab.world import CurrentFont
    f = CurrentFont()
    for i in range(0, 10):
        factor = i*.1
        name = "result_%f"%factor
        print "interpolating", name
    
        # create a new glyph
        f.newGlyph(name, clear=True)
    
        f[name].interpolate(factor, f["A"], f["B"])
    f.update()
    
    

    good luck

    in reply to: Unknown file format: Too many Blue Zones #5425

    frederik
    Keymaster

    Thanks Bas

    Yanone: how do you end up with a UFO file with 10 zones? (just curious)

    in reply to: postscriptWindowsCharacterSet #5421

    frederik
    Keymaster

    its been patched already and will be fixed in the next version of RF

    http://code.typesupply.com/changeset/1174

    thanks

    in reply to: Transform Components #5416

    frederik
    Keymaster

    It’s disabled by default cause transforming multiple glyphs can end up with a double transformation on glyphs with components, one time by the referenced glyph and other one by transforming the component itself.

    in reply to: MacRoman #5414

    frederik
    Keymaster

    its highly recommended to set at least the four first char as followed:

    http://partners.adobe.com/public/developer/opentype/index_recs.html

    in reply to: Transform Components #5413

    frederik
    Keymaster

    The transformations are saved and stored as a transform matrix [xx, xy, yx, yy, x, y] and when ever there is a rotate or skew transform its impossible to revert the matrix back to readable, understandable and simple values like position, scale, rotation,….

    This can help to transform components: Use the transformation pane in the inspector, but be sure you enabled “Transform Components” in the transform pane option menu.

    or with code:

    g = CurrentGlyph()
    
    for component in g.components:
        center = (100, 100)
        component.rotate(50, center)
        # component.transalte((100, 100))
        # component.scaleTransformation((.3, .3), center)
    
    
    in reply to: MacRoman #5409

    frederik
    Keymaster

    understandable… :)

    Why Mac Roman: FDK is already using this for their default glyph ordering (see MakeOTFUserGuide.pdf page 10)

    FYI: it will be switched off as default in the next version

    in reply to: MacRoman #5407

    frederik
    Keymaster

    kiekeboe!

    Anno 2013 there are still a of awesome nasty text setters around.

    MacRoman came out of a discussion a long long time ago on the beta list.
    Personally I set my own glyph order and be sure that it is starting with a .notdef ….

    (maybe its should be switched off by default…..)

    in reply to: Access to kerning classes #5405

    frederik
    Keymaster

    The kerning keys can be either glyph names or group names.
    If they are group names (starting with an ‘@’) you can edit them in with the groups objects

    f = CurrentFont()
    f.groups["@MMK_L_f"]
    

    Its possible that this group isn’t not in your groups but already hard coded into the features.
    (normally MM is adding those kerning groups also as font.groups items

    note:
    RoboFont does not automically convert font.groups to feature groups.
    Use this extension for converting and adding groups to the feature file: https://github.com/typemytype/RoboFontExtensions/tree/master/groups2Features

    good luck

    in reply to: ttf compiler #5402

    frederik
    Keymaster

    the ttf “path”:

    RF UFO > internal ttf compiler on top of ufo2fdk > glyph data .ttf > fdk for some tables > .ttf

    in reply to: ttf compiler #5399

    frederik
    Keymaster

    In RoboFont there are two possible ways to convert outlines:
    (see Spline Conversion http://doc.robofont.com/documentation/workspace/font-info/robofont/)

    One is 100% accurate to the outlines, which mean points will be added
    the other one is 100% accurate to the amounts of points, but the changes to the curve is minor, handy for interpolation afterwards

    in reply to: ttf compiler #5397

    frederik
    Keymaster

    not sure I understand what you mean.
    Anyhow:
    The OT features and naming tables are compiled by FDK and merged back in a ttf file with the converted glyph with cubic curves.

    in reply to: Generate/Compile only in otf #5393

    frederik
    Keymaster

    no, do this on the fly, make a script that extract only the glyph you need from a master UFO

Viewing 15 posts - 241 through 255 (of 531 total)