diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-05-23 11:48:35 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2018-05-23 11:48:35 +0100 |
commit | a58d97a41a6192038573da6862571dc72a560458 (patch) | |
tree | 0efc128007ea0afcc931dede3521012b19723d9f /content/handlers/text | |
parent | 6cabd4cd628833afa32aeb7c614ef153b4a1c985 (diff) | |
download | netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.gz netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.bz2 |
Plotters: Add plot_style_fixed type, and use for font size.
Diffstat (limited to 'content/handlers/text')
-rw-r--r-- | content/handlers/text/textplain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c index e6d167bc2..af990d1d7 100644 --- a/content/handlers/text/textplain.c +++ b/content/handlers/text/textplain.c @@ -86,7 +86,7 @@ typedef struct textplain_content { #define MARGIN 4 #define TAB_WIDTH 8 /* must be power of 2 currently */ -#define TEXT_SIZE 10 * FONT_SIZE_SCALE /* Unscaled text size in pt */ +#define TEXT_SIZE 10 * PLOT_STYLE_SCALE /* Unscaled text size in pt */ static plot_font_style_t textplain_style = { .family = PLOT_FONT_FAMILY_MONOSPACE, @@ -149,7 +149,7 @@ textplain_create_internal(textplain_content *c, lwc_string *encoding) parserutils_inputstream *stream; parserutils_error error; - textplain_style.size = (nsoption_int(font_size) * FONT_SIZE_SCALE) / 10; + textplain_style.size = (nsoption_int(font_size) * PLOT_STYLE_SCALE) / 10; utf8_data = malloc(CHUNK); if (utf8_data == NULL) @@ -400,7 +400,7 @@ static float textplain_line_height(void) /* Size is in points, so convert to pixels. * Then use a constant line height of 1.2 x font size. */ - return FIXTOFLT(FDIV((FMUL(FLTTOFIX(1.2), FMUL(nscss_screen_dpi, INTTOFIX((textplain_style.size / FONT_SIZE_SCALE))))), F_72)); + return FIXTOFLT(FDIV((FMUL(FLTTOFIX(1.2), FMUL(nscss_screen_dpi, INTTOFIX((textplain_style.size / PLOT_STYLE_SCALE))))), F_72)); } |