summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test-layout: Add a --show-fonts optionbaseline-shiftMatthias Clasen2021-08-311-0/+15
| | | | A bit more natural than the environment variable.
* test-layout: Disable fragile checksMatthias Clasen2021-08-311-175/+0
| | | | | | | I added these for improved coverage, but they get in the way, Should probably just move these kind of checks to another place and leave this test focused on dumps.
* Add horizontal displacementMatthias Clasen2021-08-315-39/+78
| | | | | | | | | | | Apply horizontal displacements for superscripts and subscripts that are provided in font metrics. This noticably improves the placement of superscripts in italics. Currently, we only apply these displacements in post-processing, and ignore the width changes during line-breaking. This could be improved by moving the baseline handling into the line-breaking proper.
* markup: Change <sup> and <sub>Matthias Clasen2021-08-312-22/+8
| | | | | | | | Use the new baseline-shift and font-scale attributes to reimplement <sup> and <sub>. Now they take font metrics into account and nest properly.
* Implement font-dependent scalingMatthias Clasen2021-08-316-21/+217
| | | | | | | Add a new font-scale attribute to indicate font size changes due to super- and subscript shifts, and handle it during item post-processing to find the right font sizes.
* Implement baseline shiftsMatthias Clasen2021-08-318-45/+231
| | | | | | | | | | | Add a new baseline-shift attribute, which is similar to rise, but accumulates. In addition, it supports font- relative values such as superscript and subscript. We implement support for this by computing baseline shifts for run during line post-processing, and storing them in the runs. The renderer now takes these shifts into account when rendering layout lines.
* Make ellipsize code saferMatthias Clasen2021-08-311-2/+1
| | | | | | We are going to add new fields to PangoGlyphItem, so zero-initialize the one we are allocating here in ellipsize.c.
* Merge branch 'coretext-font-describe' into 'main'Matthias Clasen2021-08-313-14/+17
|\ | | | | | | | | | | | | coretext: Set size on font descriptions Closes #610 See merge request GNOME/pango!464
| * tests: Test font roundtrips on MacOscoretext-font-describeMatthias Clasen2021-08-311-12/+5
| | | | | | | | | | | | We were skipping the test that would have found the brokenness in the previous fix. Lets see if we can get the test working on MacOs.
| * coretext: Set size on font descriptionsMatthias Clasen2021-08-312-2/+12
|/ | | | | | | | Set a size on the font description returned by pango_font_describe(). Otherwise, scaling it doesn't work. Fixes: #610
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-301-1/+1
|\ | | | | | | | | Cosmetics See merge request GNOME/pango!463
| * CosmeticsMatthias Clasen2021-08-301-1/+1
| |
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-303-30/+76
|\ \ | |/ | | | | | | test-shape: Print out glyph classes See merge request GNOME/pango!460
| * CosmeticsMatthias Clasen2021-08-301-1/+1
| |
| * test-break: Fix legend formattingMatthias Clasen2021-08-301-1/+1
| |
| * test-break: Add a --hex-chars optionMatthias Clasen2021-08-301-27/+44
| |
| * test-shape: Print out glyph classesMatthias Clasen2021-08-291-2/+31
|/ | | | | | These are not very reliable for things other than marks, but even that is useful for debugging cluster handling.
* Merge branch 'more-rtl-cluster-fixes' into 'main'Matthias Clasen2021-08-304-48/+121
|\ | | | | | | | | Try harder to disect clusters See merge request GNOME/pango!450
| * pango-view: Use pango_glyph_string_index_to_x_fullmore-rtl-cluster-fixesMatthias Clasen2021-08-291-7/+8
| |
| * layout: Use pango_glyph_string_index_to_x_fullMatthias Clasen2021-08-291-18/+35
| |
| * Don't compute log attrs on demandMatthias Clasen2021-08-291-15/+3
| | | | | | | | If we don't have them, just do the fallback.
| * Add pango_glyph_string_index_to_x_fullMatthias Clasen2021-08-292-24/+72
| | | | | | | | | | | | This variant of pango_glyph_string_index_to_x takes log attrs so it does not have to compute them when it needs them to determine grapheme boundaries.
| * Try harder to disect clustersMatthias Clasen2021-08-291-15/+34
|/ | | | | | | | | | We need to take into account whether the characters we are counting are actually cursor positions, else we are bound to look for more carets than the font has available, sometimes. This change would benefit from passing log attrs into pango_glyph_string_index_to_x.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-301-14/+68
|\ | | | | | | | | pango-view: Redo --annotate option See merge request GNOME/pango!459
| * pango-view: Redo --annotate optionMatthias Clasen2021-08-291-14/+68
|/ | | | | Parse the argument as a comma-separated list of names. The old numeric arguments still work.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-303-3/+20
|\ | | | | | | | | Add pango_layout_iter_get_run_baseline See merge request GNOME/pango!458
| * pango-view: Use the new apiMatthias Clasen2021-08-291-3/+2
| | | | | | | | | | | | Use the new run baseline api to correct the positioning of glyph extents and caret positions.
| * Add pango_layout_iter_get_run_baselineMatthias Clasen2021-08-292-0/+18
|/ | | | This is useful information.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-292-3/+20
|\ | | | | | | | | layout: Apply rise to cluster extents See merge request GNOME/pango!457
| * pango-view: Improve glyph extentsMatthias Clasen2021-08-291-1/+2
| | | | | | | | | | | | We can't currently position them correctly for shifted runs. But at least we can get it right for the runs on the baseline.
| * pango-view: More careful numberingMatthias Clasen2021-08-291-2/+7
| | | | | | | | | | Don't overwrite caret position numbers with different numbers.
| * layout: Apply rise to cluster extentsMatthias Clasen2021-08-291-0/+6
| | | | | | | | This has been broken all along. :(
| * pango-view: Don't draw the empty runMatthias Clasen2021-08-291-0/+5
|/
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-294-78/+50
|\ | | | | | | | | tests: Use introspection for attributes See merge request GNOME/pango!456
| * pango-view: Fix slope of caretsMatthias Clasen2021-08-291-4/+2
| | | | | | | | We want vertical carets to be really vertical.
| * test-itemize: Keep in sync with PangoLayoutMatthias Clasen2021-08-292-10/+11
| | | | | | | | | | | | This really needs some more generic treatment. Update affected test outputs.
| * tests: Use introspection for attributesMatthias Clasen2021-08-291-64/+37
|/ | | | | | Now that we have introspection helpers for attributes, we can use them ourselves to make this code less brittle.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-297-8/+23
|\ | | | | | | | | fcfont: Cosmetics See merge request GNOME/pango!455
| * Add a missing semicolonMatthias Clasen2021-08-291-1/+1
| | | | | | | | This broke the msvc build.
| * Add autoptr cleanup funcsMatthias Clasen2021-08-282-0/+5
| |
| * font: Add a vfunc for pango_font_has_charMatthias Clasen2021-08-282-4/+16
| |
| * fcfont: CosmeticsMatthias Clasen2021-08-282-3/+1
|/ | | | Remove a few duplicated lines and typos.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-281-13/+26
|\ | | | | | | | | pango-view: Split caret positions and slopes See merge request GNOME/pango!454
| * pango-view: Split caret positions and slopesMatthias Clasen2021-08-281-13/+26
|/ | | | Still some bits left!
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-281-7/+11
|\ | | | | | | | | layout: Allocate a bit less See merge request GNOME/pango!453
| * layout: Allocate a bit lessMatthias Clasen2021-08-281-7/+11
|/ | | | | Instead of throwing away the log_widths array for every run, keep it around and grow it as needed.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-281-2/+9
|\ | | | | | | | | pango-view: Fix caret visualization See merge request GNOME/pango!452
| * pango-view: Fix caret visualizationMatthias Clasen2021-08-281-2/+9
|/ | | | I was confusing char and byte offsets here.
* Merge branch 'item-offset' into 'main'Matthias Clasen2021-08-2811-60/+165
|\ | | | | | | | | Keep offsets for items See merge request GNOME/pango!451
| * layout: Use char_offset in a few placesitem-offsetMatthias Clasen2021-08-281-23/+9
| | | | | | | | There is more we can do here, but this is a start.