summaryrefslogtreecommitdiff
path: root/amiga/font.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-24 20:56:01 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-08-24 20:56:01 +0100
commit914ba332e2853baa30809eda11a878ab686253f6 (patch)
treee3a27919f6b56504c4e45a139f0134e71611933b /amiga/font.c
parent4bbf2ac58af4a660d108ec51867a7cf8e674cc39 (diff)
downloadnetsurf-914ba332e2853baa30809eda11a878ab686253f6.tar.gz
netsurf-914ba332e2853baa30809eda11a878ab686253f6.tar.bz2
Use the correct decoded surrogate values for calculating kerning widths
Diffstat (limited to 'amiga/font.c')
-rw-r--r--amiga/font.c6
1 files 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,