Component Preview Outline

RoboFont Forums Help / General Component Preview Outline

This topic contains 2 replies, has 2 voices, and was last updated by  nina 6 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5906

    nina
    Participant

    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

    #5908

    frederik
    Keymaster

    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 as with 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)
    
    #5935

    nina
    Participant

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.