From 80a6f0ae0880914f972b24a11216eed25d873576 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 19 Jan 2015 19:50:45 +0900 Subject: [PATCH] Support 'font-style: oblique'. --- components/gfx/font_context.rs | 2 +- tests/ref/basic.list | 1 + tests/ref/font_style.html | 21 +++++++++++++++++++++ tests/ref/font_style_ref.html | 21 +++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/ref/font_style.html create mode 100644 tests/ref/font_style_ref.html diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index 47764026458..f39381b3d69 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -139,7 +139,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 e53bcc6da93..cfd3478a357 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).

+ + + +