GlyphCollectionView / GlyphCellView

RoboFont Forums Help / General GlyphCollectionView / GlyphCellView

This topic contains 3 replies, has 3 voices, and was last updated by  frederik 5 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5981

    luke
    Member

    Hi!

    I would like to use

    GlyphCollectionView

    or and

    GlyphCellView

    from defconAppKit in a vanilla window like RF does when displaying groups.
    Obviously it is more difficult than using for example a vanilla List – at least it is for me.
    tried many things without success – maybe someone is willing to explain.
    thanks in advance!

    #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

    #6062

    Jeremie
    Member

    Hi Frederik,

    When trying to use it like GlyphCollectionView, got this traceback:

    File “lib/UI/fontOverView/doodleGlyphCollectionView.pyc”, line 766, in __init__
    File “lib/UI/fontOverView/doodleGlyphCollectionView.pyc”, line 421, in buildColumnHeaderMenu
    AttributeError: ‘NoneType’ object has no attribute ‘setMenu_’

    Any insight?

    thanks

    #6063

    frederik
    Keymaster

    oh I see:

    try this:

    from lib.UI.fontOverView import DoodleGlyphCollectionView
    
    from vanilla import *
    
    font = CurrentFont()
    
    glyphs = [glyph for glyph in font if glyph.name.startswith("a")]
    
    w = Window((500, 500))
    
    w.c = DoodleGlyphCollectionView((0, 0, -0, -0), 
        listShowColumnTitles=True)
    
    w.c.set(glyphs)
    
    w.open()
    

    the next version will test if there is a headerview (aka column headers in list mode)

    thanks

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

You must be logged in to reply to this topic.