summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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
| |
* | fonts: Redo the get_face implementationMatthias Clasen2021-08-312-2/+12
|/ | | | | Now that we have a private class, we can retire the misplaced vfunc in the fontmap class.
* 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
* 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.
* Add pango_layout_iter_get_run_baselineMatthias Clasen2021-08-292-0/+18
| | | | This is useful information.
* layout: Apply rise to cluster extentsMatthias Clasen2021-08-291-0/+6
| | | | This has been broken all along. :(
* 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.
* 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 'item-offset' into 'main'Matthias Clasen2021-08-287-55/+138
|\ | | | | | | | | 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.
| * item: Add a char offsetMatthias Clasen2021-08-284-9/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a char_offset field to PangoItem, compute it as part of itemization and update it when splitting items. Keeping this number around cuts down on the amount of list and utf8 walking we need to do later. We have to do some extra shenanigans to preserve abi in the face of pango's open-coded structs, so we introduce a PangoItemPrivate type that is used internally. On 64bit, PangoItem has a 4 byte whole, so we can keep the size of PangoItemPrivate the same. No such luck on 32bit.
| * CosmeticMatthias Clasen2021-08-283-23/+23
| | | | | | | | | | | | Improve the itemization code to have all variants take the same code paths, so we can do fixups in one place.
* | Merge branch 'underline-kerning' into 'main'Matthias Clasen2021-08-281-6/+6
|\ \ | | | | | | | | | | | | | | | | | | renderer: Use ink rects for line lengths Closes #139 See merge request GNOME/pango!448
| * | renderer: Use ink rects for line lengthsunderline-kerningMatthias Clasen2021-08-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering underlines and the like, we should use ink extents, since the logical extents will get shortened by kerning, which can be pretty noticable when underlining individual glyphs, such as the T in To. Fixes: #139
* | | -Wincompatible-pointer-typescoretext-warningsKhaled Hosny2021-08-281-1/+1
| | |
* | | -Wincompatible-pointer-types-discards-qualifiersKhaled Hosny2021-08-281-1/+1
| | |
* | | -Wunused-variableKhaled Hosny2021-08-281-5/+0
| |/ |/|
* | carets: Fix rect for negative slopesMatthias Clasen2021-08-271-0/+4
|/ | | | | | The intention was to flip the rectangle horizontally. We do return a negative width, but we forgot to flip the origin.
* docs: Some detail for PangoGlyphGeometryMatthias Clasen2021-08-271-0/+13
|
* Try harder to find positions in clustersMatthias Clasen2021-08-271-3/+32
| | | | | | | Try to find a single non-mark glyph in a multi-glyph cluster to use its ligature caret information. This fixes situations in Arabic where you can have marks on top of ligatures, e.g. ﻉﻭ.
* Take kerning into account for ligature caretsMatthias Clasen2021-08-271-0/+3
| | | | | | | The ligature caret positions returned by hb_ot_layout_get_ligature_carets are 'unshaped' metrics. We need to take the kerning into account that is applied during shaping, and shows up in the glyphstring as x_offset.
* Fixes for rtl cursor positionsMatthias Clasen2021-08-271-1/+4
| | | | Still not working quite right, but getting closer.
* doc: Update pango_glyph_string_index_to_xMatthias Clasen2021-08-261-2/+9
| | | | | | What the docs were saying is no longer strictly true, now that we are using font metrics. Update them, and add an illustration.
* docs: Add another illustrationMatthias Clasen2021-08-261-1/+6
| | | | Show cursor positions.
* break: Fix up word fixupsMatthias Clasen2021-08-261-7/+14
| | | | | | | We were not correctly handling overlapping segments in all cases, with <span segment='word'>. Improve this. Update affected tests.
* break: Fix sentence boundary corner casesMatthias Clasen2021-08-261-2/+2
| | | | | | We were not correctly handling the case where wipe out a sentence boundary after the fact, and were leaving behind a stray sentence end.
* break-indic: Don't wipe out mandatory breaksMatthias Clasen2021-08-261-4/+7
| | | | These are required for a conforming implementation.
* break: Follow mandatory rules more strictlyMatthias Clasen2021-08-261-4/+25
| | | | | | | | We were not putting a line break at the end of the text, in cases where a paragraph ends with a newline. Enforce this in all break apis. Update affected tests.
* Merge branch 'ligature-carets' into 'main'Matthias Clasen2021-08-261-36/+89
|\ | | | | | | | | | | | | Use ligature caret lists Closes #39 See merge request GNOME/pango!438
| * Use ligature caret listsligature-caretsMatthias Clasen2021-08-251-36/+89
| | | | | | | | | | | | | | | | Some fonts provide information about where to place carets inside ligatures. Use it, when it is available. Fixes: #39
* | hyphen: Try harder to insert needed hyphensMatthias Clasen2021-08-251-4/+43
|/ | | | | | | We were forgetting to reshape runs in some situations, leading to them not having hyphens appended. This was happening when runs fit fully onto the end of a line that is wrapped anyway.
* Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-255-48/+453
| | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* Merge branch 'hyphen-log-attr' into 'main'Matthias Clasen2021-08-254-164/+194
|\ | | | | | | | | | | | | Add hyphens to log attrs Closes #603 See merge request GNOME/pango!436
| * test-break: Print out hyphensMatthias Clasen2021-08-251-7/+3
| | | | | | | | | | | | Print out all the log attrs we have. Update expected test outputs.
| * Refine hyphenationMatthias Clasen2021-08-254-20/+82
| | | | | | | | | | | | | | | | Replace ‧ and | with a - when we break there. Update affected test output. Fixes: #603
| * shape: Rearrange hb buffer setupMatthias Clasen2021-08-251-8/+7
| | | | | | | | | | Rearrange the buffer setup code slightly, so that we can change it easier, later.
| * layout: Use need_hyphen from log attrsMatthias Clasen2021-08-241-130/+1
| |
| * Add hyphens to log attrsMatthias Clasen2021-08-242-3/+105
| | | | | | | | | | | | The code computing this is much better off in break.c, so move it there, and keep the information in the log attr array.