From e5552dda22af1969c72772c843d89af6160bde07 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Fri, 15 Jan 2010 07:47:30 +1030 Subject: Fix bug in _cairo_ft_index_to_ucs4 Previously it would miss the first character causing the space glyph to return 0x00A0 instead of 0x0020. (cherry picked from commit f3b3a5c43f247f3e9019fa6c1fd2abb3b00dd9ea) --- src/cairo-ft-font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 0b1e624bc..2172266fc 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -2200,11 +2200,11 @@ _cairo_ft_index_to_ucs4(void *abstract_font, *ucs4 = (uint32_t) -1; charcode = FT_Get_First_Char(face, &gindex); while (gindex != 0) { - charcode = FT_Get_Next_Char (face, charcode, &gindex); if (gindex == index) { *ucs4 = charcode; break; } + charcode = FT_Get_Next_Char (face, charcode, &gindex); } _cairo_ft_unscaled_font_unlock_face (unscaled); -- cgit v1.2.1