diff options
author | Chong Yidong <cyd@gnu.org> | 2012-08-16 14:40:57 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-08-16 14:40:57 +0800 |
commit | 179dad8ed18677af1251493751e3c9de4c80ee43 (patch) | |
tree | 921010ec2d8d06e358b2dca7e93f270ae1ab973e /src/nsterm.h | |
parent | 032a42c88d421ee434e783e29bf2cde3d6a81e7b (diff) | |
download | emacs-179dad8ed18677af1251493751e3c9de4c80ee43.tar.gz |
Fix average font width calculation on NS.
* src/nsfont.m (nsfont_open): Similar to the Xft backend, set
min_width to space_width and average_width to the average over
printable ASCII characters.
(ns_char_width): Code cleanup.
(ns_ascii_average_width): New utility function.
Diffstat (limited to 'src/nsterm.h')
-rw-r--r-- | src/nsterm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nsterm.h b/src/nsterm.h index 94984b3d35e..54f4a4ec89e 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -450,7 +450,10 @@ struct nsfont_info struct font font; char *name; /* PostScript name, uniquely identifies on NS systems */ - float width; /* this and following metrics stored as float rather than int */ + + /* The following metrics are stored as float rather than int. */ + + float width; /* Maximum advance for the font. */ float height; float underpos; float underwidth; |