AccordionView update CurrentFont

RoboFont Forums Help / General AccordionView update CurrentFont

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5483

    joanca
    Participant

    I’d like to update the CurrentFont when I click anywhere on an AccordionView Floating window.
    So far I get it updated if I click in the top bar of the window self.w.bind("became key", self.updateCurrentFont), but can’t figure out how to do it if I click in a slide of a group within the AV window. I searched within vanilla modules but couldn’t find any solution.
    Thanks as always

    #5484

    frederik
    Keymaster

    Why do you need to update the current font while clicking a window?

    Maybe don’t use a floating window, Floating window only become key windows if a proper input is selected, like EditText ….

    #5486

    joanca
    Participant

    I’ve some slider making some transformations to f.selection, if I change the front font and the slider keeps transforming the previous font. So I need the slider to know which is the CurrentFont.
    Using a Window works, I prefered the floating if it would be possible. Thanks.

    #5487

    Jens K.
    Participant

    You probably need to observe any or all of these events:

    fontBecameCurrent(font)
    fontResignCurrent(font)
    currentGlyphChanged()
    

    and react by changing the CurrentFont accordingly in your controller.

    #5490

    frederik
    Keymaster

    when you get a slider callback just request for the CurrentFont() instead of keeping a reference of a font

    #5492

    joanca
    Participant

    Sounds a good idea, thanks : )

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

You must be logged in to reply to this topic.