summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix a g_ascii_formatd callfix-asciid-callMatthias Clasen2022-01-186-19/+19
| | | | | | | | | | | We were passing a format specifier that starts with ' ', which some implementations of that API don't like. This change removes an extraneous space from the output. Update affected tests. Fixes: #659
* Drop uses of pango_coverage_ref/unrefMatthias Clasen2022-01-101-3/+3
| | | | Just use g_object_ref/unref.
* Add a bold sans to the test font setupMatthias Clasen2022-01-102-0/+1
|
* Reinstate previous behavior or pango_attr_list_spliceattrlist-spliceMatthias Clasen2022-01-071-0/+18
| | | | | | | | | | If gap is zero, don't limit the inserted attributes; that does not make sense. Spell out the different use cases in the docs. Testcase included. Fixes: #653
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2022-01-022-0/+136
|\ | | | | | | | | Add a test for letterspacing See merge request GNOME/pango!570
| * Add a test for letterspacingMatthias Clasen2022-01-022-0/+136
| | | | | | | | | | This tests that we turn off ligatures when letterspacing is enabled.
* | Add pango_matrix_get_slant_ratioMatthias Clasen2022-01-021-0/+26
|/ | | | | Add API to extract the slant ratio from a PangoMatrix. Tests included.
* test-ellipsize: TweakMatthias Clasen2022-01-011-2/+2
| | | | | Best to compare precise sizes and take rounding out of the equation.
* Add fonts to installed testsMatthias Clasen2021-12-251-0/+14
| | | | Fixes: #648
* Make missing space smallersmaller-spaceMatthias Clasen2021-12-222-7/+7
| | | | | | | The Microsoft paper I was citing actually recommends 1/4 em for ASCII space. Make it so... Update affected tests.
* Use a better size for missing spaceMatthias Clasen2021-12-212-7/+7
| | | | | | | | | | Follow the Microsoft Typography recommendations from https://docs.microsoft.com/en-us/typography/develop/character-design-standards/whitespace and use half of an em for missing space. Update affected tests. Fixes: #647
* Add a test for the previous commitsmisc-cleanupsMatthias Clasen2021-12-182-0/+296
| | | | | This test verifies the fixes for the situation described in #646.
* serializer: Fix a typoMatthias Clasen2021-12-1835-35/+35
| | | | | | Oops, we were not serializing the height at all. Update all affected tests.
* cairo: Work harder to measure spacemore-space-tweaksMatthias Clasen2021-12-172-18/+12
| | | | | | | | | | | When coming up with a width for a missing space, we were just measuring the hex digits. But in subsetted fonts, such as the ones we use for ci, hex digits might well be missing. Take that into account and still provide some nonzero width for space. Update affected tests.
* shape: More tweaks to space handlingMatthias Clasen2021-12-172-18/+24
| | | | | | | | | | | | | | It is a difficult dance between HarfBuzz and pango which glyphs we let hb synthesize, and which ones we need to fake ourselves. HarfBuzz knows how to create other spaces from 0x20, so if the font is lacking spaces, we want to tell HarfBuzz that we don't have that glyph *except* for 0x20 where we need to fake one, and provide HarfBuzz with a suitable width. Update affected tests.
* Revert "Fix advance widths with transforms"fix-vertical-regressionMatthias Clasen2021-12-1716-41/+302
| | | | | | | | | This reverts commit ccb651dd2a876a4f4a4cb9351f05332173e709ba. This broke vertical text rendering, see https://gitlab.com/inkscape/inkscape/-/issues/2950. Update affected tests and add a vertical test.
* Fix handling of space-less fontsfix-spaceless-fontsMatthias Clasen2021-12-166-13/+151
| | | | | | | | | | | HarfBuzz knows how to synthesize spaces, we just need to tickle it in the right way. Test included. Update affected tests. Fixes: #641
* Add a test for 0x6ddarabic-formatMatthias Clasen2021-12-164-0/+92
| | | | This tests the fix in the previous commit.
* tests: Cover new tab alignmentsMatthias Clasen2021-12-101-7/+15
|
* layout: Handle a corner caseMatthias Clasen2021-12-092-0/+184
| | | | | | | | | We can't break in a tab run. This fixes an assertion found by afl. Testcase included. Fixes: #638
* Fix line width computationMatthias Clasen2021-12-062-0/+364
| | | | | | | | | | We an only use the line_width - remaining_width shortcut if we are actually maintaining remaining_width, i.e. not if we don't wrap lines. Testcase included. Fixes: #635
* Add a monospace font for ciMatthias Clasen2021-12-064-16/+22
| | | | Update affected test outputs.
* Fix a crash in tab handlingtab-crash-fixMatthias Clasen2021-12-052-0/+1430
| | | | | | | | | | When we uninsert the current tab run, we need to reset our tab state to prevent last_tab->glyphs to become a dangling pointer. Test included. Fixes: #634
* Add pango_font_deserializeMatthias Clasen2021-12-021-1/+14
| | | | | This will make the font serialization useful in GTK, where we serialize fonts in node files.
* Update tests for small changes in outputMatthias Clasen2021-12-0229-1225/+1204
|
* testserialize: Fix the testsMatthias Clasen2021-12-021-13/+23
|
* layout: Small optimizationMatthias Clasen2021-12-022-14/+14
| | | | | Don't calculate line width the hard way when we can do it much easier.
* Add a test with tab alignmentstab-alignMatthias Clasen2021-11-292-0/+1837
|
* tabs: Tweak string formatMatthias Clasen2021-11-291-6/+6
| | | | Use newlines to separate tabs, rather than spaces.
* tabs: Add a decimal pointMatthias Clasen2021-11-293-13/+28
| | | | | | | This is useful for PANGO_TAB_DECIMAL. Implement this in PangoLayout, in the serializer, and update tests.
* serializer: Support tab alignmentsMatthias Clasen2021-11-293-13/+54
| | | | | | | | | Serialize tab alignment in addition to tab position. We still accept the old format and default alignment to left. Update testserialize and layout tests for this.
* test-layout: Make --fonts work as expectedMatthias Clasen2021-11-291-2/+5
| | | | We want to use this without initializing tests.
* tests: Fix installed data for test-layoutMatthias Clasen2021-11-281-28/+29
|
* Never show variation selectorsMatthias Clasen2021-11-281-0/+170
| | | | | | | | Even when we show ignorables, we still want to ignore variation selectors and other ignorables that we don't have nicks for. Test included.
* Fix line heights in improper gravitiesgravity-fixesMatthias Clasen2021-11-271-4/+4
| | | | | | | | | | | Without this, we end up with line height being zero in gravity north or west. The visible symptom is that wrapped lines are drawn on top of each other with line-height != 0. Affected tests have been updated. Fixes: #631
* Add a test for pango_font_serializefont-serialize-testMatthias Clasen2021-11-272-1/+79
| | | | | Now that we have fonts in git, we can reliably test this.
* font: Avoid cosmetic uglinessMatthias Clasen2021-11-271-2/+29
| | | | | | | | When setting variations to "", font descriptions would add an ugly useless " @" at the end of their serialization. Avoid that. Test included.
* Update tests one more timeMatthias Clasen2021-11-2622-1375/+1230
|
* tests: Fix font setup for EmojiMatthias Clasen2021-11-262-6/+70
| | | | We need to copy the scale hack for bitmaps.
* Add more Emoji to the included emoji fontMatthias Clasen2021-11-261-0/+0
|
* Add more fonts for test-layout testsMatthias Clasen2021-11-262-4/+7
|
* Merge branch 'hinted-metrics-fixes' into 'main'Matthias Clasen2021-11-261-14/+24
|\ | | | | | | | | | | | | Hinted metrics fixes Closes #626 See merge request GNOME/pango!518
| * Test more font sizes in the empty line height testSebastian Keller2021-11-221-14/+24
| | | | | | | | | | | | This would have caught the issue fixed in the previous commit, because the default font choice of "serif 12" happened to not be affected by it. Most other fonts or font sizes however were.
* | Skip test-layout on macOSserialization-improvementsMatthias Clasen2021-11-251-1/+6
| | | | | | | | It should work there, but it doesn't.
* | test-layout: Fix up comparison directionMatthias Clasen2021-11-251-1/+1
| | | | | | | | This makes more sense.
* | test-layout: Use an fc fontmapMatthias Clasen2021-11-251-1/+13
| | | | | | | | | | | | | | Our new, more precise font checks rely on data from fontconfig to identify fonts uniquely. So make sure that we use a custom fc fontmap, if we have one.
* | Add a newline to serialization resultsMatthias Clasen2021-11-2528-215/+96
| | | | | | | | | | | | | | | | Otherwise editing the output in an editor is likely to make the data not match anymore, since most editors will add a final newline. Update all tests
* | Make test-layout use included fontsMatthias Clasen2021-11-2533-205/+1685
| | | | | | | | | | | | | | | | | | Add Cantarell, DejaVu Sans and a subset of Noto Color Emoji to git, and make test-layout use just those fonts. This should help with keeping the ci from breaking due to different system fonts. Update tests.
* | test-layout: Drop the --show-font optionMatthias Clasen2021-11-241-6/+0
| | | | | | | | Not used anymore.
* | Add more testsMatthias Clasen2021-11-246-9/+1049
| | | | | | | | | | These were produced with the help of http://gitlab.gnome.org/matthiasc/layout-editor