summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Adapt testsline-height-attributeMatthias Clasen2021-08-081-2/+10
| | | | | | Now that we are using run extents for cursor positions, the vertical extents aren't necessarily constant across a line anymore. Adapt our assertions.
* Fix up logical rectangle reportingMatthias Clasen2021-08-081-24/+76
| | | | | | | | | | | | | Fix up the various apis that are reporting logical rects to follow these rules: Logical rectangles of lines are affected by the line-height attribute, logical rectangles of smaller units (runs, clusters, chars, cursors, etc) are not. This fixes the text cursors and block cursors in GTK to be 'normal' height, even when applying line-height for double-spacing.
* layout: Handle line-height attributesMatthias Clasen2021-08-081-1/+30
| | | | | | | | | Modify the height and vertical origin of logical extents according to the line height attributes. We currently apply half the leading above and half below the content (i.e., lines are vertically centered in their modified height).
* Add line-height attributesMatthias Clasen2021-08-085-0/+108
| | | | | | | | | | | | Add attributes for line-height, in a relative and absolute variant. This will be used to grow the logical extents of runs in a way that is compatible with CSS semantics. In markup, we support a new line_height attribute that will be interpreted as absolute if it is an integer > 1024, and as a relative factor otherwise.
* Merge branch 'layout-docs' into 'main'Matthias Clasen2021-08-0817-23/+68
|\ | | | | | | | | docs: Fix up deps for images See merge request GNOME/pango!395
| * docs: Cosmetic fixeslayout-docsMatthias Clasen2021-08-082-12/+13
| |
| * docs: Add some more imagesMatthias Clasen2021-08-089-0/+22
| | | | | | | | Add a visual example of bidi reordering.
| * docs: Add a dark mode variant of some imagesMatthias Clasen2021-08-089-6/+16
| |
| * docs: Improve image placementMatthias Clasen2021-08-081-5/+4
| | | | | | | | Move the vertical text example up, in the bidi docs.
| * gravity: Correct the documentationMatthias Clasen2021-08-081-2/+2
| | | | | | | | | | There was a cw vs ccw mixup here. Adding example images made it obvious.
| * docs: Fix up deps for imagesMatthias Clasen2021-08-081-0/+13
|/ | | | We have two lists to keep in sync :(
* Merge branch 'layout-docs' into 'main'Matthias Clasen2021-08-088-4/+12
|\ | | | | | | | | docs: More details See merge request GNOME/pango!394
| * docs: More detailsMatthias Clasen2021-08-088-4/+12
|/ | | | Add some visualizations of gravity.
* Merge branch 'layout-docs' into 'main'Matthias Clasen2021-08-088-1/+17
|\ | | | | | | | | docs: Add more details See merge request GNOME/pango!393
| * docs: Add more detailsMatthias Clasen2021-08-088-1/+17
|/ | | | | Add some visualization of alignment and justification to the PangoLayout docs.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-083-4/+12
|\ | | | | | | | | docs: Some clarifications See merge request GNOME/pango!392
| * docs: More detailsMatthias Clasen2021-08-081-0/+3
| | | | | | | | Add a cross-reference to the PangoAlignment docs.
| * docs: Some clarificationsMatthias Clasen2021-08-082-4/+9
|/ | | | | Add some more detail around baseline-to-baseline distances.
* NEWS: UpdatesMatthias Clasen2021-08-081-0/+10
|
* Merge branch 'bidi-revenge' into 'main'Matthias Clasen2021-08-085-199/+227
|\ | | | | | | | | | | | | Reimplement pango_layout_move_cursor_visually Closes #587, #585, and #157 See merge request GNOME/pango!389
| * Tweak the docsbidi-revengeMatthias Clasen2021-08-081-7/+6
| | | | | | | | | | Make the docs for pango_layout_move_cursor_visually a bit more clear.
| * Add multi-line tests for move-cursorMatthias Clasen2021-08-081-0/+63
| | | | | | | | | | Test the line end handling of pango_layout_move_cursor_visually.
| * Reimplement pango_layout_move_cursor_visuallyMatthias Clasen2021-08-084-174/+110
| | | | | | | | | | | | | | | | Reimplement this function based on pango_layout_get_cursor_pos. This is a bit less efficient, but it fixes cases where the old implementation would get stuck. Fixes: #587, #585, #157
| * Try to improve pango_layout_get_cursor_posMatthias Clasen2021-08-081-9/+27
| | | | | | | | | | Try to disambiguate run boundaries better. Not sure this works as intended, yet.
| * Add tests for pango_layout_move_cursor_visuallyMatthias Clasen2021-08-081-9/+14
| | | | | | | | Some of these currently fail.
| * Small correction to test-layoutMatthias Clasen2021-08-061-1/+8
| | | | | | | | | | We need to apply trailing properly, by skipping characters.
* | Merge branch 'markup-sizes' into 'main'Matthias Clasen2021-08-0813-33/+150
|\ \ | |/ |/| | | | | | | | | markup: Allow specifying size in pt or px Closes #67 and #23 See merge request GNOME/pango!391
| * markup: Allow specifying size as percentagemarkup-sizesMatthias Clasen2021-08-084-3/+49
| | | | | | | | | | | | | | Accept values like 200%, in addition to other ways of specifying sizes in markup. Fixes: #23
| * markup: Allow pt for rise tooMatthias Clasen2021-08-087-5/+45
| |
| * markup: Allow specifying size in ptMatthias Clasen2021-08-086-27/+58
|/ | | | | | | | Accept values like 12.5pt, in addition to the other ways of specifying font size in markup. Fixes: #67
* Merge branch 'bidi-adventures' into 'main'Matthias Clasen2021-08-0514-32/+197
|\ | | | | | | | | tests: Avoid bidi in test output See merge request GNOME/pango!388
| * Add tests for pango_layout_move_cursor_visuallybidi-adventuresMatthias Clasen2021-08-052-1/+184
| | | | | | | | Some of these currently fail.
| * tests: Avoid bidi in test outputMatthias Clasen2021-08-0512-31/+13
|/ | | | | | | When rendering the text char-by-char, use directional controls to avoid any bidi reordering. Update affected tests.
* Merge branch 'fix-split-cursors-at-end' into 'main'Matthias Clasen2021-08-043-8/+68
|\ | | | | | | | | Add an old testcase See merge request GNOME/pango!386
| * Add a test for pango_layout_get_cursor_posfix-split-cursors-at-endMatthias Clasen2021-08-041-0/+37
| | | | | | | | | | | | This checks that we get split cursors in some cases where we expect it. One of the cases was broken until the previous commit.
| * Revert a non-longer needed changeMatthias Clasen2021-08-041-8/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts 681f92d78c2623, after adding the crash that it alludes to as a test case and verifying that it no longer crashes. This commit was causing split cursors to not work as intended at the end of a mixed-direction string. Broken since 2008...
| * Add an old testcaseMatthias Clasen2021-08-041-0/+29
| | | | | | | | | | | | | | | | This was quite an odyssee: - Identify commit from 2008 that caused a regression - Spot the commit message alluding to a crash - Identify bug number in NEWS for releases from 2008 - Find the bug in the no longer searchable bugzilla.gnome.org
| * Add some more bidi embedding level testsMatthias Clasen2021-08-041-0/+2
|/
* Merge branch 'ignore-width-in-horizontal2' into 'main'Matthias Clasen2021-08-047-28/+78
|\ | | | | | | | | | | | | itemize: Ignore width in horizontal context Closes #503 See merge request GNOME/pango!385
| * itemize: Ignore width in horizontal contextignore-width-in-horizontal2Matthias Clasen2021-08-037-28/+78
|/ | | | | | | | | Changes in width only need to break runs in vertical context. Update tests and add a new test. Fixes: #503
* Merge branch 'gravity-fix' into 'main'Matthias Clasen2021-08-024-15/+54
|\ | | | | | | | | gravity: Remove redundant code See merge request GNOME/pango!384
| * itemize: Fix up gravity state initializationgravity-fixMatthias Clasen2021-08-023-4/+47
| | | | | | | | | | | | | | | | itemize_state_init was setting gravity-related fields to their initial values too late, after update_attr_iterator has already set them to the values for the first run. Test included.
| * gravity: Remove redundant codeMatthias Clasen2021-08-021-11/+7
|/ | | | | | Just pass PANGO_GRAVITY_AUTO on to pango_gravity_get_for_script_and_width. It has just the same fallback handling.
* Merge branch 'introspection-fixes' into 'main'Matthias Clasen2021-08-024-0/+347
|\ | | | | | | | | | | | | layout: Add some api for introspection Closes #476 and #553 See merge request GNOME/pango!373
| * attributes: Add helper api for introspectionintrospection-fixesMatthias Clasen2021-08-012-0/+273
| | | | | | | | | | | | | | | | Add functions to cast PangoAttribute to the various struct types, so language bindings can get at the payload. Fixes: #476
| * layout: Add some api for introspectionMatthias Clasen2021-08-012-0/+74
|/ | | | | | Add accessors for PangoLayoutLine fields. Fixes: #553
* Merge branch 'private-vfuncs' into 'main'Matthias Clasen2021-08-029-60/+188
|\ | | | | | | | | Start using private vfuncs See merge request GNOME/pango!383
| * Clean up rounding codeprivate-vfuncsMatthias Clasen2021-07-314-54/+93
| | | | | | | | | | | | Add private api to get the necessary information from the font backend, and drop the hack that was added in d4356779945855f7cc.
| * Add pango_font_get_languagesMatthias Clasen2021-07-315-4/+69
| | | | | | | | | | | | Start using private vfuncs for PangoFont, and use it to replace the recently introduced pango_fc_font_get_languages with a frontend api.
| * Bump version to 1.49Matthias Clasen2021-07-311-1/+1
| | | | | | | | We're going to add api.