summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix up tab sizingtab-speedupMatthias Clasen2021-12-021-23/+18
|
* layout: Small optimizationMatthias Clasen2021-12-023-39/+17
| | | | | Don't calculate line width the hard way when we can do it much easier.
* layout: Optimize tab handlingMatthias Clasen2021-12-011-1/+1
| | | | | | We don't need to iterate the entire tab array every time, we just continue from the previous tab stop position.
* layout: Call pango_tab_array_sortMatthias Clasen2021-12-011-3/+6
| | | | | We want to optimize access to tab stops, and will assume they are ordered.
* layout: Some restructuring of tab handlingMatthias Clasen2021-12-011-54/+43
| | | | Introduce a LastTab struct, and use it.
* Add pango_tab_array_sortMatthias Clasen2021-12-012-0/+28
| | | | | A utility function to ensure tab stops are in increasing order.
* Merge branch 'tab-align' into 'main'Matthias Clasen2021-11-2911-107/+2329
|\ | | | | | | | | | | | | Support tab alignment Closes #34 See merge request GNOME/pango!527
| * Add a test with tab alignmentstab-alignMatthias Clasen2021-11-292-0/+1837
| |
| * tabs: Tweak string formatMatthias Clasen2021-11-292-7/+7
| | | | | | | | Use newlines to separate tabs, rather than spaces.
| * tabs: Add a decimal pointMatthias Clasen2021-11-298-36/+165
| | | | | | | | | | | | | | This is useful for PANGO_TAB_DECIMAL. Implement this in PangoLayout, in the serializer, and update tests.
| * layout: Implement tab alignmentsMatthias Clasen2021-11-291-57/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement the other tab alignments by adjusting the tab width as we go. Based on an old patch by Itai Bar-Haim. This also includes a fix for the previously supported left tab alignment in the presence of indent. Fixes: #34
| * serializer: Support tab alignmentsMatthias Clasen2021-11-294-16/+85
| | | | | | | | | | | | | | | | | | 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.
| * tabs: Add other tab alignmentsMatthias Clasen2021-11-292-13/+52
| | | | | | | | | | Add right, center, decimal tab alignments and support them in serialization. They are not implemented yet.
| * test-layout: Make --fonts work as expectedMatthias Clasen2021-11-291-2/+5
| | | | | | | | We want to use this without initializing tests.
| * docs: Add a note on tabsMatthias Clasen2021-11-291-1/+2
| | | | | | | | | | Explain that tabs really only work with PANGO_ALIGN_LEFT.
* | Merge branch 'fix-pango-view' into 'main'Matthias Clasen2021-11-291-2/+0
|\ \ | | | | | | | | | | | | Fix pango-view crash See merge request GNOME/pango!528
| * | Fix pango-view crashPeng Wu2021-11-291-2/+0
|/ / | | | | | | | | Remove cairo_debug_reset_static_data function call in pango-view to avoid crash.
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-11-284-32/+244
|\ \ | |/ | | | | | | Never show variation selectors See merge request GNOME/pango!526
| * tests: Fix installed data for test-layoutMatthias Clasen2021-11-281-28/+29
| |
| * Never show variation selectorsMatthias Clasen2021-11-283-4/+215
|/ | | | | | | | Even when we show ignorables, we still want to ignore variation selectors and other ignorables that we don't have nicks for. Test included.
* Merge branch 'gravity-fixes' into 'main'Matthias Clasen2021-11-283-6/+9
|\ | | | | | | | | | | | | Fix misplaced glyphs in gravity east Closes #631 See merge request GNOME/pango!524
| * Fix line heights in improper gravitiesgravity-fixesMatthias Clasen2021-11-272-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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
| * Fix misplaced glyphs in gravity eastMatthias Clasen2021-11-271-1/+4
|/ | | | | This was showing up as glyphs placed outside their logical extents.
* 1.49.41.49.4Matthias Clasen2021-11-272-1/+15
|
* Merge branch 'font-serialize-test' into 'main'Matthias Clasen2021-11-274-5/+111
|\ | | | | | | | | Avoid cosmetic ugliness See merge request GNOME/pango!522
| * 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-272-4/+32
|/ | | | | | | | When setting variations to "", font descriptions would add an ugly useless " @" at the end of their serialization. Avoid that. Test included.
* Merge branch 'fix-emoji-in-tests' into 'main'Matthias Clasen2021-11-2728-1386/+1309
|\ | | | | | | | | Make sure glyphinfo is fully initialized See merge request GNOME/pango!523
| * Avoid an out-of-bound accessMatthias Clasen2021-11-271-1/+1
| | | | | | | | | | We can only use the width of the previous char if we are not at the first char. Found by asan.
| * 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
| |
| * Make sure glyphinfo is fully initializedMatthias Clasen2021-11-261-0/+1
| | | | | | | | | | The alternative is random test failures, now that we check all these fields in test-layout.
| * Add more fonts for test-layout testsMatthias Clasen2021-11-262-4/+7
|/
* Merge branch 'hinted-metrics-fixes' into 'main'Matthias Clasen2021-11-263-18/+54
|\ | | | | | | | | | | | | 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.
| * Calculate hinted font height based on the hinted extentsSebastian Keller2021-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous code was calculating the rounded up version of the difference between the unhinted ascender and uninted descender. This however would only result in the correct height if both unhinted extentss together only differ by less then an a Pango unit from their hinted counterparts. Otherwise the resulting height would be 1 unit too short. Fix this by using the difference between the hinted extents as height. Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/626
| * Introduce and use FLOOR and CEIL macros in Pango unitsSebastian Keller2021-11-222-4/+30
| | | | | | | | | | | | | | This replaces the code that was trying to implement those via the ROUND macro. This avoids a potential issue with values that already were on whole units being rounded up to the next whole unit in the code that was implementing CEIL this way.
* | Merge branch 'serialization-improvements' into 'main'Matthias Clasen2021-11-2566-1431/+17285
|\ \ | | | | | | | | | | | | Rename the serialize errors See merge request GNOME/pango!520
| * | 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-2529-216/+101
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | serializer: Include unknown glyphs countMatthias Clasen2021-11-241-0/+3
| | |
| * | Add pango_font_serializeMatthias Clasen2021-11-242-0/+58
| | | | | | | | | | | | | | | | | | | | | Another debug api. This function produces a serialization of a font that is enough to uniquely identify the font. This is more detailed than what pango_font_describe creates.
| * | Add more testsMatthias Clasen2021-11-246-9/+1049
| | | | | | | | | | | | | | | These were produced with the help of http://gitlab.gnome.org/matthiasc/layout-editor
| * | serializer: Support a "comment" fieldMatthias Clasen2021-11-241-0/+47
| | | | | | | | | | | | | | | | | | Json doesn't have comments, so we have to add an explicit comment value. This will be useful to describe what test cases are about.
| * | Update test-layoutMatthias Clasen2021-11-2426-349/+13864
| | | | | | | | | | | | | | | | | | Use the new output serialization in test-layout to store both the input and output in the same file.