[pango/markup-examples] Add some markup examples
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/markup-examples] Add some markup examples
- Date: Wed, 24 Mar 2021 21:09:14 +0000 (UTC)
commit a47cfee23756f09266d5f3a0ce3ea50c2f540005
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 24 17:08:14 2021 -0400
Add some markup examples
A little color doesn't hurt.
docs/arabic-markup.png | Bin 0 -> 25171 bytes
docs/blue-text.png | Bin 0 -> 15846 bytes
docs/pango.toml.in | 4 +++-
docs/pango_markup.md | 11 +++++++++++
4 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/docs/arabic-markup.png b/docs/arabic-markup.png
new file mode 100644
index 00000000..94f7e2c7
Binary files /dev/null and b/docs/arabic-markup.png differ
diff --git a/docs/blue-text.png b/docs/blue-text.png
new file mode 100644
index 00000000..1a8ee541
Binary files /dev/null and b/docs/blue-text.png differ
diff --git a/docs/pango.toml.in b/docs/pango.toml.in
index 3b7c9a0b..56705fe8 100644
--- a/docs/pango.toml.in
+++ b/docs/pango.toml.in
@@ -69,5 +69,7 @@ content_images = [
"layout.png",
"pipeline.png",
"rects1.png",
- "rects2.png"
+ "rects2.png",
+ "arabic-markup.png",
+ "blue-text.png"
]
diff --git a/docs/pango_markup.md b/docs/pango_markup.md
index dc6047d3..8541a71f 100644
--- a/docs/pango_markup.md
+++ b/docs/pango_markup.md
@@ -42,6 +42,17 @@ A simple example of a marked-up string might be:
<span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!"
```
+![Markup example](blue-text.png)
+
+A more elaborate example of using markup to color combining marks in
+Arabic text:
+
+```
+<span foreground="purple">ا</span><span foreground="red">َ</span>ل<span foreground="blue">ْ</span>ع<span
foreground="red">َ</span>ر<span foreground="red">َ</span>ب<span foreground="red">ِ</span>ي<span
foreground="green">ّ</span><span foreground="red">َ</span>ة<span foreground="blue">ُ</span>
+```
+
+![Markup example](arabic-markup.png)
+
Pango uses GMarkup to parse this language, which means that XML features
such as numeric character entities such as `©` for © can be used too.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]