+2015-02-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove no-longer-used two_byte_p calculations
+ * dispextern.h (struct glyph_string): Remove member two_byte_p.
+ All uses removed.
+ * xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p.
+ All callers changed.
+
2015-02-03 Paul Eggert <eggert@cs.ucla.edu>
Omit unnecessary var if GTK or NS
/* True means the background of this string has been drawn. */
bool_bf background_filled_p : 1;
- /* True means glyph string must be drawn with 16-bit functions. */
- bool_bf two_byte_p : 1;
-
/* True means that the original font determined for drawing this glyph
string could not be loaded. The member `font' has been set to
the frame's default font in this case. */
static struct face *
get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
- XChar2b *char2b, int *two_byte_p)
+ XChar2b *char2b)
{
struct face *face;
unsigned code = 0;
eassert (face != NULL);
prepare_face_for_display (f, face);
- if (two_byte_p)
- *two_byte_p = 0;
-
if (face->font)
{
if (CHAR_BYTE8_P (glyph->u.ch))
/* Adjust base line for subscript/superscript text. */
s->ybase += s->first_glyph->voffset;
- /* This glyph string must always be drawn with 16-bit functions. */
- s->two_byte_p = 1;
-
return s->cmp_to;
}
&& glyph->face_id == face_id
&& glyph->glyph_not_available_p == glyph_not_available_p)
{
- int two_byte_p;
-
s->face = get_glyph_face_and_encoding (s->f, glyph,
- s->char2b + s->nchars,
- &two_byte_p);
- s->two_byte_p = two_byte_p;
+ s->char2b + s->nchars);
++s->nchars;
eassert (s->nchars <= end - start);
s->width += glyph->pixel_width;
if (glyph->type == CHAR_GLYPH)
{
- struct face *face;
XChar2b char2b;
- struct font_metrics *pcm;
-
- face = get_glyph_face_and_encoding (f, glyph, &char2b, NULL);
- if (face->font && (pcm = get_per_char_metric (face->font, &char2b)))
+ struct face *face = get_glyph_face_and_encoding (f, glyph, &char2b);
+ if (face->font)
{
- if (pcm->rbearing > pcm->width)
- *right = pcm->rbearing - pcm->width;
- if (pcm->lbearing < 0)
- *left = -pcm->lbearing;
+ struct font_metrics *pcm = get_per_char_metric (face->font, &char2b);
+ if (pcm)
+ {
+ if (pcm->rbearing > pcm->width)
+ *right = pcm->rbearing - pcm->width;
+ if (pcm->lbearing < 0)
+ *left = -pcm->lbearing;
+ }
}
}
else if (glyph->type == COMPOSITE_GLYPH)