summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'pango-1-44' into 'pango-1-44'pango-1-44Matthias Clasen2021-05-0923-425/+984
|\ | | | | | | | | [1.44] Cherry pick various upstream fixes See merge request GNOME/pango!321
| * ci: Build with fedora 32 image (containing gnome 3.36)Marco Trevisan (Treviño)2021-05-051-1/+3
| |
| * fc: Sort faces of a familyMatthias Clasen2021-05-051-0/+28
| | | | | | | | | | | | | | | | Make pango_font_family_list_faces() return faces sorted by slant and weight. This makes the font chooser look much less random. (cherry-picked from commit 99f4661a)
| * Improve letterspacing with marksMatthias Clasen2021-05-051-1/+10
| | | | | | | | | | | | | | | | | | | | harfbuzz puts marks into their own clusters, so we need to work a little harder to keep non-spacing marks placed over their base character. Fixes: #541 (cherry-picked from commit fdc432bc)
| * markup: Fix two bugsMatthias Clasen2021-05-051-30/+20
| | | | | | | | | | | | | | | | | | | | | | | | The docs state that all chars marked with the accel marker get an underline. But we were only underlining the first in each text chunk. Second, if an underline appears at the end of a text chunk, or at the end of the text, we would just eat it, which is unexpected. (cherry-picked from commit 8d1ea2ae)
| * tests: Add tests for pango_font_describeMatthias Clasen2021-05-052-0/+71
| | | | | | | | | | | | | | | | | | | | | | Test that round-tripping through pango_font_describe works. This is currently broken for scalable bitmap fonts, such as color Emoji fonts. We skip the test on OS X where we are most likely missing the fonts. (cherry-picked from commit 49b1f80a)
| * Fix pango_font_describe for Emoji fontsMatthias Clasen2021-05-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | We are using the size from the FcPattern. For scalable bitmap fonts, this has been scaled to match the requested pixel size. To make a font description that can be turned back into a FcPattern and roundtrip successfully, we need to undo that scaling. Thankfully, fontconfig leaves the pixelsizefixupfactor in the pattern, so it is easy to do. Fixes: #530 (cherry-picked from commit bc973fdb)
| * Fix placement of marks in upright vertical text.Tavmjong Bah2021-05-052-8/+4
| | | | | | | | (cherry-picked from commit 3396cc20)
| * Translate origin point for vertical layoutPeng Wu2021-05-051-3/+6
| | | | | | | | | | | | | | The origin point for vertical layout needs to be translated for cairo rendering from the horizontal origin to the vertical origin. (cherry-picked from commit 4c6f0b3c)
| * Fix the length checkingWeng Xuetian2021-05-052-1/+15
| | | | | | | | | | | | Closes #526 (cherry-picked from commit 0a816b49)
| * tests: Don't free attributes prematurelyMatthias Clasen2021-05-051-2/+2
| | | | | | | | | | | | | | test-shape was using one of its attribute lists after dropping the reference on it. Don't do that. (cherry-picked from commit 17d8202d)
| * Don't assert in pango_language_get_scriptsMatthias Clasen2021-05-052-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The assertion in pango_language_get_scripts can actually be triggered since we last regenerated the pango_script_for_lang table. It now includes an entry for und-zsye which has no scripts. Handle this case without asserting. This commit includes a test. (cherry-picked from commit 7db68865)
| * cairo: Use the proper FcConfigMatthias Clasen2021-05-051-1/+1
| | | | | | | | | | | | | | | | When calling into FcConfig api, passing NULL means "use the default config". But we may have a set config that we should be using for all fontconfig calls. (cherry-picked from commit da2e893b)
| * Don't call FcFontSetSort twiceMatthias Clasen2021-05-051-7/+12
| | | | | | | | | | | | | | | | We can do the format filtering on the unsorted font lists. Sorting the same list twice may be fast, but there's still some setup overhead. (cherry-picked from commit c4ae4782)
| * Speed up font format filteringMatthias Clasen2021-05-051-1/+4
| | | | | | | | | | | | | | We were needlessly duplicating patters when we could have just referenced them. (cherry-picked from commit e9703ea3)
| * Add a reproducer for a pidgin crashMatthias Clasen2021-05-051-0/+20
| | | | | | | | | | | | This test is reproducing the crash reported in #490. (cherry-picked from commit c2c97330)
| * layout: Avoid a crash with short stringsMatthias Clasen2021-05-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | You can call pango_layout_set_text() with a length that is longer than the string (and there's code in the wild that does that). We try to handle it by only looking at the initial segment of the text, but we are forgetting to set layout->length to the length of that segment, leading us to access beyond the string end later. This fixes #490 (cherry-picked from commit 6e04db81)
| * fcfontmap: Always reject unsupported font formatsKhaled Hosny2021-05-051-26/+26
| | | | | | | | | | | | | | Fixes https://gitlab.gnome.org/GNOME/pango/-/issues/484 and https://gitlab.gnome.org/GNOME/pango/-/issues/457 (cherry-picked from commit fe1ee773)
| * itemize: Work around gtk2 brokennessMatthias Clasen2021-05-052-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | GTK 2 apparently manages to call pango_itemize_with_base_dir with a non-zero length for a string that contains 0 characters. That in turn causes pango_log2vis_get_embedding_levels to return NULL, and things go downhill from there. A test is included. Fixes: #480 (cherry-picked from commit 279bd525)
| * Add a test for a crash in shape_tabMatthias Clasen2021-05-052-0/+50
| | | | | | | | | | | | This verifies the fix in the previous commit. (cherry-picked from commit 2751956b)
| * layout: Fix a crashMatthias Clasen2021-05-051-5/+9
| | | | | | | | | | | | | | pango_layout_get_effective_attributes can return NULL. But not all callers were handling that. (cherry-picked from commit 1f06c915)
| * renderer: Fix a division-by-zeroMatthias Clasen2021-05-051-3/+10
| | | | | | | | | | | | | | | | | | | | We need to check if height is zero before dividing by it. For completeness, check width at the same time. This was pointed out in https://gitlab.gnome.org/GNOME/pango/-/merge_requests/167 (cherry-picked from commit dd867f41)
| * Use shape flags for tab widthJan Alexander Steffens (heftig)2021-05-051-1/+5
| | | | | | | | | | | | | | | | | | | | We need to apply the right shape flags to the tab width calculation, otherwise (when glyph positions get rounded, which is the default) our tab width will be slightly off from what 8 spaces normally produce. https://gitlab.gnome.org/GNOME/pango/issues/425 (cherry-picked from commit c579c0a9)
| * Add a test for keycap sequencesMatthias Clasen2021-05-052-0/+27
| | | | | | | | | | | | | | This tests that we are not breaking items up in the middle of a keycap sequence. (cherry-picked from commit 6253c71b)
| * Fix handling of keycap sequencesMatthias Clasen2021-05-051-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The last character of Emoji keycap sequences, 0x20E3, has a vertical orientation of U, according to Unicode. This unfortunately makes the width iter frequently break such sequences into multiple items, preventing them from being rendered as expected. Fix this by ignoring width changes inside Emoji sequences. Fixes: #502 (cherry-picked from commit b1718281)
| * Update break test cases to Unicode 13Peng Wu2021-05-053-80/+10
| | | | | | | | (cherry-picked from commit 9d76aa66)
| * Update pango-break-table.h to Unicode 13Peng Wu2021-05-051-195/+523
| | | | | | | | (cherry-picked from commit 145e3038)
| * Update Line Breaking to Unicode 13Peng Wu2021-05-051-20/+4
| | | | | | | | (cherry-picked from commit 23b6d06e)
| * Update gen-break-table.py for Unicode 13Peng Wu2021-05-051-8/+19
| | | | | | | | (cherry-picked from commit 2ac57751)
| * Update Grapheme and Word Boundary to Unicode 13Peng Wu2021-05-051-6/+13
| | | | | | | | (cherry-picked from commit 631775d8)
| * Update pango-emoji-table.h to Unicode Emoji Data 13.0 (was released on ↵Mike FABIAN2021-05-051-33/+46
|/ | | | | | January 29, 2020) (cherry-picked from commit 06aab353)
* Add a test for ellipsis shapingMatthias Clasen2019-11-041-0/+29
|
* Use shape flags for ellipsisMatthias Clasen2019-11-043-6/+23
| | | | | | | When shaping the ellipsis, use the same shape flags we use for the rest of the layout, otherwise we end up with subtle size differences between an ellipsized text and a plain …
* test-shape: CosmeticsMatthias Clasen2019-11-041-22/+2
| | | | Remove an unused function, and rename another.
* Undo fontset deprecationsMatthias Clasen2019-11-011-8/+4
| | | | | PangoFontsetSimple is used by the win32 fontmap implementation, so deprecating it is impractical.
* Merge branch 'no-shape-attrs' into 'master'Matthias Clasen2019-10-292-38/+58
|\ | | | | | | | | | | | | No shape attrs Closes #426 See merge request GNOME/pango!153
| * Adjust expected test outputsMatthias Clasen2019-10-281-2/+2
| | | | | | | | The change is a harmless change in attribute list ordering.
| * Fix ItemProperties handlingMatthias Clasen2019-10-281-29/+54
| | | | | | | | | | | | Deal with the fact that underlines and strikethroughs are not constant across items, since we do not break runs for these properties.
| * Don't treat rise as a no-shape attributeMatthias Clasen2019-10-281-0/+1
| | | | | | | | | | | | | | | | It doesn't make sense to apply kerning between letters if they are not on the same baseline. This was not noticed so far, since it is very uncommon to have a rise without an accompanying font change, which will cause the run to be broken.
| * Drop an unused ItemProperties useMatthias Clasen2019-10-281-3/+0
| | | | | | | | | | We don't use ItemProperties in pango_layout_line_index_to_x anymore, so no need to compute them either.
| * Go back to ignoring underlines for itemizationMatthias Clasen2019-10-281-5/+2
|/ | | | | | | | | This is what we used to do, and without it, we lose kerning beween underlined and non-underlined characters, which is most noticable with mnemonic underlines. Fixes: https://gitlab.gnome.org/GNOME/pango/issues/426
* fc: remove another assertion that might triggerMatthias Clasen2019-10-251-2/+1
| | | | | Apparently, people have fonts without formats, so better don't assert, just silently skip those.
* 1.44.71.44.7Matthias Clasen2019-10-242-1/+7
|
* Merge branch 'emoji-table-opt' into 'master'Matthias Clasen2019-10-253-180/+17
|\ | | | | | | | | emoji: Optimize tables See merge request GNOME/pango!152
| * Revert "Try again to debug win32 ci segfaults"Matthias Clasen2019-10-242-6/+1
| | | | | | | | This reverts commit 154c2db37bfecc2d1c4a09b975ab6972b63bc9a8.
| * emoji: Optimize tablesMatthias Clasen2019-10-241-174/+16
| | | | | | | | | | One of the Emoji tables had many adjacent ranges. Speed up our bsearch by merging them.
* | Merge branch 'coretext-gravity' into 'master'Matthias Clasen2019-10-251-0/+1
|\ \ | | | | | | | | | | | | [coretext] make setting font gravity work See merge request GNOME/pango!150
| * | [coretext] make setting font gravity workKhaled Hosny2019-10-231-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting font gravity to anything other than PANGO_GRAVITY_SOUTH causes no fonts to be matched on Core Text backend because the code for finding best match checks for equal gravity between the requested font and the fonts in the font set, and the later always have PANGO_GRAVITY_SOUTH. Hack around this by copying the gravity from the requested font. Can be tested with: $ pango-view --gravity=east --rotate=-90 utils/test-chinese.txt Currently without this change it gives: (pango-view:2824): Pango-WARNING **: 10:59:18.683: couldn't load font "serif Rotated-Left 12", modified variant/weight/stretch as fallback, expect ugly output. (pango-view:2824): Pango-ERROR **: 10:59:18.683: Could not load fallback font, bailing out. Trace/BPT trap: 5
* | Merge branch 'font-format-crash' into 'master'Matthias Clasen2019-10-251-2/+1
|\ \ | |/ |/| | | | | | | | | fc: Be robust against missing format information Closes #431 See merge request GNOME/pango!151
| * fc: Be robust against missing format informationMatthias Clasen2019-10-241-2/+1
|/ | | | | | | | Some people have been seeing this assertion getting hit. So don't assert, simply skip fonts that don't have format information. Fixes: https://gitlab.gnome.org/GNOME/pango/issues/431