/* Generic frame functions.
-- Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
++ Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2006,
2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
if (old_fontset == FRAME_FONTSET (f))
return;
}
- else if (!NILP (Fequal (result, oldval)))
+ store_frame_param (f, Qfont, result);
++
+ if (!NILP (Fequal (result, oldval)))
return;
- store_frame_param (f, Qfont, result);
+ /* Recalculate toolbar height. */
+ f->n_tool_bar_rows = 0;
+ /* Ensure we redraw it. */
+ clear_current_matrices (f);
+
recompute_basic_faces (f);
}
else
/* Function prototypes of this page. */
static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *));
-static int mac_encode_char P_ ((int, XChar2b *, struct font_info *, int *));
+static int mac_encode_char P_ ((int, XChar2b *, struct font_info *,
+ struct charset *, int *));
+ static void
+ pcm_init (pcm, count)
+ XCharStruct *pcm;
+ int count;
+ {
+ bzero (pcm, sizeof (XCharStruct) * count);
+ while (--count >= 0)
+ {
+ pcm->descent = PCM_INVALID;
+ pcm++;
+ }
+ }
+
+ static enum pcm_status
+ pcm_get_status (pcm)
+ XCharStruct *pcm;
+ {
+ int height = pcm->ascent + pcm->descent;
+
+ /* Negative height means some special status. */
+ return height >= 0 ? PCM_VALID : height;
+ }
+
/* Get metrics of character CHAR2B in FONT. Value is null if CHAR2B
is not contained in the font. */
while (1)
{
DEC_BOTH (from, from_byte);
- if (from == stop)
- break;
UPDATE_SYNTAX_TABLE_BACKWARD (from);
- c = FETCH_CHAR (from_byte);
+ c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
if (SYNTAX (c) == Scomment_fence
&& !char_quoted (from, from_byte))
{
/* Unibyte case. We don't have to encode, but we have to make
sure to use a face suitable for unibyte. */
STORE_XCHAR2B (char2b, 0, c);
- face_id = FACE_FOR_CHAR (f, face, c);
+ face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil);
face = FACE_FROM_ID (f, face_id);
}
- else if (c < 128 && face_id < BASIC_FACE_ID_SENTINEL)
+ else if (c < 128)
{
/* Case of ASCII in a face known to fit ASCII. */
STORE_XCHAR2B (char2b, 0, c);