summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--meson.build10
-rw-r--r--meson_options.txt4
-rw-r--r--pango/break-thai.c8
-rw-r--r--pango/break.c73
-rw-r--r--pango/fonts.c8
-rw-r--r--pango/meson.build2
-rw-r--r--pango/pango-break-table.h532
-rw-r--r--pango/pango-context.c4
-rw-r--r--pango/pango-emoji-private.h3
-rw-r--r--pango/pango-emoji.c6
-rw-r--r--pango/pango-font.h4
-rw-r--r--pango/pango-language-sample-table.h6
-rw-r--r--pango/pango-language.c6
-rw-r--r--pango/pango-ot-tag.c28
-rw-r--r--pango/pango-script-lang-table.h500
-rw-r--r--pango/pango-script.c14
-rw-r--r--pango/pango-script.h12
-rw-r--r--pango/pango-utils.c6
-rw-r--r--pango/pangocoretext-fontmap.c28
-rw-r--r--tests/layouts/valid-1.expected6
-rw-r--r--tests/layouts/valid-2.expected10
-rw-r--r--tests/layouts/valid-3.expected25
-rw-r--r--tests/layouts/valid-3.markup2
-rw-r--r--tests/markup-parse.c153
-rw-r--r--tests/meson.build9
-rw-r--r--tests/test-common.c13
-rw-r--r--tests/test-layout.c3
-rwxr-xr-xtools/gen-break-table.py156
-rw-r--r--tools/gen-script-for-lang.c26
30 files changed, 1123 insertions, 540 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index acde7aaa..e150803c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,10 +18,12 @@ gnome-runtime-linux:
cairo-devel \
gobject-introspection-devel \
cairo-gobject-devel \
- abattis-cantarell-fonts
+ abattis-cantarell-fonts \
+ desktop-file-utils
script:
- meson _build
- - ninja -C _build dist
+ - ninja -C _build
+ - cd _build; meson test --suite pango
msys2-mingw64:
stage: build
diff --git a/meson.build b/meson.build
index 76df11b1..73b5da2b 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,9 @@ project('pango', 'c', 'cpp',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
- 'c_std=c99',
+ # We only need c99, but glib needs GNU-specific features
+ # https://github.com/mesonbuild/meson/issues/2289
+ 'c_std=gnu99',
],
meson_version : '>= 0.48.0')
@@ -182,10 +184,10 @@ endif
# Dependencies
pango_deps = []
-glib_req_version = '>= 2.38.0'
+glib_req_version = '>= 2.59.2'
fribidi_req_version = '>= 0.19.7'
libthai_req_version = '>= 0.1.9'
-harfbuzz_req_version = '>= 1.4.2'
+harfbuzz_req_version = '>= 2.0.0'
fontconfig_req_version = '>= 2.11.91'
xft_req_version = '>= 2.0.0'
cairo_req_version = '>= 1.12.10'
@@ -513,6 +515,6 @@ subdir('examples')
subdir('tests')
subdir('tools')
-if get_option('enable_docs')
+if get_option('gtk_doc')
subdir('docs')
endif
diff --git a/meson_options.txt b/meson_options.txt
index ac641269..95d7edb8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,8 +1,8 @@
-option('enable_docs',
+option('gtk_doc',
description: 'Build API reference for Pango using GTK-Doc',
type: 'boolean',
value: false)
-option('gir',
+option('introspection',
description: 'Build the GObject introspection data for Pango',
type: 'boolean',
value: true)
diff --git a/pango/break-thai.c b/pango/break-thai.c
index 85b9e54a..65b527aa 100644
--- a/pango/break-thai.c
+++ b/pango/break-thai.c
@@ -88,13 +88,13 @@ break_thai (const char *text,
#endif
for (cnt = 0; cnt < len; cnt++)
- if (attrs[brk_pnts[cnt]].is_char_break)
+ if (attrs[brk_pnts[cnt]].is_line_break)
{
- /* Only allow additional line breaks if line-breaking is NOT
- * prohibited. (The alternative would be to set is_char_break to
+ /* Only allow additional char breaks if line-breaking is NOT
+ * prohibited. (The alternative would be to set is_line_break to
* TRUE as well. NOT setting it will break invariants that any
* line break opportunity is also a char break opportunity. */
- attrs[brk_pnts[cnt]].is_line_break = TRUE;
+ attrs[brk_pnts[cnt]].is_char_break = TRUE;
attrs[brk_pnts[cnt]].is_word_start = TRUE;
attrs[brk_pnts[cnt]].is_word_end = TRUE;
}
diff --git a/pango/break.c b/pango/break.c
index 355518eb..11f4079e 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -25,6 +25,7 @@
#include "pango-engine-private.h"
#include "pango-script-private.h"
#include "pango-emoji-private.h"
+#include "pango-break-table.h"
#include "pango-impl-utils.h"
#include <string.h>
@@ -124,7 +125,8 @@ static const CharJamoProps HangulJamoProps[] = {
#define GREEK(wc) (((wc) >= 0x0370 && (wc) <= 0x3FF) || ((wc) >= 0x1F00 && (wc) <= 0x1FFF))
#define KANA(wc) ((wc) >= 0x3040 && (wc) <= 0x30FF)
#define HANGUL(wc) ((wc) >= 0xAC00 && (wc) <= 0xD7A3)
-#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA(wc) && !HANGUL(wc))
+#define EMOJI(wc) (_pango_Is_Emoji_Base_Character (wc))
+#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA (wc) && !HANGUL (wc) && !EMOJI (wc))
/* Previously "123foo" was two words. But in UAX 29 of Unicode,
* we know don't break words between consecutive letters and numbers
@@ -523,6 +525,11 @@ pango_default_break (const gchar *text,
if (is_grapheme_boundary)
{
attrs[i].backspace_deletes_character = BACKSPACE_DELETES_CHARACTER (base_character);
+
+ /* Dependent Vowels for Indic language */
+ if (_pango_is_Virama (prev_wc) ||
+ _pango_is_Vowel_Dependent (prev_wc))
+ attrs[i].backspace_deletes_character = TRUE;
}
else
attrs[i].backspace_deletes_character = FALSE;
@@ -845,69 +852,7 @@ pango_default_break (const gchar *text,
wc == 0xFF64)
SB_type = SB_SContinue;
- if (wc == 0x0021 ||
- wc == 0x003F ||
- wc == 0x0589 ||
- wc == 0x061F ||
- wc == 0x06D4 ||
- (wc >= 0x0700 && wc <= 0x0702) ||
- wc == 0x07F9 ||
- (wc >= 0x0964 && wc <= 0x0965) ||
- (wc >= 0x104A && wc <= 0x104B) ||
- wc == 0x1362 ||
- (wc >= 0x1367 && wc <= 0x1368) ||
- wc == 0x166E ||
- (wc >= 0x1735 && wc <= 0x1736) ||
- wc == 0x1803 ||
- wc == 0x1809 ||
- (wc >= 0x1944 && wc <= 0x1945) ||
- (wc >= 0x1AA8 && wc <= 0x1AAB) ||
- (wc >= 0x1B5A && wc <= 0x1B5B) ||
- (wc >= 0x1B5E && wc <= 0x1B5F) ||
- (wc >= 0x1C3B && wc <= 0x1C3C) ||
- (wc >= 0x1C7E && wc <= 0x1C7F) ||
- (wc >= 0x203C && wc <= 0x203D) ||
- (wc >= 0x2047 && wc <= 0x2049) ||
- wc == 0x2E2E ||
- wc == 0x2E3C ||
- wc == 0x3002 ||
- wc == 0xA4FF ||
- (wc >= 0xA60E && wc <= 0xA60F) ||
- wc == 0xA6F3 ||
- wc == 0xA6F7 ||
- (wc >= 0xA876 && wc <= 0xA877) ||
- (wc >= 0xA8CE && wc <= 0xA8CF) ||
- wc == 0xA92F ||
- (wc >= 0xA9C8 && wc <= 0xA9C9) ||
- (wc >= 0xAA5D && wc <= 0xAA5F) ||
- (wc >= 0xAAF0 && wc <= 0xAAF1) ||
- wc == 0xABEB ||
- (wc >= 0xFE56 && wc <= 0xFE57) ||
- wc == 0xFF01 ||
- wc == 0xFF1F ||
- wc == 0xFF61 ||
- (wc >= 0x10A56 && wc <= 0x10A57) ||
- (wc >= 0x11047 && wc <= 0x11048) ||
- (wc >= 0x110BE && wc <= 0x110C1) ||
- (wc >= 0x11141 && wc <= 0x11143) ||
- (wc >= 0x111C5 && wc <= 0x111C6) ||
- wc == 0x111CD ||
- (wc >= 0x111DE && wc <= 0x111DF) ||
- (wc >= 0x11238 && wc <= 0x11239) ||
- (wc >= 0x1123B && wc <= 0x1123C) ||
- wc == 0x112A9 ||
- (wc >= 0x1144B && wc <= 0x1144C) ||
- (wc >= 0x115C2 && wc <= 0x115C3) ||
- (wc >= 0x115C9 && wc <= 0x115D7) ||
- (wc >= 0x11641 && wc <= 0x11642) ||
- (wc >= 0x1173C && wc <= 0x1173E) ||
- (wc >= 0x11C41 && wc <= 0x11C42) ||
- (wc >= 0x16A6E && wc <= 0x16A6F) ||
- wc == 0x16AF5 ||
- (wc >= 0x16B37 && wc <= 0x16B38) ||
- wc == 0x16B44 ||
- wc == 0x1BC9F ||
- wc == 0x1DA88)
+ if (_pango_is_STerm(wc))
SB_type = SB_STerm;
break;
diff --git a/pango/fonts.c b/pango/fonts.c
index 63e7c7b9..b46aef02 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1527,7 +1527,7 @@ parse_field (const char *what,
/**
* pango_parse_style:
* @str: a string to parse.
- * @style: (out caller-allocates): a #PangoStyle to store the result
+ * @style: (out): a #PangoStyle to store the result
* in.
* @warn: if %TRUE, issue a g_warning() on bad input.
*
@@ -1548,7 +1548,7 @@ pango_parse_style (const char *str,
/**
* pango_parse_variant:
* @str: a string to parse.
- * @variant: (out caller-allocates): a #PangoVariant to store the
+ * @variant: (out): a #PangoVariant to store the
* result in.
* @warn: if %TRUE, issue a g_warning() on bad input.
*
@@ -1569,7 +1569,7 @@ pango_parse_variant (const char *str,
/**
* pango_parse_weight:
* @str: a string to parse.
- * @weight: (out caller-allocates): a #PangoWeight to store the result
+ * @weight: (out): a #PangoWeight to store the result
* in.
* @warn: if %TRUE, issue a g_warning() on bad input.
*
@@ -1590,7 +1590,7 @@ pango_parse_weight (const char *str,
/**
* pango_parse_stretch:
* @str: a string to parse.
- * @stretch: (out caller-allocates): a #PangoStretch to store the
+ * @stretch: (out): a #PangoStretch to store the
* result in.
* @warn: if %TRUE, issue a g_warning() on bad input.
*
diff --git a/pango/meson.build b/pango/meson.build
index 9dd02bdc..6d35cc32 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -122,7 +122,7 @@ libpango = library(
pango_dep_sources = [pango_enum_h]
-build_gir = get_option('gir')
+build_gir = get_option('introspection')
if build_gir
gir_args = [
diff --git a/pango/pango-break-table.h b/pango/pango-break-table.h
new file mode 100644
index 00000000..2361ede5
--- /dev/null
+++ b/pango/pango-break-table.h
@@ -0,0 +1,532 @@
+/* == Start of generated table == */
+/*
+ * The following tables are generated by running:
+ *
+ * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent
+ *
+ * on files with these headers:
+ *
+ * # SentenceBreakProperty-11.0.0.txt
+ * # Date: 2018-03-15, 04:28:45 GMT
+ * # © 2018 Unicode®, Inc.
+ * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
+ * # For terms of use, see http://www.unicode.org/terms_of_use.html
+ * #
+ * # Unicode Character Database
+ * # For documentation, see http://www.unicode.org/reports/tr44/
+ *
+ * # IndicSyllabicCategory-11.0.0.txt
+ * # Date: 2018-05-21, 18:33:00 GMT [KW, RP]
+ * # © 2018 Unicode®, Inc.
+ * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
+ * # For terms of use, see http://www.unicode.org/terms_of_use.html
+ * #
+ * # For documentation, see UAX #44: Unicode Character Database,
+ * # at http://www.unicode.org/reports/tr44/
+ * #
+ * # This file defines the following property:
+ * #
+ * # Indic_Syllabic_Category enumerated property
+ * #
+ * # Scope: This property is aimed at two general problem
+ * # areas involving the analysis and processing of Indic scripts:
+ * #
+ * # 1. Specification of syllabic structure.
+ * # 2. Specification of segmentation rules.
+ * #
+ * # Both of these problem areas may benefit from having defined subtypes
+ * # of Indic script characters which are relevant to how Indic
+ * # syllables (or aksaras) are constructed. Note that rules for
+ * # syllabic structure in Indic scripts may differ significantly
+ * # from how phonological syllables are defined.
+ * #
+ * # Format:
+ * # Field 0 Unicode code point value or range of code point values
+ * # Field 1 Indic_Syllabic_Category property value
+ * #
+ * # Field 1 is followed by a comment field, starting with the number sign '#',
+ * # which shows the General_Category property value, the Unicode character name
+ * # or names, and, in lines with ranges of code points, the code point count in
+ * # square brackets.
+ * #
+ * # The scripts assessed as Indic in the structural sense used for the
+ * # Indic_Syllabic_Category are the following:
+ * #
+ * # Ahom, Balinese, Batak, Bengali, Bhaiksuki, Brahmi, Buginese, Buhid,
+ * # Chakma, Cham, Devanagari, Dogra, Grantha, Gujarati, Gunjala Gondi,
+ * # Gurmukhi, Hanunoo, Javanese, Kaithi, Kannada, Kayah Li, Kharoshthi,
+ * # Khmer, Khojki, Khudawadi, Lao, Lepcha, Limbu, Mahajani, Makasar,
+ * # Malayalam, Marchen, Masaram Gondi, Meetei Mayek, Modi, Multani,
+ * # Myanmar, Newa, New Tai Lue, Oriya, Phags-pa, Rejang, Saurashtra,
+ * # Sharada, Siddham, Sinhala, Soyombo, Sundanese, Syloti Nagri,
+ * # Tagalog, Tagbanwa, Tai Le, Tai Tham, Tai Viet, Takri, Tamil,
+ * # Telugu, Thai, Tibetan, Tirhuta, and Zanabazar Square.
+ * #
+ * # All characters for all other scripts not in that list
+ * # take the default value for this property, unless they
+ * # are individually listed in this data file.
+ * #
+ *
+ */
+
+#ifndef PANGO_BREAK_TABLE_H
+#define PANGO_BREAK_TABLE_H
+
+#include <glib.h>
+
+
+static inline gboolean
+_pango_is_STerm (gunichar wc)
+{
+ if ((wc >= 0x0021 && wc <= 0x1803))
+ {
+ if (wc == 0x0021 ||
+ wc == 0x003F || wc == 0x0589 || (wc >= 0x061E && wc <= 0x061F))
+ return TRUE;
+ if (wc == 0x06D4 ||
+ (wc >= 0x0700 && wc <= 0x0702) || wc == 0x07F9 || wc == 0x0837)
+ return TRUE;
+ if (wc == 0x0839 ||
+ (wc >= 0x083D && wc <= 0x083E) ||
+ (wc >= 0x0964 && wc <= 0x0965) || (wc >= 0x104A && wc <= 0x104B))
+ return TRUE;
+ if ((wc >= 0x1362 && wc <= 0x1803))
+ {
+ if (wc == 0x1362)
+ return TRUE;
+ if ((wc >= 0x1367 && wc <= 0x1368))
+ return TRUE;
+ if (wc == 0x166E)
+ return TRUE;
+ if ((wc >= 0x1735 && wc <= 0x1736) || wc == 0x1803)
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0x1809 && wc <= 0xA8CF))
+ {
+ if (wc == 0x1809 ||
+ (wc >= 0x1944 && wc <= 0x1945) ||
+ (wc >= 0x1AA8 && wc <= 0x1AAB) || (wc >= 0x1B5A && wc <= 0x1B5B))
+ return TRUE;
+ if ((wc >= 0x1B5E && wc <= 0x2049))
+ {
+ if ((wc >= 0x1B5E && wc <= 0x1B5F))
+ return TRUE;
+ if ((wc >= 0x1C3B && wc <= 0x1C3C))
+ return TRUE;
+ if ((wc >= 0x1C7E && wc <= 0x1C7F))
+ return TRUE;
+ if ((wc >= 0x203C && wc <= 0x203D) ||
+ (wc >= 0x2047 && wc <= 0x2049))
+ return TRUE;
+ return FALSE;
+ }
+ if (wc == 0x2E2E || wc == 0x2E3C || wc == 0x3002 || wc == 0xA4FF)
+ return TRUE;
+ if ((wc >= 0xA60E && wc <= 0xA8CF))
+ {
+ if ((wc >= 0xA60E && wc <= 0xA60F))
+ return TRUE;
+ if (wc == 0xA6F3)
+ return TRUE;
+ if (wc == 0xA6F7)
+ return TRUE;
+ if ((wc >= 0xA876 && wc <= 0xA877) ||
+ (wc >= 0xA8CE && wc <= 0xA8CF))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0xA92F && wc <= 0x111DF))
+ {
+ if (wc == 0xA92F ||
+ (wc >= 0xA9C8 && wc <= 0xA9C9) ||
+ (wc >= 0xAA5D && wc <= 0xAA5F) || (wc >= 0xAAF0 && wc <= 0xAAF1))
+ return TRUE;
+ if (wc == 0xABEB ||
+ (wc >= 0xFE56 && wc <= 0xFE57) || wc == 0xFF01 || wc == 0xFF1F)
+ return TRUE;
+ if (wc == 0xFF61 ||
+ (wc >= 0x10A56 && wc <= 0x10A57) ||
+ (wc >= 0x10F55 && wc <= 0x10F59) ||
+ (wc >= 0x11047 && wc <= 0x11048))
+ return TRUE;
+ if ((wc >= 0x110BE && wc <= 0x111DF))
+ {
+ if ((wc >= 0x110BE && wc <= 0x110C1))
+ return TRUE;
+ if ((wc >= 0x11141 && wc <= 0x11143))
+ return TRUE;
+ if ((wc >= 0x111C5 && wc <= 0x111C6))
+ return TRUE;
+ if (wc == 0x111CD || (wc >= 0x111DE && wc <= 0x111DF))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0x11238 && wc <= 0x1DA88))
+ {
+ if ((wc >= 0x11238 && wc <= 0x11239) ||
+ (wc >= 0x1123B && wc <= 0x1123C) ||
+ wc == 0x112A9 || (wc >= 0x1144B && wc <= 0x1144C))
+ return TRUE;
+ if ((wc >= 0x115C2 && wc <= 0x11A43))
+ {
+ if ((wc >= 0x115C2 && wc <= 0x115C3))
+ return TRUE;
+ if ((wc >= 0x115C9 && wc <= 0x115D7))
+ return TRUE;
+ if ((wc >= 0x11641 && wc <= 0x11642))
+ return TRUE;
+ if ((wc >= 0x1173C && wc <= 0x1173E) ||
+ (wc >= 0x11A42 && wc <= 0x11A43))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x11A9B && wc <= 0x11A9C) ||
+ (wc >= 0x11C41 && wc <= 0x11C42) ||
+ (wc >= 0x11EF7 && wc <= 0x11EF8) ||
+ (wc >= 0x16A6E && wc <= 0x16A6F))
+ return TRUE;
+ if ((wc >= 0x16AF5 && wc <= 0x1DA88))
+ {
+ if (wc == 0x16AF5)
+ return TRUE;
+ if ((wc >= 0x16B37 && wc <= 0x16B38) || wc == 0x16B44)
+ return TRUE;
+ if (wc == 0x16E98)
+ return TRUE;
+ if (wc == 0x1BC9F || wc == 0x1DA88)
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ return FALSE;
+}
+
+static inline gboolean
+_pango_is_Virama (gunichar wc)
+{
+ if ((wc >= 0x094D && wc <= 0x0BCD))
+ {
+ if (wc == 0x094D)
+ return TRUE;
+ if (wc == 0x09CD || wc == 0x0A4D)
+ return TRUE;
+ if (wc == 0x0ACD)
+ return TRUE;
+ if (wc == 0x0B4D || wc == 0x0BCD)
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x0C4D && wc <= 0xA8C4))
+ {
+ if (wc == 0x0C4D)
+ return TRUE;
+ if (wc == 0x0CCD || wc == 0x0D4D)
+ return TRUE;
+ if (wc == 0x0DCA)
+ return TRUE;
+ if (wc == 0x1B44 || wc == 0xA8C4)
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0xA9C0 && wc <= 0x1134D))
+ {
+ if (wc == 0xA9C0)
+ return TRUE;
+ if (wc == 0x11046 || wc == 0x110B9)
+ return TRUE;
+ if (wc == 0x111C0)
+ return TRUE;
+ if (wc == 0x11235 || wc == 0x1134D)
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x11442 && wc <= 0x11C3F))
+ {
+ if (wc == 0x11442)
+ return TRUE;
+ if (wc == 0x114C2 || wc == 0x115BF)
+ return TRUE;
+ if (wc == 0x1163F)
+ return TRUE;
+ if (wc == 0x116B6 || wc == 0x11839 || wc == 0x11C3F)
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+}
+
+static inline gboolean
+_pango_is_Vowel_Dependent (gunichar wc)
+{
+ if ((wc >= 0x093A && wc <= 0x0C63))
+ {
+ if ((wc >= 0x093A && wc <= 0x09C8))
+ {
+ if ((wc >= 0x093A && wc <= 0x093B))
+ return TRUE;
+ if ((wc >= 0x093E && wc <= 0x094C) ||
+ (wc >= 0x094E && wc <= 0x094F))
+ return TRUE;
+ if ((wc >= 0x0955 && wc <= 0x0957))
+ return TRUE;
+ if ((wc >= 0x0962 && wc <= 0x0963) ||
+ (wc >= 0x09BE && wc <= 0x09C4) ||
+ (wc >= 0x09C7 && wc <= 0x09C8))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x09CB && wc <= 0x0AC9))
+ {
+ if ((wc >= 0x09CB && wc <= 0x09CC) || wc == 0x09D7)
+ return TRUE;
+ if ((wc >= 0x09E2 && wc <= 0x09E3) ||
+ (wc >= 0x0A3E && wc <= 0x0A42))
+ return TRUE;
+ if ((wc >= 0x0A47 && wc <= 0x0A48) ||
+ (wc >= 0x0A4B && wc <= 0x0A4C))
+ return TRUE;
+ if ((wc >= 0x0ABE && wc <= 0x0AC5) ||
+ (wc >= 0x0AC7 && wc <= 0x0AC9))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x0ACB && wc <= 0x0B63))
+ {
+ if ((wc >= 0x0ACB && wc <= 0x0ACC))
+ return TRUE;
+ if ((wc >= 0x0AE2 && wc <= 0x0AE3) ||
+ (wc >= 0x0B3E && wc <= 0x0B44))
+ return TRUE;
+ if ((wc >= 0x0B47 && wc <= 0x0B48))
+ return TRUE;
+ if ((wc >= 0x0B4B && wc <= 0x0B4C) ||
+ (wc >= 0x0B56 && wc <= 0x0B57) ||
+ (wc >= 0x0B62 && wc <= 0x0B63))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x0BBE && wc <= 0x0C63))
+ {
+ if ((wc >= 0x0BBE && wc <= 0x0BC2) ||
+ (wc >= 0x0BC6 && wc <= 0x0BC8))
+ return TRUE;
+ if ((wc >= 0x0BCA && wc <= 0x0BCC) || wc == 0x0BD7)
+ return TRUE;
+ if ((wc >= 0x0C3E && wc <= 0x0C44) ||
+ (wc >= 0x0C46 && wc <= 0x0C48))
+ return TRUE;
+ if ((wc >= 0x0C4A && wc <= 0x0C4C) ||
+ (wc >= 0x0C55 && wc <= 0x0C56) ||
+ (wc >= 0x0C62 && wc <= 0x0C63))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0x0CBE && wc <= 0x1733))
+ {
+ if ((wc >= 0x0CBE && wc <= 0x0D48))
+ {
+ if ((wc >= 0x0CBE && wc <= 0x0CC4))
+ return TRUE;
+ if ((wc >= 0x0CC6 && wc <= 0x0CC8) ||
+ (wc >= 0x0CCA && wc <= 0x0CCC))
+ return TRUE;
+ if ((wc >= 0x0CD5 && wc <= 0x0CD6))
+ return TRUE;
+ if ((wc >= 0x0CE2 && wc <= 0x0CE3) ||
+ (wc >= 0x0D3E && wc <= 0x0D44) ||
+ (wc >= 0x0D46 && wc <= 0x0D48))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x0D4A && wc <= 0x0E39))
+ {
+ if ((wc >= 0x0D4A && wc <= 0x0D4C) || wc == 0x0D57)
+ return TRUE;
+ if ((wc >= 0x0D62 && wc <= 0x0D63) ||
+ (wc >= 0x0DCF && wc <= 0x0DD4))
+ return TRUE;
+ if (wc == 0x0DD6 || (wc >= 0x0DD8 && wc <= 0x0DDF))
+ return TRUE;
+ if ((wc >= 0x0DF2 && wc <= 0x0DF3) ||
+ (wc >= 0x0E30 && wc <= 0x0E39))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x0E40 && wc <= 0x0F81))
+ {
+ if ((wc >= 0x0E40 && wc <= 0x0E45))
+ return TRUE;
+ if (wc == 0x0E47 || (wc >= 0x0EB0 && wc <= 0x0EB9))
+ return TRUE;
+ if (wc == 0x0EBB)
+ return TRUE;
+ if ((wc >= 0x0EC0 && wc <= 0x0EC4) ||
+ (wc >= 0x0F71 && wc <= 0x0F7D) ||
+ (wc >= 0x0F80 && wc <= 0x0F81))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x102B && wc <= 0x1733))
+ {
+ if ((wc >= 0x102B && wc <= 0x1035) ||
+ (wc >= 0x1056 && wc <= 0x1059))
+ return TRUE;
+ if (wc == 0x1062 || (wc >= 0x1067 && wc <= 0x1068))
+ return TRUE;
+ if ((wc >= 0x1071 && wc <= 0x1074) ||
+ (wc >= 0x1083 && wc <= 0x1086))
+ return TRUE;
+ if ((wc >= 0x109C && wc <= 0x109D) ||
+ (wc >= 0x1712 && wc <= 0x1713) ||
+ (wc >= 0x1732 && wc <= 0x1733))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0x1752 && wc <= 0x111BF))
+ {
+ if ((wc >= 0x1752 && wc <= 0x19C0))
+ {
+ if ((wc >= 0x1752 && wc <= 0x1753))
+ return TRUE;
+ if ((wc >= 0x1772 && wc <= 0x1773) ||
+ (wc >= 0x17B6 && wc <= 0x17C5))
+ return TRUE;
+ if (wc == 0x17C8)
+ return TRUE;
+ if ((wc >= 0x1920 && wc <= 0x1928) ||
+ wc == 0x193A || (wc >= 0x19B0 && wc <= 0x19C0))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x1A17 && wc <= 0xA8C3))
+ {
+ if ((wc >= 0x1A17 && wc <= 0x1A1B) ||
+ (wc >= 0x1A61 && wc <= 0x1A73))
+ return TRUE;
+ if ((wc >= 0x1B35 && wc <= 0x1B43) ||
+ (wc >= 0x1BA4 && wc <= 0x1BA9))
+ return TRUE;
+ if ((wc >= 0x1BE7 && wc <= 0x1BEF) ||
+ (wc >= 0x1C26 && wc <= 0x1C2C))
+ return TRUE;
+ if ((wc >= 0xA823 && wc <= 0xA827) ||
+ (wc >= 0xA8B5 && wc <= 0xA8C3))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0xA8FF && wc <= 0xAAEF))
+ {
+ if (wc == 0xA8FF)
+ return TRUE;
+ if ((wc >= 0xA947 && wc <= 0xA94E) ||
+ (wc >= 0xA9B4 && wc <= 0xA9BC))
+ return TRUE;
+ if (wc == 0xA9E5)
+ return TRUE;
+ if ((wc >= 0xAA29 && wc <= 0xAA32) ||
+ (wc >= 0xAAB0 && wc <= 0xAABE) ||
+ (wc >= 0xAAEB && wc <= 0xAAEF))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0xABE3 && wc <= 0x111BF))
+ {
+ if ((wc >= 0xABE3 && wc <= 0xABEA) ||
+ (wc >= 0x10A01 && wc <= 0x10A03))
+ return TRUE;
+ if ((wc >= 0x10A05 && wc <= 0x10A06) ||
+ (wc >= 0x10A0C && wc <= 0x10A0D))
+ return TRUE;
+ if ((wc >= 0x11038 && wc <= 0x11045) ||
+ (wc >= 0x110B0 && wc <= 0x110B8))
+ return TRUE;
+ if ((wc >= 0x11127 && wc <= 0x11132) ||
+ (wc >= 0x11145 && wc <= 0x11146) ||
+ (wc >= 0x111B3 && wc <= 0x111BF))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ if ((wc >= 0x111CB && wc <= 0x11EF6))
+ {
+ if ((wc >= 0x111CB && wc <= 0x11363))
+ {
+ if ((wc >= 0x111CB && wc <= 0x111CC) ||
+ (wc >= 0x1122C && wc <= 0x11233))
+ return TRUE;
+ if ((wc >= 0x112E0 && wc <= 0x112E8) ||
+ (wc >= 0x1133E && wc <= 0x11344))
+ return TRUE;
+ if ((wc >= 0x11347 && wc <= 0x11348) ||
+ (wc >= 0x1134B && wc <= 0x1134C))
+ return TRUE;
+ if (wc == 0x11357 || (wc >= 0x11362 && wc <= 0x11363))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x11435 && wc <= 0x116B5))
+ {
+ if ((wc >= 0x11435 && wc <= 0x11441) ||
+ (wc >= 0x114B0 && wc <= 0x114BE))
+ return TRUE;
+ if ((wc >= 0x115AF && wc <= 0x115B5) ||
+ (wc >= 0x115B8 && wc <= 0x115BB))
+ return TRUE;
+ if ((wc >= 0x115DC && wc <= 0x115DD) ||
+ (wc >= 0x11630 && wc <= 0x1163C))
+ return TRUE;
+ if (wc == 0x11640 || (wc >= 0x116AD && wc <= 0x116B5))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x11720 && wc <= 0x11D36))
+ {
+ if ((wc >= 0x11720 && wc <= 0x1172A) ||
+ (wc >= 0x1182C && wc <= 0x11836))
+ return TRUE;
+ if ((wc >= 0x11A01 && wc <= 0x11A0A) ||
+ (wc >= 0x11A51 && wc <= 0x11A5B))
+ return TRUE;
+ if ((wc >= 0x11C2F && wc <= 0x11C36) ||
+ (wc >= 0x11C38 && wc <= 0x11C3B))
+ return TRUE;
+ if ((wc >= 0x11CB0 && wc <= 0x11CB4) ||
+ (wc >= 0x11D31 && wc <= 0x11D36))
+ return TRUE;
+ return FALSE;
+ }
+ if ((wc >= 0x11D3A && wc <= 0x11EF6))
+ {
+ if (wc == 0x11D3A || (wc >= 0x11D3C && wc <= 0x11D3D))
+ return TRUE;
+ if (wc == 0x11D3F || wc == 0x11D43)
+ return TRUE;
+ if ((wc >= 0x11D8A && wc <= 0x11D8E) ||
+ (wc >= 0x11D90 && wc <= 0x11D91))
+ return TRUE;
+ if ((wc >= 0x11D93 && wc <= 0x11D94) ||
+ (wc >= 0x11EF3 && wc <= 0x11EF6))
+ return TRUE;
+ return FALSE;
+ }
+ return FALSE;
+ }
+ return FALSE;
+}
+
+#endif /* PANGO_BREAK_TABLE_H */
+
+/* == End of generated table == */
diff --git a/pango/pango-context.c b/pango/pango-context.c
index e21b490f..6a1a81e2 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1447,11 +1447,11 @@ string_from_script (PangoScript script)
static GEnumClass *class = NULL; /* MT-safe */
GEnumValue *value;
if (g_once_init_enter (&class))
- g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_SCRIPT));
+ g_once_init_leave(&class, (gpointer)g_type_class_ref (G_TYPE_UNICODE_SCRIPT));
value = g_enum_get_value (class, script);
if (!value)
- return string_from_script (PANGO_SCRIPT_INVALID_CODE);
+ return string_from_script (G_UNICODE_SCRIPT_INVALID_CODE);
return value->value_nick;
}
diff --git a/pango/pango-emoji-private.h b/pango/pango-emoji-private.h
index f0d3b7f9..928ad885 100644
--- a/pango/pango-emoji-private.h
+++ b/pango/pango-emoji-private.h
@@ -25,6 +25,9 @@
#include <glib.h>
gboolean
+_pango_Is_Emoji_Base_Character (gunichar ch);
+
+gboolean
_pango_Is_Emoji_Extended_Pictographic (gunichar ch);
typedef struct _PangoEmojiIter PangoEmojiIter;
diff --git a/pango/pango-emoji.c b/pango/pango-emoji.c
index c0e0de60..e316b370 100644
--- a/pango/pango-emoji.c
+++ b/pango/pango-emoji.c
@@ -95,6 +95,12 @@ DEFINE_pango_Is_(Emoji_Modifier_Base)
DEFINE_pango_Is_(Extended_Pictographic)
gboolean
+_pango_Is_Emoji_Base_Character (gunichar ch)
+{
+ return _pango_Is_Emoji (ch);
+}
+
+gboolean
_pango_Is_Emoji_Extended_Pictographic (gunichar ch)
{
return _pango_Is_Extended_Pictographic (ch);
diff --git a/pango/pango-font.h b/pango/pango-font.h
index 1b85c386..90127b84 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -198,11 +198,11 @@ typedef enum {
* The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
*/
#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
-#define PANGO_SCALE_X_SMALL ((double)0.6444444444444)
+#define PANGO_SCALE_X_SMALL ((double)0.6944444444444)
#define PANGO_SCALE_SMALL ((double)0.8333333333333)
#define PANGO_SCALE_MEDIUM ((double)1.0)
#define PANGO_SCALE_LARGE ((double)1.2)
-#define PANGO_SCALE_X_LARGE ((double)1.4399999999999)
+#define PANGO_SCALE_X_LARGE ((double)1.44)
#define PANGO_SCALE_XX_LARGE ((double)1.728)
/*
diff --git a/pango/pango-language-sample-table.h b/pango/pango-language-sample-table.h
index 19614d8c..b0cf414d 100644
--- a/pango/pango-language-sample-table.h
+++ b/pango/pango-language-sample-table.h
@@ -263,9 +263,9 @@ LANGUAGE(
)
LANGUAGE(
hr /* Croatian */,
- GLASS,
- "Ja mogu jesti staklo i ne boli me."
- /* I can eat glass and it doesn't hurt me. */
+ MISC,
+ "Deblji krojač: zgužvah smeđ filc u tanjušni džepić."
+ /* A fatter taylor: I’ve crumpled a brown felt in a slim pocket. */
)
LANGUAGE(
hu /* Hungarian */,
diff --git a/pango/pango-language.c b/pango/pango-language.c
index 725559fa..575d4652 100644
--- a/pango/pango-language.c
+++ b/pango/pango-language.c
@@ -638,6 +638,10 @@ pango_language_get_sample_string (PangoLanguage *language)
* The pango_language_includes_script() function uses this function
* internally.
*
+ * Note: while the return value is declared as PangoScript, the
+ * returned values are from the GUnicodeScript enumeration, which
+ * may have more values. Callers need to handle unknown values.
+ *
* Return value: (array length=num_scripts) (nullable): An array of
* #PangoScript values, with the number of entries in the array stored
* in @num_scripts, or %NULL if Pango does not have any information
@@ -677,7 +681,7 @@ pango_language_get_scripts (PangoLanguage *language,
*num_scripts = j;
}
- return script_for_lang->scripts;
+ return (const PangoScript *) script_for_lang->scripts;
}
/**
diff --git a/pango/pango-ot-tag.c b/pango/pango-ot-tag.c
index 610b59d7..1cb58c88 100644
--- a/pango/pango-ot-tag.c
+++ b/pango/pango-ot-tag.c
@@ -46,9 +46,18 @@
PangoOTTag
pango_ot_tag_from_script (PangoScript script)
{
- hb_tag_t tag1, tag2;
- hb_ot_tags_from_script (hb_glib_script_to_script (script), &tag1, &tag2);
- return (PangoOTTag) tag1;
+ unsigned int count = 1;
+ hb_tag_t tags[1];
+
+ hb_ot_tags_from_script_and_language (hb_glib_script_to_script (script),
+ HB_LANGUAGE_INVALID,
+ &count,
+ tags,
+ NULL, NULL);
+ if (count > 0)
+ return (PangoOTTag) tags[0];
+
+ return PANGO_OT_TAG_DEFAULT_SCRIPT;
}
/**
@@ -94,7 +103,18 @@ pango_ot_tag_to_script (PangoOTTag script_tag)
PangoOTTag
pango_ot_tag_from_language (PangoLanguage *language)
{
- return (PangoOTTag) hb_ot_tag_from_language (hb_language_from_string (pango_language_to_string (language), -1));
+ unsigned int count = 1;
+ hb_tag_t tags[1];
+
+ hb_ot_tags_from_script_and_language (HB_SCRIPT_UNKNOWN,
+ hb_language_from_string (pango_language_to_string (language), -1),
+ NULL, NULL,
+ &count, tags);
+
+ if (count > 0)
+ return (PangoOTTag) tags[0];
+
+ return PANGO_OT_TAG_DEFAULT_LANGUAGE;
}
/**
diff --git a/pango/pango-script-lang-table.h b/pango/pango-script-lang-table.h
index 05af016e..9f6e0b42 100644
--- a/pango/pango-script-lang-table.h
+++ b/pango/pango-script-lang-table.h
@@ -1,259 +1,261 @@
/* pango-script-lang-table.h:
*
- * Generated by gen-script-for-lang.c
- * Date: 2015-12-14
- * Source: fontconfig-2.11.94
+ * Generated by ../tools/gen-script-for-lang.c
+ * Date: 2019-06-06
+ * Source: fontconfig-2.13.1
*
* Do not edit.
*/
typedef struct _PangoScriptForLang {
- const char lang[7];
- PangoScript scripts[3];
+ const char lang[9];
+ GUnicodeScript scripts[3];
} PangoScriptForLang;
static const PangoScriptForLang pango_script_for_lang[] = {
- { "aa", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "ab", { PANGO_SCRIPT_CYRILLIC/*90*/ } },
- { "af", { PANGO_SCRIPT_LATIN/*69*/ } },
- { "ak", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "am", { PANGO_SCRIPT_ETHIOPIC/*264*/ } },
- { "an", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "ar", { PANGO_SCRIPT_ARABIC/*36*/ } },
- { "as", { PANGO_SCRIPT_BENGALI/*64*/ } },
- { "ast", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "av", { PANGO_SCRIPT_CYRILLIC/*67*/ } },
- { "ay", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "az-az", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "az-ir", { PANGO_SCRIPT_ARABIC/*38*/ } },
- { "ba", { PANGO_SCRIPT_CYRILLIC/*82*/ } },
- { "be", { PANGO_SCRIPT_CYRILLIC/*68*/ } },
- { "ber-dz", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ber-ma", { PANGO_SCRIPT_TIFINAGH/*32*/ } },
- { "bg", { PANGO_SCRIPT_CYRILLIC/*60*/ } },
- { "bh", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "bho", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "bi", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "bin", { PANGO_SCRIPT_LATIN/*76*/ } },
- { "bm", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "bn", { PANGO_SCRIPT_BENGALI/*63*/ } },
- { "bo", { PANGO_SCRIPT_TIBETAN/*95*/ } },
- { "br", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "brx", { PANGO_SCRIPT_DEVANAGARI/*78*/ } },
- { "bs", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "bua", { PANGO_SCRIPT_CYRILLIC/*70*/ } },
- { "byn", { PANGO_SCRIPT_ETHIOPIC/*255*/ } },
- { "ca", { PANGO_SCRIPT_LATIN/*74*/ } },
- { "ce", { PANGO_SCRIPT_CYRILLIC/*67*/ } },
- { "ch", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "chm", { PANGO_SCRIPT_CYRILLIC/*76*/ } },
- { "chr", { PANGO_SCRIPT_CHEROKEE/*85*/ } },
- { "co", { PANGO_SCRIPT_LATIN/*84*/ } },
- { "crh", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "cs", { PANGO_SCRIPT_LATIN/*82*/ } },
- { "csb", { PANGO_SCRIPT_LATIN/*74*/ } },
- { "cu", { PANGO_SCRIPT_CYRILLIC/*103*/ } },
- { "cv", { PANGO_SCRIPT_CYRILLIC/*72*/, PANGO_SCRIPT_LATIN/*2*/ } },
- { "cy", { PANGO_SCRIPT_LATIN/*78*/ } },
- { "da", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "de", { PANGO_SCRIPT_LATIN/*59*/ } },
- { "doi", { PANGO_SCRIPT_DEVANAGARI/*81*/ } },
- { "dv", { PANGO_SCRIPT_THAANA/*49*/ } },
- { "dz", { PANGO_SCRIPT_TIBETAN/*95*/ } },
- { "ee", { PANGO_SCRIPT_LATIN/*96*/ } },
- { "el", { PANGO_SCRIPT_GREEK/*69*/ } },
- { "en", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "eo", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "es", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "et", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "eu", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "fa", { PANGO_SCRIPT_ARABIC/*38*/ } },
- { "fat", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ff", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "fi", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "fil", { PANGO_SCRIPT_LATIN/*84*/ } },
- { "fj", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "fo", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "fr", { PANGO_SCRIPT_LATIN/*84*/ } },
- { "fur", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "fy", { PANGO_SCRIPT_LATIN/*75*/ } },
- { "ga", { PANGO_SCRIPT_LATIN/*80*/ } },
- { "gd", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "gez", { PANGO_SCRIPT_ETHIOPIC/*218*/ } },
- { "gl", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "gn", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "gu", { PANGO_SCRIPT_GUJARATI/*68*/ } },
- { "gv", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "ha", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "haw", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "he", { PANGO_SCRIPT_HEBREW/*27*/ } },
- { "hi", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "hne", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "ho", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "hr", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "hsb", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "ht", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "hu", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "hy", { PANGO_SCRIPT_ARMENIAN/*77*/ } },
- { "hz", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "ia", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "id", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "ie", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "ig", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "ii", { PANGO_SCRIPT_YI/*1165*/ } },
- { "ik", { PANGO_SCRIPT_CYRILLIC/*68*/ } },
- { "io", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "is", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "it", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "iu", { PANGO_SCRIPT_CANADIAN_ABORIGINAL/*161*/ } },
- { "ja", { PANGO_SCRIPT_HAN/*2134*/, PANGO_SCRIPT_KATAKANA/*88*/, PANGO_SCRIPT_HIRAGANA/*85*/ } },
- { "jv", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "ka", { PANGO_SCRIPT_GEORGIAN/*33*/ } },
- { "kaa", { PANGO_SCRIPT_CYRILLIC/*78*/ } },
- { "kab", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ki", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "kj", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "kk", { PANGO_SCRIPT_CYRILLIC/*77*/ } },
- { "kl", { PANGO_SCRIPT_LATIN/*81*/ } },
- { "km", { PANGO_SCRIPT_KHMER/*63*/ } },
- { "kn", { PANGO_SCRIPT_KANNADA/*70*/ } },
- { "ko", { PANGO_SCRIPT_HANGUL/*2442*/ } },
- { "kok", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "kr", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "ks", { PANGO_SCRIPT_ARABIC/*33*/ } },
- { "ku-am", { PANGO_SCRIPT_CYRILLIC/*64*/ } },
- { "ku-iq", { PANGO_SCRIPT_ARABIC/*32*/ } },
- { "ku-ir", { PANGO_SCRIPT_ARABIC/*32*/ } },
- { "ku-tr", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "kum", { PANGO_SCRIPT_CYRILLIC/*66*/ } },
- { "kv", { PANGO_SCRIPT_CYRILLIC/*70*/ } },
- { "kw", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "kwm", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "ky", { PANGO_SCRIPT_CYRILLIC/*70*/ } },
- { "la", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "lah", { PANGO_SCRIPT_ARABIC/*27*/ } },
- { "lb", { PANGO_SCRIPT_LATIN/*75*/ } },
- { "lez", { PANGO_SCRIPT_CYRILLIC/*67*/ } },
- { "lg", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "li", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "ln", { PANGO_SCRIPT_LATIN/*78*/ } },
- { "lo", { PANGO_SCRIPT_LAO/*55*/ } },
- { "lt", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "lv", { PANGO_SCRIPT_LATIN/*78*/ } },
- { "mai", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "mg", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "mh", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "mi", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "mk", { PANGO_SCRIPT_CYRILLIC/*42*/ } },
- { "ml", { PANGO_SCRIPT_MALAYALAM/*68*/ } },
- { "mn-cn", { PANGO_SCRIPT_MONGOLIAN/*130*/ } },
- { "mn-mn", { PANGO_SCRIPT_CYRILLIC/*70*/ } },
- { "mni", { PANGO_SCRIPT_BENGALI/*75*/ } },
- { "mo", { PANGO_SCRIPT_CYRILLIC/*66*/, PANGO_SCRIPT_LATIN/*62*/ } },
- { "mr", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "ms", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "mt", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "my", { PANGO_SCRIPT_MYANMAR/*48*/ } },
- { "na", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "nb", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "nds", { PANGO_SCRIPT_LATIN/*59*/ } },
- { "ne", { PANGO_SCRIPT_DEVANAGARI/*70*/ } },
- { "ng", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "nl", { PANGO_SCRIPT_LATIN/*82*/ } },
- { "nn", { PANGO_SCRIPT_LATIN/*76*/ } },
- { "no", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "nqo", { PANGO_SCRIPT_NKO/*59*/ } },
- { "nr", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "nso", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "nv", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ny", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "oc", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "om", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "or", { PANGO_SCRIPT_ORIYA/*68*/ } },
- { "os", { PANGO_SCRIPT_CYRILLIC/*66*/ } },
- { "ota", { PANGO_SCRIPT_ARABIC/*37*/ } },
- { "pa", { PANGO_SCRIPT_GURMUKHI/*63*/ } },
- { "pa-pk", { PANGO_SCRIPT_ARABIC/*27*/ } },
- { "pap-an", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "pap-aw", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "pl", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ps-af", { PANGO_SCRIPT_ARABIC/*49*/ } },
- { "ps-pk", { PANGO_SCRIPT_ARABIC/*49*/ } },
- { "pt", { PANGO_SCRIPT_LATIN/*82*/ } },
- { "qu", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "quz", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "rm", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "rn", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "ro", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "ru", { PANGO_SCRIPT_CYRILLIC/*66*/ } },
- { "rw", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "sa", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "sah", { PANGO_SCRIPT_CYRILLIC/*76*/ } },
- { "sat", { PANGO_SCRIPT_DEVANAGARI/*68*/ } },
- { "sc", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "sco", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "sd", { PANGO_SCRIPT_ARABIC/*54*/ } },
- { "se", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "sel", { PANGO_SCRIPT_CYRILLIC/*66*/ } },
- { "sg", { PANGO_SCRIPT_LATIN/*72*/ } },
- { "sh", { PANGO_SCRIPT_CYRILLIC/*94*/, PANGO_SCRIPT_LATIN/*62*/ } },
- { "shs", { PANGO_SCRIPT_LATIN/*46*/ } },
- { "si", { PANGO_SCRIPT_SINHALA/*73*/ } },
- { "sid", { PANGO_SCRIPT_ETHIOPIC/*281*/ } },
- { "sk", { PANGO_SCRIPT_LATIN/*86*/ } },
- { "sl", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "sm", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "sma", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "smj", { PANGO_SCRIPT_LATIN/*60*/ } },
- { "smn", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "sms", { PANGO_SCRIPT_LATIN/*80*/ } },
- { "sn", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "so", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "sq", { PANGO_SCRIPT_LATIN/*56*/ } },
- { "sr", { PANGO_SCRIPT_CYRILLIC/*60*/ } },
- { "ss", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "st", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "su", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "sv", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "sw", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "syr", { PANGO_SCRIPT_SYRIAC/*45*/ } },
- { "ta", { PANGO_SCRIPT_TAMIL/*48*/ } },
- { "te", { PANGO_SCRIPT_TELUGU/*70*/ } },
- { "tg", { PANGO_SCRIPT_CYRILLIC/*78*/ } },
- { "th", { PANGO_SCRIPT_THAI/*73*/ } },
- { "ti-er", { PANGO_SCRIPT_ETHIOPIC/*255*/ } },
- { "ti-et", { PANGO_SCRIPT_ETHIOPIC/*281*/ } },
- { "tig", { PANGO_SCRIPT_ETHIOPIC/*221*/ } },
- { "tk", { PANGO_SCRIPT_LATIN/*68*/ } },
- { "tl", { PANGO_SCRIPT_LATIN/*84*/ } },
- { "tn", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "to", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "tr", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ts", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "tt", { PANGO_SCRIPT_CYRILLIC/*76*/ } },
- { "tw", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "ty", { PANGO_SCRIPT_LATIN/*64*/ } },
- { "tyv", { PANGO_SCRIPT_CYRILLIC/*70*/ } },
- { "ug", { PANGO_SCRIPT_ARABIC/*33*/ } },
- { "uk", { PANGO_SCRIPT_CYRILLIC/*72*/ } },
- { "ur", { PANGO_SCRIPT_ARABIC/*27*/ } },
- { "uz", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "ve", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "vi", { PANGO_SCRIPT_LATIN/*186*/ } },
- { "vo", { PANGO_SCRIPT_LATIN/*54*/ } },
- { "vot", { PANGO_SCRIPT_LATIN/*62*/ } },
- { "wa", { PANGO_SCRIPT_LATIN/*70*/ } },
- { "wal", { PANGO_SCRIPT_ETHIOPIC/*281*/ } },
- { "wen", { PANGO_SCRIPT_LATIN/*76*/ } },
- { "wo", { PANGO_SCRIPT_LATIN/*66*/ } },
- { "xh", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "yap", { PANGO_SCRIPT_LATIN/*58*/ } },
- { "yi", { PANGO_SCRIPT_HEBREW/*27*/ } },
- { "yo", { PANGO_SCRIPT_LATIN/*114*/ } },
- { "za", { PANGO_SCRIPT_LATIN/*52*/ } },
- { "zh-cn", { PANGO_SCRIPT_HAN/*6763*/ } },
- { "zh-hk", { PANGO_SCRIPT_HAN/*1083*/ } },
- { "zh-mo", { PANGO_SCRIPT_HAN/*1083*/ } },
- { "zh-sg", { PANGO_SCRIPT_HAN/*6763*/ } },
- { "zh-tw", { PANGO_SCRIPT_HAN/*13063*/ } },
- { "zu", { PANGO_SCRIPT_LATIN/*52*/ } }
+ { "aa", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "ab", { G_UNICODE_SCRIPT_CYRILLIC/*90*/ } },
+ { "af", { G_UNICODE_SCRIPT_LATIN/*69*/ } },
+ { "ak", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "am", { G_UNICODE_SCRIPT_ETHIOPIC/*264*/ } },
+ { "an", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "ar", { G_UNICODE_SCRIPT_ARABIC/*36*/ } },
+ { "as", { G_UNICODE_SCRIPT_BENGALI/*64*/ } },
+ { "ast", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "av", { G_UNICODE_SCRIPT_CYRILLIC/*67*/ } },
+ { "ay", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "az-az", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "az-ir", { G_UNICODE_SCRIPT_ARABIC/*38*/ } },
+ { "ba", { G_UNICODE_SCRIPT_CYRILLIC/*82*/ } },
+ { "be", { G_UNICODE_SCRIPT_CYRILLIC/*68*/ } },
+ { "ber-dz", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ber-ma", { G_UNICODE_SCRIPT_TIFINAGH/*32*/ } },
+ { "bg", { G_UNICODE_SCRIPT_CYRILLIC/*60*/ } },
+ { "bh", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "bho", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "bi", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "bin", { G_UNICODE_SCRIPT_LATIN/*76*/ } },
+ { "bm", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "bn", { G_UNICODE_SCRIPT_BENGALI/*63*/ } },
+ { "bo", { G_UNICODE_SCRIPT_TIBETAN/*95*/ } },
+ { "br", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "brx", { G_UNICODE_SCRIPT_DEVANAGARI/*78*/ } },
+ { "bs", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "bua", { G_UNICODE_SCRIPT_CYRILLIC/*70*/ } },
+ { "byn", { G_UNICODE_SCRIPT_ETHIOPIC/*255*/ } },
+ { "ca", { G_UNICODE_SCRIPT_LATIN/*74*/ } },
+ { "ce", { G_UNICODE_SCRIPT_CYRILLIC/*67*/ } },
+ { "ch", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "chm", { G_UNICODE_SCRIPT_CYRILLIC/*76*/ } },
+ { "chr", { G_UNICODE_SCRIPT_CHEROKEE/*85*/ } },
+ { "co", { G_UNICODE_SCRIPT_LATIN/*84*/ } },
+ { "crh", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "cs", { G_UNICODE_SCRIPT_LATIN/*82*/ } },
+ { "csb", { G_UNICODE_SCRIPT_LATIN/*74*/ } },
+ { "cu", { G_UNICODE_SCRIPT_CYRILLIC/*103*/ } },
+ { "cv", { G_UNICODE_SCRIPT_CYRILLIC/*72*/, G_UNICODE_SCRIPT_LATIN/*2*/ } },
+ { "cy", { G_UNICODE_SCRIPT_LATIN/*78*/ } },
+ { "da", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "de", { G_UNICODE_SCRIPT_LATIN/*59*/ } },
+ { "doi", { G_UNICODE_SCRIPT_DEVANAGARI/*81*/ } },
+ { "dv", { G_UNICODE_SCRIPT_THAANA/*49*/ } },
+ { "dz", { G_UNICODE_SCRIPT_TIBETAN/*95*/ } },
+ { "ee", { G_UNICODE_SCRIPT_LATIN/*96*/ } },
+ { "el", { G_UNICODE_SCRIPT_GREEK/*69*/ } },
+ { "en", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "eo", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "es", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "et", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "eu", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "fa", { G_UNICODE_SCRIPT_ARABIC/*38*/ } },
+ { "fat", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ff", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "fi", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "fil", { G_UNICODE_SCRIPT_LATIN/*84*/ } },
+ { "fj", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "fo", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "fr", { G_UNICODE_SCRIPT_LATIN/*84*/ } },
+ { "fur", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "fy", { G_UNICODE_SCRIPT_LATIN/*75*/ } },
+ { "ga", { G_UNICODE_SCRIPT_LATIN/*80*/ } },
+ { "gd", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "gez", { G_UNICODE_SCRIPT_ETHIOPIC/*218*/ } },
+ { "gl", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "gn", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "gu", { G_UNICODE_SCRIPT_GUJARATI/*68*/ } },
+ { "gv", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "ha", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "haw", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "he", { G_UNICODE_SCRIPT_HEBREW/*27*/ } },
+ { "hi", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "hne", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "ho", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "hr", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "hsb", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "ht", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "hu", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "hy", { G_UNICODE_SCRIPT_ARMENIAN/*77*/ } },
+ { "hz", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "ia", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "id", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "ie", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "ig", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "ii", { G_UNICODE_SCRIPT_YI/*1165*/ } },
+ { "ik", { G_UNICODE_SCRIPT_CYRILLIC/*68*/ } },
+ { "io", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "is", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "it", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "iu", { G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL/*161*/ } },
+ { "ja", { G_UNICODE_SCRIPT_HAN/*2134*/, G_UNICODE_SCRIPT_KATAKANA/*88*/, G_UNICODE_SCRIPT_HIRAGANA/*85*/ } },
+ { "jv", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "ka", { G_UNICODE_SCRIPT_GEORGIAN/*33*/ } },
+ { "kaa", { G_UNICODE_SCRIPT_CYRILLIC/*78*/ } },
+ { "kab", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ki", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "kj", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "kk", { G_UNICODE_SCRIPT_CYRILLIC/*77*/ } },
+ { "kl", { G_UNICODE_SCRIPT_LATIN/*81*/ } },
+ { "km", { G_UNICODE_SCRIPT_KHMER/*63*/ } },
+ { "kn", { G_UNICODE_SCRIPT_KANNADA/*70*/ } },
+ { "ko", { G_UNICODE_SCRIPT_HANGUL/*2442*/ } },
+ { "kok", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "kr", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "ks", { G_UNICODE_SCRIPT_ARABIC/*33*/ } },
+ { "ku-am", { G_UNICODE_SCRIPT_CYRILLIC/*64*/ } },
+ { "ku-iq", { G_UNICODE_SCRIPT_ARABIC/*32*/ } },
+ { "ku-ir", { G_UNICODE_SCRIPT_ARABIC/*32*/ } },
+ { "ku-tr", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "kum", { G_UNICODE_SCRIPT_CYRILLIC/*66*/ } },
+ { "kv", { G_UNICODE_SCRIPT_CYRILLIC/*70*/ } },
+ { "kw", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "kwm", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "ky", { G_UNICODE_SCRIPT_CYRILLIC/*70*/ } },
+ { "la", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "lah", { G_UNICODE_SCRIPT_ARABIC/*27*/ } },
+ { "lb", { G_UNICODE_SCRIPT_LATIN/*75*/ } },
+ { "lez", { G_UNICODE_SCRIPT_CYRILLIC/*67*/ } },
+ { "lg", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "li", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "ln", { G_UNICODE_SCRIPT_LATIN/*78*/ } },
+ { "lo", { G_UNICODE_SCRIPT_LAO/*55*/ } },
+ { "lt", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "lv", { G_UNICODE_SCRIPT_LATIN/*78*/ } },
+ { "mai", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "mg", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "mh", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "mi", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "mk", { G_UNICODE_SCRIPT_CYRILLIC/*42*/ } },
+ { "ml", { G_UNICODE_SCRIPT_MALAYALAM/*68*/ } },
+ { "mn-cn", { G_UNICODE_SCRIPT_MONGOLIAN/*130*/ } },
+ { "mn-mn", { G_UNICODE_SCRIPT_CYRILLIC/*70*/ } },
+ { "mni", { G_UNICODE_SCRIPT_BENGALI/*75*/ } },
+ { "mo", { G_UNICODE_SCRIPT_CYRILLIC/*66*/, G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "mr", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "ms", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "mt", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "my", { G_UNICODE_SCRIPT_MYANMAR/*48*/ } },
+ { "na", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "nb", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "nds", { G_UNICODE_SCRIPT_LATIN/*59*/ } },
+ { "ne", { G_UNICODE_SCRIPT_DEVANAGARI/*70*/ } },
+ { "ng", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "nl", { G_UNICODE_SCRIPT_LATIN/*82*/ } },
+ { "nn", { G_UNICODE_SCRIPT_LATIN/*76*/ } },
+ { "no", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "nqo", { G_UNICODE_SCRIPT_NKO/*59*/ } },
+ { "nr", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "nso", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "nv", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ny", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "oc", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "om", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "or", { G_UNICODE_SCRIPT_ORIYA/*68*/ } },
+ { "os", { G_UNICODE_SCRIPT_CYRILLIC/*66*/ } },
+ { "ota", { G_UNICODE_SCRIPT_ARABIC/*37*/ } },
+ { "pa", { G_UNICODE_SCRIPT_GURMUKHI/*63*/ } },
+ { "pa-pk", { G_UNICODE_SCRIPT_ARABIC/*27*/ } },
+ { "pap-an", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "pap-aw", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "pl", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ps-af", { G_UNICODE_SCRIPT_ARABIC/*49*/ } },
+ { "ps-pk", { G_UNICODE_SCRIPT_ARABIC/*49*/ } },
+ { "pt", { G_UNICODE_SCRIPT_LATIN/*82*/ } },
+ { "qu", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "quz", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "rm", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "rn", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "ro", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "ru", { G_UNICODE_SCRIPT_CYRILLIC/*66*/ } },
+ { "rw", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "sa", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "sah", { G_UNICODE_SCRIPT_CYRILLIC/*76*/ } },
+ { "sat", { G_UNICODE_SCRIPT_DEVANAGARI/*68*/ } },
+ { "sc", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "sco", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "sd", { G_UNICODE_SCRIPT_ARABIC/*54*/ } },
+ { "se", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "sel", { G_UNICODE_SCRIPT_CYRILLIC/*66*/ } },
+ { "sg", { G_UNICODE_SCRIPT_LATIN/*72*/ } },
+ { "sh", { G_UNICODE_SCRIPT_CYRILLIC/*94*/, G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "shs", { G_UNICODE_SCRIPT_LATIN/*46*/ } },
+ { "si", { G_UNICODE_SCRIPT_SINHALA/*73*/ } },
+ { "sid", { G_UNICODE_SCRIPT_ETHIOPIC/*281*/ } },
+ { "sk", { G_UNICODE_SCRIPT_LATIN/*86*/ } },
+ { "sl", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "sm", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "sma", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "smj", { G_UNICODE_SCRIPT_LATIN/*60*/ } },
+ { "smn", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "sms", { G_UNICODE_SCRIPT_LATIN/*80*/ } },
+ { "sn", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "so", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "sq", { G_UNICODE_SCRIPT_LATIN/*56*/ } },
+ { "sr", { G_UNICODE_SCRIPT_CYRILLIC/*60*/ } },
+ { "ss", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "st", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "su", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "sv", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "sw", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "syr", { G_UNICODE_SCRIPT_SYRIAC/*45*/ } },
+ { "ta", { G_UNICODE_SCRIPT_TAMIL/*48*/ } },
+ { "te", { G_UNICODE_SCRIPT_TELUGU/*70*/ } },
+ { "tg", { G_UNICODE_SCRIPT_CYRILLIC/*78*/ } },
+ { "th", { G_UNICODE_SCRIPT_THAI/*73*/ } },
+ { "ti-er", { G_UNICODE_SCRIPT_ETHIOPIC/*255*/ } },
+ { "ti-et", { G_UNICODE_SCRIPT_ETHIOPIC/*281*/ } },
+ { "tig", { G_UNICODE_SCRIPT_ETHIOPIC/*221*/ } },
+ { "tk", { G_UNICODE_SCRIPT_LATIN/*68*/ } },
+ { "tl", { G_UNICODE_SCRIPT_LATIN/*84*/ } },
+ { "tn", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "to", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "tr", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ts", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "tt", { G_UNICODE_SCRIPT_CYRILLIC/*76*/ } },
+ { "tw", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "ty", { G_UNICODE_SCRIPT_LATIN/*64*/ } },
+ { "tyv", { G_UNICODE_SCRIPT_CYRILLIC/*70*/ } },
+ { "ug", { G_UNICODE_SCRIPT_ARABIC/*33*/ } },
+ { "uk", { G_UNICODE_SCRIPT_CYRILLIC/*72*/ } },
+ { "und-zmth", { G_UNICODE_SCRIPT_LATIN/*53*/, G_UNICODE_SCRIPT_GREEK/*51*/ } },
+ { "und-zsye", { 0 } },
+ { "ur", { G_UNICODE_SCRIPT_ARABIC/*27*/ } },
+ { "uz", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "ve", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "vi", { G_UNICODE_SCRIPT_LATIN/*186*/ } },
+ { "vo", { G_UNICODE_SCRIPT_LATIN/*54*/ } },
+ { "vot", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
+ { "wa", { G_UNICODE_SCRIPT_LATIN/*70*/ } },
+ { "wal", { G_UNICODE_SCRIPT_ETHIOPIC/*281*/ } },
+ { "wen", { G_UNICODE_SCRIPT_LATIN/*76*/ } },
+ { "wo", { G_UNICODE_SCRIPT_LATIN/*66*/ } },
+ { "xh", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "yap", { G_UNICODE_SCRIPT_LATIN/*58*/ } },
+ { "yi", { G_UNICODE_SCRIPT_HEBREW/*27*/ } },
+ { "yo", { G_UNICODE_SCRIPT_LATIN/*114*/ } },
+ { "za", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
+ { "zh-cn", { G_UNICODE_SCRIPT_HAN/*6763*/ } },
+ { "zh-hk", { G_UNICODE_SCRIPT_HAN/*1083*/ } },
+ { "zh-mo", { G_UNICODE_SCRIPT_HAN/*1083*/ } },
+ { "zh-sg", { G_UNICODE_SCRIPT_HAN/*6763*/ } },
+ { "zh-tw", { G_UNICODE_SCRIPT_HAN/*13063*/ } },
+ { "zu", { G_UNICODE_SCRIPT_LATIN/*52*/ } }
};
diff --git a/pango/pango-script.c b/pango/pango-script.c
index 43be3fa0..05cfbe29 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -73,17 +73,20 @@
* pango_script_for_unichar:
* @ch: a Unicode character
*
- * Looks up the #PangoScript for a particular character (as defined by
+ * Looks up the script for a particular character (as defined by
* Unicode Standard Annex \#24). No check is made for @ch being a
* valid Unicode character; if you pass in invalid character, the
* result is undefined.
*
- * As of Pango 1.18, this function simply returns the return value of
- * g_unichar_get_script().
+ * Note that while the return type of this function is declared
+ * as PangoScript, as of Pango 1.18, this function simply returns
+ * the return value of g_unichar_get_script(). Callers must be
+ * prepared to handle unknown values.
*
* Return value: the #PangoScript for the character.
*
* Since: 1.4
+ * Deprecated: 1.44. Use g_unichar_get_script()
**/
PangoScript
pango_script_for_unichar (gunichar ch)
@@ -170,6 +173,11 @@ pango_script_iter_free (PangoScriptIter *iter)
* The range is the set of locations p where *start <= p < *end.
* (That is, it doesn't include the character stored at *end)
*
+ * Note that while the type of the @script argument is declared
+ * as PangoScript, as of Pango 1.18, this function simply returns
+ * GUnicodeScript values. Callers must be prepared to handle unknown
+ * values.
+ *
* Since: 1.4
**/
void
diff --git a/pango/pango-script.h b/pango/pango-script.h
index 62876025..a5c2b497 100644
--- a/pango/pango-script.h
+++ b/pango/pango-script.h
@@ -158,12 +158,14 @@ typedef struct _PangoScriptIter PangoScriptIter;
*
* The #PangoScript enumeration identifies different writing
* systems. The values correspond to the names as defined in the
- * Unicode standard.
- * Note that new types may be added in the future. Applications should be ready
- * to handle unknown values. This enumeration is interchangeable with
- * #GUnicodeScript. See <ulink
+ * Unicode standard. See <ulink
* url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
* #24: Script names</ulink>.
+ *
+ * Note that this enumeration is deprecated and will not be updated
+ * to include values in newer versions of the Unicode standard.
+ * Applications should use the GUnicodeScript enumeration instead,
+ * whose values are interchangeable with PangoScript.
*/
typedef enum { /* ISO 15924 code */
PANGO_SCRIPT_INVALID_CODE = -1,
@@ -304,7 +306,7 @@ typedef enum { /* ISO 15924 code */
#include <pango/pango-version-macros.h>
-PANGO_AVAILABLE_IN_1_4
+PANGO_DEPRECATED_IN_1_44_FOR(g_unichar_get_script)
PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST;
PANGO_AVAILABLE_IN_1_4
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 088a60d6..bb5d18ad 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -255,7 +255,7 @@ pango_split_file_list (const char *str)
/**
* pango_read_line:
* @stream: a stdio stream
- * @str: (out): #GString buffer into which to write the result
+ * @str: #GString buffer into which to write the result
*
* Reads an entire line from a file into a buffer. Lines may
* be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
@@ -391,7 +391,7 @@ pango_skip_space (const char **pos)
/**
* pango_scan_word:
* @pos: (inout): in/out string position
- * @out: (out): a #GString into which to write the result
+ * @out: a #GString into which to write the result
*
* Scans a word into a #GString buffer. A word consists
* of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
@@ -435,7 +435,7 @@ pango_scan_word (const char **pos, GString *out)
/**
* pango_scan_string:
* @pos: (inout): in/out string position
- * @out: (out): a #GString into which to write the result
+ * @out: a #GString into which to write the result
*
* Scans a string into a #GString buffer. The string may either
* be a sequence of non-white-space characters, or a quoted
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index b4654268..427e9a0f 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -1528,6 +1528,7 @@ struct _PangoCoreTextFontset
GPtrArray *fonts;
GPtrArray *coverages;
+ guint real_font_count;
};
struct _PangoCoreTextFontsetClass
@@ -1558,10 +1559,9 @@ pango_core_text_fontset_new (PangoCoreTextFontsetKey *key,
gchar **family_names;
const gchar *family;
gchar *name;
- GPtrArray *fonts;
int i;
- fonts = g_ptr_array_new ();
+ fontset = g_object_new (PANGO_TYPE_CORE_TEXT_FONTSET, NULL);
family = pango_font_description_get_family (description);
family_names = g_strsplit (family ? family : "", ",", -1);
@@ -1588,7 +1588,7 @@ pango_core_text_fontset_new (PangoCoreTextFontsetKey *key,
if (font)
{
- g_ptr_array_add (fonts, font);
+ g_ptr_array_add (fontset->fonts, font);
if (best_font == NULL) best_font = font;
}
}
@@ -1599,17 +1599,15 @@ pango_core_text_fontset_new (PangoCoreTextFontsetKey *key,
if (!best_font)
{
- g_ptr_array_free (fonts, false);
+ g_object_unref (fontset);
return NULL;
}
/* Create a font set with best font */
- fontset = g_object_new (PANGO_TYPE_CORE_TEXT_FONTSET, NULL);
fontset->key = pango_core_text_fontset_key_copy (key);
fontset->orig_description = pango_font_description_copy (description);
- fontset->fonts = fonts;
- fontset->coverages = g_ptr_array_new ();
+ fontset->real_font_count = fontset->fonts->len;
/* Add the cascade list for this language */
#if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
@@ -1643,9 +1641,9 @@ pango_core_text_fontset_new (PangoCoreTextFontsetKey *key,
fontset->cascade_list = CTFontCopyDefaultCascadeList (pango_core_text_font_get_ctfont (best_font));
#endif
- /* length of cascade list + 1 for the "real" font at the front */
- g_ptr_array_set_size (fontset->fonts, CFArrayGetCount (fontset->cascade_list) + fonts->len);
- g_ptr_array_set_size (fontset->coverages, CFArrayGetCount (fontset->cascade_list) + fonts->len);
+ /* length of cascade list + real_font_count for the "real" fonts at the front */
+ g_ptr_array_set_size (fontset->fonts, CFArrayGetCount (fontset->cascade_list) + fontset->real_font_count);
+ g_ptr_array_set_size (fontset->coverages, CFArrayGetCount (fontset->cascade_list) + fontset->real_font_count);
return fontset;
}
@@ -1674,8 +1672,8 @@ static PangoFont *
pango_core_text_fontset_get_font_at (PangoCoreTextFontset *ctfontset,
unsigned int i)
{
- /* The first font is loaded as soon as the fontset is created */
- if (i == 0)
+ /* These fonts are loaded as soon as the fontset is created */
+ if (i < ctfontset->real_font_count)
return g_ptr_array_index (ctfontset->fonts, i);
if (i >= ctfontset->fonts->len)
@@ -1683,7 +1681,7 @@ pango_core_text_fontset_get_font_at (PangoCoreTextFontset *ctfontset,
if (g_ptr_array_index (ctfontset->fonts, i) == NULL)
{
- CTFontDescriptorRef ctdescriptor = CFArrayGetValueAtIndex (ctfontset->cascade_list, i - 1);
+ CTFontDescriptorRef ctdescriptor = CFArrayGetValueAtIndex (ctfontset->cascade_list, i - ctfontset->real_font_count);
PangoFont *font = pango_core_text_fontset_load_font (ctfontset, ctdescriptor);
g_ptr_array_index (ctfontset->fonts, i) = font;
g_ptr_array_index (ctfontset->coverages, i) = NULL;
@@ -1712,6 +1710,7 @@ pango_core_text_fontset_init (PangoCoreTextFontset *ctfontset)
ctfontset->cascade_list = NULL;
ctfontset->fonts = g_ptr_array_new ();
ctfontset->coverages = g_ptr_array_new ();
+ ctfontset->real_font_count = 0;
}
static void
@@ -1736,7 +1735,8 @@ pango_core_text_fontset_finalize (GObject *object)
}
g_ptr_array_free (ctfontset->coverages, TRUE);
- CFRelease (ctfontset->cascade_list);
+ if (ctfontset->cascade_list)
+ CFRelease (ctfontset->cascade_list);
pango_font_description_free (ctfontset->orig_description);
diff --git a/tests/layouts/valid-1.expected b/tests/layouts/valid-1.expected
index 91660b9c..e03bf31d 100644
--- a/tests/layouts/valid-1.expected
+++ b/tests/layouts/valid-1.expected
@@ -23,11 +23,11 @@ i=2, index=49, paragraph-start=1, dir=ltr ''
---
-i=1, index=0, chars=22, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, 'This is a test of the '
-i=2, index=22, chars=11, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, 'automatic e'
+i=1, index=0, chars=22, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'This is a test of the '
+i=2, index=22, chars=11, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'automatic e'
[22 41] foreground #00000000ffff
[22 41] underline 1
-i=3, index=33, chars=15, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=c, 'mergency brake!'
+i=3, index=33, chars=15, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'mergency brake!'
[0 2147483647] fallback 0
[22 41] foreground #00000000ffff
[22 41] underline 1
diff --git a/tests/layouts/valid-2.expected b/tests/layouts/valid-2.expected
index 4de28dc3..1467dd25 100644
--- a/tests/layouts/valid-2.expected
+++ b/tests/layouts/valid-2.expected
@@ -24,11 +24,11 @@ i=2, index=33, paragraph-start=1, dir=ltr ''
---
-i=1, index=0, chars=9, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, 'test the '
-i=2, index=9, chars=4, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, 'blue'
-i=3, index=13, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, ' drink '
-i=4, index=20, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, 'after'
+i=1, index=0, chars=9, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'test the '
+i=2, index=9, chars=4, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'blue'
+i=3, index=13, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' drink '
+i=4, index=20, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'after'
[20 25] underline 1
-i=5, index=25, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=c, ' dinner'
+i=5, index=25, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' dinner'
i=6, index=32, no run, line end
i=7, index=33, no run, line end
diff --git a/tests/layouts/valid-3.expected b/tests/layouts/valid-3.expected
new file mode 100644
index 00000000..ce983c34
--- /dev/null
+++ b/tests/layouts/valid-3.expected
@@ -0,0 +1,25 @@
+ABC😀️D
+
+---
+
+wrapped: 0
+ellipsized: 0
+lines: 2
+
+---
+
+range 0 2147483647
+
+---
+
+i=1, index=0, paragraph-start=1, dir=ltr 'ABC😀️D
+'
+i=2, index=12, paragraph-start=1, dir=ltr ''
+
+---
+
+i=1, index=0, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'ABC'
+i=2, index=3, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '😀️'
+i=3, index=10, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'D'
+i=4, index=11, no run, line end
+i=5, index=12, no run, line end
diff --git a/tests/layouts/valid-3.markup b/tests/layouts/valid-3.markup
new file mode 100644
index 00000000..4e394a42
--- /dev/null
+++ b/tests/layouts/valid-3.markup
@@ -0,0 +1,2 @@
+
+ABC😀️D
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
index 633f3e89..dff0ccc4 100644
--- a/tests/markup-parse.c
+++ b/tests/markup-parse.c
@@ -31,117 +31,7 @@
#include <locale.h>
#include <pango/pangocairo.h>
-
-static void
-print_attr (PangoAttribute *attr, GString *string)
-{
- g_string_append_printf (string, "[%d %d] ", attr->start_index, attr->end_index);
- switch (attr->klass->type)
- {
- case PANGO_ATTR_LANGUAGE:
- g_string_append_printf (string,"language %s\n", pango_language_to_string (((PangoAttrLanguage *)attr)->value));
- break;
- case PANGO_ATTR_FAMILY:
- g_string_append_printf (string,"family %s\n", ((PangoAttrString *)attr)->value);
- break;
- case PANGO_ATTR_STYLE:
- g_string_append_printf (string,"style %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_WEIGHT:
- g_string_append_printf (string,"weight %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_VARIANT:
- g_string_append_printf (string,"variant %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_STRETCH:
- g_string_append_printf (string,"stretch %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_SIZE:
- g_string_append_printf (string,"size %d\n", ((PangoAttrSize *)attr)->size);
- break;
- case PANGO_ATTR_FONT_DESC:
- g_string_append_printf (string,"font %s\n", pango_font_description_to_string (((PangoAttrFontDesc *)attr)->desc));
- break;
- case PANGO_ATTR_FOREGROUND:
- g_string_append_printf (string,"foreground %s\n", pango_color_to_string (&((PangoAttrColor *)attr)->color));
- break;
- case PANGO_ATTR_BACKGROUND:
- g_string_append_printf (string,"background %s\n", pango_color_to_string (&((PangoAttrColor *)attr)->color));
- break;
- case PANGO_ATTR_UNDERLINE:
- g_string_append_printf (string,"underline %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_STRIKETHROUGH:
- g_string_append_printf (string,"strikethrough %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_RISE:
- g_string_append_printf (string,"rise %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_SHAPE:
- g_string_append_printf (string,"shape\n");
- break;
- case PANGO_ATTR_SCALE:
- g_string_append_printf (string,"scale %f\n", ((PangoAttrFloat *)attr)->value);
- break;
- case PANGO_ATTR_FALLBACK:
- g_string_append_printf (string,"fallback %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_LETTER_SPACING:
- g_string_append_printf (string,"letter-spacing %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_UNDERLINE_COLOR:
- g_string_append_printf (string,"underline-color %s\n", pango_color_to_string (&((PangoAttrColor *)attr)->color));
- break;
- case PANGO_ATTR_STRIKETHROUGH_COLOR:
- g_string_append_printf (string,"strikethrough-color %s\n", pango_color_to_string (&((PangoAttrColor *)attr)->color));
- break;
- case PANGO_ATTR_ABSOLUTE_SIZE:
- g_string_append_printf (string,"absolute-size %d\n", ((PangoAttrSize *)attr)->size);
- break;
- case PANGO_ATTR_GRAVITY:
- g_string_append_printf (string,"gravity %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_GRAVITY_HINT:
- g_string_append_printf (string,"gravity-hint %d\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_FONT_FEATURES:
- g_string_append_printf (string,"font-features %s\n", ((PangoAttrString *)attr)->value);
- break;
- case PANGO_ATTR_FOREGROUND_ALPHA:
- g_string_append_printf (string,"foreground-alpha %04x\n", ((PangoAttrInt *)attr)->value);
- break;
- case PANGO_ATTR_BACKGROUND_ALPHA:
- g_string_append_printf (string,"background-alpha %04x\n", ((PangoAttrInt *)attr)->value);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-}
-
-static void
-attr_list_dump (PangoAttrList *attrs, GString *string)
-{
- PangoAttrIterator *iter;
-
- iter = pango_attr_list_get_iterator (attrs);
- do {
- gint start, end;
- GSList *list, *l;
-
- pango_attr_iterator_range (iter, &start, &end);
- g_string_append_printf (string, "range %d %d\n", start, end);
- list = pango_attr_iterator_get_attrs (iter);
- for (l = list; l; l = l->next)
- {
- PangoAttribute *attr = l->data;
- print_attr (attr, string);
- }
- g_slist_free_full (list, (GDestroyNotify)pango_attribute_destroy);
- } while (pango_attr_iterator_next (iter));
-
- pango_attr_iterator_destroy (iter);
-}
+#include "test-common.h"
static void
test_file (const gchar *filename, GString *string)
@@ -173,7 +63,7 @@ test_file (const gchar *filename, GString *string)
g_assert_no_error (error);
g_string_append (string, text);
g_string_append (string, "\n\n---\n\n");
- attr_list_dump (attrs, string);
+ print_attr_list (attrs, string);
g_string_append (string, "\n\n---\n\n");
desc = pango_font_description_new ();
iter = pango_attr_list_get_iterator (attrs);
@@ -212,43 +102,6 @@ get_expected_filename (const gchar *filename)
return expected;
}
-static char *
-diff_with_file (const char *file1,
- GString *string,
- GError **error)
-{
- const char *command[] = { "diff", "-u", file1, NULL, NULL };
- char *diff, *tmpfile;
- int fd;
-
- diff = NULL;
-
- /* write the text buffer to a temporary file */
- fd = g_file_open_tmp (NULL, &tmpfile, error);
- if (fd < 0)
- return NULL;
-
- if (write (fd, string->str, string->len) != (int) string->len)
- {
- close (fd);
- g_set_error (error,
- G_FILE_ERROR, G_FILE_ERROR_FAILED,
- "Could not write data to temporary file '%s'", tmpfile);
- goto done;
- }
- close (fd);
- command[3] = tmpfile;
-
- /* run diff command */
- g_spawn_sync (NULL, (char **)command, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &diff, NULL, NULL, error);
-
-done:
- unlink (tmpfile);
- g_free (tmpfile);
-
- return diff;
-}
-
static void
test_parse (gconstpointer d)
{
@@ -264,7 +117,7 @@ test_parse (gconstpointer d)
test_file (filename, string);
- diff = diff_with_file (expected_file, string, &error);
+ diff = diff_with_file (expected_file, string->str, string->len, &error);
g_assert_no_error (error);
if (diff && diff[0])
diff --git a/tests/meson.build b/tests/meson.build
index eb15ead1..ef97970f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -35,12 +35,17 @@ if cairo_dep.found()
test_cflags += '-DHAVE_CAIRO'
tests += [
[ 'testiter', [ 'testiter.c' ], [ libpangocairo_dep ] ],
- [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ], [ libpangocairo_dep, cairo_dep ] ],
- [ 'markup-parse', [ 'markup-parse.c' ], [ libpangocairo_dep ] ],
+ [ 'markup-parse', [ 'markup-parse.c' , 'test-common.c' ], [ libpangocairo_dep ] ],
[ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep ] ],
[ 'test-font', [ 'test-font.c' ], [ libpangocairo_dep ] ],
[ 'testattributes', [ 'testattributes.c', 'test-common.c' ], [ libpangocairo_dep ] ],
]
+
+ if pango_cairo_backends.contains('png')
+ tests += [
+ [ 'test-pangocairo-threads', [ 'test-pangocairo-threads.c' ], [ libpangocairo_dep, cairo_dep ] ],
+ ]
+ endif
endif
installed_test_data = [
diff --git a/tests/test-common.c b/tests/test-common.c
index adeb4b66..34c0e9a8 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -39,7 +39,7 @@ diff_with_file (const char *file,
gssize len,
GError **error)
{
- const char *command[] = { "diff", "-u", file, NULL, NULL };
+ const char *command[] = { "diff", "-u", "-i", file, NULL, NULL };
char *diff, *tmpfile;
int fd;
@@ -62,7 +62,7 @@ diff_with_file (const char *file,
goto done;
}
close (fd);
- command[3] = tmpfile;
+ command[4] = tmpfile;
/* run diff command */
g_spawn_sync (NULL,
@@ -153,6 +153,15 @@ print_attribute (PangoAttribute *attr, GString *string)
case PANGO_ATTR_GRAVITY_HINT:
g_string_append_printf (string,"gravity-hint %d\n", ((PangoAttrInt *)attr)->value);
break;
+ case PANGO_ATTR_FONT_FEATURES:
+ g_string_append_printf (string,"font-features %s\n", ((PangoAttrString *)attr)->value);
+ break;
+ case PANGO_ATTR_FOREGROUND_ALPHA:
+ g_string_append_printf (string,"foreground-alpha %04x\n", ((PangoAttrInt *)attr)->value);
+ break;
+ case PANGO_ATTR_BACKGROUND_ALPHA:
+ g_string_append_printf (string,"background-alpha %04x\n", ((PangoAttrInt *)attr)->value);
+ break;
default:
g_assert_not_reached ();
break;
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 4bce4439..c4d01ccc 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -261,6 +261,7 @@ test_file (const gchar *filename, GString *string)
g_assert (p);
markup = p + 1;
*p = '\0';
+ length = strlen (markup);
parse_params (contents, &width, &ellipsize_at, &ellipsize, &wrap);
@@ -347,7 +348,7 @@ main (int argc, char *argv[])
const gchar *name;
gchar *path;
- g_setenv ("LC_ALL", "C", TRUE);
+ g_setenv ("LC_ALL", "en_US.UTF-8", TRUE);
setlocale (LC_ALL, "");
g_test_init (&argc, &argv, NULL);
diff --git a/tools/gen-break-table.py b/tools/gen-break-table.py
new file mode 100755
index 00000000..2c8a7d70
--- /dev/null
+++ b/tools/gen-break-table.py
@@ -0,0 +1,156 @@
+#!/usr/bin/python
+
+from __future__ import print_function, division, absolute_import
+import sys
+import os.path
+from collections import OrderedDict
+
+
+header = []
+ranges = OrderedDict()
+
+def load_data(filename):
+ global header, ranges
+ f = open(filename)
+ lines = f.readlines()
+ for line in lines:
+ header.append(line)
+ if not line.startswith("#"):
+ break
+
+ for line in lines:
+ line = line.strip()
+ if not line or line[0] == '#':
+ continue
+ rang, typ = [s.strip() for s in line.split('#')[0].split(';')[:2]]
+
+ rang = [int(s, 16) for s in rang.split('..')]
+ if len(rang) > 1:
+ start, end = rang
+ else:
+ start = end = rang[0]
+
+ if typ not in ranges:
+ ranges[typ] = []
+ if ranges[typ] and ranges[typ][-1][1] == start - 1:
+ ranges[typ][-1] = (ranges[typ][-1][0], end)
+ else:
+ ranges[typ].append((start, end))
+
+
+def onecondition(start, end):
+ condition = ''
+ if start == end:
+ condition = 'wc == 0x' + format(start, '04X')
+ elif start < end:
+ condition = '(' + 'wc >= 0x' + format(start, '04X') + ' && ' + 'wc <= 0x' + format(end, '04X') + ')'
+ return condition
+
+
+# print out the numbers in compact form
+def print_if_branch(ranges):
+ conditions = []
+ for start, end in ranges:
+ condition = onecondition(start, end)
+ conditions.append(condition)
+ statement = "||\n".join(conditions)
+ print("if (%s)" % statement)
+ print("\treturn TRUE;")
+ print("return FALSE;")
+
+
+def print_one_line(start, end):
+ if start < end:
+ outline = 'if (' + onecondition(start, end) + ')'
+ print(outline)
+
+def print_ranges(ranges):
+ if 4 >= len(ranges):
+ conditions = []
+ for start, end in ranges:
+ conditions.append(onecondition(start, end))
+
+ statement = " ||\n".join(conditions)
+ print('if (' + statement + ')')
+ print('\treturn TRUE;')
+ return
+
+ start = ranges[0][0]
+ end = ranges[-1][1]
+ print_one_line(start, end)
+ print('{')
+ print_balanced_search(ranges)
+ print('}')
+
+
+# print if branch like 4-way balanced search
+def print_balanced_search(ranges):
+ if 4 >= len(ranges):
+ print_ranges(ranges)
+ return
+
+ length = len(ranges)
+ step = int(length / 4)
+ first = step
+ second = int(length * 2 / 4)
+ third = second + step
+
+ newranges = ranges[0:first]
+ print_ranges(newranges)
+
+ newranges = ranges[first:second]
+ print_ranges(newranges)
+
+ newranges = ranges[second:third]
+ print_ranges(newranges)
+
+ newranges = ranges[third:]
+ print_ranges(newranges)
+
+ print("return FALSE;")
+
+
+def print_table():
+ global header, ranges
+ print("/* == Start of generated table == */")
+ print("/*")
+ print(" * The following tables are generated by running:")
+ print(" *")
+ print(" * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent")
+ print(" *")
+ print(" * on files with these headers:")
+ print(" *")
+ for l in header:
+ print(" * %s" % (l.strip()))
+ print(" */")
+ print()
+ print("#ifndef PANGO_BREAK_TABLE_H")
+ print("#define PANGO_BREAK_TABLE_H")
+ print()
+ print("#include <glib.h>")
+ print()
+
+ for typ,s in ranges.items():
+ if typ not in ['STerm',
+ 'Virama',
+ 'Vowel_Dependent']: continue
+ print()
+ print("static inline gboolean _pango_is_%s (gunichar wc)" % typ)
+ print("{")
+ print_balanced_search(sorted(s))
+ print("}")
+
+ print()
+ print("#endif /* PANGO_BREAK_TABLE_H */")
+ print()
+ print("/* == End of generated table == */")
+
+
+if __name__ == "__main__":
+ if len (sys.argv) != 3:
+ print("usage: ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent", file=sys.stderr)
+ sys.exit (1)
+
+ load_data(sys.argv[1])
+ load_data(sys.argv[2])
+ print_table()
diff --git a/tools/gen-script-for-lang.c b/tools/gen-script-for-lang.c
index 04614b15..2f439a4e 100644
--- a/tools/gen-script-for-lang.c
+++ b/tools/gen-script-for-lang.c
@@ -35,7 +35,7 @@
#define MAX_SCRIPTS 3
typedef struct {
- PangoScript script;
+ GUnicodeScript script;
int freq;
} ScriptInfo;
@@ -49,7 +49,7 @@ static const char *get_script_name (PangoScript script)
static GEnumClass *class = NULL;
GEnumValue *value;
if (!class)
- class = g_type_class_ref (PANGO_TYPE_SCRIPT);
+ class = g_type_class_ref (G_TYPE_UNICODE_SCRIPT);
value = g_enum_get_value (class, script);
g_assert (value);
@@ -73,13 +73,13 @@ static void
script_for_char (gunichar ch,
LangInfo *info)
{
- PangoScript script = pango_script_for_unichar (ch);
- if (script != PANGO_SCRIPT_COMMON &&
- script != PANGO_SCRIPT_INHERITED)
+ GUnicodeScript script = g_unichar_get_script (ch);
+ if (script != G_UNICODE_SCRIPT_COMMON &&
+ script != G_UNICODE_SCRIPT_INHERITED)
{
int j;
- if (script == PANGO_SCRIPT_UNKNOWN)
+ if (script == G_UNICODE_SCRIPT_UNKNOWN)
{
g_message ("Script unknown for U+%04X", ch);
return;
@@ -89,7 +89,7 @@ script_for_char (gunichar ch,
{
if (info->scripts[j].script == script)
break;
- if (info->scripts[j].script == PANGO_SCRIPT_COMMON)
+ if (info->scripts[j].script == G_UNICODE_SCRIPT_COMMON)
{
info->scripts[j].script = script;
break;
@@ -149,7 +149,7 @@ do_lang (GArray *script_array,
for (j = 0; j < MAX_SCRIPTS; j++)
{
- info.scripts[j].script = PANGO_SCRIPT_COMMON;
+ info.scripts[j].script = G_UNICODE_SCRIPT_COMMON;
info.scripts[j].freq = 0;
}
@@ -272,7 +272,7 @@ int main (void)
g_print ("typedef struct _PangoScriptForLang {\n"
" const char lang[%d];\n"
- " PangoScript scripts[%d];\n"
+ " GUnicodeScript scripts[%d];\n"
"} PangoScriptForLang;\n"
"\n"
"static const PangoScriptForLang pango_script_for_lang[] = {\n",
@@ -289,7 +289,13 @@ int main (void)
for (j = 0; j < MAX_SCRIPTS; j++)
{
if (!info->scripts[j].freq)
- break;
+ {
+ /* Avoid generating code with empty arrays */
+ if (j == 0)
+ g_print ("0");
+
+ break;
+ }
if (j != 0)
g_print (", ");