dwrite: Return on first found glyph.

This commit is contained in:
Nikolay Sivov 2014-10-16 11:59:55 +04:00 committed by Alexandre Julliard
parent d02d35a7b1
commit e3c514f6d5
1 changed files with 3 additions and 1 deletions

View File

@ -377,7 +377,7 @@ void opentype_cmap_get_glyphindex(void *data, UINT32 utf32c, UINT16 *pgi)
table = (WORD*)(((BYTE*)CMAP_Table) + GET_BE_DWORD(CMAP_Table->tables[i].offset)); table = (WORD*)(((BYTE*)CMAP_Table) + GET_BE_DWORD(CMAP_Table->tables[i].offset));
type = GET_BE_WORD(*table); type = GET_BE_WORD(*table);
TRACE("table type %i\n", type); TRACE("table type %i\n", type);
/* Break when we find a handled type */
switch (type) switch (type)
{ {
case OPENTYPE_CMAP_TABLE_SEGMENT_MAPPING: case OPENTYPE_CMAP_TABLE_SEGMENT_MAPPING:
@ -389,6 +389,8 @@ void opentype_cmap_get_glyphindex(void *data, UINT32 utf32c, UINT16 *pgi)
default: default:
TRACE("table type %i unhandled.\n", type); TRACE("table type %i unhandled.\n", type);
} }
if (*pgi) return;
} }
} }