summaryrefslogtreecommitdiff
path: root/amiga/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'amiga/font.c')
-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)