[gtk/wip/otte/inscription: 2/2] reftests: Add test for inscription markup parsing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/inscription: 2/2] reftests: Add test for inscription markup parsing
- Date: Thu, 9 Jun 2022 01:51:45 +0000 (UTC)
commit 185752b27a95f74439c309f2bac478d02f9cffa7
Author: Benjamin Otte <otte redhat com>
Date: Thu Jun 9 02:45:59 2022 +0200
reftests: Add test for inscription markup parsing
Compare with label markup parsing as the reference.
testsuite/reftests/inscription-markup.ref.ui | 43 ++++++++++++++++++++++++++++
testsuite/reftests/inscription-markup.ui | 41 ++++++++++++++++++++++++++
testsuite/reftests/meson.build | 2 ++
3 files changed, 86 insertions(+)
---
diff --git a/testsuite/reftests/inscription-markup.ref.ui b/testsuite/reftests/inscription-markup.ref.ui
new file mode 100644
index 0000000000..9c337c0b24
--- /dev/null
+++ b/testsuite/reftests/inscription-markup.ref.ui
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="decorated">0</property>
+ <property name="default-width">800</property>
+ <property name="default-height">1000</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="use-markup">1</property>
+ <property name="wrap">1</property>
+ <property name="label" translatable="yes">Text sizes: <span size="xx-small">tiny
</span><span size="x-small">very small </span><span size="small">small
</span><span size="medium">normal </span><span size="large">large
</span><span size="x-large">very large </span><span size="xx-large">huge</span>
+
+Text styles: <span style="normal">Normal</span> <span style="italic">Italic</span>
<span style="oblique">Olique</span>
+
+Text weights: <span weight="thin">thin</span> <span weight="light">light</span>
<span weight="normal">normal</span> <span weight="bold">bold</span> <span
weight="ultraheavy">ultraheavy</span>
+
+Text <span color="gray">c<span color="green">o</span>l<span
color="tomato">o</span>rs</span> and <span background="pink">backgrounds</span>
+
+Colorful <span underline="low" underline-color="blue"><span underline="double"
underline-color="red">under</span>lines</span> and <span background="pink"><span
underline="error">mo</span><span underline="error"
underline-color="green">re</span></span>
+
+Colorful <span strikethrough="true" strikethrough-color="magenta">strikethroughs</span> and
<span overline="single" overline_color="green">overlines</span>
+
+Superscripts and subscripts: 𝜀<span rise="-6000" size="x-small" font_desc="italic">0</span> =
𝜔<span rise="8000" size="smaller">𝜔<span rise="14000" size="smaller">𝜔<span
rise="20000">.<span rise="23000">.<span
rise="26000">.</span></span></span></span></span>
+
+<span letter_spacing="3000">Letterspacing</span>
+
+OpenType font features: <span font_desc="sans regular" font_features="dlig=0">feast</span>
versus <span font_desc="sans regular" font_features="dlig=1">feast</span>
+
+Shortcuts: <tt>Monospace</tt> – <b>Bold</b> – <i>Italic</i> –
<big>Big</big> – <small>Small</small> – <u>Underlined</u> –
<s>Strikethrough</s> – Super<sup>script</sup> – Sub<sub>script</sub>
+
+hyphenation algorithm is a <span allow_breaks="false" style="italic">set of rules</span>,
especially one codified for implementation in a computer program, that decides at which points a
word can be broken over two lines with a hyphen. For example, a hyphenation algorithm might decide
that impeachment can be broken as impeach‧ment or im‧peachment but not impe‧achment.
+
+<span insert_hyphens="false">one/two three/four five/six seven/eight nine/ten</span>
+
+<span line_height='1.33'>Line height: This is an example of widely spaced text. It was achieved by
setting the line-height factor to 1.33. You can set the line-height factor to any value between 0 and 10.
+
+Note that the line height affects the spacing between paragraphs as well as between the wrapped lines inside
a paragraph.</span>
+
+Transforms: <span text_transform='uppercase'>straße</span> <span
text_transform='capitalize'>up, up and away</span></property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/testsuite/reftests/inscription-markup.ui b/testsuite/reftests/inscription-markup.ui
new file mode 100644
index 0000000000..181d7ffbd6
--- /dev/null
+++ b/testsuite/reftests/inscription-markup.ui
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="decorated">0</property>
+ <property name="default-width">800</property>
+ <property name="default-height">1000</property>
+ <child>
+ <object class="GtkInscription">
+ <property name="markup" translatable="yes">Text sizes: <span size="xx-small">tiny
</span><span size="x-small">very small </span><span size="small">small
</span><span size="medium">normal </span><span size="large">large
</span><span size="x-large">very large </span><span size="xx-large">huge</span>
+
+Text styles: <span style="normal">Normal</span> <span style="italic">Italic</span>
<span style="oblique">Olique</span>
+
+Text weights: <span weight="thin">thin</span> <span weight="light">light</span>
<span weight="normal">normal</span> <span weight="bold">bold</span> <span
weight="ultraheavy">ultraheavy</span>
+
+Text <span color="gray">c<span color="green">o</span>l<span
color="tomato">o</span>rs</span> and <span background="pink">backgrounds</span>
+
+Colorful <span underline="low" underline-color="blue"><span underline="double"
underline-color="red">under</span>lines</span> and <span background="pink"><span
underline="error">mo</span><span underline="error"
underline-color="green">re</span></span>
+
+Colorful <span strikethrough="true" strikethrough-color="magenta">strikethroughs</span> and
<span overline="single" overline_color="green">overlines</span>
+
+Superscripts and subscripts: 𝜀<span rise="-6000" size="x-small" font_desc="italic">0</span> =
𝜔<span rise="8000" size="smaller">𝜔<span rise="14000" size="smaller">𝜔<span
rise="20000">.<span rise="23000">.<span
rise="26000">.</span></span></span></span></span>
+
+<span letter_spacing="3000">Letterspacing</span>
+
+OpenType font features: <span font_desc="sans regular" font_features="dlig=0">feast</span>
versus <span font_desc="sans regular" font_features="dlig=1">feast</span>
+
+Shortcuts: <tt>Monospace</tt> – <b>Bold</b> – <i>Italic</i> –
<big>Big</big> – <small>Small</small> – <u>Underlined</u> –
<s>Strikethrough</s> – Super<sup>script</sup> – Sub<sub>script</sub>
+
+hyphenation algorithm is a <span allow_breaks="false" style="italic">set of rules</span>,
especially one codified for implementation in a computer program, that decides at which points a
word can be broken over two lines with a hyphen. For example, a hyphenation algorithm might decide
that impeachment can be broken as impeach‧ment or im‧peachment but not impe‧achment.
+
+<span insert_hyphens="false">one/two three/four five/six seven/eight nine/ten</span>
+
+<span line_height='1.33'>Line height: This is an example of widely spaced text. It was achieved by
setting the line-height factor to 1.33. You can set the line-height factor to any value between 0 and 10.
+
+Note that the line height affects the spacing between paragraphs as well as between the wrapped lines inside
a paragraph.</span>
+
+Transforms: <span text_transform='uppercase'>straße</span> <span
text_transform='capitalize'>up, up and away</span></property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build
index 301f8bd0c5..3001d0e127 100644
--- a/testsuite/reftests/meson.build
+++ b/testsuite/reftests/meson.build
@@ -367,6 +367,8 @@ testdata = [
'image-load-from-file.css',
'image-load-from-file.ref.ui',
'image-load-from-file.ui',
+ 'inscription-markup.ref.ui',
+ 'inscription-markup.ui',
'label-attribute-preference.css',
'label-attribute-preference.ref.ui',
'label-attribute-preference.ui',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]