| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This is useful information.
|
|
|
|
| |
This has been broken all along. :(
|
|
|
|
|
| |
Instead of throwing away the log_widths array
for every run, keep it around and grow it as needed.
|
|
|
|
| |
There is more we can do here, but this is a start.
|
|
|
|
|
|
| |
The intention was to flip the rectangle horizontally.
We do return a negative width, but we forgot to flip
the origin.
|
|
|
|
| |
Show cursor positions.
|
|
|
|
|
|
|
| |
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 attributes that let us override word and
sentence boundaries (and, indirectly, line breaks).
Tests included.
|
|\
| |
| |
| |
| |
| |
| | |
Add hyphens to log attrs
Closes #603
See merge request GNOME/pango!436
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace ‧ and | with a - when we break there.
Update affected test output.
Fixes: #603
|
| | |
|
| | |
|
|/
|
|
|
| |
This is like pango_layout_get_cursor_pos, but returns
a rectangle that has caret font metrics applied to it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
With the current implementation of text-transform,
we need the attribute to be constant across runs.
|
| |
|
|
|
|
| |
Use the new API, and pass our log attrs along.
|
|
|
|
|
| |
Classify text transform as an attribute that
affects shaping. It will, in the future.
|
|
|
|
|
| |
Make pango_layout_index_to_pos report non-empty
pos for the first position in a wrapped line.
|
|
|
|
|
| |
Make pango_layout_index_to_pos report non-empty
rectangles at the end of a line.
|
|
|
|
|
| |
We were returning wildly incorrect results for
anything but the first run in a line.
|
|
|
|
|
|
| |
Not great, but these *are* conflicting features.
Fixes: #595
|
|
|
|
|
|
|
| |
Add a way to justify the last line in a justified
paragraph.
Fixes: #74
|
|
|
|
|
|
| |
We were miscounting the cursor positions in a line,
causing us to jump down to the next line when moving
backwards towards the start of the line.
|
|
|
|
|
|
|
|
|
|
| |
pango_layout_index_to_line_and_extents needs to
return a run rect even if the line has no non-empty
runs. Failing to do so was causing cursors at the
end of lines to have a height of 0 or 1, which is
not what we want.
Add a testcase.
|
|
|
|
|
|
|
| |
Show how weak and strong cursors look in
practice.
Fixes: #77
|
|
|
|
| |
No need to link a function to itself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
| |
Add some visualization of alignment and justification
to the PangoLayout docs.
|
|
|
|
|
| |
Add some more detail around baseline-to-baseline
distances.
|
|
|
|
|
| |
Make the docs for pango_layout_move_cursor_visually
a bit more clear.
|
|
|
|
|
|
|
|
| |
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 disambiguate run boundaries better.
Not sure this works as intended, yet.
|
|
|
|
|
|
|
|
|
|
|
| |
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 accessors for PangoLayoutLine fields.
Fixes: #553
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
layout: make the height of an empty line match a regular line
Closes #577
See merge request GNOME/pango!363
|
| |
| |
| |
| |
| | |
When using line-spacing, the height of an empty line is the same as when line-spacing has zero value.
Take the value from font metrics.
|
|/
|
|
|
| |
Add some more default values, and correct the docs
for pango_layout_set_spacing wrt to the default value.
|
|
|
|
| |
This makes tests more reproducible.
|
|
|
|
| |
pango_layout_get_tabs returns a copy.
|
|
|
|
|
| |
Since these are not properties, their default
values aren't documented anywhere. Until now.
|
|
|
|
|
| |
The convention is to return the initial value if
the 'this' check fails. Correct this for auto_dir.
|
|
|
|
| |
This makes it obvious what the initial value is.
|
|
|
|
|
|
|
|
|
|
| |
pango_layout_get_direction contained an assertion that
would be hit when just iterating over all chars in the
text of the layout (it gets hit when you get to the final
newline).
Remove the assertion, so that this function is less
of a trap.
|