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. --- frontends/framebuffer/fbtk/text.c | 2 +- frontends/framebuffer/font_freetype.c | 2 +- frontends/framebuffer/font_internal.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'frontends/framebuffer') diff --git a/frontends/framebuffer/fbtk/text.c b/frontends/framebuffer/fbtk/text.c index 4f3a2385d..9c96dcef4 100644 --- a/frontends/framebuffer/fbtk/text.c +++ b/frontends/framebuffer/fbtk/text.c @@ -71,7 +71,7 @@ fb_text_font_style(fbtk_widget_t *widget, int *font_height, int *padding, #endif font_style->family = PLOT_FONT_FAMILY_SANS_SERIF; - font_style->size = px_to_pt(*font_height * FONT_SIZE_SCALE); + font_style->size = px_to_pt(*font_height * PLOT_STYLE_SCALE); font_style->weight = 400; font_style->flags = FONTF_NONE; font_style->background = widget->bg; diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c index 9e47e4b99..744ac6281 100644 --- a/frontends/framebuffer/font_freetype.c +++ b/frontends/framebuffer/font_freetype.c @@ -392,7 +392,7 @@ static void fb_fill_scalar(const plot_font_style_t *fstyle, FTC_Scaler srec) srec->face_id = (FTC_FaceID)fb_faces[selected_face]; - srec->width = srec->height = (fstyle->size * 64) / FONT_SIZE_SCALE; + srec->width = srec->height = (fstyle->size * 64) / PLOT_STYLE_SCALE; srec->pixel = 0; srec->x_res = srec->y_res = browser_get_dpi(); diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c index ff3471d1d..d755681c6 100644 --- a/frontends/framebuffer/font_internal.c +++ b/frontends/framebuffer/font_internal.c @@ -212,7 +212,7 @@ fb_get_font_size(const plot_font_style_t *fstyle) { int size = fstyle->size * 10 / (((nsoption_int(font_min_size) * 3 + - nsoption_int(font_size)) / 4) * FONT_SIZE_SCALE); + nsoption_int(font_size)) / 4) * PLOT_STYLE_SCALE); if (size > 2) size = 2; else if (size <= 0) -- cgit v1.2.3