summaryrefslogtreecommitdiff
path: root/frontends/framebuffer
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-05-23 11:48:35 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2018-05-23 11:48:35 +0100
commita58d97a41a6192038573da6862571dc72a560458 (patch)
tree0efc128007ea0afcc931dede3521012b19723d9f /frontends/framebuffer
parent6cabd4cd628833afa32aeb7c614ef153b4a1c985 (diff)
downloadnetsurf-a58d97a41a6192038573da6862571dc72a560458.tar.gz
netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.bz2
Plotters: Add plot_style_fixed type, and use for font size.
Diffstat (limited to 'frontends/framebuffer')
-rw-r--r--frontends/framebuffer/fbtk/text.c2
-rw-r--r--frontends/framebuffer/font_freetype.c2
-rw-r--r--frontends/framebuffer/font_internal.c2
3 files changed, 3 insertions, 3 deletions
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)