return CAIRO_STATUS_SUCCESS; }
GlyphID theGlyph = glyphs[0].index;
_cairo_atsui_font_glyph_extents(	void					*abstract_font,									cairo_font_scale_t		*sc,									cairo_glyph_t			*glyphs, 									int						num_glyphs,									cairo_text_extents_t	*extents){	cairo_atsui_font_t		*font = abstract_font;	cairo_point_double_t	origin;	cairo_point_double_t	glyph_min, glyph_max;	cairo_point_double_t	total_min, total_max;	OSStatus				err;	ATSUStyle				style;	int						i;		if (num_glyphs == 0)	{		extents->x_bearing = 0.0;		extents->y_bearing = 0.0;		extents->width  = 0.0;		extents->height = 0.0;		extents->x_advance = 0.0;		extents->y_advance = 0.0;		return CAIRO_STATUS_SUCCESS;	}	origin.x = glyphs[0].x;	origin.y = glyphs[0].y;			style = CreateSizedCopyOfStyle(font->style, sc);		for (i = 0; i < num_glyphs; i++)	{		GlyphID					theGlyph = glyphs[i].index;		double					minX, maxX, ascent, descent;		ATSGlyphIdealMetrics	metricsH, metricsV;						err = ATSUGlyphGetIdealMetrics(	style,										1,										&theGlyph,										0,										&metricsH);						ATSUVerticalCharacterType	verticalType = kATSUStronglyVertical;		ATSUAttributeTag			theTag = kATSUVerticalCharacterTag;		ByteCount					theSize = sizeof(ATSUVerticalCharacterType);				err = ATSUSetAttributes(style, 1, &theTag, &theSize, (ATSUAttributeValuePtr)&verticalType);				err = ATSUGlyphGetIdealMetrics(	style,										1,										&theGlyph,										0,										&metricsV);				minX = metricsH.otherSideBearing.x;		maxX = metricsH.advance.x;				ascent = metricsV.advance.x;		descent = metricsV.otherSideBearing.x;				glyph_min.x = glyphs[i].x + minX;		glyph_min.y = glyphs[i].y + descent;		glyph_max.x = glyphs[i].x + maxX;		glyph_max.y = glyphs[i].y + ascent;				if (i==0)		{			total_min = glyph_min;			total_max = glyph_max;		}		else		{			if (glyph_min.x < total_min.x)				total_min.x = glyph_min.x;			if (glyph_min.y < total_min.y)				total_min.y = glyph_min.y;			if (glyph_max.x > total_max.x)				total_max.x = glyph_max.x;			if (glyph_max.y > total_max.y)				total_max.y = glyph_max.y;		}	}		extents->x_bearing = total_min.x - origin.x;	extents->y_bearing = total_min.y - origin.y;	extents->width 	= total_max.x - total_min.x;	extents->height	= total_max.y - total_min.y;	extents->x_advance = glyphs[i-1].x - origin.x;	extents->y_advance = glyphs[i-1].y - origin.y;			return CAIRO_STATUS_SUCCESS;}