summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 38e908c5..2828eab3 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -294,12 +294,16 @@ markup_data_close_tag (MarkupData *md)
if (ot->has_base_font_size)
{
- /* Create a font using the absolute point size
- * as the base size to be scaled from
- */
- a = pango_attr_size_new (scale_factor (ot->scale_level,
- 1.0) *
- ot->base_font_size);
+ /* Create a font using the absolute point size as the base size
+ * to be scaled from.
+ * We need to use a local variable to ensure that the compiler won't
+ * implicitly cast it to integer while the result is kept in registers,
+ * leading to a wrong approximation in i386 (with 387 FPU)
+ */
+ volatile double size;
+
+ size = scale_factor (ot->scale_level, 1.0) * ot->base_font_size;
+ a = pango_attr_size_new (size);
}
else
{