| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.
|
|
|
|
|
| |
Remove leftovers like #Type, reduce indentations
to avoid markdown block quotes, etc.
|
|
|
|
|
| |
The allow-none annotation has been deprecated for a long
time already. Instead use optional and nullable everywhere.
|
|
|
|
|
|
|
|
|
| |
The commit message for d476d2a944500f8553 said
"word boundaries", but the code checked for line
breaks. That was wrong, since it also made hyphens
disappear at SHY, where we very much want them.
Update affected tests.
|
|\
| |
| |
| |
| |
| |
| | |
Make pango_layout_line_get_height work
Closes #487
See merge request GNOME/pango!327
|
| |
| |
| |
| |
| |
| |
| | |
We were just never setting the height. Ouch!
Test included.
Fixes: #487
|
|/
|
|
|
|
|
| |
When using line-spacing, we were not giving
empty lines their expected width. Fix that.
Fixes: #499
|
|
|
|
|
|
|
| |
pango_layout_set_width was trying to avoid invalidating
lines in some cases, but it failed. Which is good, since
this is incorrect, since it did not take possible
ellipsization into account.
|
|
|
|
|
|
|
|
|
|
| |
We only want to insert hyphens when we are breaking
inside a word.
Update affected tests (hyphen-or-not shows up in the
analysis flags in the output of test-layout).
Fixes: #558
|
| |
|
|
|
| |
This reverts merge request !309
|
|
|
|
|
|
|
| |
Extend the PangoUnderline and PangoOverline enumerations to
cover dashed and dotted variants of the various lines, add
api to PangoRenderer to render such lines, and implement it
in the cairo renderer.
|
|
|
|
|
| |
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
|
|
|
|
| |
All these were pointed out by gi-docgen warnings.
|
|
|
|
| |
Add summaries, convert markup, etc.
|
|
|
|
| |
Replace gtk-doc'isms and use gi-docgen links instead.
|
|
|
|
|
| |
We want to use pure markdown, since docbook
is going away as the intermediate format.
|
|
|
|
|
| |
g-ir-scanner picks the long description over the struct
docs, when the id matches.
|
|
|
|
| |
This is in preparation for going to pure markdown.
|