* macfont.h (macfont_update_antialias_threshold): Declare.

* macfont.m (macfont_update_antialias_threshold): Remove static.

* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.

* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes.
(antialiasThresholdDidChange:): New method for EmacsApp.

Fixes: debbugs:17534
This commit is contained in:
Jan Djärv 2014-07-20 15:18:47 +02:00
parent eb8cb39e89
commit 880b716696
5 changed files with 36 additions and 1 deletions

View file

@ -1,3 +1,15 @@
2014-07-20 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes (Bug#17534).
(antialiasThresholdDidChange:): New method for EmacsApp.
* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
* macfont.m (macfont_update_antialias_threshold): Remove static.
* macfont.h (macfont_update_antialias_threshold): Declare.
2014-07-17 Eli Zaretskii <eliz@gnu.org>
* w32select.c (setup_windows_coding_system): Apply

View file

@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */
extern void mac_register_font_driver (struct frame *f);
extern void *macfont_get_nsctfont (struct font *font);
extern void macfont_update_antialias_threshold (void);

View file

@ -729,7 +729,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, UTF32Char,
static CGFloat macfont_antialias_threshold;
static void
void
macfont_update_antialias_threshold (void)
{
int threshold;

View file

@ -111,6 +111,7 @@ typedef float EmacsCGFloat;
#endif
}
- (void)logNotification: (NSNotification *)notification;
- (void)antialiasThresholdDidChange:(NSNotification *)notification;
- (void)sendEvent: (NSEvent *)theEvent;
- (void)showPreferencesWindow: (id)sender;
- (BOOL) openFile: (NSString *)fileName;

View file

@ -4668,9 +4668,30 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
#endif
[NSApp setServicesProvider: NSApp];
[self antialiasThresholdDidChange:nil];
#ifdef NS_IMPL_COCOA
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(antialiasThresholdDidChange:)
name:NSAntialiasThresholdChangedNotification
object:nil];
#endif
#endif
ns_send_appdefined (-2);
}
- (void)antialiasThresholdDidChange:(NSNotification *)notification
{
#ifdef NS_IMPL_COCOA
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
macfont_update_antialias_threshold ();
#endif
#endif
}
/* Termination sequences:
C-x C-c: