Component Preview Outline



  • Hi,

    Is there a way (UI or script wise) to remove the white outline from the way components are rendered in the preview pane of Inspector?

    Thanks



  • Sorry I didn’t reply earlier. I really like the new configuration! Will gladly wait for the implementation. The white outlines are maybe a bit too disturbing for some use cases.


  • admin

    there have been some discussions on the beta list about this:

    the next implementation will be:
    components in dark gray and hard contours in black. it will be almost not visible when there are only components but when ever there is a mix of contours and components it clear.

    if you have other ideas you could send me your configuration (use inside DrawBot)

    from defcon import Font
    from fontTools.pens.cocoaPen import CocoaPen
    
    # set a path
    path = u"path/to/my/Font-Regular.ufo"
    
    # get the font
    font = Font(path)
    # get a glyph both with a contour and a component
    glyph = font["tcaron"]
    
    # background fill (same color as the window)
    fill(237/255)
    # draw rect with the size of the canvas
    rect(0, 0, width(), height())
    
    translate(100, 100)
    scale(.8)
    
    # fill with black
    fill(0)
    
    # get a pen
    pen = CocoaPen(font)
    # draw the glyph in the pen
    glyph.draw(pen)
    # draw the pen.path 
    drawPath(pen.path)
    
    # new pen
    componentPen = CocoaPen(font)
    
    # draw only the components in that pen
    for component in glyph.components:
        component.draw(componentPen)
        
    # set a fill
    # component fill color
    # 50% black with a 30% alpha value
    fill(.5, .5)
    #stroke(1)
    # draw the compontens path
    drawPath(componentPen.path)