From: Kenichi Handa Date: Sat, 13 Dec 2008 03:29:30 +0000 (+0000) Subject: (font_rescale_ratio): Moved to font.c. X-Git-Tag: emacs-pretest-23.0.90~1128 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96f9306b8b3659c5f9e39a398ab5c8aad48431d5;p=emacs.git (font_rescale_ratio): Moved to font.c. --- diff --git a/src/ChangeLog b/src/ChangeLog index 00016429e42..3ec9a2ac75b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2008-12-13 Kenichi Handa + + * font.c (font_rescale_ratio): Moved from xfaces.c. Argument + type changed. Handle a font-spec too. + (font_score): Check Vface_font_rescale_alist. + (font_open_entity): Likewise. + + * xfaces.c (font_rescale_ratio): Moved to font.c. + 2008-12-13 Chong Yidong * 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]; #ifdef HAVE_WINDOW_SYSTEM -/* Return a rescaling ratio of a font of NAME. */ - -static double -font_rescale_ratio (name) - char *name; -{ - Lisp_Object tail, elt; - - for (tail = Vface_font_rescale_alist; CONSP (tail); tail = XCDR (tail)) - { - elt = XCAR (tail); - if (STRINGP (XCAR (elt)) && FLOATP (XCDR (elt)) - && fast_c_string_match_ignore_case (XCAR (elt), name) >= 0) - return XFLOAT_DATA (XCDR (elt)); - } - return 1.0; -} - static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX]; static int @@ -7015,8 +6997,8 @@ face definitions. For instance, the mode my-mode could define a face DEFVAR_LISP ("face-font-rescale-alist", &Vface_font_rescale_alist, doc: /* Alist of fonts vs the rescaling factors. -Each element is a cons (FONT-NAME-PATTERN . RESCALE-RATIO), where -FONT-NAME-PATTERN is a regular expression matching a font name, and +Each element is a cons (FONT-PATTERN . RESCALE-RATIO), where +FONT-PATTERN is a font-spec or a regular expression matching a font name, and RESCALE-RATIO is a floating point number to specify how much larger \(or smaller) font we should use. For instance, if a face requests a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */);