diff options
-rwxr-xr-x | amiga/font.c | 10 | ||||
-rw-r--r-- | amiga/font_scan.c | 2 | ||||
-rwxr-xr-x | amiga/font_scan.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/amiga/font.c b/amiga/font.c index 6821a3194..93bee3cf0 100755 --- a/amiga/font.c +++ b/amiga/font.c @@ -151,7 +151,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp, int32 ami_font_width_glyph(struct OutlineFont *ofont, const uint16 *char1, const uint16 *char2, uint32 emwidth); struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, - uint16 *codepoint); + const uint16 *codepoint); static void ami_font_cleanup(struct MinList *ami_font_list); static bool nsfont_width(const plot_font_style_t *fstyle, @@ -433,7 +433,7 @@ struct ami_font_node *ami_font_open(const char *font) * \return outline font or NULL on error */ struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle, - uint16 *codepoint) + const uint16 *codepoint) { struct ami_font_node *node; struct OutlineFont *ofont; @@ -647,8 +647,8 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont, { int32 char_advance = 0; FIXED kern = 0; - struct MinList *gwlist; - FIXED char1w; + struct MinList *gwlist = NULL; + FIXED char1w = 0; struct GlyphWidthEntry *gwnode; bool skip_c2 = false; @@ -662,7 +662,7 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont, skip_c2 = true; } - if (*char2 == 0) skip_c2 = true; + if (*char2 < 0x0020) skip_c2 = true; if(ESetInfo(&ofont->olf_EEngine, OT_GlyphCode, *char1, diff --git a/amiga/font_scan.c b/amiga/font_scan.c index a2738f208..6a595b456 100644 --- a/amiga/font_scan.c +++ b/amiga/font_scan.c @@ -71,7 +71,7 @@ struct ami_font_scan_window { * \param glypharray an array of 0xffff lwc_string pointers * \return font name or NULL */ -const char *ami_font_scan_lookup(uint16 *code, lwc_string **glypharray) +const char *ami_font_scan_lookup(const uint16 *code, lwc_string **glypharray) { if(*code >= 0xd800 && *code <= 0xdbff) { /* This is a multi-byte character, we don't support falback for these yet. */ diff --git a/amiga/font_scan.h b/amiga/font_scan.h index 840f200e1..d29469742 100755 --- a/amiga/font_scan.h +++ b/amiga/font_scan.h @@ -25,6 +25,6 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, lwc_string **glypharray); void ami_font_scan_fini(lwc_string **glypharray); void ami_font_scan_save(const char *filename, lwc_string **glypharray); -const char *ami_font_scan_lookup(uint16 *code, lwc_string **glypharray); +const char *ami_font_scan_lookup(const uint16 *code, lwc_string **glypharray); #endif |