Skip to content

NSFontManager: post NSFontSetChangedNotification when the available fonts change - #1012

Open
probonopd wants to merge 1 commit into
gnustep:masterfrom
probonopd:fix-font-set-changed-notification
Open

probonopd wants to merge 1 commit into
gnustep:masterfrom
probonopd:fix-font-set-changed-notification

Conversation

@probonopd

Copy link
Copy Markdown
Contributor

Cocoa applications observe NSFontSetChangedNotification to learn that the set of available fonts has changed; GNUstep only posts GSFontManagerAvailableFontsDidChangeNotification, so such code never hears about a refresh.

$ gnustep-tests gui/NSFontManager/fontSetChanged.m

# master
fontSetChanged.m: undefined symbol: NSFontSetChangedNotification

# with this change
Passed test: the notification has the name Cocoa uses
Passed test: refreshing the available fonts posts NSFontSetChangedNotification
Passed test: the font manager is the object of the notification

-refreshAvailableFonts now posts NSFontSetChangedNotification on the default notification center, with the font manager as the object, in addition to the existing GNUstep notification. It complements #960, which lets another process trigger the refresh.

cc @pkgdemon

…onts change

Cocoa applications observe NSFontSetChangedNotification to learn that the
set of available fonts has changed; GNUstep only posted
GSFontManagerAvailableFontsDidChangeNotification, so such code never heard
about a refresh.  -refreshAvailableFonts now posts both.
@probonopd
probonopd requested a review from fredkiefer as a code owner October 18, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant