summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-10 12:52:51 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-10 12:52:51 +0000
commitbcdbb9e365201cc06a5a9635c51d57993a6286fe (patch)
tree38bdc7c415324b5f0feef6a847bdf0e05bc0bb1e /amiga
parent5fb63e19ab4496fd7a0d75dc2744f143c5b9a488 (diff)
downloadnetsurf-bcdbb9e365201cc06a5a9635c51d57993a6286fe.tar.gz
netsurf-bcdbb9e365201cc06a5a9635c51d57993a6286fe.tar.bz2
Use correct parameters
Diffstat (limited to 'amiga')
-rw-r--r--amiga/font.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/amiga/font.c b/amiga/font.c
index 5197b32c7..0b9784284 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -789,6 +789,7 @@ ULONG ami_font_unicode_text(struct RastPort *rp, const char *string, ULONG lengt
uint32 x=0;
int32 tempx = 0;
ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);
+ uint16 utf16_a = 0x41;
if(!string || string[0]=='\0') return 0;
if(!length) return 0;
@@ -801,7 +802,7 @@ ULONG ami_font_unicode_text(struct RastPort *rp, const char *string, ULONG lengt
if(utf8_to_enc(string,"UTF-16",length,(char **)&utf16) != NSERROR_OK) return 0;
outf16 = utf16;
if(!(ofont = ami_open_outline_font(fstyle, 0))) {
- if(!(ofont = ami_open_outline_font(fstyle, 'A'))) return 0;
+ if(!(ofont = ami_open_outline_font(fstyle, &utf16_a))) return 0;
}
while(*utf16 != 0)
@@ -857,6 +858,7 @@ static inline ULONG ami_font_unicode_width(const char *string, ULONG length,
uint32 x=0;
int32 tempx = 0;
ULONG emwidth = (ULONG)NSA_FONT_EMWIDTH(fstyle->size);
+ uint16 utf16_a = 0x41;
if(!string || string[0]=='\0') return 0;
if(!length) return 0;
@@ -864,8 +866,7 @@ static inline ULONG ami_font_unicode_width(const char *string, ULONG length,
if(utf8_to_enc(string,"UTF-16",length,(char **)&utf16) != NSERROR_OK) return 0;
outf16 = utf16;
if(!(ofont = ami_open_outline_font(fstyle, 0))) {
- if(!(ofont = ami_open_outline_font(fstyle, 'A'))) return 0;
-
+ if(!(ofont = ami_open_outline_font(fstyle, &utf16_a))) return 0;
}
while(*utf16 != 0)