diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-05-19 18:39:54 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-05-19 18:39:54 +0100 |
commit | 06ad319c2407ec28e46d27b13f72d5b89631e7fb (patch) | |
tree | 1626a41e2e633d9d93e0aa99ad0a67e3ebc10dce /amiga/font.c | |
parent | 329bae77d87f939d4ad466d0f49140eabfd88065 (diff) | |
download | netsurf-06ad319c2407ec28e46d27b13f72d5b89631e7fb.tar.gz netsurf-06ad319c2407ec28e46d27b13f72d5b89631e7fb.tar.bz2 |
Filter all control chars from width kerning and fix some const warnings.
Diffstat (limited to 'amiga/font.c')
-rwxr-xr-x | amiga/font.c | 10 |
1 files changed, 5 insertions, 5 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, |