Fix css_len2pt conversion from px and use it in the RO front end code.
svn path=/trunk/netsurf/; revision=5914
This commit is contained in:
parent
d58fa7aee5
commit
e34ed32685
|
@ -3222,7 +3222,7 @@ float css_len2pt(const struct css_length *length,
|
|||
css_len2pt(&style->font_size.value.length, 0) *
|
||||
0.6;
|
||||
/* We assume the screen and any other output has the same dpi */
|
||||
case CSS_UNIT_PX: return length->value * css_screen_dpi / 72;
|
||||
case CSS_UNIT_PX: return length->value * 72 / css_screen_dpi;
|
||||
/* 1pt = 1in/72 */
|
||||
case CSS_UNIT_IN: return length->value * 72;
|
||||
case CSS_UNIT_CM: return length->value * 28.452756;
|
||||
|
|
|
@ -421,8 +421,7 @@ void nsfont_read_style(const struct css_style *style,
|
|||
rufl_style *font_style)
|
||||
{
|
||||
assert(style->font_size.size == CSS_FONT_SIZE_LENGTH);
|
||||
*font_size = css_len2px(&style->font_size.value.length, style) *
|
||||
72.0 / 90.0 * 16.;
|
||||
*font_size = css_len2pt(&style->font_size.value.length, style) * 16.;
|
||||
if (*font_size < option_font_min_size * 1.6)
|
||||
*font_size = option_font_min_size * 1.6;
|
||||
if (1600 < *font_size)
|
||||
|
|
Loading…
Reference in New Issue