Skip to content

Instantly share code, notes, and snippets.

@don9z
Last active December 10, 2015 17:08
Show Gist options
  • Save don9z/4465545 to your computer and use it in GitHub Desktop.
Save don9z/4465545 to your computer and use it in GitHub Desktop.
Fix Emacs 23.4.50 light font weight issue and make it able to display non-western chars
diff --git a/src/nsfont.m b/src/nsfont.m
index c0bea2e..a5fc570 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -560,10 +560,7 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
if (isMatch)
[fkeys removeObject: NSFontFamilyAttribute];
- if ([fkeys count] > 0)
- matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
- else
- matchingDescs = [NSMutableArray array];
+ matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
if (NSFONT_TRACE)
NSLog(@"Got desc %@ and found %d matching fonts from it: ", fdesc,
@@ -1240,7 +1237,6 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
else
CGContextSetShouldAntialias (gcontext, 1);
- CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment