Thanks for you fix.<br><br><div><span class="gmail_quote">On 6/14/06, <b class="gmail_sendername">Carl Worth</b> <<a href="mailto:cworth@cworth.org">cworth@cworth.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> diff-tree 0d2900477cd6edfe6025be06c3f1eda63cbe5230 (from b104a79502e2c01c508e40d83613ecfa001a2a4e)<br>> Author: Jinghua Luo <<a href="mailto:sunmoon1997@gmail.com">sunmoon1997@gmail.com</a>><br>> Date: Wed Jun 14 15:56:17 2006 +0800
<br>...<br>> @@ -1896,8 +1897,7 @@ _cairo_ft_scaled_glyph_init (void *abs<br>> status = _transform_glyph_bitmap (&unscaled->current_shape,<br>> &surface);
<br>> } else<br>> - status = _render_glyph_bitmap (face, &scaled_font->base.options,<br>> - &surface);<br>> + status = CAIRO_STATUS_NO_MEMORY;
<br><br>There are a few problems with the above:<br><br>1. There's a style problem with inconsistent usage of braces, (a<br> closing brace before the else but no opening brace).<br><br>2. The implementation should never abuse CAIRO_STATUS_NO_MEMORY values
<br> to indicate arbitrary errors, (yes, there are existing cases of<br> this is in the implementation and I consider all of them bugs).<br><br>3. Most importantly, the _render_glyph_bitmap function is already<br> written to handle the case where glyph->format is neither
<br> FT_GLYPH_FORMAT_OUTLINE nor FT_GLYPH_FORMAT_BITMAP. Its comment<br> says:<br><br> /* According to the FreeType docs, glyphslot->format could be<br> * something other than FT_GLYPH_FORMAT_OUTLINE or<br> * FT_GLYPH_FORMAT_BITMAP. Calling FT_Render_Glyph gives FreeType
<br> * the opportunity to convert such to<br> * bitmap.<br><br>So there's a regression in not calling this in this case.<br><br>I just pushed out the following patch to fix the above issues.<br><br>-Carl<br><br><br>
<br></blockquote></div><br>