summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/font.c4
-rw-r--r--riscos/htmlredraw.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/riscos/font.c b/riscos/font.c
index ef2ecb5a6..c56c85ad7 100644
--- a/riscos/font.c
+++ b/riscos/font.c
@@ -208,8 +208,8 @@ struct font_data *nsfont_open(struct font_set *set, struct css_style *style)
assert(style != NULL);
if (style->font_size.size == CSS_FONT_SIZE_LENGTH)
- size = len(&style->font_size.value.length, style) *
- 72.0 / 90.0 * 16;
+ size = (int)(css_len2px(&style->font_size.value.length,
+ style) * 72.0 / 90.0 * 16.);
if (size < option_font_min_size * 1.6)
size = option_font_min_size * 1.6;
if (1600 < size)
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c
index d9060563d..a3ecce1c6 100644
--- a/riscos/htmlredraw.c
+++ b/riscos/htmlredraw.c
@@ -954,7 +954,7 @@ bool html_redraw_background(int xi, int yi, int width, int height,
x += ((state.visible.x1 - state.visible.x0) - (image_size.x * 2)) * multiplier;
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- x += 2 * len(&box->style->background_position.horz.value.length, box->style) * scale;
+ x += (int)(2. * css_len2px(&box->style->background_position.horz.value.length, box->style) * scale);
break;
default:
break;
@@ -966,7 +966,7 @@ bool html_redraw_background(int xi, int yi, int width, int height,
y -= ((state.visible.y1 - state.visible.y0 - toolbar_height) - (image_size.y * 2)) * multiplier;
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- y -= 2 * len(&box->style->background_position.vert.value.length, box->style) * scale;
+ y -= (int)(2. * css_len2px(&box->style->background_position.vert.value.length, box->style) * scale);
break;
default:
break;
@@ -984,7 +984,7 @@ bool html_redraw_background(int xi, int yi, int width, int height,
x += 2 * (box->width + box->padding[LEFT] + box->padding[RIGHT] - image_size.x) * multiplier;
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- x += 2 * len(&box->style->background_position.horz.value.length, box->style) * scale;
+ x += (int)(2. * css_len2px(&box->style->background_position.horz.value.length, box->style) * scale);
break;
default:
break;
@@ -996,7 +996,7 @@ bool html_redraw_background(int xi, int yi, int width, int height,
y -= 2 * (box->height + box->padding[TOP] + box->padding[BOTTOM] - image_size.y) * multiplier;
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- y -= 2 * len(&box->style->background_position.vert.value.length, box->style) * scale;
+ y -= (int)(2. * css_len2px(&box->style->background_position.vert.value.length, box->style) * scale);
break;
default:
break;