Skip to content

Instantly share code, notes, and snippets.

@guehara
Created April 17, 2012 01:52
Show Gist options
  • Save guehara/2402874 to your computer and use it in GitHub Desktop.
Save guehara/2402874 to your computer and use it in GitHub Desktop.
fix-width for Emacs 24.x
=== modified file 'src/nsfont.m'
--- src/nsfont.m 2012-01-19 07:21:25 +0000
+++ src/nsfont.m 2012-04-17 01:35:44 +0000
@@ -891,7 +891,7 @@
font->descent = -lrint(floor(adjusted_descender));
font->min_width = ns_char_width(sfont, '|');
font->space_width = lrint (ns_char_width (sfont, ' '));
- font->average_width = lrint (font_info->width);
+ font->average_width = lrint (ns_char_width (sfont, '0'));
font->max_width = lrint (font_info->max_bounds.width);
font->height = lrint (font_info->height);
font->underline_position = lrint (font_info->underpos);
frame-width-widh-cjk-fonts.patch => https://gist.github.com/1114252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment