summaryrefslogtreecommitdiff
path: root/frontends/framebuffer/font_freetype.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-01-02 11:59:32 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2017-01-02 11:59:32 +0000
commit24b7fdf4382dcef274092b4735093fc390815455 (patch)
treef3188b13046b2046a05dd9610077b4b5ce750d53 /frontends/framebuffer/font_freetype.c
parentbb2341898113f37936832c8828bd515c3e3860c9 (diff)
downloadnetsurf-24b7fdf4382dcef274092b4735093fc390815455.tar.gz
netsurf-24b7fdf4382dcef274092b4735093fc390815455.tar.bz2
Framebuffer: Fix freetype font table to return nserror.
We were returning true on success, which when the return value was tested for being NSERROR_OK (0), meant it was treated as failure. Now we correctly return NSERROR_OK on success.
Diffstat (limited to 'frontends/framebuffer/font_freetype.c')
-rw-r--r--frontends/framebuffer/font_freetype.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c
index 9235ad476..323982014 100644
--- a/frontends/framebuffer/font_freetype.c
+++ b/frontends/framebuffer/font_freetype.c
@@ -444,8 +444,7 @@ fb_font_width(const plot_font_style_t *fstyle,
*width += glyph->advance.x >> 16;
}
-
- return true;
+ return NSERROR_OK;
}
@@ -481,7 +480,7 @@ fb_font_position(const plot_font_style_t *fstyle,
*actual_x = prev_x;
*char_offset = nxtchr;
- return true;
+ return NSERROR_OK;
}
@@ -537,7 +536,7 @@ fb_font_split(const plot_font_style_t *fstyle,
* found a space; return previous space */
*actual_x = last_space_x;
*char_offset = last_space_idx;
- return true;
+ return NSERROR_OK;
}
nxtchr = utf8_next(string, length, nxtchr);
@@ -545,7 +544,7 @@ fb_font_split(const plot_font_style_t *fstyle,
*char_offset = nxtchr;
- return true;
+ return NSERROR_OK;
}
static struct gui_layout_table layout_table = {