There is no mechanism for a font to notify interested parties that its internal state (size and options) has changed.

Create issue
Issue #303 resolved
Paul Turner created an issue

When a font has it's size or other options changed, the chances are window objects (and other interested parties) will need to update themselves in response, however there is currently no mechanism for this to occur.

The best example of this is in the FontDemo sample, where we resort to hacks in order to get the MultilineEditbox and Listbox to update themselves - while it might be tempting to add 'updateYourself' functions to the widgets that the app can call, a better solution is a more automated event driven system that can use the existing internal onFontChanged notifications.

Reproducibility: always

Comments (1)

  1. Paul Turner reporter

    changeset 3238 4263db4758a6

    The following was done to implement this: - ADD: Font is now derived from EventSet, and will fire an event when some change causes the rendered size of glyphs to change. - MOD: Window globally hears about font rendering changes and can react - either directly, or via WindowRenderer/looknfeel - to ensure that rendering and layouts are updated as needed.

    This facility <em>should</em> be enough to fix the related tickets, but I'll perform more testing and what have you in order to confirm that (and resolve those tickets).

  2. Log in to comment