diff options
Diffstat (limited to 'src/nsterm.m')
-rw-r--r-- | src/nsterm.m | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 0e405fc0175..572b859a982 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4043,10 +4043,22 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) [doTransform concat]; + /* Smoothing is the default, so if we don't want smoothing we + have to turn it off. */ + if (! img->smoothing) + [[NSGraphicsContext currentContext] + setImageInterpolation:NSImageInterpolationNone]; + [img drawInRect:ir fromRect:ir operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil]; + /* Apparently image interpolation is not reset with + restoreGraphicsState, so we have to manually reset it. */ + if (! img->smoothing) + [[NSGraphicsContext currentContext] + setImageInterpolation:NSImageInterpolationDefault]; + [[NSGraphicsContext currentContext] restoreGraphicsState]; } @@ -5476,7 +5488,8 @@ ns_term_init (Lisp_Object display_name) { NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; - if ( cl == nil ) + /* There are 752 colors defined in rgb.txt. */ + if ( cl == nil || [[cl allKeys] count] < 752) { Lisp_Object color_file, color_map, color; unsigned long c; |