diff options
| author | Kenichi Handa | 2008-12-13 03:29:30 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-12-13 03:29:30 +0000 |
| commit | 96f9306b8b3659c5f9e39a398ab5c8aad48431d5 (patch) | |
| tree | 9810f35b7feff9dfd8bc6a227143fcb9821de2d7 /src | |
| parent | 3b18571d2c297f828e4374b0608b95ca9697cc55 (diff) | |
| download | emacs-96f9306b8b3659c5f9e39a398ab5c8aad48431d5.tar.gz emacs-96f9306b8b3659c5f9e39a398ab5c8aad48431d5.zip | |
(font_rescale_ratio): Moved to font.c.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/xfaces.c | 22 |
2 files changed, 11 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 00016429e42..3ec9a2ac75b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2008-12-13 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * font.c (font_rescale_ratio): Moved from xfaces.c. Argument | ||
| 4 | type changed. Handle a font-spec too. | ||
| 5 | (font_score): Check Vface_font_rescale_alist. | ||
| 6 | (font_open_entity): Likewise. | ||
| 7 | |||
| 8 | * xfaces.c (font_rescale_ratio): Moved to font.c. | ||
| 9 | |||
| 1 | 2008-12-13 Chong Yidong <cyd@stupidchicken.com> | 10 | 2008-12-13 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 11 | ||
| 3 | * xfns.c (Fx_wm_set_size_hint): Check if the frame is an X frame. | 12 | * xfns.c (Fx_wm_set_size_hint): Check if the frame is an X frame. |
diff --git a/src/xfaces.c b/src/xfaces.c index a504ca1c9b1..4773619468f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -1688,24 +1688,6 @@ static int font_sort_order[4]; | |||
| 1688 | 1688 | ||
| 1689 | #ifdef HAVE_WINDOW_SYSTEM | 1689 | #ifdef HAVE_WINDOW_SYSTEM |
| 1690 | 1690 | ||
| 1691 | /* Return a rescaling ratio of a font of NAME. */ | ||
| 1692 | |||
| 1693 | static double | ||
| 1694 | font_rescale_ratio (name) | ||
| 1695 | char *name; | ||
| 1696 | { | ||
| 1697 | Lisp_Object tail, elt; | ||
| 1698 | |||
| 1699 | for (tail = Vface_font_rescale_alist; CONSP (tail); tail = XCDR (tail)) | ||
| 1700 | { | ||
| 1701 | elt = XCAR (tail); | ||
| 1702 | if (STRINGP (XCAR (elt)) && FLOATP (XCDR (elt)) | ||
| 1703 | && fast_c_string_match_ignore_case (XCAR (elt), name) >= 0) | ||
| 1704 | return XFLOAT_DATA (XCDR (elt)); | ||
| 1705 | } | ||
| 1706 | return 1.0; | ||
| 1707 | } | ||
| 1708 | |||
| 1709 | static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX]; | 1691 | static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX]; |
| 1710 | 1692 | ||
| 1711 | static int | 1693 | static int |
| @@ -7015,8 +6997,8 @@ face definitions. For instance, the mode my-mode could define a face | |||
| 7015 | 6997 | ||
| 7016 | DEFVAR_LISP ("face-font-rescale-alist", &Vface_font_rescale_alist, | 6998 | DEFVAR_LISP ("face-font-rescale-alist", &Vface_font_rescale_alist, |
| 7017 | doc: /* Alist of fonts vs the rescaling factors. | 6999 | doc: /* Alist of fonts vs the rescaling factors. |
| 7018 | Each element is a cons (FONT-NAME-PATTERN . RESCALE-RATIO), where | 7000 | Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where |
| 7019 | FONT-NAME-PATTERN is a regular expression matching a font name, and | 7001 | FONT-PATTERN is a font-spec or a regular expression matching a font name, and |
| 7020 | RESCALE-RATIO is a floating point number to specify how much larger | 7002 | RESCALE-RATIO is a floating point number to specify how much larger |
| 7021 | \(or smaller) font we should use. For instance, if a face requests | 7003 | \(or smaller) font we should use. For instance, if a face requests |
| 7022 | a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */); | 7004 | a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */); |