diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index e439d482f64..34e92b21540 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -140,7 +140,7 @@ impl FontContext { // so they will never be released. Find out a good time to drop them. let desc = FontTemplateDescriptor::new(style.font_weight, - style.font_style == font_style::T::italic); + style.font_style == font_style::T::italic || style.font_style == font_style::T::oblique); let mut fonts = SmallVec8::new(); for family in style.font_family.iter() { diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 3587b59e181..f4af79d356f 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -26,6 +26,7 @@ # text_decoration_propagation_a.html text_decoration_propagation_b.html # inline_text_align_a.html inline_text_align_b.html == font_size.html font_size_ref.html +== font_style.html font_style_ref.html == img_size_a.html img_size_b.html == img_dynamic_remove.html img_dynamic_remove_ref.html == upper_id_attr.html upper_id_attr_ref.html diff --git a/tests/ref/font_style.html b/tests/ref/font_style.html new file mode 100644 index 00000000000..18c67976c26 --- /dev/null +++ b/tests/ref/font_style.html @@ -0,0 +1,21 @@ + + + + + + + +

This is a paragraph, normal.

+

This is a paragraph, italic(oblique).

+ + + + diff --git a/tests/ref/font_style_ref.html b/tests/ref/font_style_ref.html new file mode 100644 index 00000000000..023dc14f501 --- /dev/null +++ b/tests/ref/font_style_ref.html @@ -0,0 +1,21 @@ + + + + + + + +

This is a paragraph, normal.

+

This is a paragraph, italic(oblique).

+ + + +