summaryrefslogtreecommitdiff
path: root/render/font.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2018-01-03 23:58:18 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2018-01-05 13:49:51 +0000
commit6be6fa1b2197ffe6e511c5eff9abe14d883f8478 (patch)
tree6059c45898a74fe06300f73f4cd75b3571fd2c75 /render/font.c
parenta67973f312b7cba8a6d56f9841a542a731a9ddb4 (diff)
downloadnetsurf-6be6fa1b2197ffe6e511c5eff9abe14d883f8478.tar.gz
netsurf-6be6fa1b2197ffe6e511c5eff9abe14d883f8478.tar.bz2
CSS utils: Handle new units in length conversion routines.
This causes a ripple effect of all the callsites needing information they didn't have.
Diffstat (limited to 'render/font.c')
-rw-r--r--render/font.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/render/font.c b/render/font.c
index 94ef877c7..a769b476f 100644
--- a/render/font.c
+++ b/render/font.c
@@ -131,8 +131,10 @@ static plot_font_flags_t plot_font_flags(enum css_font_style_e style,
}
-/* exported function documented in render/font_internal.h */
-void font_plot_style_from_css(const css_computed_style *css,
+/* exported function documented in render/font.h */
+void font_plot_style_from_css(
+ const nscss_len_ctx *len_ctx,
+ const css_computed_style *css,
plot_font_style_t *fstyle)
{
lwc_string **families;
@@ -144,7 +146,7 @@ void font_plot_style_from_css(const css_computed_style *css,
css_computed_font_family(css, &families));
css_computed_font_size(css, &length, &unit);
- fstyle->size = FIXTOINT(FMUL(nscss_len2pt(length, unit),
+ fstyle->size = FIXTOINT(FMUL(nscss_len2pt(len_ctx, length, unit),
INTTOFIX(FONT_SIZE_SCALE)));
/* Clamp font size to configured minimum */