Hello community, here is the log from the commit of package pango for openSUSE:Factory checked in at 2020-09-25 16:25:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pango (Old) and /work/SRC/openSUSE:Factory/.pango.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pango" Fri Sep 25 16:25:11 2020 rev:124 rq:836044 version:1.46.2 Changes: -------- --- /work/SRC/openSUSE:Factory/pango/pango.changes 2020-08-28 21:20:48.388308045 +0200 +++ /work/SRC/openSUSE:Factory/.pango.new.4249/pango.changes 2020-09-25 16:28:12.503713603 +0200 @@ -1,0 +2,13 @@ +Sat Sep 19 16:21:16 UTC 2020 - Bjørn Lie <bjorn....@gmail.com> + +- Update to version 1.46.2: + + Fix pango_win32_font_map_load_font with falback families. + + Fix an assertion in pango_language_get_scripts. + + Fix a crash in get_items_log_attrs. + + Fix attribute iterators with overlapping attributes. + + Fix rendering of Emoji keycap sequences. + + ci: Run the testsuite under asan and fix all reported issues. + + build: Make libthai, cairo, xft, fontconfig, freetype + dependencies meson features. + +------------------------------------------------------------------- Old: ---- pango-1.46.1.obscpio New: ---- pango-1.46.2.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pango.spec ++++++ --- /var/tmp/diff_new_pack.PenYEM/_old 2020-09-25 16:28:13.175714199 +0200 +++ /var/tmp/diff_new_pack.PenYEM/_new 2020-09-25 16:28:13.175714199 +0200 @@ -17,7 +17,7 @@ Name: pango -Version: 1.46.1 +Version: 1.46.2 Release: 0 Summary: Library for Layout and Rendering of Text License: LGPL-2.1-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.PenYEM/_old 2020-09-25 16:28:13.211714230 +0200 +++ /var/tmp/diff_new_pack.PenYEM/_new 2020-09-25 16:28:13.215714234 +0200 @@ -2,7 +2,7 @@ <service name="obs_scm" mode="disabled"> <param name="url">https://gitlab.gnome.org/GNOME/pango.git</param> <param name="scm">git</param> - <param name="revision">1.46.1</param> + <param name="revision">1.46.2</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> ++++++ pango-1.46.1.obscpio -> pango-1.46.2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/.gitlab-ci/fedora.Dockerfile new/pango-1.46.2/.gitlab-ci/fedora.Dockerfile --- old/pango-1.46.1/.gitlab-ci/fedora.Dockerfile 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/.gitlab-ci/fedora.Dockerfile 2020-09-18 20:46:01.000000000 +0200 @@ -26,8 +26,10 @@ harfbuzz-devel \ hicolor-icon-theme \ itstool \ + libasan \ lcov \ libthai-devel \ + libubsan \ libXft-devel \ ninja-build \ python3 \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/.gitlab-ci/run-tests.sh new/pango-1.46.2/.gitlab-ci/run-tests.sh --- old/pango-1.46.1/.gitlab-ci/run-tests.sh 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/.gitlab-ci/run-tests.sh 2020-09-18 20:46:01.000000000 +0200 @@ -6,6 +6,9 @@ srcdir=$( pwd ) builddir=$1 +# Ignore memory leaks lower in dependencies +export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp + meson test -C ${builddir} \ --print-errorlogs \ --suite=pango diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/.gitlab-ci.yml new/pango-1.46.2/.gitlab-ci.yml --- old/pango-1.46.1/.gitlab-ci.yml 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/.gitlab-ci.yml 2020-09-18 20:46:01.000000000 +0200 @@ -1,5 +1,6 @@ stages: - build + - analysis - docs - deploy @@ -9,8 +10,9 @@ MESON_TEST_TIMEOUT_MULTIPLIER: 2 linux-fedora: - image: registry.gitlab.gnome.org/gnome/pango/fedora:v1 + image: registry.gitlab.gnome.org/gnome/pango/fedora:v2 stage: build + needs: [] variables: EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both" script: @@ -31,8 +33,32 @@ - "${CI_PROJECT_DIR}/_build/hello.png" - "${CI_PROJECT_DIR}/_build/fontlist.txt" +asan-build: + image: registry.gitlab.gnome.org/gnome/pango/fedora:v2 + tags: [ asan ] + stage: analysis + needs: [] + variables: + script: + - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build + - ninja -C _build + - .gitlab-ci/run-tests.sh _build + allow_failure: true + artifacts: + when: always + reports: + junit: + - "${CI_PROJECT_DIR}/_build/report.xml" + name: "gtk-${CI_COMMIT_REF_NAME}" + paths: + - "${CI_PROJECT_DIR}/_build/meson-logs" + - "${CI_PROJECT_DIR}/_build/report.xml" + - "${CI_PROJECT_DIR}/_build/hello.png" + - "${CI_PROJECT_DIR}/_build/fontlist.txt" + msys2-mingw64: stage: build + needs: [] tags: - win32-ps variables: @@ -54,6 +80,7 @@ reference: image: registry.gitlab.gnome.org/gnome/pango/fedora:v1 stage: docs + needs: [] variables: EXTRA_MESON_FLAGS: "" script: @@ -67,6 +94,7 @@ pages: stage: deploy + needs: ['reference'] script: - mv _reference/ public/ artifacts: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/NEWS new/pango-1.46.2/NEWS --- old/pango-1.46.1/NEWS 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/NEWS 2020-09-18 20:46:01.000000000 +0200 @@ -1,3 +1,14 @@ +Overview of changes in 1.46.2 +============================= +- Fix pango_win32_font_map_load_font with falback families +- Fix an assertion in pango_language_get_scripts +- Fix a crash in get_items_log_attrs +- Fix attribute iterators with overlapping attributes +- Fix rendering of Emoji keycap sequences +- ci: Run the testsuite under asan and fix all reported issues +- build: Make libthai, cairo, xft, fontconfig, freetype + dependencies meson features + Overview of changes in 1.46.1 ============================= - Revert an unintentional PangoRenderer abi break in 1.46.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/lsan.supp new/pango-1.46.2/lsan.supp --- old/pango-1.46.1/lsan.supp 1970-01-01 01:00:00.000000000 +0100 +++ new/pango-1.46.2/lsan.supp 2020-09-18 20:46:01.000000000 +0200 @@ -0,0 +1,7 @@ +leak:g_quark_init +leak:libc.so +leak:libfontconfig.so +leak:libcairo.so +leak:libpixman-1.so +leak:libthai.so +leak:libdatrie.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/make-release.sh new/pango-1.46.2/make-release.sh --- old/pango-1.46.1/make-release.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/pango-1.46.2/make-release.sh 2020-09-18 20:46:01.000000000 +0200 @@ -0,0 +1,28 @@ +#! /bin/sh + +version=$(head -5 meson.build | grep version | sed -e "s/[^']*'//" -e "s/'.*$//") +release_build_dir="release_build" +branch=$(git branch --show-current) + +if [ -d ${release_build_dir} ]; then + echo "Please remove ./${release_build_dir} first" + exit 1 +fi + +# we include gtk-doc since we need the gtk-doc-for-gtk4 branch +meson setup --force-fallback-for gtk-doc ${release_build_dir} || exit + +# make the release tarball +meson dist -C${release_build_dir} --include-subprojects || exit + +# now build the docs +meson configure -Dgtk_doc=true ${release_build_dir} || exit +ninja -C${release_build_dir} pango-doc || exit + +tar cf ${release_build_dir}/meson-dist/pango-docs-${version}.tar.xz ${release_build_dir}/docs/ + +echo -e "\n\nPango ${version} release on branch ${branch} in ./${release_build_dir}/:\n" + +ls -l --sort=time -r "${release_build_dir}/meson-dist" + +echo -e "\nPlease sanity-check these tarballs before uploading them." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/meson.build new/pango-1.46.2/meson.build --- old/pango-1.46.1/meson.build 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/meson.build 2020-09-18 20:46:01.000000000 +0200 @@ -1,5 +1,5 @@ project('pango', 'c', 'cpp', - version: '1.46.1', + version: '1.46.2', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', @@ -57,7 +57,7 @@ if cc.get_id() == 'msvc' # Compiler options taken from msvc_recommended_pragmas.h # in GLib, based on _Win32_Programming_ by Rector and Newcomer - test_cflags = ['-FImsvc_recommended_pragmas', '-utf-8'] + test_cflags = ['-FImsvc_recommended_pragmas.h', '-utf-8'] add_project_arguments(cc.get_supported_arguments(test_cflags), language: 'c') test_c_only_flags = [] elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' @@ -216,7 +216,7 @@ default_options: ['docs=false']) pango_deps += fribidi_dep -thai_dep = dependency('libthai', version: libthai_req_version, required: false) +thai_dep = dependency('libthai', version: libthai_req_version, required: get_option('libthai')) if thai_dep.found() pango_conf.set('HAVE_LIBTHAI', 1) pango_deps += thai_dep @@ -270,16 +270,24 @@ pango_deps += harfbuzz_dep # Only use FontConfig fallback when required or requested -fontconfig_required = (host_system != 'windows' and host_system != 'darwin') or get_option('use_fontconfig') -fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version, required: false) +fontconfig_option = get_option('fontconfig') + +fontconfig_sys_required = (host_system != 'windows' and host_system != 'darwin') +if fontconfig_sys_required and fontconfig_option.disabled() + error('Fontconfig is required on this platform (pass -Dfontconfig=enabled or -Dfontconfig=auto)') +endif + +fontconfig_required = fontconfig_sys_required or fontconfig_option.enabled() + +fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version, required: fontconfig_option) if fontconfig_dep.found() fontconfig_pc = 'fontconfig' else if cc.get_id() == 'msvc' and cc.has_header('fontconfig/fontconfig.h') # Look for the Visual Studio-style import library if FontConfig's .pc file cannot be # found on Visual Studio - fontconfig_dep = cc.find_library('fontconfig', required: false) + fontconfig_dep = cc.find_library('fontconfig', required: fontconfig_option) if fontconfig_dep.found() fontconfig_lib = '-lfontconfig' endif @@ -312,7 +320,7 @@ # The first version of freetype with a pkg-config file is 2.1.5 # We require both fontconfig and freetype if we are to have either. -freetype_dep = dependency('freetype2', required: false) +freetype_dep = dependency('freetype2', required: get_option('freetype')) if freetype_dep.found() freetype2_pc = 'freetype2' @@ -320,7 +328,7 @@ if cc.get_id() == 'msvc' and cc.has_header('ft2build.h') foreach ft2_lib: ['freetype', 'freetypemt'] if not freetype_dep.found() - freetype_dep = cc.find_library(ft2_lib, required: false) + freetype_dep = cc.find_library(ft2_lib, required: get_option('freetype')) if freetype_dep.found() freetype2_lib = '-l@0@'.format(ft2_lib) endif @@ -330,7 +338,7 @@ endif if fontconfig_required and not freetype_dep.found() - freetype_dep = dependency('freetype2', required: false, + freetype_dep = dependency('freetype2', required: get_option('freetype'), fallback: ['freetype2', 'freetype_dep']) endif @@ -341,7 +349,7 @@ pango_deps += freetype_dep endif -xft_dep = dependency('xft', version: xft_req_version, required: false) +xft_dep = dependency('xft', version: xft_req_version, required: get_option('xft')) if xft_dep.found() and fontconfig_dep.found() and freetype_dep.found() pango_conf.set('HAVE_XFT', 1) pango_deps += dependency('xrender', required: false) @@ -364,7 +372,7 @@ endif cairo_found_type = '' -cairo_dep = dependency('cairo', version: cairo_req_version, required: false) +cairo_dep = dependency('cairo', version: cairo_req_version, required: get_option('cairo')) if cairo_dep.found() cairo_found_type = cairo_dep.type_name() @@ -379,7 +387,7 @@ # in a declarative way if not cairo_dep.found() cairo_dep = dependency('cairo', version: cairo_req_version, - fallback: ['cairo', 'libcairo_dep']) + fallback: ['cairo', 'libcairo_dep'], required: get_option('cairo')) cairo_found_type = cairo_dep.type_name() endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/meson_options.txt new/pango-1.46.2/meson_options.txt --- old/pango-1.46.1/meson_options.txt 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/meson_options.txt 2020-09-18 20:46:01.000000000 +0200 @@ -10,11 +10,27 @@ description : 'Install tests', type: 'boolean', value: 'false') -option('use_fontconfig', - description : 'Force using FontConfig where it is optional, on Windows and macOS. This is ignored on platforms where it is required', - type: 'boolean', - value: 'false') +option('fontconfig', + description : 'Build with FontConfig support. Passing \'auto\' or \'disabled\' disables fontconfig where it is optional, i.e. on Windows and macOS. Passing \'disabled\' on platforms where fontconfig is required results in error.', + type: 'feature', + value: 'auto') option('sysprof', type : 'feature', value : 'disabled', description : 'include tracing support for sysprof') +option('libthai', + type : 'feature', + value : 'auto', + description : 'Build with libthai support') +option('cairo', + type : 'feature', + value : 'auto', + description : 'Build with cairo support') +option('xft', + type : 'feature', + value : 'auto', + description : 'Build with xft support') +option('freetype', + type : 'feature', + value : 'auto', + description : 'Build with freetype support') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pango-attributes.c new/pango-1.46.2/pango/pango-attributes.c --- old/pango-1.46.1/pango/pango-attributes.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pango-attributes.c 2020-09-18 20:46:01.000000000 +0200 @@ -2003,7 +2003,7 @@ gboolean pango_attr_iterator_next (PangoAttrIterator *iterator) { - guint i; + int i; g_return_val_if_fail (iterator != NULL, FALSE); @@ -2016,19 +2016,14 @@ if (iterator->attribute_stack) { - for (i = 0; i < iterator->attribute_stack->len; i++) + for (i = iterator->attribute_stack->len - 1; i>= 0; i--) { const PangoAttribute *attr = g_ptr_array_index (iterator->attribute_stack, i); if (attr->end_index == iterator->start_index) - { - g_ptr_array_remove_index (iterator->attribute_stack, i); /* Can't use index_fast :( */; - i--; - } + g_ptr_array_remove_index (iterator->attribute_stack, i); /* Can't use index_fast :( */ else - { - iterator->end_index = MIN (iterator->end_index, attr->end_index); - } + iterator->end_index = MIN (iterator->end_index, attr->end_index); } } @@ -2136,14 +2131,14 @@ pango_attr_iterator_get (PangoAttrIterator *iterator, PangoAttrType type) { - guint i; + int i; g_return_val_if_fail (iterator != NULL, NULL); if (!iterator->attribute_stack) return NULL; - for (i = 0; i < iterator->attribute_stack->len; i++) + for (i = iterator->attribute_stack->len - 1; i>= 0; i--) { PangoAttribute *attr = g_ptr_array_index (iterator->attribute_stack, i); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pango-context.c new/pango-1.46.2/pango/pango-context.c --- old/pango-1.46.1/pango/pango-context.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pango-context.c 2020-09-18 20:46:01.000000000 +0200 @@ -1065,6 +1065,9 @@ width_iter_init (&state->width_iter, text + start_index, length); _pango_emoji_iter_init (&state->emoji_iter, text + start_index, length); + if (state->emoji_iter.is_emoji) + state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end); + update_end (state); if (pango_font_description_get_set_fields (state->font_desc) & PANGO_FONT_MASK_GRAVITY) @@ -1111,15 +1114,18 @@ &state->script_end, &state->script); state->changed |= SCRIPT_CHANGED; } - if (state->run_end == state->width_iter.end) - { - width_iter_next (&state->width_iter); - state->changed |= WIDTH_CHANGED; - } if (state->run_end == state->emoji_iter.end) { _pango_emoji_iter_next (&state->emoji_iter); state->changed |= EMOJI_CHANGED; + + if (state->emoji_iter.is_emoji) + state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end); + } + if (state->run_end == state->width_iter.end) + { + width_iter_next (&state->width_iter); + state->changed |= WIDTH_CHANGED; } update_end (state); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pango-language-sample-table.h new/pango-1.46.2/pango/pango-language-sample-table.h --- old/pango-1.46.1/pango/pango-language-sample-table.h 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pango-language-sample-table.h 2020-09-18 20:46:01.000000000 +0200 @@ -24,10 +24,14 @@ * http://en.wikipedia.org/wiki/Sample_Font_Displays_In_Other_Languages * Fetched on 2008-08-19 * + * WP + * Wikipedia, Article about the language + * Fetched on 2020-09-08 + * * GLASS * Kermit project's "I Can Eat Glass" list, also available in pango-view/ * http://www.columbia.edu/kermit/utf8.html#glass - * Fetched on 2008-08-19 + * Fetched on 2008-08-19, updates on 2020-09-08 * * KERMIT * Kermit project's Quick-Brown-Fox equivalents for other languages @@ -144,6 +148,12 @@ /* Twelve boxing fighters drive Viktor over the great. */ ) LANGUAGE( + dv /* Maldivian */, + WP, + "މާއްދާ 1 – ހުރިހާ އިންސާނުން ވެސް އުފަންވަނީ، ދަރަޖަ އާއި ޙައްޤު ތަކުގައި މިނިވަންކަމާއި ހަމަހަމަކަން ލިބިގެންވާ ބައެއްގެ ގޮތުގައެވެ." + /* Beginning of UDHR */ + ) +LANGUAGE( el /* Greek */, WP-SFD, "Θέλει αρετή και τόλμη η ελευθερία. (Ανδρέας Κάλβος)" @@ -320,6 +330,12 @@ /* I can eat glass and it doesn't hurt me. */ ) LANGUAGE( + km /* Khmer */, + GLASS, + "ខ្ញុំអាចញុំកញ្ចក់បាន ដោយគ្មានបញ្ហារ" + /* I can eat glass and it doesn't hurt me. */ + ) +LANGUAGE( kn /* Kannada */, GLASS, "ನಾನು ಗಾಜನ್ನು ತಿನ್ನಬಲ್ಲೆ ಮತ್ತು ಅದರಿಂದ ನನಗೆ ನೋವಾಗುವುದಿಲ್ಲ." @@ -343,6 +359,12 @@ "Sic surgens, dux, zelotypos quam karus haberis" ) LANGUAGE( + lo /* Lao */, + GLASS, + "ຂອ້ຍກິນແກ້ວໄດ້ໂດຍທີ່ມັນບໍ່ໄດ້ເຮັດໃຫ້ຂອ້ຍເຈັບ" + /* I can eat glass and it doesn't hurt me. */ + ) +LANGUAGE( lt /* Lithuanian */, WP-PANG, "Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą." @@ -391,6 +413,12 @@ /* I can eat glass and it doesn't hurt me. */ ) LANGUAGE( + my /* Burmese */, + WP, + "ဘာသာပြန်နှင့် စာပေပြုစုရေး ကော်မရှင်" + /* Literary and Translation Commission */ + ) +LANGUAGE( nap /* Neapolitan */, GLASS, "M' pozz magna' o'vetr, e nun m' fa mal." @@ -491,6 +519,11 @@ /* I can eat glass and it doesn't hurt me. */ ) LANGUAGE( + si /* Sinhalese */, + WP, + "මනොපුබ්බඞ්ගමා ධම්මා, මනොසෙට්ඨා මනොමයා; මනසා චෙ පදුට්ඨෙන, භාසති වා කරොති වා; තතො නං දුක්ඛමන්වෙති, චක්කංව වහතො පදං." + ) +LANGUAGE( sk /* Slovak */, KERMIT, "Starý kôň na hŕbe kníh žuje tíško povädnuté ruže, na stĺpe sa ďateľ učí kvákať novú ódu o živote." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pango-language.c new/pango-1.46.2/pango/pango-language.c --- old/pango-1.46.1/pango/pango-language.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pango-language.c 2020-09-18 20:46:01.000000000 +0200 @@ -66,7 +66,7 @@ if (!language) return NULL; - priv = (PangoLanguagePrivate *) ((char *)language - sizeof (PangoLanguagePrivate)); + priv = (PangoLanguagePrivate *)(void *)((char *)language - sizeof (PangoLanguagePrivate)); if (G_UNLIKELY (priv->magic != PANGO_LANGUAGE_PRIVATE_MAGIC)) { @@ -662,7 +662,7 @@ script_for_lang, pango_script_for_lang); - if (!script_for_lang) + if (!script_for_lang || script_for_lang->scripts[0] == 0) { if (num_scripts) *num_scripts = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pango-layout.c new/pango-1.46.2/pango/pango-layout.c --- old/pango-1.46.1/pango/pango-layout.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pango-layout.c 2020-09-18 20:46:01.000000000 +0200 @@ -4088,6 +4088,7 @@ static void get_items_log_attrs (const char *text, + int start, int length, GList *items, PangoLogAttr *log_attrs, @@ -4096,11 +4097,13 @@ int offset = 0; GList *l; - pango_default_break (text, length, NULL, log_attrs, log_attrs_len); + pango_default_break (text + start, length, NULL, log_attrs, log_attrs_len); for (l = items; l; l = l->next) { PangoItem *item = l->data; + g_assert (item->offset <= start + length); + g_assert (item->length <= (start + length) - item->offset); pango_tailor_break (text + item->offset, item->length, @@ -4371,7 +4374,8 @@ apply_attributes_to_items (state.items, shape_attrs); - get_items_log_attrs (start, + get_items_log_attrs (layout->text, + start - layout->text, delimiter_index + delim_len, state.items, layout->log_attrs + start_offset, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pangocairo-fontmap.c new/pango-1.46.2/pango/pangocairo-fontmap.c --- old/pango-1.46.1/pango/pangocairo-fontmap.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pangocairo-fontmap.c 2020-09-18 20:46:01.000000000 +0200 @@ -198,8 +198,8 @@ * * Note that since Pango 1.32.6, the default fontmap is per-thread. * This function only changes the default fontmap for - * the current thread. Default fontmaps of exisiting threads - * are not changed. Default fontmaps of any new threads will + * the current thread. Default fontmaps of existing threads + * are not changed. Default fontmaps of any new threads will * still be created using pango_cairo_font_map_new(). * * A value of %NULL for @fontmap will cause the current default diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pangofc-font.c new/pango-1.46.2/pango/pangofc-font.c --- old/pango-1.46.1/pango/pangofc-font.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pangofc-font.c 2020-09-18 20:46:01.000000000 +0200 @@ -993,7 +993,7 @@ if (key) { - FcPattern *pattern = pango_fc_font_key_get_pattern (key); + const FcPattern *pattern = pango_fc_font_key_get_pattern (key); const char *variations; int index; unsigned int n_axes; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pangofc-fontmap.c new/pango-1.46.2/pango/pangofc-fontmap.c --- old/pango-1.46.1/pango/pangofc-fontmap.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pangofc-fontmap.c 2020-09-18 20:46:01.000000000 +0200 @@ -1920,14 +1920,12 @@ { /* Add to cache initially */ -#if 1 if (cache->length == FONTSET_CACHE_SIZE) { PangoFcFontset *tmp_fontset = g_queue_pop_tail (cache); tmp_fontset->cache_link = NULL; g_hash_table_remove (priv->fontset_hash, tmp_fontset->key); } -#endif fontset->cache_link = g_list_prepend (NULL, fontset); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/pango/pangowin32-fontmap.c new/pango-1.46.2/pango/pangowin32-fontmap.c --- old/pango-1.46.1/pango/pangowin32-fontmap.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/pango/pangowin32-fontmap.c 2020-09-18 20:46:01.000000000 +0200 @@ -1016,44 +1016,51 @@ const PangoFontDescription *description) { PangoWin32FontMap *win32fontmap = (PangoWin32FontMap *)fontmap; - PangoWin32Family *win32family; + PangoWin32Face *best_match = NULL; PangoFont *result = NULL; GSList *tmp_list; const char *family; + char **families; + int i; g_return_val_if_fail (description != NULL, NULL); family = pango_font_description_get_family (description); - family = family ? family : ""; - PING (("name=%s", family)); + families = g_strsplit (family ? family : "", ",", -1); - win32family = g_hash_table_lookup (win32fontmap->families, family); - if (win32family) + for (i = 0; families[i] && !best_match; ++i) { - PangoWin32Face *best_match = NULL; + PangoWin32Family *win32family; + PING (("name=%s", families[i])); - PING (("got win32family")); - tmp_list = win32family->faces; - while (tmp_list) + win32family = g_hash_table_lookup (win32fontmap->families, families[i]); + if (win32family) { - PangoWin32Face *face = tmp_list->data; + PING (("got win32family")); + tmp_list = win32family->faces; + while (tmp_list) + { + PangoWin32Face *face = tmp_list->data; + + if (pango_font_description_better_match (description, + best_match ? best_match->description : NULL, + face->description)) + best_match = face; - if (pango_font_description_better_match (description, - best_match ? best_match->description : NULL, - face->description)) - best_match = face; - - tmp_list = tmp_list->next; + tmp_list = tmp_list->next; + } } + } + + g_strfreev (families); - if (best_match) - result = PANGO_WIN32_FONT_MAP_GET_CLASS (win32fontmap)->find_font (win32fontmap, context, - best_match, - description); + if (best_match) + result = PANGO_WIN32_FONT_MAP_GET_CLASS (win32fontmap)->find_font (win32fontmap, context, + best_match, + description); /* TODO: Handle the case that result == NULL. */ - else - PING (("no best match!")); - } + else + PING (("no best match!")); return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/layouts/valid-6.expected new/pango-1.46.2/tests/layouts/valid-6.expected --- old/pango-1.46.1/tests/layouts/valid-6.expected 1970-01-01 01:00:00.000000000 +0100 +++ new/pango-1.46.2/tests/layouts/valid-6.expected 2020-09-18 20:46:01.000000000 +0200 @@ -0,0 +1,25 @@ + 0️⃣ Keycap Digit Zero + +--- parameters + +wrapped: 0 +ellipsized: 0 +lines: 2 + +--- attributes + +range 0 2147483647 + +--- lines + +i=1, index=0, paragraph-start=1, dir=ltr ' 0️⃣ Keycap Digit Zero +' +i=2, index=27, paragraph-start=1, dir=ltr '' + +--- runs + +i=1, index=0, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' ' +i=2, index=1, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '0️⃣' +i=3, index=8, chars=18, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' Keycap Digit Zero' +i=4, index=26, no run, line end +i=5, index=27, no run, line end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/layouts/valid-6.markup new/pango-1.46.2/tests/layouts/valid-6.markup --- old/pango-1.46.1/tests/layouts/valid-6.markup 1970-01-01 01:00:00.000000000 +0100 +++ new/pango-1.46.2/tests/layouts/valid-6.markup 2020-09-18 20:46:01.000000000 +0200 @@ -0,0 +1,2 @@ + + 0️⃣ Keycap Digit Zero diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/meson.build new/pango-1.46.2/tests/meson.build --- old/pango-1.46.1/tests/meson.build 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/meson.build 2020-09-18 20:46:01.000000000 +0200 @@ -20,11 +20,7 @@ [ 'testboundaries' ], [ 'testboundaries_ucd' ], [ 'testcolor' ], - [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep ] ], - [ 'testscript' ], - [ 'test-harfbuzz', [ 'test-harfbuzz.c' ], [ libpangocairo_dep ] ], - [ 'cxx-test', [ 'cxx-test.cpp' ], [ libpangocairo_dep ] ], - [ 'test-break', [ 'test-break.c', 'test-common.c' ], [libpangocairo_dep ] ], + [ 'testscript' ] ] if build_pangoft2 @@ -45,6 +41,10 @@ [ 'test-shape', [ 'test-shape.c', 'test-common.c' ], [ libpangocairo_dep ] ], [ 'test-font', [ 'test-font.c' ], [ libpangocairo_dep ] ], [ 'testattributes', [ 'testattributes.c', 'test-common.c' ], [ libpangocairo_dep ] ], + [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep, glib_dep, harfbuzz_dep ] ], + [ 'cxx-test', [ 'cxx-test.cpp' ], [ libpangocairo_dep, gobject_dep, harfbuzz_dep ] ], + [ 'test-harfbuzz', [ 'test-harfbuzz.c' ], [ libpangocairo_dep, gobject_dep, harfbuzz_dep ] ], + [ 'test-break', [ 'test-break.c', 'test-common.c' ], [libpangocairo_dep, glib_dep, harfbuzz_dep ] ] ] if pango_cairo_backends.contains('png') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/test-break.c new/pango-1.46.2/tests/test-break.c --- old/pango-1.46.1/tests/test-break.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/test-break.c 2020-09-18 20:46:01.000000000 +0200 @@ -62,7 +62,6 @@ length = strlen (test); len = g_utf8_strlen (test, -1) + 1; - attrs = g_new (PangoLogAttr, len); pango_parse_markup (test, -1, 0, &attributes, &text, NULL, &error); g_assert_no_error (error); @@ -79,6 +78,10 @@ g_test_skip (msg); g_free (msg); #endif + g_free (contents); + g_object_unref (layout); + pango_attr_list_unref (attributes); + g_free (text); return FALSE; } @@ -225,6 +228,7 @@ g_object_unref (layout); g_free (attrs); g_free (contents); + g_free (text); pango_attr_list_unref (attributes); return TRUE; @@ -255,7 +259,7 @@ GString *dump; gchar *diff; - const char *old_locale = setlocale (LC_ALL, NULL); + char *old_locale = g_strdup (setlocale (LC_ALL, NULL)); setlocale (LC_ALL, "en_US.utf8"); if (strstr (setlocale (LC_ALL, NULL), "en_US") == NULL) { @@ -265,20 +269,26 @@ g_test_skip (msg); g_free (msg); #endif + g_free (old_locale); return; } - expected_file = get_expected_filename (filename); - dump = g_string_sized_new (0); if (!test_file (filename, dump)) - return; + { + g_free (old_locale); + g_string_free (dump, TRUE); + return; + } + + expected_file = get_expected_filename (filename); diff = diff_with_file (expected_file, dump->str, dump->len, &error); g_assert_no_error (error); setlocale (LC_ALL, old_locale); + g_free (old_locale); if (diff && diff[0]) { @@ -294,9 +304,9 @@ g_test_fail (); g_strfreev (lines); - g_free (diff); } + g_free (diff); g_string_free (dump, TRUE); g_free (expected_file); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/test-itemize.c new/pango-1.46.2/tests/test-itemize.c --- old/pango-1.46.1/tests/test-itemize.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/test-itemize.c 2020-09-18 20:46:01.000000000 +0200 @@ -277,9 +277,9 @@ g_test_fail (); g_strfreev (lines); - g_free (diff); } + g_free (diff); g_string_free (dump, TRUE); g_free (expected_file); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/test-layout.c new/pango-1.46.2/tests/test-layout.c --- old/pango-1.46.1/tests/test-layout.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/test-layout.c 2020-09-18 20:46:01.000000000 +0200 @@ -238,6 +238,9 @@ PangoWrapMode wrap = PANGO_WRAP_WORD; PangoFontDescription *desc; + if (context == NULL) + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + g_file_get_contents (filename, &contents, &length, &error); g_assert_no_error (error); @@ -344,9 +347,9 @@ g_test_fail (); g_strfreev (lines); - g_free (diff); } + g_free (diff); g_string_free (dump, TRUE); g_free (expected_file); } @@ -359,13 +362,13 @@ const gchar *name; gchar *path; - g_test_init (&argc, &argv, NULL); - /* allow to easily generate expected output for new test cases */ - if (argc > 1) + if (argc > 1 && argv[1][0] != '-') { GString *string; + setlocale (LC_ALL, "en_US.utf8"); + string = g_string_sized_new (0); test_file (argv[1], string); g_test_message ("%s", string->str); @@ -373,6 +376,8 @@ return 0; } + g_test_init (&argc, &argv, NULL); + path = g_test_build_filename (G_TEST_DIST, "layouts", NULL); dir = g_dir_open (path, 0, &error); g_free (path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/testattributes.c new/pango-1.46.2/tests/testattributes.c --- old/pango-1.46.1/tests/testattributes.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/testattributes.c 2020-09-18 20:46:01.000000000 +0200 @@ -944,6 +944,94 @@ pango_attr_list_unref (list); } +/* This only prints rise, size and scale, which are the + * only relevant attributes in the test that uses this + * function. + */ +static void +print_tags_for_attributes (PangoAttrIterator *iter, + GString *s) +{ + PangoAttribute *attr; + + attr = pango_attr_iterator_get (iter, PANGO_ATTR_RISE); + if (attr) + g_string_append_printf (s, "[%d, %d]rise=%d\n", + attr->start_index, attr->end_index, + ((PangoAttrInt*)attr)->value); + + attr = pango_attr_iterator_get (iter, PANGO_ATTR_SIZE); + if (attr) + g_string_append_printf (s, "[%d, %d]size=%d\n", + attr->start_index, attr->end_index, + ((PangoAttrInt*)attr)->value); + + attr = pango_attr_iterator_get (iter, PANGO_ATTR_SCALE); + if (attr) + g_string_append_printf (s, "[%d, %d]scale=%f\n", + attr->start_index, attr->end_index, + ((PangoAttrFloat*)attr)->value); +} + +static void +test_iter_epsilon_zero (void) +{ + const char *markup = "𝜀<span rise=\"-6000\" size=\"x-small\" font_desc=\"italic\">0</span> = 𝜔<span rise=\"8000\" size=\"smaller\">𝜔<span rise=\"14000\" size=\"smaller\">𝜔<span rise=\"20000\">.<span rise=\"23000\">.<span rise=\"26000\">.</span></span></span></span></span>"; + PangoAttrList *attributes; + PangoAttrIterator *attr; + char *text; + GError *error = NULL; + GString *s; + + s = g_string_new (""); + + pango_parse_markup (markup, -1, 0, &attributes, &text, NULL, &error); + g_assert_no_error (error); + g_assert_cmpstr (text, ==, "𝜀0 = 𝜔𝜔𝜔..."); + + attr = pango_attr_list_get_iterator (attributes); + do + { + int start, end; + + pango_attr_iterator_range (attr, &start, &end); + + g_string_append_printf (s, "range: [%d, %d]\n", start, end); + + print_tags_for_attributes (attr, s); + } + while (pango_attr_iterator_next (attr)); + + g_assert_cmpstr (s->str, ==, + "range: [0, 4]\n" + "range: [4, 5]\n" + "[4, 5]rise=-6000\n" + "[4, 5]scale=0.694444\n" + "range: [5, 12]\n" + "range: [12, 16]\n" + "[12, 23]rise=8000\n" + "[12, 23]scale=0.833333\n" + "range: [16, 20]\n" + "[16, 23]rise=14000\n" + "[16, 23]scale=0.694444\n" + "range: [20, 21]\n" + "[20, 23]rise=20000\n" + "[16, 23]scale=0.694444\n" + "range: [21, 22]\n" + "[21, 23]rise=23000\n" + "[16, 23]scale=0.694444\n" + "range: [22, 23]\n" + "[22, 23]rise=26000\n" + "[16, 23]scale=0.694444\n" + "range: [23, 2147483647]\n"); + + g_free (text); + pango_attr_list_unref (attributes); + pango_attr_iterator_destroy (attr); + + g_string_free (s, TRUE); +} + int main (int argc, char *argv[]) { @@ -966,6 +1054,7 @@ g_test_add_func ("/attributes/iter/get", test_iter_get); g_test_add_func ("/attributes/iter/get_font", test_iter_get_font); g_test_add_func ("/attributes/iter/get_attrs", test_iter_get_attrs); + g_test_add_func ("/attributes/iter/epsilon_zero", test_iter_epsilon_zero); return g_test_run (); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pango-1.46.1/tests/testmisc.c new/pango-1.46.2/tests/testmisc.c --- old/pango-1.46.1/tests/testmisc.c 2020-08-20 14:12:54.000000000 +0200 +++ new/pango-1.46.2/tests/testmisc.c 2020-09-18 20:46:01.000000000 +0200 @@ -73,6 +73,20 @@ g_object_unref (context); } +static void +test_language_emoji_crash (void) +{ + PangoLanguage *lang; + const PangoScript *scripts; + int num; + + lang = pango_language_from_string ("und-zsye"); + scripts = pango_language_get_scripts (lang, &num); + + g_assert (num >= 0); + g_assert (scripts == NULL || num > 0); +} + int main (int argc, char *argv[]) { @@ -81,6 +95,7 @@ g_test_add_func ("/layout/shape-tab-crash", test_shape_tab_crash); g_test_add_func ("/layout/itemize-empty-crash", test_itemize_empty_crash); g_test_add_func ("/layout/short-string-crash", test_short_string_crash); + g_test_add_func ("/language/emoji-crash", test_language_emoji_crash); return g_test_run (); } ++++++ pango.obsinfo ++++++ --- /var/tmp/diff_new_pack.PenYEM/_old 2020-09-25 16:28:13.527714510 +0200 +++ /var/tmp/diff_new_pack.PenYEM/_new 2020-09-25 16:28:13.527714510 +0200 @@ -1,5 +1,5 @@ name: pango -version: 1.46.1 -mtime: 1597925574 -commit: 265c4e50d29d58c0e07c0db26805220c7b878f5c +version: 1.46.2 +mtime: 1600454761 +commit: 296711130ef90d9555bd6ada5b258bb75d622c12