diff options
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | pango/fonts.c | 102 | ||||
-rw-r--r-- | pango/pango-break-table.h | 367 | ||||
-rw-r--r-- | pango/pango-context.c | 40 | ||||
-rw-r--r-- | pango/pango-emoji-table.h | 50 | ||||
-rw-r--r-- | pango/pango-fontset.c | 4 | ||||
-rw-r--r-- | pango/pango-glyph-item.c | 18 | ||||
-rw-r--r-- | pango/pango-layout.c | 94 | ||||
-rw-r--r-- | pango/pango-utils.c | 36 | ||||
-rw-r--r-- | pango/pangocoretext-fontmap.c | 2 | ||||
-rw-r--r-- | pango/serializer.c | 3 | ||||
-rw-r--r-- | pango/shape.c | 21 | ||||
-rw-r--r-- | tests/GraphemeBreakTest.txt | 10 | ||||
-rw-r--r-- | tests/SentenceBreakTest.txt | 10 | ||||
-rw-r--r-- | tests/WordBreakTest.txt | 10 | ||||
-rw-r--r-- | tests/meson.build | 1 | ||||
-rw-r--r-- | tests/nofonts/fonts.conf | 71 | ||||
-rw-r--r-- | tests/test-no-fonts.c | 109 |
19 files changed, 591 insertions, 367 deletions
@@ -1,3 +1,11 @@ +Overview of changes in 1.50.12, xx-xx-xxxx +========================================== + +Overview of changes in 1.50.11, 03-10-2022 +========================================== +- Don't crash for lack of fonts +- Avoid a crash in shaping + Overview of changes in 1.50.10, 16-09-2022 ========================================= - Avoid some unnecessary strdups diff --git a/meson.build b/meson.build index 840d37f6..f63ce6cd 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('pango', 'c', 'cpp', - version: '1.50.10', + version: '1.50.12', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', diff --git a/pango/fonts.c b/pango/fonts.c index e7bd4780..5f9bbb01 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -78,8 +78,8 @@ static const PangoFontDescription pfd_defaults = { * * Creates a new font description structure with all fields unset. * - * Return value: the newly allocated `PangoFontDescription`, which - * should be freed using [method@Pango.FontDescription.free]. + * Returns: (transfer full): the newly allocated `PangoFontDescription`, + * which should be freed using [method@Pango.FontDescription.free]. */ PangoFontDescription * pango_font_description_new (void) @@ -162,8 +162,8 @@ pango_font_description_set_family_static (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_family]. * - * Return value: (nullable): the family name field for the font - * description, or %NULL if not previously set. This has the same + * Returns: (transfer none) (nullable): the family name field for the + * font description, or %NULL if not previously set. This has the same * life-time as the font description itself and should not be freed. */ const char * @@ -208,7 +208,7 @@ pango_font_description_set_style (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_style]. * - * Return value: the style field for the font description. + * Returns: the style field for the font description. * Use [method@Pango.FontDescription.get_set_fields] to * find out if the field was explicitly set or not. */ @@ -248,7 +248,7 @@ pango_font_description_set_variant (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_variant]. * - * Return value: the variant field for the font description. + * Returns: the variant field for the font description. * Use [method@Pango.FontDescription.get_set_fields] to find * out if the field was explicitly set or not. */ @@ -290,7 +290,7 @@ pango_font_description_set_weight (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_weight]. * - * Return value: the weight field for the font description. + * Returns: the weight field for the font description. * Use [method@Pango.FontDescription.get_set_fields] to find * out if the field was explicitly set or not. */ @@ -330,7 +330,7 @@ pango_font_description_set_stretch (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_stretch]. * - * Return value: the stretch field for the font description. + * Returns: the stretch field for the font description. * Use [method@Pango.FontDescription.get_set_fields] to find * out if the field was explicitly set or not. */ @@ -379,7 +379,7 @@ pango_font_description_set_size (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_size]. * - * Return value: the size field for the font description in points + * Returns: the size field for the font description in points * or device units. You must call * [method@Pango.FontDescription.get_size_is_absolute] to find out * which is the case. Returns 0 if the size field has not previously @@ -431,7 +431,7 @@ pango_font_description_set_absolute_size (PangoFontDescription *desc, * See [method@Pango.FontDescription.set_size] * and [method@Pango.FontDescription.set_absolute_size]. * - * Return value: whether the size for the font description is in + * Returns: whether the size for the font description is in * points or device units. Use [method@Pango.FontDescription.get_set_fields] * to find out if the size field of the font description was explicitly * set or not. @@ -487,7 +487,7 @@ pango_font_description_set_gravity (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_gravity]. * - * Return value: the gravity field for the font description. + * Returns: the gravity field for the font description. * Use [method@Pango.FontDescription.get_set_fields] to find out * if the field was explicitly set or not. * @@ -586,7 +586,7 @@ pango_font_description_set_variations (PangoFontDescription *desc, * * See [method@Pango.FontDescription.set_variations]. * - * Return value: (nullable): the variations field for the font + * Returns: (transfer none) (nullable): the variations field for the font * description, or %NULL if not previously set. This has the same * life-time as the font description itself and should not be freed. * @@ -606,7 +606,7 @@ pango_font_description_get_variations (const PangoFontDescription *desc) * * Determines which fields in a font description have been set. * - * Return value: a bitmask with bits set corresponding to the + * Returns: a bitmask with bits set corresponding to the * fields in @desc that have been set. */ PangoFontMask @@ -782,7 +782,7 @@ compute_distance (const PangoFontDescription *a, * * Note that @old_match must match @desc. * - * Return value: %TRUE if @new_match is a better match + * Returns: %TRUE if @new_match is a better match */ gboolean pango_font_description_better_match (const PangoFontDescription *desc, @@ -812,7 +812,7 @@ pango_font_description_better_match (const PangoFontDescription *desc, * * Make a copy of a `PangoFontDescription`. * - * Return value: (nullable): the newly allocated `PangoFontDescription`, + * Returns: (transfer full) (nullable): the newly allocated `PangoFontDescription`, * which should be freed with [method@Pango.FontDescription.free], * or %NULL if @desc was %NULL. */ @@ -852,7 +852,7 @@ pango_font_description_copy (const PangoFontDescription *desc) * can only be used until @desc is modified or freed. This is meant * to be used when the copy is only needed temporarily. * - * Return value: (nullable): the newly allocated `PangoFontDescription`, + * Returns: (transfer full) (nullable): the newly allocated `PangoFontDescription`, * which should be freed with [method@Pango.FontDescription.free], * or %NULL if @desc was %NULL. */ @@ -889,7 +889,7 @@ pango_font_description_copy_static (const PangoFontDescription *desc) * as long as other fields are all the same. (Two font descriptions may * result in identical fonts being loaded, but still compare %FALSE.) * - * Return value: %TRUE if the two font descriptions are identical, + * Returns: %TRUE if the two font descriptions are identical, * %FALSE otherwise. */ gboolean @@ -938,7 +938,7 @@ case_insensitive_hash (const char *key) * This is suitable to be used, for example, as an argument * to g_hash_table_new(). The hash value is independent of @desc->mask. * - * Return value: the hash value. + * Returns: the hash value. */ guint pango_font_description_hash (const PangoFontDescription *desc) @@ -1298,7 +1298,7 @@ parse_variations (const char *word, * * "Cantarell Italic Light 15 \@wght=200" * - * Return value: a new `PangoFontDescription`. + * Returns: (transfer full) a new `PangoFontDescription`. */ PangoFontDescription * pango_font_description_from_string (const char *str) @@ -1430,7 +1430,7 @@ append_field (GString *str, const char *what, const FieldMap *map, int n_element * the string description will only have a terminating comma if * the last word of the list is a valid style option. * - * Return value: a new string that must be freed with g_free(). + * Returns: (transfer full): a new string that must be freed with g_free(). */ char * pango_font_description_to_string (const PangoFontDescription *desc) @@ -1514,7 +1514,7 @@ pango_font_description_to_string (const PangoFontDescription *desc) * instead of characters that are untypical in filenames, and in * lower case only. * - * Return value: a new string that must be freed with g_free(). + * Returns: (transfer full) (nullable): a new string that must be freed with g_free(). */ char * pango_font_description_to_filename (const PangoFontDescription *desc) @@ -1610,7 +1610,7 @@ parse_field (const char *what, * variations being * ignored. * - * Return value: %TRUE if @str was successfully parsed. + * Returns: %TRUE if @str was successfully parsed. */ gboolean pango_parse_style (const char *str, @@ -1632,7 +1632,7 @@ pango_parse_style (const char *str, * "petite-caps", "all-petite-caps", "unicase" and "title-caps", * case variations being ignored. * - * Return value: %TRUE if @str was successfully parsed. + * Returns: %TRUE if @str was successfully parsed. */ gboolean pango_parse_variant (const char *str, @@ -1654,7 +1654,7 @@ pango_parse_variant (const char *str, * "ultrabold", "bold", "normal", "light", "ultraleight" * and integers. Case variations are ignored. * - * Return value: %TRUE if @str was successfully parsed. + * Returns: %TRUE if @str was successfully parsed. */ gboolean pango_parse_weight (const char *str, @@ -1678,7 +1678,7 @@ pango_parse_weight (const char *str, * "extra_expanded" and "ultra_expanded". Case variations are * ignored and the '_' characters may be omitted. * - * Return value: %TRUE if @str was successfully parsed. + * Returns: %TRUE if @str was successfully parsed. */ gboolean pango_parse_stretch (const char *str, @@ -1807,7 +1807,7 @@ pango_font_init (PangoFont *font G_GNUC_UNUSED) * Use [method@Pango.Font.describe_with_absolute_size] if you want * the font size in device units. * - * Return value: a newly-allocated `PangoFontDescription` object. + * Returns: (transfer full): a newly-allocated `PangoFontDescription` object. */ PangoFontDescription * pango_font_describe (PangoFont *font) @@ -1826,7 +1826,7 @@ pango_font_describe (PangoFont *font) * * Use [method@Pango.Font.describe] if you want the font size in points. * - * Return value: a newly-allocated `PangoFontDescription` object. + * Returns: (transfer full): a newly-allocated `PangoFontDescription` object. * * Since: 1.14 */ @@ -1851,7 +1851,7 @@ pango_font_describe_with_absolute_size (PangoFont *font) * * Computes the coverage map for a given font and language tag. * - * Return value: (transfer full): a newly-allocated `PangoCoverage` + * Returns: (transfer full): a newly-allocated `PangoCoverage` * object. */ PangoCoverage * @@ -1872,7 +1872,7 @@ pango_font_get_coverage (PangoFont *font, * Finds the best matching shaper for a font for a particular * language tag and character point. * - * Return value: (transfer none): the best matching shaper. + * Returns: (transfer none) (nullable): the best matching shaper. * Deprecated: Shape engines are no longer used */ PangoEngineShape * @@ -1946,7 +1946,7 @@ pango_font_get_glyph_extents (PangoFont *font, * If @font is %NULL, this function gracefully sets some sane values in the * output variables and returns. * - * Return value: a `PangoFontMetrics` object. The caller must call + * Returns: (transfer full): a `PangoFontMetrics` object. The caller must call * [method@Pango.FontMetrics.unref] when finished using the object. */ PangoFontMetrics * @@ -1989,7 +1989,7 @@ pango_font_get_metrics (PangoFont *font, * font map is kept alive. In most uses this is not an issue * as a `PangoContext` holds a reference to the font map. * - * Return value: (transfer none) (nullable): the `PangoFontMap` + * Returns: (transfer none) (nullable): the `PangoFontMap` * for the font * * Since: 1.10 @@ -2068,7 +2068,7 @@ G_DEFINE_BOXED_TYPE (PangoFontMetrics, pango_font_metrics, * This is only for internal use by Pango backends and there is * no public way to set the fields of the structure. * - * Return value: a newly-created `PangoFontMetrics` structure + * Returns: (transfer full): a newly-created `PangoFontMetrics` structure * with a reference count of 1. */ PangoFontMetrics * @@ -2086,7 +2086,7 @@ pango_font_metrics_new (void) * * Increase the reference count of a font metrics structure by one. * - * Return value: (nullable): @metrics + * Returns: (nullable): @metrics */ PangoFontMetrics * pango_font_metrics_ref (PangoFontMetrics *metrics) @@ -2130,7 +2130,7 @@ pango_font_metrics_unref (PangoFontMetrics *metrics) * of the actual drawn ink. It is necessary to lay out the text to * figure where the ink will be.) * - * Return value: the ascent, in Pango units. + * Returns: the ascent, in Pango units. */ int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) @@ -2151,7 +2151,7 @@ pango_font_metrics_get_ascent (PangoFontMetrics *metrics) * bottom of the actual drawn ink. It is necessary to lay out the text * to figure where the ink will be.) * - * Return value: the descent, in Pango units. + * Returns: the descent, in Pango units. */ int pango_font_metrics_get_descent (PangoFontMetrics *metrics) @@ -2172,7 +2172,7 @@ pango_font_metrics_get_descent (PangoFontMetrics *metrics) * * If the line height is not available, 0 is returned. * - * Return value: the height, in Pango units + * Returns: the height, in Pango units * * Since: 1.44 */ @@ -2194,7 +2194,7 @@ pango_font_metrics_get_height (PangoFontMetrics *metrics) * determining the initial size for a window. Actual characters in * text will be wider and narrower than this. * - * Return value: the character width, in Pango units. + * Returns: the character width, in Pango units. */ int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) @@ -2216,7 +2216,7 @@ pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) * is generally somewhat more accurate than the result of * pango_font_metrics_get_approximate_char_width() for digits. * - * Return value: the digit width, in Pango units. + * Returns: the digit width, in Pango units. */ int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) @@ -2236,7 +2236,7 @@ pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) * of the underline. Since most fonts have underline positions beneath * the baseline, this value is typically negative. * - * Return value: the suggested underline position, in Pango units. + * Returns: the suggested underline position, in Pango units. * * Since: 1.6 */ @@ -2254,7 +2254,7 @@ pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) * * Gets the suggested thickness to draw for the underline. * - * Return value: the suggested underline thickness, in Pango units. + * Returns: the suggested underline thickness, in Pango units. * * Since: 1.6 */ @@ -2275,7 +2275,7 @@ pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) * The value returned is the distance *above* the * baseline of the top of the strikethrough. * - * Return value: the suggested strikethrough position, in Pango units. + * Returns: the suggested strikethrough position, in Pango units. * * Since: 1.6 */ @@ -2293,7 +2293,7 @@ pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) * * Gets the suggested thickness to draw for the strikethrough. * - * Return value: the suggested strikethrough thickness, in Pango units. + * Returns: the suggested strikethrough thickness, in Pango units. * * Since: 1.6 */ @@ -2464,7 +2464,7 @@ pango_font_family_init (PangoFontFamily *family G_GNUC_UNUSED) * be used in a `PangoFontDescription` to specify that a face from * this family is desired. * - * Return value: the name of the family. This string is owned + * Returns: (transfer none): the name of the family. This string is owned * by the family object and must not be modified or freed. */ const char * @@ -2580,7 +2580,7 @@ pango_font_family_get_face (PangoFontFamily *family, * results of [method@Pango.FontMetrics.get_approximate_char_width] may * be affected by double-width characters. * - * Return value: %TRUE if the family is monospace. + * Returns: %TRUE if the family is monospace. * * Since: 1.4 */ @@ -2602,7 +2602,7 @@ pango_font_family_is_monospace (PangoFontFamily *family) * Such axes are also known as _variations_; see * [method@Pango.FontDescription.set_variations] for more information. * - * Return value: %TRUE if the family is variable + * Returns: %TRUE if the family is variable * * Since: 1.44 */ @@ -2640,7 +2640,7 @@ pango_font_face_init (PangoFontFace *face G_GNUC_UNUSED) * variant, weight and stretch of the face, but its size field * will be unset. * - * Return value: a newly-created `PangoFontDescription` structure + * Returns: (transfer full): a newly-created `PangoFontDescription` structure * holding the description of the face. Use [method@Pango.FontDescription.free] * to free the result. */ @@ -2662,7 +2662,7 @@ pango_font_face_describe (PangoFontFace *face) * creates this face from another face, by shearing, emboldening, * lightening or modifying it in some other way. * - * Return value: whether @face is synthesized + * Returns: whether @face is synthesized * * Since: 1.18 */ @@ -2687,7 +2687,7 @@ pango_font_face_is_synthesized (PangoFontFace *face) * with the same name (e.g. a variable and a non-variable * face for the same style). * - * Return value: the face name for the face. This string is + * Returns: (transfer none): the face name for the face. This string is * owned by the face object and must not be modified or freed. */ const char * @@ -2871,5 +2871,11 @@ pango_font_get_scale_factors (PangoFont *font, double *x_scale, double *y_scale) { + if (G_UNLIKELY (!font)) + { + *x_scale = *y_scale = .1; + return; + } + PANGO_FONT_GET_CLASS_PRIVATE (font)->get_scale_factors (font, x_scale, y_scale); } diff --git a/pango/pango-break-table.h b/pango/pango-break-table.h index c5430b39..b0ef21bf 100644 --- a/pango/pango-break-table.h +++ b/pango/pango-break-table.h @@ -6,22 +6,22 @@ * * on files with these headers: * - * # SentenceBreakProperty-14.0.0.txt - * # Date: 2021-08-12, 23:13:21 GMT - * # © 2021 Unicode®, Inc. + * # SentenceBreakProperty-15.0.0.txt + * # Date: 2022-08-05, 22:17:35 GMT + * # © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html * # * # Unicode Character Database - * # For documentation, see http://www.unicode.org/reports/tr44/ - * # IndicSyllabicCategory-14.0.0.txt - * # Date: 2021-05-22, 01:01:00 GMT [KW, RP] - * # © 2021 Unicode®, Inc. + * # For documentation, see https://www.unicode.org/reports/tr44/ + * # IndicSyllabicCategory-15.0.0.txt + * # Date: 2022-05-26, 02:18:00 GMT [KW, RP] + * # © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html * # * # For documentation, see UAX #44: Unicode Character Database, - * # at http://www.unicode.org/reports/tr44/ + * # at https://www.unicode.org/reports/tr44/ * # * # This file defines the following property: * # @@ -53,7 +53,7 @@ * # * # Ahom, Balinese, Batak, Bengali, Bhaiksuki, Brahmi, Buginese, Buhid, * # Chakma, Cham, Devanagari, Dives Akuru, Dogra, Grantha, Gujarati, - * # Gunjala Gondi, Gurmukhi, Hanunoo, Javanese, Kaithi, Kannada, + * # Gunjala Gondi, Gurmukhi, Hanunoo, Javanese, Kaithi, Kannada, Kawi, * # Kayah Li, Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Lepcha, Limbu, * # Mahajani, Makasar, Malayalam, Marchen, Masaram Gondi, Meetei Mayek, * # Modi, Multani, Myanmar, Nandinagari, Newa, New Tai Lue, Oriya, @@ -66,9 +66,9 @@ * # take the default value for this property, unless they * # are individually listed in this data file. * # - * # EastAsianWidth-14.0.0.txt - * # Date: 2021-07-06, 09:58:53 GMT [KW, LI] - * # © 2021 Unicode®, Inc. + * # EastAsianWidth-15.0.0.txt + * # Date: 2022-05-24, 17:40:20 GMT [KW, LI] + * # © 2022 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 https://www.unicode.org/terms_of_use.html * # @@ -229,33 +229,49 @@ _pango_is_STerm (gunichar wc) } if ((wc >= 0x112A9 && wc <= 0x1DA88)) { - if (wc == 0x112A9 || - (wc >= 0x1144B && wc <= 0x1144C) || - (wc >= 0x115C2 && wc <= 0x115C3) || - (wc >= 0x115C9 && wc <= 0x115D7)) - return TRUE; - if ((wc >= 0x11641 && wc <= 0x11A43)) + if ((wc >= 0x112A9 && wc <= 0x11642)) { - if ((wc >= 0x11641 && wc <= 0x11642)) + if (wc == 0x112A9) + return TRUE; + if ((wc >= 0x1144B && wc <= 0x1144C)) return TRUE; + if ((wc >= 0x115C2 && wc <= 0x115C3)) + return TRUE; + if ((wc >= 0x115C9 && wc <= 0x115D7) || + (wc >= 0x11641 && wc <= 0x11642)) + return TRUE; + return FALSE; + } + if ((wc >= 0x1173C && wc <= 0x11A9C)) + { if ((wc >= 0x1173C && wc <= 0x1173E)) return TRUE; if (wc == 0x11944) return TRUE; - if (wc == 0x11946 || (wc >= 0x11A42 && wc <= 0x11A43)) + if (wc == 0x11946) + return TRUE; + if ((wc >= 0x11A42 && wc <= 0x11A43) || + (wc >= 0x11A9B && wc <= 0x11A9C)) 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 >= 0x11C41 && wc <= 0x16AF5)) { - if (wc == 0x16AF5) + if ((wc >= 0x11C41 && wc <= 0x11C42)) + return TRUE; + if ((wc >= 0x11EF7 && wc <= 0x11EF8)) + return TRUE; + if ((wc >= 0x11F43 && wc <= 0x11F44)) return TRUE; - if ((wc >= 0x16B37 && wc <= 0x16B38) || wc == 0x16B44) + if ((wc >= 0x16A6E && wc <= 0x16A6F) || wc == 0x16AF5) + return TRUE; + return FALSE; + } + if ((wc >= 0x16B37 && wc <= 0x1DA88)) + { + if ((wc >= 0x16B37 && wc <= 0x16B38)) + return TRUE; + if (wc == 0x16B44) return TRUE; if (wc == 0x16E98) return TRUE; @@ -325,7 +341,7 @@ _pango_is_Virama (gunichar wc) static inline gboolean _pango_is_Vowel_Dependent (gunichar wc) { - if ((wc >= 0x093A && wc <= 0x0CC8)) + if ((wc >= 0x093A && wc <= 0x0CCC)) { if ((wc >= 0x093A && wc <= 0x09CC)) { @@ -343,7 +359,7 @@ _pango_is_Vowel_Dependent (gunichar wc) return TRUE; return FALSE; } - if ((wc >= 0x09D7 && wc <= 0x0ACC)) + if ((wc >= 0x09D7 && wc <= 0x0AE3)) { if (wc == 0x09D7 || (wc >= 0x09E2 && wc <= 0x09E3)) return TRUE; @@ -354,143 +370,142 @@ _pango_is_Vowel_Dependent (gunichar wc) (wc >= 0x0ABE && wc <= 0x0AC5)) return TRUE; if ((wc >= 0x0AC7 && wc <= 0x0AC9) || - (wc >= 0x0ACB && wc <= 0x0ACC)) + (wc >= 0x0ACB && wc <= 0x0ACC) || + (wc >= 0x0AE2 && wc <= 0x0AE3)) return TRUE; return FALSE; } - if ((wc >= 0x0AE2 && wc <= 0x0BC8)) + if ((wc >= 0x0B3E && wc <= 0x0BCC)) { - if ((wc >= 0x0AE2 && wc <= 0x0AE3) || - (wc >= 0x0B3E && wc <= 0x0B44)) + if ((wc >= 0x0B3E && wc <= 0x0B44) || + (wc >= 0x0B47 && wc <= 0x0B48)) return TRUE; - if ((wc >= 0x0B47 && wc <= 0x0B48) || - (wc >= 0x0B4B && wc <= 0x0B4C)) + if ((wc >= 0x0B4B && wc <= 0x0B4C) || + (wc >= 0x0B55 && wc <= 0x0B57)) return TRUE; - if ((wc >= 0x0B55 && wc <= 0x0B57) || - (wc >= 0x0B62 && wc <= 0x0B63)) + if ((wc >= 0x0B62 && wc <= 0x0B63) || + (wc >= 0x0BBE && wc <= 0x0BC2)) return TRUE; - if ((wc >= 0x0BBE && wc <= 0x0BC2) || - (wc >= 0x0BC6 && wc <= 0x0BC8)) + if ((wc >= 0x0BC6 && wc <= 0x0BC8) || + (wc >= 0x0BCA && wc <= 0x0BCC)) return TRUE; return FALSE; } - if ((wc >= 0x0BCA && wc <= 0x0CC8)) + if ((wc >= 0x0BD7 && wc <= 0x0CCC)) { - if ((wc >= 0x0BCA && wc <= 0x0BCC) || wc == 0x0BD7) + if (wc == 0x0BD7 || (wc >= 0x0C3E && wc <= 0x0C44)) return TRUE; - if ((wc >= 0x0C3E && wc <= 0x0C44) || - (wc >= 0x0C46 && wc <= 0x0C48)) + if ((wc >= 0x0C46 && wc <= 0x0C48) || + (wc >= 0x0C4A && wc <= 0x0C4C)) return TRUE; - if ((wc >= 0x0C4A && wc <= 0x0C4C) || - (wc >= 0x0C55 && wc <= 0x0C56)) + if ((wc >= 0x0C55 && wc <= 0x0C56) || + (wc >= 0x0C62 && wc <= 0x0C63)) return TRUE; - if ((wc >= 0x0C62 && wc <= 0x0C63) || - (wc >= 0x0CBE && wc <= 0x0CC4) || - (wc >= 0x0CC6 && wc <= 0x0CC8)) + if ((wc >= 0x0CBE && wc <= 0x0CC4) || + (wc >= 0x0CC6 && wc <= 0x0CC8) || + (wc >= 0x0CCA && wc <= 0x0CCC)) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x0CCA && wc <= 0x1928)) + if ((wc >= 0x0CD5 && wc <= 0x193A)) { - if ((wc >= 0x0CCA && wc <= 0x0D63)) + if ((wc >= 0x0CD5 && wc <= 0x0DD4)) { - if ((wc >= 0x0CCA && wc <= 0x0CCC) || - (wc >= 0x0CD5 && wc <= 0x0CD6)) + if ((wc >= 0x0CD5 && wc <= 0x0CD6) || + (wc >= 0x0CE2 && wc <= 0x0CE3)) return TRUE; - if ((wc >= 0x0CE2 && wc <= 0x0CE3) || - (wc >= 0x0D3E && wc <= 0x0D44)) + if ((wc >= 0x0D3E && wc <= 0x0D44) || + (wc >= 0x0D46 && wc <= 0x0D48)) return TRUE; - if ((wc >= 0x0D46 && wc <= 0x0D48) || - (wc >= 0x0D4A && wc <= 0x0D4C)) + if ((wc >= 0x0D4A && wc <= 0x0D4C) || wc == 0x0D57) return TRUE; - if (wc == 0x0D57 || (wc >= 0x0D62 && wc <= 0x0D63)) + if ((wc >= 0x0D62 && wc <= 0x0D63) || + (wc >= 0x0DCF && wc <= 0x0DD4)) return TRUE; return FALSE; } - if ((wc >= 0x0DCF && wc <= 0x0EBB)) + if ((wc >= 0x0DD6 && wc <= 0x0EC4)) { - if ((wc >= 0x0DCF && wc <= 0x0DD4) || wc == 0x0DD6) + if (wc == 0x0DD6 || (wc >= 0x0DD8 && wc <= 0x0DDF)) return TRUE; - if ((wc >= 0x0DD8 && wc <= 0x0DDF) || - (wc >= 0x0DF2 && wc <= 0x0DF3)) + if ((wc >= 0x0DF2 && wc <= 0x0DF3) || + (wc >= 0x0E30 && wc <= 0x0E39)) return TRUE; - if ((wc >= 0x0E30 && wc <= 0x0E39) || - (wc >= 0x0E40 && wc <= 0x0E45)) + if ((wc >= 0x0E40 && wc <= 0x0E45) || wc == 0x0E47) return TRUE; - if (wc == 0x0E47 || (wc >= 0x0EB0 && wc <= 0x0EB9) || wc == 0x0EBB) + if ((wc >= 0x0EB0 && wc <= 0x0EB9) || + wc == 0x0EBB || (wc >= 0x0EC0 && wc <= 0x0EC4)) return TRUE; return FALSE; } - if ((wc >= 0x0EC0 && wc <= 0x1074)) + if ((wc >= 0x0F71 && wc <= 0x1086)) { - if ((wc >= 0x0EC0 && wc <= 0x0EC4) || - (wc >= 0x0F71 && wc <= 0x0F7D)) + if ((wc >= 0x0F71 && wc <= 0x0F7D) || + (wc >= 0x0F80 && wc <= 0x0F81)) return TRUE; - if ((wc >= 0x0F80 && wc <= 0x0F81) || - (wc >= 0x102B && wc <= 0x1035)) + if ((wc >= 0x102B && wc <= 0x1035) || + (wc >= 0x1056 && wc <= 0x1059)) return TRUE; - if ((wc >= 0x1056 && wc <= 0x1059) || wc == 0x1062) + if (wc == 0x1062 || (wc >= 0x1067 && wc <= 0x1068)) return TRUE; - if ((wc >= 0x1067 && wc <= 0x1068) || - (wc >= 0x1071 && wc <= 0x1074)) + if ((wc >= 0x1071 && wc <= 0x1074) || + (wc >= 0x1083 && wc <= 0x1086)) return TRUE; return FALSE; } - if ((wc >= 0x1083 && wc <= 0x1928)) + if ((wc >= 0x109C && wc <= 0x193A)) { - if ((wc >= 0x1083 && wc <= 0x1086) || - (wc >= 0x109C && wc <= 0x109D)) + if ((wc >= 0x109C && wc <= 0x109D) || + (wc >= 0x1712 && wc <= 0x1713)) return TRUE; - if ((wc >= 0x1712 && wc <= 0x1713) || - (wc >= 0x1732 && wc <= 0x1733)) + if ((wc >= 0x1732 && wc <= 0x1733) || + (wc >= 0x1752 && wc <= 0x1753)) return TRUE; - if ((wc >= 0x1752 && wc <= 0x1753) || - (wc >= 0x1772 && wc <= 0x1773)) + if ((wc >= 0x1772 && wc <= 0x1773) || + (wc >= 0x17B6 && wc <= 0x17C5)) return TRUE; - if ((wc >= 0x17B6 && wc <= 0x17C5) || - wc == 0x17C8 || (wc >= 0x1920 && wc <= 0x1928)) + if (wc == 0x17C8 || (wc >= 0x1920 && wc <= 0x1928) || wc == 0x193A) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x193A && wc <= 0x112E8)) + if ((wc >= 0x19B0 && wc <= 0x11344)) { - if ((wc >= 0x193A && wc <= 0x1C2C)) + if ((wc >= 0x19B0 && wc <= 0xA802)) { - if (wc == 0x193A || (wc >= 0x19B0 && wc <= 0x19C0)) + if ((wc >= 0x19B0 && wc <= 0x19C0) || + (wc >= 0x1A17 && wc <= 0x1A1B)) return TRUE; - if ((wc >= 0x1A17 && wc <= 0x1A1B) || - (wc >= 0x1A61 && wc <= 0x1A73)) + if ((wc >= 0x1A61 && wc <= 0x1A73) || + (wc >= 0x1B35 && wc <= 0x1B43)) return TRUE; - if ((wc >= 0x1B35 && wc <= 0x1B43) || - (wc >= 0x1BA4 && wc <= 0x1BA9)) + if ((wc >= 0x1BA4 && wc <= 0x1BA9) || + (wc >= 0x1BE7 && wc <= 0x1BEF)) return TRUE; - if ((wc >= 0x1BE7 && wc <= 0x1BEF) || - (wc >= 0x1C26 && wc <= 0x1C2C)) + if ((wc >= 0x1C26 && wc <= 0x1C2C) || wc == 0xA802) return TRUE; return FALSE; } - if ((wc >= 0xA802 && wc <= 0xAA32)) + if ((wc >= 0xA823 && wc <= 0xAAEF)) { - if (wc == 0xA802 || (wc >= 0xA823 && wc <= 0xA827)) + if ((wc >= 0xA823 && wc <= 0xA827) || + (wc >= 0xA8B5 && wc <= 0xA8C3)) return TRUE; - if ((wc >= 0xA8B5 && wc <= 0xA8C3) || wc == 0xA8FF) + if (wc == 0xA8FF || (wc >= 0xA947 && wc <= 0xA94E)) return TRUE; - if ((wc >= 0xA947 && wc <= 0xA94E) || - (wc >= 0xA9B4 && wc <= 0xA9BC)) + if ((wc >= 0xA9B4 && wc <= 0xA9BC) || wc == 0xA9E5) return TRUE; - if (wc == 0xA9E5 || (wc >= 0xAA29 && wc <= 0xAA32)) + if ((wc >= 0xAA29 && wc <= 0xAA32) || + (wc >= 0xAAB0 && wc <= 0xAABE) || + (wc >= 0xAAEB && wc <= 0xAAEF)) return TRUE; return FALSE; } - if ((wc >= 0xAAB0 && wc <= 0x11074)) + if ((wc >= 0xABE3 && wc <= 0x110C2)) { - if ((wc >= 0xAAB0 && wc <= 0xAABE) || - (wc >= 0xAAEB && wc <= 0xAAEF)) - return TRUE; if ((wc >= 0xABE3 && wc <= 0xABEA) || (wc >= 0x10A01 && wc <= 0x10A03)) return TRUE; @@ -500,85 +515,89 @@ _pango_is_Vowel_Dependent (gunichar wc) if ((wc >= 0x11038 && wc <= 0x11045) || (wc >= 0x11073 && wc <= 0x11074)) return TRUE; + if ((wc >= 0x110B0 && wc <= 0x110B8) || wc == 0x110C2) + return TRUE; return FALSE; } - if ((wc >= 0x110B0 && wc <= 0x112E8)) + if ((wc >= 0x11127 && wc <= 0x11344)) { - if ((wc >= 0x110B0 && wc <= 0x110B8) || wc == 0x110C2) - return TRUE; if ((wc >= 0x11127 && wc <= 0x11132) || (wc >= 0x11145 && wc <= 0x11146)) return TRUE; if ((wc >= 0x111B3 && wc <= 0x111BF) || (wc >= 0x111CB && wc <= 0x111CC)) return TRUE; - if (wc == 0x111CE || - (wc >= 0x1122C && wc <= 0x11233) || - (wc >= 0x112E0 && wc <= 0x112E8)) + if (wc == 0x111CE || (wc >= 0x1122C && wc <= 0x11233)) + return TRUE; + if (wc == 0x11241 || + (wc >= 0x112E0 && wc <= 0x112E8) || + (wc >= 0x1133E && wc <= 0x11344)) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x1133E && wc <= 0x11EF6)) + if ((wc >= 0x11347 && wc <= 0x11F40)) { - if ((wc >= 0x1133E && wc <= 0x115B5)) + if ((wc >= 0x11347 && wc <= 0x115BB)) { - if ((wc >= 0x1133E && wc <= 0x11344) || - (wc >= 0x11347 && wc <= 0x11348)) + if ((wc >= 0x11347 && wc <= 0x11348) || + (wc >= 0x1134B && wc <= 0x1134C)) return TRUE; - if ((wc >= 0x1134B && wc <= 0x1134C) || wc == 0x11357) + if (wc == 0x11357 || (wc >= 0x11362 && wc <= 0x11363)) return TRUE; - if ((wc >= 0x11362 && wc <= 0x11363) || - (wc >= 0x11435 && wc <= 0x11441)) + if ((wc >= 0x11435 && wc <= 0x11441) || + (wc >= 0x114B0 && wc <= 0x114BE)) return TRUE; - if ((wc >= 0x114B0 && wc <= 0x114BE) || - (wc >= 0x115AF && wc <= 0x115B5)) + if ((wc >= 0x115AF && wc <= 0x115B5) || + (wc >= 0x115B8 && wc <= 0x115BB)) return TRUE; return FALSE; } - if ((wc >= 0x115B8 && wc <= 0x11938)) + if ((wc >= 0x115DC && wc <= 0x119D7)) { - if ((wc >= 0x115B8 && wc <= 0x115BB) || - (wc >= 0x115DC && wc <= 0x115DD)) + if ((wc >= 0x115DC && wc <= 0x115DD) || + (wc >= 0x11630 && wc <= 0x1163C)) return TRUE; - if ((wc >= 0x11630 && wc <= 0x1163C) || wc == 0x11640) + if (wc == 0x11640 || (wc >= 0x116AD && wc <= 0x116B5)) return TRUE; - if ((wc >= 0x116AD && wc <= 0x116B5) || - (wc >= 0x11720 && wc <= 0x1172A)) + if ((wc >= 0x11720 && wc <= 0x1172A) || + (wc >= 0x1182C && wc <= 0x11836)) return TRUE; - if ((wc >= 0x1182C && wc <= 0x11836) || - (wc >= 0x11930 && wc <= 0x11935) || - (wc >= 0x11937 && wc <= 0x11938)) + if ((wc >= 0x11930 && wc <= 0x11935) || + (wc >= 0x11937 && wc <= 0x11938) || + (wc >= 0x119D1 && wc <= 0x119D7)) return TRUE; return FALSE; } - if ((wc >= 0x119D1 && wc <= 0x11CB4)) + if ((wc >= 0x119DA && wc <= 0x11D36)) { - if ((wc >= 0x119D1 && wc <= 0x119D7) || - (wc >= 0x119DA && wc <= 0x119DD)) + if ((wc >= 0x119DA && wc <= 0x119DD) || wc == 0x119E4) return TRUE; - if (wc == 0x119E4 || (wc >= 0x11A01 && wc <= 0x11A0A)) + if ((wc >= 0x11A01 && wc <= 0x11A0A) || + (wc >= 0x11A51 && wc <= 0x11A5B)) return TRUE; - if ((wc >= 0x11A51 && wc <= 0x11A5B) || - (wc >= 0x11C2F && wc <= 0x11C36)) + if ((wc >= 0x11C2F && wc <= 0x11C36) || + (wc >= 0x11C38 && wc <= 0x11C3B)) return TRUE; - if ((wc >= 0x11C38 && wc <= 0x11C3B) || - (wc >= 0x11CB0 && wc <= 0x11CB4)) + if ((wc >= 0x11CB0 && wc <= 0x11CB4) || + (wc >= 0x11D31 && wc <= 0x11D36)) return TRUE; return FALSE; } - if ((wc >= 0x11D31 && wc <= 0x11EF6)) + if ((wc >= 0x11D3A && wc <= 0x11F40)) { - if ((wc >= 0x11D31 && wc <= 0x11D36) || wc == 0x11D3A) - return TRUE; - if ((wc >= 0x11D3C && wc <= 0x11D3D) || wc == 0x11D3F) + if (wc == 0x11D3A || (wc >= 0x11D3C && wc <= 0x11D3D)) return TRUE; - if (wc == 0x11D43 || (wc >= 0x11D8A && wc <= 0x11D8E)) + if (wc == 0x11D3F || + wc == 0x11D43 || (wc >= 0x11D8A && wc <= 0x11D8E)) return TRUE; if ((wc >= 0x11D90 && wc <= 0x11D91) || - (wc >= 0x11D93 && wc <= 0x11D94) || - (wc >= 0x11EF3 && wc <= 0x11EF6)) + (wc >= 0x11D93 && wc <= 0x11D94)) + return TRUE; + if ((wc >= 0x11EF3 && wc <= 0x11EF6) || + (wc >= 0x11F34 && wc <= 0x11F3A) || + (wc >= 0x11F3E && wc <= 0x11F40)) return TRUE; return FALSE; } @@ -599,7 +618,7 @@ _pango_is_Consonant_Prefixed (gunichar wc) static inline gboolean _pango_is_Consonant_Preceding_Repha (gunichar wc) { - if (wc == 0x0D4E || wc == 0x11941 || wc == 0x11D46) + if (wc == 0x0D4E || wc == 0x11941 || wc == 0x11D46 || wc == 0x11F02) return TRUE; return FALSE; } @@ -727,7 +746,7 @@ _pango_is_EastAsianWide (gunichar wc) } return FALSE; } - if ((wc >= 0xFFDA && wc <= 0x1F3F4)) + if ((wc >= 0xFFDA && wc <= 0x1F3D3)) { if ((wc >= 0xFFDA && wc <= 0x18D08)) { @@ -745,7 +764,7 @@ _pango_is_EastAsianWide (gunichar wc) return TRUE; return FALSE; } - if ((wc >= 0x1AFF0 && wc <= 0x1F004)) + if ((wc >= 0x1AFF0 && wc <= 0x1B167)) { if ((wc >= 0x1AFF0 && wc <= 0x1AFF3) || (wc >= 0x1AFF5 && wc <= 0x1AFFB)) @@ -753,15 +772,16 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1AFFD && wc <= 0x1AFFE) || (wc >= 0x1B000 && wc <= 0x1B122)) return TRUE; - if ((wc >= 0x1B150 && wc <= 0x1B152) || - (wc >= 0x1B164 && wc <= 0x1B167)) + if (wc == 0x1B132 || (wc >= 0x1B150 && wc <= 0x1B152)) return TRUE; - if ((wc >= 0x1B170 && wc <= 0x1B2FB) || wc == 0x1F004) + if (wc == 0x1B155 || (wc >= 0x1B164 && wc <= 0x1B167)) return TRUE; return FALSE; } - if ((wc >= 0x1F0CF && wc <= 0x1F265)) + if ((wc >= 0x1B170 && wc <= 0x1F248)) { + if ((wc >= 0x1B170 && wc <= 0x1B2FB) || wc == 0x1F004) + return TRUE; if (wc == 0x1F0CF || wc == 0x1F18E) return TRUE; if ((wc >= 0x1F191 && wc <= 0x1F19A) || @@ -770,13 +790,13 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1F210 && wc <= 0x1F23B) || (wc >= 0x1F240 && wc <= 0x1F248)) return TRUE; - if ((wc >= 0x1F250 && wc <= 0x1F251) || - (wc >= 0x1F260 && wc <= 0x1F265)) - return TRUE; return FALSE; } - if ((wc >= 0x1F300 && wc <= 0x1F3F4)) + if ((wc >= 0x1F250 && wc <= 0x1F3D3)) { + if ((wc >= 0x1F250 && wc <= 0x1F251) || + (wc >= 0x1F260 && wc <= 0x1F265)) + return TRUE; if ((wc >= 0x1F300 && wc <= 0x1F320) || (wc >= 0x1F32D && wc <= 0x1F335)) return TRUE; @@ -786,16 +806,16 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1F3A0 && wc <= 0x1F3CA) || (wc >= 0x1F3CF && wc <= 0x1F3D3)) return TRUE; - if ((wc >= 0x1F3E0 && wc <= 0x1F3F0) || wc == 0x1F3F4) - return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x1F3F8 && wc <= 0x3FFFD)) + if ((wc >= 0x1F3E0 && wc <= 0x3FFFD)) { - if ((wc >= 0x1F3F8 && wc <= 0x1F596)) + if ((wc >= 0x1F3E0 && wc <= 0x1F567)) { + if ((wc >= 0x1F3E0 && wc <= 0x1F3F0) || wc == 0x1F3F4) + return TRUE; if ((wc >= 0x1F3F8 && wc <= 0x1F43E) || wc == 0x1F440) return TRUE; if ((wc >= 0x1F442 && wc <= 0x1F4FC) || @@ -804,12 +824,12 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1F54B && wc <= 0x1F54E) || (wc >= 0x1F550 && wc <= 0x1F567)) return TRUE; - if (wc == 0x1F57A || (wc >= 0x1F595 && wc <= 0x1F596)) - return TRUE; return FALSE; } - if ((wc >= 0x1F5A4 && wc <= 0x1F6EC)) + if ((wc >= 0x1F57A && wc <= 0x1F6D7)) { + if (wc == 0x1F57A || (wc >= 0x1F595 && wc <= 0x1F596)) + return TRUE; if (wc == 0x1F5A4 || (wc >= 0x1F5FB && wc <= 0x1F64F)) return TRUE; if ((wc >= 0x1F680 && wc <= 0x1F6C5) || wc == 0x1F6CC) @@ -817,13 +837,13 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1F6D0 && wc <= 0x1F6D2) || (wc >= 0x1F6D5 && wc <= 0x1F6D7)) return TRUE; - if ((wc >= 0x1F6DD && wc <= 0x1F6DF) || - (wc >= 0x1F6EB && wc <= 0x1F6EC)) - return TRUE; return FALSE; } - if ((wc >= 0x1F6F4 && wc <= 0x1FA7C)) + if ((wc >= 0x1F6DC && wc <= 0x1F9FF)) { + if ((wc >= 0x1F6DC && wc <= 0x1F6DF) || + (wc >= 0x1F6EB && wc <= 0x1F6EC)) + return TRUE; if ((wc >= 0x1F6F4 && wc <= 0x1F6FC) || (wc >= 0x1F7E0 && wc <= 0x1F7EB)) return TRUE; @@ -832,23 +852,20 @@ _pango_is_EastAsianWide (gunichar wc) if ((wc >= 0x1F93C && wc <= 0x1F945) || (wc >= 0x1F947 && wc <= 0x1F9FF)) return TRUE; - if ((wc >= 0x1FA70 && wc <= 0x1FA74) || - (wc >= 0x1FA78 && wc <= 0x1FA7C)) - return TRUE; return FALSE; } - if ((wc >= 0x1FA80 && wc <= 0x3FFFD)) + if ((wc >= 0x1FA70 && wc <= 0x3FFFD)) { - if ((wc >= 0x1FA80 && wc <= 0x1FA86) || - (wc >= 0x1FA90 && wc <= 0x1FAAC)) + if ((wc >= 0x1FA70 && wc <= 0x1FA7C) || + (wc >= 0x1FA80 && wc <= 0x1FA88)) return TRUE; - if ((wc >= 0x1FAB0 && wc <= 0x1FABA) || - (wc >= 0x1FAC0 && wc <= 0x1FAC5)) + if ((wc >= 0x1FA90 && wc <= 0x1FABD) || + (wc >= 0x1FABF && wc <= 0x1FAC5)) return TRUE; - if ((wc >= 0x1FAD0 && wc <= 0x1FAD9) || - (wc >= 0x1FAE0 && wc <= 0x1FAE7)) + if ((wc >= 0x1FACE && wc <= 0x1FADB) || + (wc >= 0x1FAE0 && wc <= 0x1FAE8)) return TRUE; - if ((wc >= 0x1FAF0 && wc <= 0x1FAF6) || + if ((wc >= 0x1FAF0 && wc <= 0x1FAF8) || (wc >= 0x20000 && wc <= 0x2FFFD) || (wc >= 0x30000 && wc <= 0x3FFFD)) return TRUE; diff --git a/pango/pango-context.c b/pango/pango-context.c index d5e73cfe..54a0b683 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -123,8 +123,8 @@ pango_context_finalize (GObject *object) * For instance, the GTK toolkit has, among others, * `gtk_widget_get_pango_context()`. Use those instead. * - * Return value: the newly allocated `PangoContext`, which should - * be freed with g_object_unref(). + * Returns: (transfer full) (nullable): the newly allocated `PangoContext`, + * which should be freed with g_object_unref(). */ PangoContext * pango_context_new (void) @@ -190,9 +190,10 @@ pango_context_set_matrix (PangoContext *context, * * See [method@Pango.Context.set_matrix]. * - * Return value: (nullable): the matrix, or %NULL if no matrix has - * been set (which is the same as the identity matrix). The returned - * matrix is owned by Pango and must not be modified or freed. + * Returns: (transfer none) (nullable): the matrix, or %NULL if no + * matrix has been set (which is the same as the identity matrix). + * The returned matrix is owned by Pango and must not be modified + * or freed. * * Since: 1.6 */ @@ -207,7 +208,7 @@ pango_context_get_matrix (PangoContext *context) /** * pango_context_set_font_map: * @context: a `PangoContext` - * @font_map: the `PangoFontMap` to set. + * @font_map: (nullable): the `PangoFontMap` to set. * * Sets the font map to be searched when fonts are looked-up * in this context. @@ -244,8 +245,9 @@ pango_context_set_font_map (PangoContext *context, * * Gets the `PangoFontMap` used to look up fonts for this context. * - * Return value: (transfer none): the font map for the `PangoContext`. - * This value is owned by Pango and should not be unreferenced. + * Returns: (transfer none) (nullable): the font map for the. + * `PangoContext` This value is owned by Pango and should not be + * unreferenced. * * Since: 1.6 */ @@ -336,7 +338,7 @@ pango_context_load_fontset (PangoContext *context, /** * pango_context_set_font_description: * @context: a `PangoContext` - * @desc: the new pango font description + * @desc: (nullable): the new pango font description * * Set the default font description for the context */ @@ -363,7 +365,7 @@ pango_context_set_font_description (PangoContext *context, * * Retrieve the default font description for the context. * - * Return value: (transfer none): a pointer to the context's default font + * Returns: (transfer none) (nullable): a pointer to the context's default font * description. This value must not be modified or freed. */ PangoFontDescription * @@ -377,7 +379,7 @@ pango_context_get_font_description (PangoContext *context) /** * pango_context_set_language: * @context: a `PangoContext` - * @language: the new language tag. + * @language: (nullable): the new language tag. * * Sets the global language tag for the context. * @@ -406,7 +408,7 @@ pango_context_set_language (PangoContext *context, * * Retrieves the global language tag for the context. * - * Return value: the global language tag. + * Returns: (transfer none): the global language tag. */ PangoLanguage * pango_context_get_language (PangoContext *context) @@ -450,7 +452,7 @@ pango_context_set_base_dir (PangoContext *context, * * See [method@Pango.Context.set_base_dir]. * - * Return value: the base direction for the context. + * Returns: the base direction for the context. */ PangoDirection pango_context_get_base_dir (PangoContext *context) @@ -493,7 +495,7 @@ pango_context_set_base_gravity (PangoContext *context, * * See [method@Pango.Context.set_base_gravity]. * - * Return value: the base gravity for the context. + * Returns: the base gravity for the context. * * Since: 1.16 */ @@ -516,7 +518,7 @@ pango_context_get_base_gravity (PangoContext *context) * which [func@Pango.Gravity.get_for_matrix] is used to return the * gravity from the current context matrix. * - * Return value: the resolved gravity for the context. + * Returns: the resolved gravity for the context. * * Since: 1.16 */ @@ -562,7 +564,7 @@ pango_context_set_gravity_hint (PangoContext *context, * * See [method@Pango.Context.set_gravity_hint] for details. * - * Return value: the gravity hint for the context. + * Returns: the gravity hint for the context. * * Since: 1.16 */ @@ -681,8 +683,8 @@ update_metrics_from_items (PangoFontMetrics *metrics, * the returned fonts would be a composite of the metrics for the fonts loaded * for the individual families. * - * Return value: a `PangoFontMetrics` object. The caller must call - * [method@Pango.FontMetrics.unref] when finished using the object. + * Returns: (transfer full) (nullable): a `PangoFontMetrics` object. The caller + * must call [method@Pango.FontMetrics.unref] when finished using the object. */ PangoFontMetrics * pango_context_get_metrics (PangoContext *context, @@ -793,7 +795,7 @@ check_fontmap_changed (PangoContext *context) * and is only useful when implementing objects that need update when their * `PangoContext` changes, like `PangoLayout`. * - * Return value: The current serial number of @context. + * Returns: The current serial number of @context. * * Since: 1.32.4 */ diff --git a/pango/pango-emoji-table.h b/pango/pango-emoji-table.h index 84cd9193..4dc008d7 100644 --- a/pango/pango-emoji-table.h +++ b/pango/pango-emoji-table.h @@ -6,16 +6,16 @@ * * on file with this header: * - * # emoji-data-14.0.0.txt - * # Date: 2021-08-26, 17:22:22 GMT - * # © 2021 Unicode®, Inc. + * # emoji-data.txt + * # Date: 2022-08-02, 00:26:10 GMT + * # © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html * # * # Emoji Data for UTS #51 - * # Used with Emoji Version 14.0 and subsequent minor revisions (if any) + * # Used with Emoji Version 15.0 and subsequent minor revisions (if any) * # - * # For documentation and usage, see http://www.unicode.org/reports/tr51 + * # For documentation and usage, see https://www.unicode.org/reports/tr51 */ #ifndef PANGO_EMOJI_TABLE_H @@ -163,7 +163,7 @@ static const struct Interval _pango_Emoji_table[] = {0x1F680, 0x1F6C5}, {0x1F6CB, 0x1F6D2}, {0x1F6D5, 0x1F6D7}, - {0x1F6DD, 0x1F6E5}, + {0x1F6DC, 0x1F6E5}, {0x1F6E9, 0x1F6E9}, {0x1F6EB, 0x1F6EC}, {0x1F6F0, 0x1F6F0}, @@ -173,15 +173,13 @@ static const struct Interval _pango_Emoji_table[] = {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F9FF}, - {0x1FA70, 0x1FA74}, - {0x1FA78, 0x1FA7C}, - {0x1FA80, 0x1FA86}, - {0x1FA90, 0x1FAAC}, - {0x1FAB0, 0x1FABA}, - {0x1FAC0, 0x1FAC5}, - {0x1FAD0, 0x1FAD9}, - {0x1FAE0, 0x1FAE7}, - {0x1FAF0, 0x1FAF6}, + {0x1FA70, 0x1FA7C}, + {0x1FA80, 0x1FA88}, + {0x1FA90, 0x1FABD}, + {0x1FABF, 0x1FAC5}, + {0x1FACE, 0x1FADB}, + {0x1FAE0, 0x1FAE8}, + {0x1FAF0, 0x1FAF8}, }; static const struct Interval _pango_Emoji_Presentation_table[] = @@ -252,7 +250,7 @@ static const struct Interval _pango_Emoji_Presentation_table[] = {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2}, {0x1F6D5, 0x1F6D7}, - {0x1F6DD, 0x1F6DF}, + {0x1F6DC, 0x1F6DF}, {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6FC}, {0x1F7E0, 0x1F7EB}, @@ -260,15 +258,13 @@ static const struct Interval _pango_Emoji_Presentation_table[] = {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F9FF}, - {0x1FA70, 0x1FA74}, - {0x1FA78, 0x1FA7C}, - {0x1FA80, 0x1FA86}, - {0x1FA90, 0x1FAAC}, - {0x1FAB0, 0x1FABA}, - {0x1FAC0, 0x1FAC5}, - {0x1FAD0, 0x1FAD9}, - {0x1FAE0, 0x1FAE7}, - {0x1FAF0, 0x1FAF6}, + {0x1FA70, 0x1FA7C}, + {0x1FA80, 0x1FA88}, + {0x1FA90, 0x1FABD}, + {0x1FABF, 0x1FAC5}, + {0x1FACE, 0x1FADB}, + {0x1FAE0, 0x1FAE8}, + {0x1FAF0, 0x1FAF8}, }; static const struct Interval _pango_Emoji_Modifier_table[] = @@ -317,7 +313,7 @@ static const struct Interval _pango_Emoji_Modifier_Base_table[] = {0x1F9CD, 0x1F9CF}, {0x1F9D1, 0x1F9DD}, {0x1FAC3, 0x1FAC5}, - {0x1FAF0, 0x1FAF6}, + {0x1FAF0, 0x1FAF8}, }; static const struct Interval _pango_Extended_Pictographic_table[] = diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c index fc9e05b8..dc9d0354 100644 --- a/pango/pango-fontset.c +++ b/pango/pango-fontset.c @@ -55,7 +55,7 @@ pango_fontset_class_init (PangoFontsetClass *class) * Returns the font in the fontset that contains the best * glyph for a Unicode character. * - * Return value: (transfer full): a `PangoFont` + * Returns: (transfer full): a `PangoFont` */ PangoFont * pango_fontset_get_font (PangoFontset *fontset, @@ -73,7 +73,7 @@ pango_fontset_get_font (PangoFontset *fontset, * * Get overall metric information for the fonts in the fontset. * - * Return value: a `PangoFontMetrics` object + * Returns: (transfer full): a `PangoFontMetrics` object */ PangoFontMetrics * pango_fontset_get_metrics (PangoFontset *fontset) diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c index 7eb1737d..e58f6593 100644 --- a/pango/pango-glyph-item.c +++ b/pango/pango-glyph-item.c @@ -47,8 +47,8 @@ * This function is similar in function to pango_item_split() (and uses * it internally.) * - * Return value: the newly allocated item representing text before - * @split_index, which should be freed + * Returns: (transfer full) (nullable): the newly allocated item + * representing text before @split_index, which should be freed * with pango_glyph_item_free(). * * Since: 1.2 @@ -142,7 +142,7 @@ pango_glyph_item_split (PangoGlyphItem *orig, * * Make a deep copy of an existing `PangoGlyphItem` structure. * - * Return value: (nullable): the newly allocated `PangoGlyphItem` + * Returns: (transfer full) (nullable): the newly allocated `PangoGlyphItem` * * Since: 1.20 */ @@ -198,7 +198,7 @@ G_DEFINE_BOXED_TYPE (PangoGlyphItem, pango_glyph_item, * * Make a shallow copy of an existing `PangoGlyphItemIter` structure. * - * Return value: (nullable): the newly allocated `PangoGlyphItemIter` + * Returns: (transfer full) (nullable): the newly allocated `PangoGlyphItemIter` * * Since: 1.22 */ @@ -246,7 +246,7 @@ G_DEFINE_BOXED_TYPE (PangoGlyphItemIter, pango_glyph_item_iter, * * See `PangoGlyphItemIter` for details of cluster orders. * - * Return value: %TRUE if the iterator was advanced, + * Returns: %TRUE if the iterator was advanced, * %FALSE if we were already on the last cluster. * * Since: 1.22 @@ -336,7 +336,7 @@ pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter) * Moves the iterator to the preceding cluster in the glyph item. * See `PangoGlyphItemIter` for details of cluster orders. * - * Return value: %TRUE if the iterator was moved, + * Returns: %TRUE if the iterator was moved, * %FALSE if we were already on the first cluster. * * Since: 1.22 @@ -433,7 +433,7 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter) * * See `PangoGlyphItemIter` for details of cluster orders. * - * Return value: %FALSE if there are no clusters in the glyph item + * Returns: %FALSE if there are no clusters in the glyph item * * Since: 1.22 */ @@ -472,7 +472,7 @@ pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter, * * See `PangoGlyphItemIter` for details of cluster orders. * - * Return value: %FALSE if there are no clusters in the glyph item + * Returns: %FALSE if there are no clusters in the glyph item * * Since: 1.22 */ @@ -582,7 +582,7 @@ split_before_cluster_start (ApplyAttrsState *state) * This function takes ownership of @glyph_item; it will be reused * as one of the elements in the list. * - * Return value: (transfer full) (element-type Pango.GlyphItem): a + * Returns: (transfer full) (element-type Pango.GlyphItem): a * list of glyph items resulting from splitting @glyph_item. Free * the elements using [method@Pango.GlyphItem.free], the list using * g_slist_free(). diff --git a/pango/pango-layout.c b/pango/pango-layout.c index a1c47203..306741b5 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -280,7 +280,7 @@ pango_layout_finalize (GObject *object) * Create a new `PangoLayout` object with attributes initialized to * default values for a particular `PangoContext`. * - * Return value: the newly allocated `PangoLayout` + * Returns: (transfer full): the newly allocated `PangoLayout` */ PangoLayout * pango_layout_new (PangoContext *context) @@ -307,7 +307,7 @@ pango_layout_new (PangoContext *context) * The attribute list, tab array, and text from the original layout * are all copied by value. * - * Return value: (transfer full): the newly allocated `PangoLayout` + * Returns: (transfer full): the newly allocated `PangoLayout` */ PangoLayout* pango_layout_copy (PangoLayout *src) @@ -342,7 +342,7 @@ pango_layout_copy (PangoLayout *src) * * Retrieves the `PangoContext` used for this layout. * - * Return value: (transfer none): the `PangoContext` for the layout + * Returns: (transfer none): the `PangoContext` for the layout */ PangoContext * pango_layout_get_context (PangoLayout *layout) @@ -385,7 +385,7 @@ pango_layout_set_width (PangoLayout *layout, * * Gets the width to which the lines of the `PangoLayout` should wrap. * - * Return value: the width in Pango units, or -1 if no width set. + * Returns: the width in Pango units, or -1 if no width set. */ int pango_layout_get_width (PangoLayout *layout) @@ -457,7 +457,7 @@ pango_layout_set_height (PangoLayout *layout, * * See [method@Pango.Layout.set_height] for details. * - * Return value: the height, in Pango units if positive, + * Returns: the height, in Pango units if positive, * or number of lines if negative. * * Since: 1.20 @@ -506,7 +506,7 @@ pango_layout_set_wrap (PangoLayout *layout, * Use [method@Pango.Layout.is_wrapped] to query whether * any paragraphs were actually wrapped. * - * Return value: active wrap mode. + * Returns: active wrap mode. */ PangoWrapMode pango_layout_get_wrap (PangoLayout *layout) @@ -527,7 +527,7 @@ pango_layout_get_wrap (PangoLayout *layout) * and there are paragraphs exceeding the layout width that have * to be wrapped. * - * Return value: %TRUE if any paragraphs had to be wrapped, %FALSE + * Returns: %TRUE if any paragraphs had to be wrapped, %FALSE * otherwise * * Since: 1.16 @@ -579,7 +579,7 @@ pango_layout_set_indent (PangoLayout *layout, * * A negative value indicates a hanging indentation. * - * Return value: the indent in Pango units + * Returns: the indent in Pango units */ int pango_layout_get_indent (PangoLayout *layout) @@ -629,7 +629,7 @@ pango_layout_set_spacing (PangoLayout *layout, * * Gets the amount of spacing between the lines of the layout. * - * Return value: the spacing in Pango units + * Returns: the spacing in Pango units */ int pango_layout_get_spacing (PangoLayout *layout) @@ -740,7 +740,7 @@ pango_layout_set_attributes (PangoLayout *layout, * * Gets the attribute list for the layout, if any. * - * Return value: (transfer none) (nullable): a `PangoAttrList` + * Returns: (transfer none) (nullable): a `PangoAttrList` */ PangoAttrList* pango_layout_get_attributes (PangoLayout *layout) @@ -786,7 +786,7 @@ pango_layout_set_font_description (PangoLayout *layout, * * Gets the font description for the layout, if any. * - * Return value: (transfer none) (nullable): a pointer to the + * Returns: (transfer none) (nullable): a pointer to the * layout's font description, or %NULL if the font description * from the layout's context is inherited. * @@ -847,7 +847,7 @@ pango_layout_set_justify (PangoLayout *layout, * Gets whether each complete line should be stretched to fill the entire * width of the layout. * - * Return value: the justify value + * Returns: the justify value */ gboolean pango_layout_get_justify (PangoLayout *layout) @@ -893,7 +893,7 @@ pango_layout_set_justify_last_line (PangoLayout *layout, * Gets whether the last line should be stretched * to fill the entire width of the layout. * - * Return value: the justify value + * Returns: the justify value * * Since: 1.50 */ @@ -953,7 +953,7 @@ pango_layout_set_auto_dir (PangoLayout *layout, * * See [method@Pango.Layout.set_auto_dir]. * - * Return value: %TRUE if the bidirectional base direction + * Returns: %TRUE if the bidirectional base direction * is computed from the layout's contents, %FALSE otherwise * * Since: 1.4 @@ -996,7 +996,7 @@ pango_layout_set_alignment (PangoLayout *layout, * Gets the alignment for the layout: how partial lines are * positioned within the horizontal space available. * - * Return value: the alignment + * Returns: the alignment */ PangoAlignment pango_layout_get_alignment (PangoLayout *layout) @@ -1057,7 +1057,7 @@ pango_layout_set_tabs (PangoLayout *layout, * * The return value should be freed with [method@Pango.TabArray.free]. * - * Return value: (transfer full) (nullable): a copy of the tabs for this layout + * Returns: (transfer full) (nullable): a copy of the tabs for this layout */ PangoTabArray* pango_layout_get_tabs (PangoLayout *layout) @@ -1107,7 +1107,7 @@ pango_layout_set_single_paragraph_mode (PangoLayout *layout, * * See [method@Pango.Layout.set_single_paragraph_mode]. * - * Return value: %TRUE if the layout does not break paragraphs + * Returns: %TRUE if the layout does not break paragraphs * at paragraph separator characters, %FALSE otherwise */ gboolean @@ -1167,7 +1167,7 @@ pango_layout_set_ellipsize (PangoLayout *layout, * Use [method@Pango.Layout.is_ellipsized] to query whether any * paragraphs were actually ellipsized. * - * Return value: the current ellipsization mode for @layout + * Returns: the current ellipsization mode for @layout * * Since: 1.6 */ @@ -1190,7 +1190,7 @@ pango_layout_get_ellipsize (PangoLayout *layout) * and there are paragraphs exceeding that width that have to be * ellipsized. * - * Return value: %TRUE if any paragraphs had to be ellipsized, + * Returns: %TRUE if any paragraphs had to be ellipsized, * %FALSE otherwise * * Since: 1.16 @@ -1297,7 +1297,7 @@ pango_layout_set_text (PangoLayout *layout, * * The returned text should not be freed or modified. * - * Return value: (transfer none): the text in the @layout + * Returns: (transfer none): the text in the @layout */ const char* pango_layout_get_text (PangoLayout *layout) @@ -1319,7 +1319,7 @@ pango_layout_get_text (PangoLayout *layout) * Returns the number of Unicode characters in the * the text of @layout. * - * Return value: the number of Unicode characters + * Returns: the number of Unicode characters * in the text of @layout * * Since: 1.30 @@ -1423,7 +1423,7 @@ pango_layout_set_markup_with_accel (PangoLayout *layout, * used in combination with %PANGO_ATTR_FALLBACK, to check if a * certain font supports all the characters in the string. * - * Return value: The number of unknown glyphs in @layout + * Returns: The number of unknown glyphs in @layout * * Since: 1.16 */ @@ -1525,7 +1525,7 @@ pango_layout_context_changed (PangoLayout *layout) * To force the serial to be increased, use * [method@Pango.Layout.context_changed]. * - * Return value: The current serial number of @layout. + * Returns: The current serial number of @layout. * * Since: 1.32.4 */ @@ -1615,7 +1615,7 @@ pango_layout_get_log_attrs_readonly (PangoLayout *layout, * * Retrieves the count of lines for the @layout. * - * Return value: the line count + * Returns: the line count */ int pango_layout_get_line_count (PangoLayout *layout) @@ -1635,7 +1635,7 @@ pango_layout_get_line_count (PangoLayout *layout) * Use the faster [method@Pango.Layout.get_lines_readonly] if you do not * plan to modify the contents of the lines (glyphs, glyph widths, etc.). * - * Return value: (element-type Pango.LayoutLine) (transfer none): a `GSList` + * Returns: (element-type Pango.LayoutLine) (transfer none): a `GSList` * containing the lines in the layout. This points to internal data of the * `PangoLayout` and must be used with care. It will become invalid on any * change to the layout's text or properties. @@ -1670,7 +1670,7 @@ pango_layout_get_lines (PangoLayout *layout) * but the user is not expected to modify the contents of the lines * (glyphs, glyph widths, etc.). * - * Return value: (element-type Pango.LayoutLine) (transfer none): a `GSList` + * Returns: (element-type Pango.LayoutLine) (transfer none): a `GSList` * containing the lines in the layout. This points to internal data of the * `PangoLayout` and must be used with care. It will become invalid on any * change to the layout's text or properties. No changes should be made to @@ -1697,7 +1697,7 @@ pango_layout_get_lines_readonly (PangoLayout *layout) * Use the faster [method@Pango.Layout.get_line_readonly] if you do not * plan to modify the contents of the line (glyphs, glyph widths, etc.). * - * Return value: (transfer none) (nullable): the requested `PangoLayoutLine`, + * Returns: (transfer none) (nullable): the requested `PangoLayoutLine`, * or %NULL if the index is out of range. This layout line can be ref'ed * and retained, but will become invalid if changes are made to the * `PangoLayout`. @@ -1739,7 +1739,7 @@ pango_layout_get_line (PangoLayout *layout, * but the user is not expected to modify the contents of the line * (glyphs, glyph widths, etc.). * - * Return value: (transfer none) (nullable): the requested `PangoLayoutLine`, + * Returns: (transfer none) (nullable): the requested `PangoLayoutLine`, * or %NULL if the index is out of range. This layout line can be ref'ed * and retained, but will become invalid if changes are made to the * `PangoLayout`. No changes should be made to the line. @@ -2291,7 +2291,7 @@ pango_layout_move_cursor_visually (PangoLayout *layout, * the X or Y positions were not inside the layout, then the function returns * %FALSE; on an exact hit, it returns %TRUE. * - * Return value: %TRUE if the coordinates were inside text, %FALSE otherwise + * Returns: %TRUE if the coordinates were inside text, %FALSE otherwise */ gboolean pango_layout_xy_to_index (PangoLayout *layout, @@ -2385,7 +2385,7 @@ pango_layout_xy_to_index (PangoLayout *layout, * Converts from an index within a `PangoLayout` to the onscreen position * corresponding to the grapheme at that index. * - * The return value is represented as rectangle. Note that `pos->x` is + * The returns is represented as rectangle. Note that `pos->x` is * always the leading edge of the grapheme and `pos->x + pos->width` the * trailing edge of the grapheme. If the directionality of the grapheme * is right-to-left, then `pos->width` will be negative. @@ -3206,7 +3206,7 @@ pango_layout_get_pixel_size (PangoLayout *layout, * * Gets the Y position of baseline of the first line in @layout. * - * Return value: baseline of first line, from top of @layout + * Returns: baseline of first line, from top of @layout * * Since: 1.22 */ @@ -4986,7 +4986,7 @@ pango_layout_check_lines (PangoLayout *layout) * * Increase the reference count of a `PangoLayoutLine` by one. * - * Return value: the line passed in. + * Returns: (transfer full) (nullable): the line passed in. * * Since: 1.10 */ @@ -5121,7 +5121,7 @@ pango_layout_line_get_resolved_direction (PangoLayoutLine *line) * in the line and @trailing being set to the number of characters in that * grapheme. The reverse is true for a left-to-right line. * - * Return value: %FALSE if @x_pos was outside the line, %TRUE if inside + * Returns: %FALSE if @x_pos was outside the line, %TRUE if inside */ gboolean pango_layout_line_x_to_index (PangoLayoutLine *line, @@ -7124,7 +7124,7 @@ update_run (PangoLayoutIter *iter, * * Copies a `PangoLayoutIter`. * - * Return value: (nullable): the newly allocated `PangoLayoutIter` + * Returns: (transfer full) (nullable): the newly allocated `PangoLayoutIter` * * Since: 1.20 */ @@ -7184,7 +7184,7 @@ G_DEFINE_BOXED_TYPE (PangoLayoutIter, pango_layout_iter, * * Returns an iterator to iterate over the visual extents of the layout. * - * Return value: the new `PangoLayoutIter` + * Returns: (transfer full): the new `PangoLayoutIter` */ PangoLayoutIter* pango_layout_get_iter (PangoLayout *layout) @@ -7290,7 +7290,7 @@ pango_layout_iter_free (PangoLayoutIter *iter) * the index may be equal to the length of the text in the * layout, if on the %NULL run (see [method@Pango.LayoutIter.get_run]). * - * Return value: current byte index + * Returns: current byte index */ int pango_layout_iter_get_index (PangoLayoutIter *iter) @@ -7315,7 +7315,7 @@ pango_layout_iter_get_index (PangoLayoutIter *iter) * Use the faster [method@Pango.LayoutIter.get_run_readonly] if you do not * plan to modify the contents of the run (glyphs, glyph widths, etc.). * - * Return value: (transfer none) (nullable): the current run + * Returns: (transfer none) (nullable): the current run */ PangoLayoutRun* pango_layout_iter_get_run (PangoLayoutIter *iter) @@ -7343,7 +7343,7 @@ pango_layout_iter_get_run (PangoLayoutIter *iter) * but the user is not expected to modify the contents of the run (glyphs, * glyph widths, etc.). * - * Return value: (transfer none) (nullable): the current run, that + * Returns: (transfer none) (nullable): the current run, that * should not be modified * * Since: 1.16 @@ -7382,7 +7382,7 @@ _pango_layout_iter_get_run (PangoLayoutIter *iter) * you do not plan to modify the contents of the line (glyphs, * glyph widths, etc.). * - * Return value: (transfer none): the current line + * Returns: (transfer none) (nullable): the current line */ PangoLayoutLine* pango_layout_iter_get_line (PangoLayoutIter *iter) @@ -7405,7 +7405,7 @@ pango_layout_iter_get_line (PangoLayoutIter *iter) * but the user is not expected to modify the contents of the line * (glyphs, glyph widths, etc.). * - * Return value: (transfer none): the current line, that should not be + * Returns: (transfer none) (nullable): the current line, that should not be * modified * * Since: 1.16 @@ -7425,7 +7425,7 @@ pango_layout_iter_get_line_readonly (PangoLayoutIter *iter) * * Determines whether @iter is on the last line of the layout. * - * Return value: %TRUE if @iter is on the last line + * Returns: %TRUE if @iter is on the last line */ gboolean pango_layout_iter_at_last_line (PangoLayoutIter *iter) @@ -7442,7 +7442,7 @@ pango_layout_iter_at_last_line (PangoLayoutIter *iter) * * Gets the layout associated with a `PangoLayoutIter`. * - * Return value: (transfer none): the layout associated with @iter + * Returns: (transfer none) (nullable): the layout associated with @iter * * Since: 1.20 */ @@ -7566,7 +7566,7 @@ next_cluster_internal (PangoLayoutIter *iter, * * If @iter was already at the end of the layout, returns %FALSE. * - * Return value: whether motion was possible + * Returns: whether motion was possible */ gboolean pango_layout_iter_next_char (PangoLayoutIter *iter) @@ -7611,7 +7611,7 @@ pango_layout_iter_next_char (PangoLayoutIter *iter) * * If @iter was already at the end of the layout, returns %FALSE. * - * Return value: whether motion was possible + * Returns: whether motion was possible */ gboolean pango_layout_iter_next_cluster (PangoLayoutIter *iter) @@ -7627,7 +7627,7 @@ pango_layout_iter_next_cluster (PangoLayoutIter *iter) * * If @iter was already at the end of the layout, returns %FALSE. * - * Return value: whether motion was possible + * Returns: whether motion was possible */ gboolean pango_layout_iter_next_run (PangoLayoutIter *iter) @@ -7672,7 +7672,7 @@ pango_layout_iter_next_run (PangoLayoutIter *iter) * * If @iter is already on the last line, returns %FALSE. * - * Return value: whether motion was possible + * Returns: whether motion was possible */ gboolean pango_layout_iter_next_line (PangoLayoutIter *iter) @@ -7991,7 +7991,7 @@ pango_layout_iter_get_line_yrange (PangoLayoutIter *iter, * * Layout coordinates have the origin at the top left of the entire layout. * - * Return value: baseline of current line + * Returns: baseline of current line */ int pango_layout_iter_get_baseline (PangoLayoutIter *iter) diff --git a/pango/pango-utils.c b/pango/pango-utils.c index b942921e..ce294230 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -76,7 +76,7 @@ pango_version (void) * This is similar to the macro %PANGO_VERSION_STRING except that the * macro returns the version available at compile-time. * - * Returns: A string containing the version of Pango library available + * Returns: (transfer none): A string containing the version of Pango library available * at run time. The returned string is owned by Pango and should not * be modified or freed. * @@ -112,7 +112,7 @@ pango_version_string (void) * * For compile-time version checking use PANGO_VERSION_CHECK(). * - * Return value: (nullable): %NULL if the Pango library is compatible + * Returns: (transfer none) (nullable): %NULL if the Pango library is compatible * with the given version, or a string describing the version * mismatch. The returned string is owned by Pango and should not * be modified or freed. @@ -144,7 +144,7 @@ pango_version_check (int required_major, * * Trims leading and trailing whitespace from a string. * - * Return value: A newly-allocated string that must be freed with g_free() + * Returns: (transfer full): A newly-allocated string that must be freed with g_free() * * Deprecated: 1.38 */ @@ -178,7 +178,7 @@ _pango_trim_string (const char *str) * Splits a %G_SEARCHPATH_SEPARATOR-separated list of files, stripping * white space and substituting ~/ with $HOME/. * - * Return value: (transfer full) (array zero-terminated=1): a list of + * Returns: (transfer full) (array zero-terminated=1): a list of * strings to be freed with g_strfreev() * * Deprecated: 1.38 @@ -251,7 +251,7 @@ pango_split_file_list (const char *str) * any other character is ignored and written into the output buffer * unmodified. * - * Return value: 0 if the stream was already at an %EOF character, + * Returns: 0 if the stream was already at an %EOF character, * otherwise the number of lines read (this is useful for maintaining * a line number counter which doesn't combine lines with '\') * @@ -356,7 +356,7 @@ pango_read_line (FILE *stream, GString *str) * * Skips 0 or more characters of white space. * - * Return value: %FALSE if skipping the white space leaves + * Returns: %FALSE if skipping the white space leaves * the position at a '\0' character. * * Deprecated: 1.38 @@ -384,7 +384,7 @@ pango_skip_space (const char **pos) * A word consists of [A-Za-z_] followed by zero or more * [A-Za-z_0-9]. Leading white space is skipped. * - * Return value: %FALSE if a parse error occurred + * Returns: %FALSE if a parse error occurred * * Deprecated: 1.38 */ @@ -430,7 +430,7 @@ pango_scan_word (const char **pos, GString *out) * or a quoted string with '"'. Instead a quoted string, '\"' represents * a literal quote. Leading white space outside of quotes is skipped. * - * Return value: %FALSE if a parse error occurred + * Returns: %FALSE if a parse error occurred * * Deprecated: 1.38 */ @@ -521,7 +521,7 @@ pango_scan_string (const char **pos, GString *out) * * Leading white space is skipped. * - * Return value: %FALSE if a parse error occurred + * Returns: %FALSE if a parse error occurred * * Deprecated: 1.38 */ @@ -562,7 +562,7 @@ _pango_scan_int (const char **pos, int *out) * * Do not use. Does not do anything. * - * Return value: %NULL + * Returns: (nullable): %NULL * * Deprecated: 1.38 */ @@ -578,7 +578,7 @@ pango_config_key_get_system (const char *key) * * Do not use. Does not do anything. * - * Return value: %NULL + * Returns: (nullable): %NULL * * Deprecated: 1.38 */ @@ -594,7 +594,7 @@ pango_config_key_get (const char *key) * Returns the name of the "pango" subdirectory of SYSCONFDIR * (which is set at compile time). * - * Return value: the Pango sysconf directory. The returned string should + * Returns: (transfer none): the Pango sysconf directory. The returned string should * not be freed. * * Deprecated: 1.38 @@ -623,7 +623,7 @@ pango_get_sysconf_subdirectory (void) * Returns the name of the "pango" subdirectory of LIBDIR * (which is set at compile time). * - * Return value: the Pango lib directory. The returned string should + * Returns: (transfer none): the Pango lib directory. The returned string should * not be freed. * * Deprecated: 1.38 @@ -692,7 +692,7 @@ parse_int (const char *word, * If failed and @possible_values is not %NULL, returned string should * be freed using g_free(). * - * Return value: %TRUE if @str was successfully parsed + * Returns: %TRUE if @str was successfully parsed * * Deprecated: 1.38 * @@ -858,7 +858,7 @@ pango_lookup_aliases (const char *fontname, * Searches a string the first character that has a strong * direction, according to the Unicode bidirectional algorithm. * - * Return value: The direction corresponding to the first strong character. + * Returns: The direction corresponding to the first strong character. * If no such character is found, then %PANGO_DIRECTION_NEUTRAL is returned. * * Since: 1.4 @@ -901,7 +901,7 @@ pango_find_base_dir (const gchar *text, * * This is totally different from [func@GLib.unichar_iszerowidth] and is at best misnamed. * - * Return value: %TRUE if @ch is a zero-width character, %FALSE otherwise + * Returns: %TRUE if @ch is a zero-width character, %FALSE otherwise * * Since: 1.10 */ @@ -997,7 +997,7 @@ pango_quantize_line_geometry (int *thickness, * The conversion is done by multiplying @d by %PANGO_SCALE and * rounding the result to nearest integer. * - * Return value: the value in Pango units. + * Returns: the value in Pango units. * * Since: 1.16 */ @@ -1015,7 +1015,7 @@ pango_units_from_double (double d) * * The conversion is done by dividing @i by %PANGO_SCALE. * - * Return value: the double value. + * Returns: the double value. * * Since: 1.16 */ diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c index e090bfc4..6e59a4f9 100644 --- a/pango/pangocoretext-fontmap.c +++ b/pango/pangocoretext-fontmap.c @@ -328,7 +328,7 @@ ct_font_descriptor_get_weight (CTFontDescriptorRef desc) if (!(value >= ct_weight_min && value <= ct_weight_max)) { i = value > ct_weight_max ? G_N_ELEMENTS (ct_weight_map) - 1 : 0; - weight = ct_weight_map[i].ct_weight; + weight = ct_weight_map[i].pango_weight; } else { diff --git a/pango/serializer.c b/pango/serializer.c index 2dab93b4..e3a22800 100644 --- a/pango/serializer.c +++ b/pango/serializer.c @@ -653,7 +653,8 @@ add_run (GtkJsonPrinter *printer, gtk_json_printer_add_string (printer, "language", pango_language_to_string (run->item->analysis.language)); gtk_json_printer_add_string (printer, "script", get_script_name (run->item->analysis.script)); - add_font (printer, "font", run->item->analysis.font); + if (run->item->analysis.font) + add_font (printer, "font", run->item->analysis.font); gtk_json_printer_add_integer (printer, "flags", run->item->analysis.flags & ANALYSIS_FLAGS); diff --git a/pango/shape.c b/pango/shape.c index 1ad1f494..81cfedf0 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -404,7 +404,7 @@ pango_hb_shape (const char *item_text, hyphen_index = item_offset + item_length - last_char_len; - if (log_attrs[num_chars].break_removes_preceding) + if (log_attrs && log_attrs[num_chars].break_removes_preceding) item_length -= last_char_len; } @@ -444,7 +444,7 @@ pango_hb_shape (const char *item_text, break; case PANGO_TEXT_TRANSFORM_CAPITALIZE: - if (log_attrs[i].is_word_start) + if (log_attrs && log_attrs[i].is_word_start) ch = g_unichar_totitle (ch); break; @@ -785,6 +785,10 @@ pango_shape_internal (const char *item_text, * that API allows for shaping interaction happening across text item * boundaries. * + * Some aspects of hyphen insertion and text transformation (in particular, + * capitalization) require log attrs, and thus can only be handled by + * [func@Pango.shape_item]. + * * Note that the extra attributes in the @analyis that is returned from * [func@Pango.itemize] have indices that are relative to the entire paragraph, * so you need to subtract the item offset from their indices before @@ -820,6 +824,10 @@ pango_shape (const char *text, * text of which @item_text is part of, provide the broader text as * @paragraph_text. If @paragraph_text is %NULL, item text is used instead. * + * Some aspects of hyphen insertion and text transformation (in particular, + * capitalization) require log attrs, and thus can only be handled by + * [func@Pango.shape_item]. + * * Note that the extra attributes in the @analyis that is returned from * [func@Pango.itemize] have indices that are relative to the entire paragraph, * so you do not pass the full paragraph text as @paragraph_text, you need @@ -864,6 +872,10 @@ pango_shape_full (const char *item_text, * This is similar to [func@Pango.shape_full], except it also takes flags * that can influence the shaping process. * + * Some aspects of hyphen insertion and text transformation (in particular, + * capitalization) require log attrs, and thus can only be handled by + * [func@Pango.shape_item]. + * * Note that the extra attributes in the @analyis that is returned from * [func@Pango.itemize] have indices that are relative to the entire paragraph, * so you do not pass the full paragraph text as @paragraph_text, you need @@ -901,8 +913,9 @@ pango_shape_with_flags (const char *item_text, * * This is similar to [func@Pango.shape_with_flags], except it takes a * `PangoItem` instead of separate @item_text and @analysis arguments. - * It also takes @log_attrs, which may be used in implementing text - * transforms. + * + * It also takes @log_attrs, which are needed for implementing some aspects + * of hyphen insertion and text transforms (in particular, capitalization). * * Note that the extra attributes in the @analyis that is returned from * [func@Pango.itemize] have indices that are relative to the entire paragraph, diff --git a/tests/GraphemeBreakTest.txt b/tests/GraphemeBreakTest.txt index eff2fd33..3c73f97b 100644 --- a/tests/GraphemeBreakTest.txt +++ b/tests/GraphemeBreakTest.txt @@ -1,11 +1,11 @@ -# GraphemeBreakTest-14.0.0.txt -# Date: 2021-03-08, 06:22:32 GMT -# © 2021 Unicode®, Inc. +# GraphemeBreakTest-15.0.0.txt +# Date: 2022-02-26, 00:38:37 GMT +# © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # Default Grapheme_Cluster_Break Test # diff --git a/tests/SentenceBreakTest.txt b/tests/SentenceBreakTest.txt index 61ea42cf..be53fe95 100644 --- a/tests/SentenceBreakTest.txt +++ b/tests/SentenceBreakTest.txt @@ -1,11 +1,11 @@ -# SentenceBreakTest-14.0.0.txt -# Date: 2021-03-08, 06:22:40 GMT -# © 2021 Unicode®, Inc. +# SentenceBreakTest-15.0.0.txt +# Date: 2022-02-26, 00:39:00 GMT +# © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # Default Sentence_Break Test # diff --git a/tests/WordBreakTest.txt b/tests/WordBreakTest.txt index 1d1435bf..27f64bfe 100644 --- a/tests/WordBreakTest.txt +++ b/tests/WordBreakTest.txt @@ -1,11 +1,11 @@ -# WordBreakTest-14.0.0.txt -# Date: 2021-03-08, 06:22:40 GMT -# © 2021 Unicode®, Inc. +# WordBreakTest-15.0.0.txt +# Date: 2022-02-26, 00:39:00 GMT +# © 2022 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 terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # Default Word_Break Test # diff --git a/tests/meson.build b/tests/meson.build index e75b8e2f..8b4bfa38 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -63,6 +63,7 @@ if cairo_dep.found() tests += [ [ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep, libpangoft2_dep ] ], [ 'test-fonts', [ 'test-fonts.c', 'test-common.c' ], [ libpangocairo_dep, libpangoft2_dep ] ], + [ 'test-no-fonts', [ 'test-no-fonts.c' ], [ libpangocairo_dep, libpangoft2_dep ] ], ] endif endif diff --git a/tests/nofonts/fonts.conf b/tests/nofonts/fonts.conf new file mode 100644 index 00000000..15685421 --- /dev/null +++ b/tests/nofonts/fonts.conf @@ -0,0 +1,71 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> +<fontconfig> + <cachedir>/tmp/cache</cachedir> + + <match target="font"> + <test name="outline" compare="eq"> + <bool>false</bool> + </test> + <edit name="pixelsizefixupfactor" mode="assign"> + <divide> + <name target="pattern">pixelsize</name> + <name target="font">pixelsize</name> + </divide> + </edit> + </match> + + <match target="font"> + <test name="outline" compare="eq"> + <bool>false</bool> + </test> + <test name="pixelsizefixupfactor" compare="not_eq"> + <double>1.0</double> + </test> + <edit name="matrix" mode="assign"> + <times> + <name>matrix</name> + <matrix> + <name>pixelsizefixupfactor</name> <double>0</double> + <double>0</double> <name>pixelsizefixupfactor</name> + </matrix> + </times> + </edit> + <edit name="size" mode="assign"> + <divide> + <name>size</name> + <name>pixelsizefixupfactor</name> + </divide> + </edit> + </match> + + <alias binding="same"> + <family>Noto Color Emoji</family> + <default><family>emoji</family></default> + </alias> + + <match> + <test name="lang"> + <string>und-zsye</string> + </test> + <test qual="all" name="family" compare="not_eq"> + <string>emoji</string> + </test> + <edit name="family" mode="append" binding="strong"> + <string>emoji</string> + </edit> + </match> + + <alias binding="same"> + <family>emoji</family> + <prefer> + <family>Noto Color Emoji</family> + </prefer> + </alias> + + <alias> + <family>monospace</family> + <prefer><family>DejaVu Sans Mono</family></prefer> + </alias> + +</fontconfig> diff --git a/tests/test-no-fonts.c b/tests/test-no-fonts.c new file mode 100644 index 00000000..c057874d --- /dev/null +++ b/tests/test-no-fonts.c @@ -0,0 +1,109 @@ +/* Pango + * test-no-fonts.c: Check that lack of fonts is survivable + * + * Copyright (C) 2022 Red Hat, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <glib.h> +#include <string.h> +#include <locale.h> + +#ifndef G_OS_WIN32 +#include <unistd.h> +#endif + +#include "config.h" +#include <pango/pangocairo.h> +#include <pango/pangocairo-fc.h> +#include <pango/pangofc-fontmap.h> +#include "test-common.h" + + +static void +install_fonts (const char *dir) +{ + FcConfig *config; + PangoFontMap *map; + char *path; + gsize len; + char *conf; + + map = g_object_new (PANGO_TYPE_CAIRO_FC_FONT_MAP, NULL); + + config = FcConfigCreate (); + + path = g_build_filename (dir, "fonts.conf", NULL); + g_file_get_contents (path, &conf, &len, NULL); + + if (!FcConfigParseAndLoadFromMemory (config, (const FcChar8 *) conf, TRUE)) + g_error ("Failed to parse fontconfig configuration"); + + g_free (conf); + g_free (path); + + FcConfigAppFontAddDir (config, (const FcChar8 *) dir); + pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (map), config); + FcConfigDestroy (config); + + pango_cairo_font_map_set_default (PANGO_CAIRO_FONT_MAP (map)); + + g_object_unref (map); +} + +static void +test_nofonts (void) +{ + PangoContext *context; + const char *text; + PangoLayout *layout; + int missing; + + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + layout = pango_layout_new (context); + + text = "Schlaf, Kindlein schlaf! " + "Der Vater hüt' die Schaf, " + "die Mutter schúttelt's Bäumelein, " + "da fällt herab ein Träumelein. " + "Schlaf, Kindlein schlaf!"; + + pango_layout_set_text (layout, text, -1); + missing = pango_layout_get_unknown_glyphs_count (layout); + g_assert_cmpint (missing, ==, g_utf8_strlen (text, -1)); + + g_object_unref (layout); + g_object_unref (context); +} + +int +main (int argc, char *argv[]) +{ + char *path; + + setlocale (LC_ALL, ""); + + g_test_init (&argc, &argv, NULL); + + path = g_test_build_filename (G_TEST_DIST, "nofonts", NULL); + install_fonts (path); + g_free (path); + + g_test_add_func ("/layout/nofonts", test_nofonts); + + return g_test_run (); +} |