static void nsfont_close (struct font *font);
static int nsfont_has_char (Lisp_Object entity, int c);
static unsigned int nsfont_encode_char (struct font *font, int c);
static void nsfont_close (struct font *font);
static int nsfont_has_char (Lisp_Object entity, int c);
static unsigned int nsfont_encode_char (struct font *font, int c);
-static int nsfont_text_extents (struct font *font, unsigned int *code,
- int nglyphs, struct font_metrics *metrics);
+static void nsfont_text_extents (struct font *font, unsigned int *code,
+ int nglyphs, struct font_metrics *metrics);
static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
bool with_background);
static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
bool with_background);
- /* excluded: get_bitmap, free_bitmap, get_outline, free_outline,
+ /* excluded: get_bitmap, free_bitmap,
anchor_point, otf_capability, otf_driver,
start_for_frame, end_for_frame, shape */
};
anchor_point, otf_capability, otf_driver,
start_for_frame, end_for_frame, shape */
};
font_info->glyphs = xzalloc (0x100 * sizeof *font_info->glyphs);
font_info->metrics = xzalloc (0x100 * sizeof *font_info->metrics);
font_info->glyphs = xzalloc (0x100 * sizeof *font_info->glyphs);
font_info->metrics = xzalloc (0x100 * sizeof *font_info->metrics);
/* Perform the size computation of glyphs of FONT and fill in members
of METRICS. The glyphs are specified by their glyph codes in
CODE (length NGLYPHS). */
/* Perform the size computation of glyphs of FONT and fill in members
of METRICS. The glyphs are specified by their glyph codes in
CODE (length NGLYPHS). */
-static int
-nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
- struct font_metrics *metrics)
+static void
+nsfont_text_extents (struct font *font, unsigned int *code,
+ int nglyphs, struct font_metrics *metrics)
{
/* get metrics for this glyph, filling cache if need be */
/* TODO: get metrics for whole string from an NSLayoutManager
{
/* get metrics for this glyph, filling cache if need be */
/* TODO: get metrics for whole string from an NSLayoutManager
static int
nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
bool with_background)
static int
nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
bool with_background)
- t += s->cmp_from; /* advance into composition */
- for (i = s->cmp_from; i < end; i++, t++)
+ t += from; /* advance into composition */
+ for (i = from; i < to; i++, t++)
col = (NS_FACE_FOREGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f)
col = (NS_FACE_FOREGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f)