summaryrefslogtreecommitdiff
path: root/content/handlers/html
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 /content/handlers/html
parent6cabd4cd628833afa32aeb7c614ef153b4a1c985 (diff)
downloadnetsurf-a58d97a41a6192038573da6862571dc72a560458.tar.gz
netsurf-a58d97a41a6192038573da6862571dc72a560458.tar.bz2
Plotters: Add plot_style_fixed type, and use for font size.
Diffstat (limited to 'content/handlers/html')
-rw-r--r--content/handlers/html/box_textarea.c2
-rw-r--r--content/handlers/html/font.c6
-rw-r--r--content/handlers/html/form.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/content/handlers/html/box_textarea.c b/content/handlers/html/box_textarea.c
index 858de5039..c19afbb77 100644
--- a/content/handlers/html/box_textarea.c
+++ b/content/handlers/html/box_textarea.c
@@ -244,7 +244,7 @@ bool box_textarea_create_textarea(html_content *html,
textarea_flags ta_flags;
plot_font_style_t fstyle = {
.family = PLOT_FONT_FAMILY_SANS_SERIF,
- .size = 10 * FONT_SIZE_SCALE,
+ .size = 10 * PLOT_STYLE_SCALE,
.weight = 400,
.flags = FONTF_NONE,
.background = 0,
diff --git a/content/handlers/html/font.c b/content/handlers/html/font.c
index 9dbf5922b..71843e108 100644
--- a/content/handlers/html/font.c
+++ b/content/handlers/html/font.c
@@ -147,11 +147,11 @@ void font_plot_style_from_css(
css_computed_font_size(css, &length, &unit);
fstyle->size = FIXTOINT(FMUL(nscss_len2pt(len_ctx, length, unit),
- INTTOFIX(FONT_SIZE_SCALE)));
+ INTTOFIX(PLOT_STYLE_SCALE)));
/* Clamp font size to configured minimum */
- if (fstyle->size < (nsoption_int(font_min_size) * FONT_SIZE_SCALE) / 10)
- fstyle->size = (nsoption_int(font_min_size) * FONT_SIZE_SCALE) / 10;
+ if (fstyle->size < (nsoption_int(font_min_size) * PLOT_STYLE_SCALE) / 10)
+ fstyle->size = (nsoption_int(font_min_size) * PLOT_STYLE_SCALE) / 10;
fstyle->weight = plot_font_weight(css_computed_font_weight(css));
fstyle->flags = plot_font_flags(css_computed_font_style(css),
diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
index 9fe2e771a..8ba99d4ab 100644
--- a/content/handlers/html/form.c
+++ b/content/handlers/html/form.c
@@ -1160,7 +1160,7 @@ bool form_open_select_menu(void *client_data,
menu->line_height = FIXTOINT(FDIV((FMUL(FLTTOFIX(1.2),
FMUL(nscss_screen_dpi,
- INTTOFIX(fstyle.size / FONT_SIZE_SCALE)))),
+ INTTOFIX(fstyle.size / PLOT_STYLE_SCALE)))),
F_72));
line_height_with_spacing = menu->line_height +