summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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.
* | Add an illustration for caret metricscaret-slopeMatthias Clasen2021-08-241-1/+4
| |
* | Add pango_layout_get_caret_posMatthias Clasen2021-08-242-5/+102
|/ | | | | This is like pango_layout_get_cursor_pos, but returns a rectangle that has caret font metrics applied to it.
* break: Add pango_attr_break apiMatthias Clasen2021-08-233-9/+62
| | | | | | | | | | | | So far, we've been applying attribute-based customization while doing per-item tailoring. But this is suboptimal, since it means we don't have a full view of the log attrs, and can't do invariant fixes that cross item boundaries. Therefore, add a separate pango_attr_break api that applies attributes to to the whole paragraph, and make PangoLayout use it.
* break: Some code reorganizationMatthias Clasen2021-08-232-49/+60
| | | | Shuffle break.c around a bit.
* break-thai: Fix up word break handlingMatthias Clasen2021-08-231-8/+20
| | | | | | | | | | | We want to insert word start+end if libthai hands us line breaks between letters. But must be careful not to overwrite existing word boundaries, or we end up with a nonsense sequence. This was found by checking log attr invariants. Regenerate affected test outputs.
* layout: Only recompute log_attrs when neededMatthias Clasen2021-08-231-15/+21
| | | | | | There is no need to throw away the log_attrs when we just change the width, or other layout properties that do not affect segmentation.
* docs: Add another illustrationdoc-font-metricsMatthias Clasen2021-08-221-0/+8
| | | | Show font metrics.
* Fix an oversight with text-transformMatthias Clasen2021-08-221-1/+1
| | | | | With the current implementation of text-transform, we need the attribute to be constant across runs.
* renderer: Silence compiler warningsMatthias Clasen2021-08-221-0/+8
|
* markup: Silence compiler warningsMatthias Clasen2021-08-221-0/+3
|
* layout: Silence compiler warningsMatthias Clasen2021-08-221-26/+27
|
* break: Silence compiler warningsMatthias Clasen2021-08-221-8/+16
|
* fcfontmap: Silence compiler warningsMatthias Clasen2021-08-221-0/+2
|
* bidi: Silence compiler warningsMatthias Clasen2021-08-221-0/+1
|
* emoji: Silence compiler warningsMatthias Clasen2021-08-221-0/+3
|
* attributes: Silence compiler warningsMatthias Clasen2021-08-221-9/+9
|
* glyphstring: Silence compiler warningsMatthias Clasen2021-08-221-4/+4
|
* attributes: CosmeticsMatthias Clasen2021-08-221-2/+2
| | | | Fix a few comments.
* Add a forgotten binding helperMatthias Clasen2021-08-221-0/+1
| | | | The new text-transform attribute was overlooked.
* Fix binding helpers for absolute-line-heightMatthias Clasen2021-08-221-0/+1
| | | | This was overlooked.
* break: Some code reorgMatthias Clasen2021-08-221-141/+130
| | | | Reshuffle things to make room for validation.
* Merge branch 'renderer-crash' into 'main'Matthias Clasen2021-08-211-1/+1
|\ | | | | | | | | | | | | renderer: Don't divide by zero Closes #599 See merge request GNOME/pango!425
| * renderer: Don't divide by zerorenderer-crashMatthias Clasen2021-08-211-1/+1
| | | | | | | | | | | | | | | | Before dividing by num_glyphs in draw_strikethrough, make sure it isn't 0. This should fix reported crashes in this function. Fixes: #599
* | Merge branch 'text-transform-3' into 'main'Matthias Clasen2021-08-216-120/+336
|\ \ | |/ |/| | | | | Add support for text transformation See merge request GNOME/pango!421
| * Documentation tweaksMatthias Clasen2021-08-201-27/+28
| |
| * shaping: implement text transformMatthias Clasen2021-08-201-81/+167
| | | | | | | | | | | | Transform the text we hand to harfbuzz, as prescribed by the text transform attributes we have. This uses the log attrs to find word starts.
| * layout: Use pango_shape_itemMatthias Clasen2021-08-201-4/+5
| | | | | | | | Use the new API, and pass our log attrs along.
| * Add pango_shape_itemMatthias Clasen2021-08-202-38/+103
| | | | | | | | | | | | Add a pango_shape API variant that takes log attrs, so we can implement text transforms that depend on word boundaries, in the future.
| * layout: Text transform affects shapeMatthias Clasen2021-08-201-0/+1
| | | | | | | | | | Classify text transform as an attribute that affects shaping. It will, in the future.