From a58d97a41a6192038573da6862571dc72a560458 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 23 May 2018 11:48:35 +0100 Subject: Plotters: Add plot_style_fixed type, and use for font size. --- content/handlers/text/textplain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content/handlers/text/textplain.c') 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)); } -- cgit v1.2.3