summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* Add more casing variantsMatthias Clasen2021-11-072-3/+30
| | | | | Add values for all the css casing variants to the PangoVariant enum.
* itemize: Implement emulated Small CapsMatthias Clasen2021-11-071-1/+181
| | | | | | | | | | | When we detect that Small Caps are requested, but not available via OpenType font features, emulate Small Caps by splitting the item into lowercase and uppercase runs and add text transform and font scale attributes to the lowercase runs to get the effect of Small Caps. Still to do: resolve conflicts with preexisting text transform attributes.
* itemize: Break out a helperMatthias Clasen2021-11-071-27/+32
| | | | | | Factor out the 'consider as space' part from the itemization code, so we can reuse it when breaking items into upper- and lowercase runs.
* itemize: Handle PANGO_FONT_SCALE_SMALL_CAPSMatthias Clasen2021-11-071-17/+39
| | | | This is not used by anything yet.
* Add PANGO_FONT_SCALE_SMALL_CAPSMatthias Clasen2021-11-071-1/+3
| | | | | This will be used in the implementation of emulated Small Caps.
* shape: Use the new helperMatthias Clasen2021-11-061-68/+2
|
* pango-item: Add a helperMatthias Clasen2021-11-062-0/+73
| | | | | | Add a helper function that used to live with the Harfbuzz shaping code in shape.c. It will be used in the itemize code too, in the future.
* fc: Implement PANGO_VARIANT_SMALL_CAPSMatthias Clasen2021-11-051-0/+21
| | | | | | | Arrange for PANGO_VARIANT_SMALL_CAPS to be translated into the OpenType feature smcp=1 and back. This makes small caps survive a roundtrip from font description to font and back.
* Fix advance widths with transformsadvance-transformMatthias Clasen2021-11-051-29/+13
| | | | | | | | | | The hb_font_t we were passing to Harfbuzz for shaping was not taking context transforms into account, and therefore was not scaling advance widths as necessary. Always go through pangos glyph extents to fix this. Fixes: #620
* Add a few more default-ignorablesmore-default-ignorablesMatthias Clasen2021-11-031-0/+5
| | | | | | Add some more directional formatting characters to the list of default-ignorables that we make visible when requested: ALM, LRI, RLI, FSI, PDI.
* fontset: Add a missing annotationMatthias Clasen2021-10-311-1/+3
| | | | | pango_fontset_simple_append consumes the font that it is given.
* Make logical glyph extents betterMatthias Clasen2021-10-311-0/+2
| | | | | For east and west gravity, the logical glyph extents were still misaligned with the ink extents.
* Merge branch 'glyph-extents-fixes' into 'main'Matthias Clasen2021-10-312-27/+66
|\ | | | | | | | | cairo: Produce meaningful logical glyph extents See merge request GNOME/pango!490
| * cairo: Small fixupglyph-extents-fixesMatthias Clasen2021-10-301-1/+1
| | | | | | | | | | | | cf_priv->scaled_font is initialized on demand, it may be NULL. So better call the getter. This was showing up as failure in the asan test in ci.
| * Use harfbuzz metrics for cairo fontsMatthias Clasen2021-10-301-14/+37
| | | | | | | | | | Without this, we end up with differences in metrics of empty runs.
| * cairo: fix hinting of metricsMatthias Clasen2021-10-301-4/+3
| | | | | | | | | | | | | | We were looking at the wrong font options here, causing metrics to not be hinted when they should be. This was causing some of the empty line height tests to fail.
| * cairo: Produce meaningful logical glyph extentsMatthias Clasen2021-10-301-11/+28
| | | | | | | | | | Depending on gravity, our logical glyph extents were empty and mis-aligned. Fix that.
* | gi: add array annotations to get_languages Bilal Elmoussaoui2021-10-301-2/+1
|/ | | | Also drops the null-terminated doc comment as gi-docgen shows that already if the function is annotated properly
* Flesh out some doc commentsMatthias Clasen2021-10-292-3/+16
| | | | | Add some missing details about new enumerations and run baselines.
* pango: backport an old since annotationBilal Elmoussaoui2021-10-291-0/+2
| | | | from a manual override in gtk-rs
* add missing since 1.50 annotationsBilal Elmoussaoui2021-10-293-0/+15
|
* Revert "Use harfbuzz metrics for cairo fonts"Matthias Clasen2021-10-271-22/+21
| | | | | | This broke glyph extents with gravity north or west. This reverts commit 20ec670e124e4461075a2967faa29603d25106cc.
* Support for Catalan middle dot in word start and endJordi Mas2021-10-272-0/+67
|
* CosmeticsMatthias Clasen2021-10-261-6/+6
| | | | Fold markers always just use 3 {, even when nested.
* CosmeticsMatthias Clasen2021-10-241-8/+16
| | | | Add default implementations for is_monospace and is_variable.
* Fix a typoMatthias Clasen2021-10-231-1/+1
|
* Merge branch 'empty-line-height-attr-fix' into 'main'Matthias Clasen2021-10-203-39/+86
|\ | | | | | | | | | | | | Fix empty line heights Closes #421 See merge request GNOME/pango!481
| * Fix cursor pos height in some casesMatthias Clasen2021-10-191-18/+28
| | | | | | | | | | | | | | For empty runs, we were sometimes using line height, which may be scaled up by the line-height attribute. Fix that.
| * Fix empty line heightsMatthias Clasen2021-10-191-0/+24
| | | | | | | | | | | | Fix the calculation of line height for empty lines to take the line-height attributes into account like we do for non-empty lines.
| * Use harfbuzz metrics for cairo fontsMatthias Clasen2021-10-191-21/+22
| | | | | | | | | | | | | | Without this, we end up with differences in metrics of empty runs. Fixes: #421
| * pangocairo: Round font metrics when appropriateMatthias Clasen2021-10-191-1/+13
| | | | | | | | | | | | | | | | | | | | | | When metrics hinting is on, we used to provide rounded font metrics. We should keep doing that since otherwise we end up with logical rects sometimes being rounded and sometimes not, leading to jumping empty lines. Test included. Fixes: #421
* | Update Line Break to Unicode 14Peng Wu2021-10-121-2/+6
| |
* | Update pango-break-table.h to Unicode 14Peng Wu2021-10-091-209/+213
| |
* | Update pango-emoji-table.h to Unicode 14Peng Wu2021-10-091-21/+26
|/
* Merge branch 'fix-underlined-spaces' into 'main'Matthias Clasen2021-09-241-2/+2
|\ | | | | | | | | | | | | Underline spaces again Closes #613 See merge request GNOME/pango!478
| * Underline spaces againfix-underlined-spacesMatthias Clasen2021-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | in ada1bc9385d638e4c42, I switched to using ink rects for horizontal underline extents, to improve the placement of single-character underlines in the presence of kerning. I overlooked the fact that spaces don't have ink, so the change caused leading and trailing whitespace to not be underlined anymore. Fix this by using the union of ink and logical rectangles. Fixes: #613
* | Update script data for Unicode 14unicode-14-updatesMatthias Clasen2021-09-191-0/+6
|/
* layout: Fix static analysis warningsMatthias Clasen2021-09-171-4/+4
| | | | | These were showing up as warnings about garbage values in the gtk static-scan build.
* renderer: Fix static analysis warningsMatthias Clasen2021-09-171-1/+1
| | | | | Fix a warnings about garbage values that are showing up in the gtk static-scan build.
* Avoid a crashMatthias Clasen2021-09-011-5/+12
| | | | I was carelessly not initializing prev to NULL.
* Be more forgiving about attribute orderingMatthias Clasen2021-09-011-10/+16
| | | | | | | | | | | | We don't really have firm control over the way attributes are ordered in the list, so the assumtion that we see proper nesting for baseline shifts was a bit optimistic. Just look through all open stack items for a match, and remove that. Test included.
* Add docs for new attributesMatthias Clasen2021-09-011-0/+27
|
* Merge branch 'baseline-shift' into 'main'Matthias Clasen2021-09-0110-90/+494
|\ | | | | | | | | Implement baseline shifts See merge request GNOME/pango!462
| * 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-311-18/+4
| | | | | | | | | | | | | | | | 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-315-21/+216
| | | | | | | | | | | | | | 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-317-45/+230
| | | | | | | | | | | | | | | | | | | | | | 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.
* | shape: Mark color glyphs in glyphstringsMatthias Clasen2021-09-012-2/+47
| | | | | | | | | | GTK needs this information to decide how to render the glyphs, so provide it.
* | font: Add more autoptr cleanupMatthias Clasen2021-08-311-0/+2
| |