From 0401bdfad65b4f31613506ce29ab870bae91dd9e Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 27 Jan 2017 11:31:37 -0600 Subject: [PATCH] usp10: Change GSUB_E_NOGLYPH value. -1 is a potentially valid index to return for RTL languages. Signed-off-by: Aric Stewart Signed-off-by: Alexandre Julliard --- dlls/usp10/opentype.c | 10 +++++----- dlls/usp10/usp10_internal.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index d2eb74991c1..9a74fcce4ec 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1098,7 +1098,7 @@ static INT GSUB_apply_ContextSubst(const OT_LookupList* lookup, const OT_LookupT TRACE(" SUBST: %i -> %i %i\n",l, SequenceIndex, lookupIndex); newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); - if (newIndex == -1) + if (newIndex == GSUB_E_NOGLYPH) { ERR(" Chain failed to generate a glyph\n"); continue; @@ -1172,7 +1172,7 @@ static INT GSUB_apply_ContextSubst(const OT_LookupList* lookup, const OT_LookupT TRACE(" SUBST: %i -> %i %i\n",l, SequenceIndex, lookupIndex); newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); - if (newIndex == -1) + if (newIndex == GSUB_E_NOGLYPH) { ERR(" Chain failed to generate a glyph\n"); continue; @@ -1316,7 +1316,7 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); - if (newIndex == -1) + if (newIndex == GSUB_E_NOGLYPH) { ERR("Chain failed to generate a glyph\n"); continue; @@ -1390,7 +1390,7 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); - if (newIndex == -1) + if (newIndex == GSUB_E_NOGLYPH) { ERR("Chain failed to generate a glyph\n"); continue; @@ -1401,7 +1401,7 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo else return GSUB_E_NOGLYPH; } } - return -1; + return GSUB_E_NOGLYPH; } static INT GSUB_apply_lookup(const OT_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 1c0d1c546c9..ccc0f8d8f0d 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -127,8 +127,8 @@ #define NUM_PAGES 17 -#define GSUB_E_NOFEATURE -2 -#define GSUB_E_NOGLYPH -1 +#define GSUB_E_NOFEATURE -20 +#define GSUB_E_NOGLYPH -10 #define FEATURE_ALL_TABLES 0 #define FEATURE_GSUB_TABLE 1