macfont_draw,
NULL, /* get_bitmap */
NULL, /* free_bitmap */
- NULL, /* get_outline */
- NULL, /* free_outline */
NULL, /* anchor_point */
NULL, /* otf_capability */
NULL, /* otf_drive */
int size;
FontRef macfont;
FontSymbolicTraits sym_traits;
- char name[256];
- int len, i, total_width;
+ int i, total_width;
CGGlyph glyph;
CGFloat ascent, descent, leading;
if (! macfont)
return Qnil;
- font_object = font_make_object (VECSIZE (struct macfont_info), entity, size);
- ASET (font_object, FONT_TYPE_INDEX, macfont_driver.type);
- len = font_unparse_xlfd (entity, size, name, 256);
- if (len > 0)
- ASET (font_object, FONT_NAME_INDEX, make_string (name, len));
- len = font_unparse_fcname (entity, size, name, 256);
- if (len > 0)
- ASET (font_object, FONT_FULLNAME_INDEX, make_string (name, len));
- else
- ASET (font_object, FONT_FULLNAME_INDEX,
- AREF (font_object, FONT_NAME_INDEX));
+ font_object = font_build_object (VECSIZE (struct macfont_info),
+ Qmac_ct, entity, size);
font = XFONT_OBJECT (font_object);
font->pixel_size = size;
font->driver = &macfont_driver;