From 914ba332e2853baa30809eda11a878ab686253f6 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Mon, 24 Aug 2015 20:56:01 +0100 Subject: Use the correct decoded surrogate values for calculating kerning widths --- amiga/font.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/amiga/font.c b/amiga/font.c index 5f661c4dc..c9a6d868a 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -676,6 +676,7 @@ static inline int32 ami_font_width_glyph(struct OutlineFont *ofont, struct GlyphWidthEntry *gwnode; bool skip_c2 = false; uint32 long_char_1 = 0; + uint32 long_char_2; #ifndef __amigaos4__ struct BulletBase *BulletBase = ofont->BulletBase; #endif @@ -712,9 +713,10 @@ static inline int32 ami_font_width_glyph(struct OutlineFont *ofont, kern = 0; if(!skip_c2) { + long_char_2 = amiga_nsfont_decode_surrogate(char2); if(ESetInfo(AMI_OFONT_ENGINE, - OT_GlyphCode, *char1, - OT_GlyphCode2, *char2, + OT_GlyphCode, long_char_1, + OT_GlyphCode2, long_char_2, TAG_END) == OTERR_Success) { EObtainInfo(AMI_OFONT_ENGINE, -- cgit v1.2.3