/* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for
character C in FONTSET. If C is -1, return a fallback font-group.
If C is not -1, the value may be Qt (FONTSET doesn't have a font
- for C even in the fallback group, or 0 (a font for C may be found
+ for C even in the fallback group), or 0 (a font for C may be found
only in the fallback group). */
static Lisp_Object
if (! NILP (font_group))
return font_group;
base_fontset = FONTSET_BASE (fontset);
- if (c >= 0)
+ if (NILP (base_fontset))
+ font_group = Qnil;
+ else if (c >= 0)
font_group = char_table_ref_and_range (base_fontset, c, &from, &to);
else
font_group = FONTSET_FALLBACK (base_fontset);
char_table_set_range (fontset, from, to, font_group);
return font_group;
}
+ if (!VECTORP (font_group))
+ return font_group;
font_group = Fcopy_sequence (font_group);
for (i = 0; i < ASIZE (font_group); i++)
if (! NILP (AREF (font_group, i)))
nescs++;
}
- /* If PATTERN is not full XLFD we conert "*" to ".*". Otherwise
+ /* If PATTERN is not full XLFD we convert "*" to ".*". Otherwise
we convert "*" to "[^-]*" which is much faster in regular
expression matching. */
if (ndashes < 14)
In FONTSET, set FONT_DEF in a fashion specified by ADD for
characters in RANGE and ranges in SCRIPT_RANGE_LIST before RANGE.
- The consumed ranges are poped up from SCRIPT_RANGE_LIST, and the
+ The consumed ranges are popped up from SCRIPT_RANGE_LIST, and the
new SCRIPT_RANGE_LIST is stored in ARG.
If ASCII is nil, don't set FONT_DEF for ASCII characters. It is
static Lisp_Object auto_fontset_alist;
/* Number of automatically created fontsets. */
-static int num_auto_fontsets;
+static printmax_t num_auto_fontsets;
-/* Retun a fontset synthesized from FONT-OBJECT. This is called from
+/* Return a fontset synthesized from FONT-OBJECT. This is called from
x_new_font when FONT-OBJECT is used for the default ASCII font of a
frame, and the returned fontset is used for the default fontset of
that frame. The fontset specifies a font of the same registry as
alias = intern ("fontset-startup");
else
{
- char temp[32];
+ char temp[sizeof "fontset-auto" + INT_STRLEN_BOUND (printmax_t)];
- sprintf (temp, "fontset-auto%d", num_auto_fontsets - 1);
+ sprintf (temp, "fontset-auto%"pMd, num_auto_fontsets - 1);
alias = intern (temp);
}
fontset_spec = copy_font_spec (font_spec);
/* Return a cons (FONT-OBJECT . GLYPH-CODE).
FONT-OBJECT is the font for the character at POSITION in the current
buffer. This is computed from all the text properties and overlays
- that apply to POSITION. POSTION may be nil, in which case,
+ that apply to POSITION. POSITION may be nil, in which case,
FONT-SPEC is the font for displaying the character CH with the
default face.