| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...when interpreting item->offset values.
I ran into this when executing tests of recent LibreOffice master with ASan on
Fedora 32 (with pango-1.44.7-2.fc32.x86_64), where one of the tests renders
various dialogs with a Tamil localization and failed with
> ==97247==ERROR: AddressSanitizer: SEGV on unknown address 0x60b000210006 (pc 0x7fd6c5b22b54 bp 0x61d0004b4150 sp 0x7fff107a0d18 T0)
> ==97247==The signal is caused by a READ memory access.
> #0 in g_utf8_get_char at ../glib/gutf8.c:319:37 (/lib64/libglib-2.0.so.0 +0x85b54)
> #1 in break_indic at ../pango/break-indic.c:119:17 (/lib64/libpango-1.0.so.0 +0x1076d)
> #2 in break_script at ../pango/break.c:1896:7 (/lib64/libpango-1.0.so.0 +0x1076d)
> #3 in tailor_break at ../pango/break.c:1606:9 (/lib64/libpango-1.0.so.0 +0x147db)
> #4 in pango_tailor_break at ../pango/break.c:1774:7 (/lib64/libpango-1.0.so.0 +0x147db)
> #5 in get_items_log_attrs at ../pango/pango-layout.c:4032:7 (/lib64/libpango-1.0.so.0 +0x2729c)
> #6 in pango_layout_check_lines at ../pango/pango-layout.c:4289:7 (/lib64/libpango-1.0.so.0 +0x2729c)
> #7 in pango_layout_get_extents_internal at ../pango/pango-layout.c:2623:3 (/lib64/libpango-1.0.so.0 +0x29068)
> #8 in gtk_label_get_measuring_layout at /usr/src/debug/gtk3-3.24.22-1.fc32.x86_64/gtk/gtklabel.c:3376:3 (/lib64/libgtk-3.so.0 +0x2454d0)
[...]
From some debugging, it smells like `pango_layout_check_lines` calls
`pango_itemize_with_base_dir` to compute `state.items` that are relative to the
beginning of `layout->text`, but then passes `state.items` together with the
offset'ed `start` into `get_items_log_attrs`, so that the latter misinterpreted
the items' locations relative to the offset'ed start.
Just adding
g_assert (item->offset <= length);
g_assert (item->length <= length - item->offset);
to the original `get_items_log_attrs` would make various tests in the `meson
test` suite fail, but which pass again with the complete fix, matching the above
speculation.
|
|
|
|
|
|
|
|
| |
I don't think this is a legitimate concern, but it is
faster to add a check than to argue about the use of
pango on fontless systems.
Fixes: #495
|
|
|
|
|
|
|
|
|
|
|
| |
You can call pango_layout_set_text() with a length that
is longer than the string (and there's code in the wild
that does that). We try to handle it by only looking at
the initial segment of the text, but we are forgetting
to set layout->length to the length of that segment,
leading us to access beyond the string end later.
This fixes #490
|
|
|
|
|
|
|
| |
Apparently, gtk2 assumes that calling pango_layout_set_attributes
guarantees that the attribute list gains a ref.
Fixes: #479
|
| |
|
|
|
|
|
| |
Make sure we have a valid iter here, which is of course always the case
in reality.
|
|
|
|
|
| |
pango_layout_get_effective_attributes can return
NULL. But not all callers were handling that.
|
|\
| |
| |
| |
| | |
Wip/baedert/for master2
See merge request GNOME/pango!190
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Instead of getting the logical rect and then not using it, try not to
compute it in the first place.
|
| |
| |
| |
| |
| |
| | |
This is a pretty weak check (think e.g. a layout containing the text
"a\na"), but it's very easy to do and still hits quite a few cases in
real-world applications.
|
|/
|
|
|
|
|
|
| |
We need to apply the right shape flags to the tab width calculation,
otherwise (when glyph positions get rounded, which is the default) our
tab width will be slightly off from what 8 spaces normally produce.
https://gitlab.gnome.org/GNOME/pango/issues/425
|
|
|
|
|
|
|
| |
When shaping the ellipsis, use the same shape flags
we use for the rest of the layout, otherwise we end
up with subtle size differences between an ellipsized
text and a plain …
|
|
|
|
|
|
| |
This matches what web browsers do.
Fixes https://gitlab.gnome.org/GNOME/pango/issues/432
|
| |
|
| |
|
|
|
|
|
|
|
| |
This lets callers access to resolved text direction
of a layout. GTK needs this.
Closes: https://gitlab.gnome.org/GNOME/pango/issues/14
|
|
|
|
|
|
| |
Deal with the fact that underlines and strikethroughs
are not constant across items, since we do not break
runs for these properties.
|
|
|
|
|
|
|
|
| |
It doesn't make sense to apply kerning between letters
if they are not on the same baseline. This was not noticed
so far, since it is very uncommon to have a rise without
an accompanying font change, which will cause the run to
be broken.
|
|
|
|
|
| |
We don't use ItemProperties in pango_layout_line_index_to_x
anymore, so no need to compute them either.
|
|
|
|
|
|
|
|
|
| |
This is what we used to do, and without it, we
lose kerning beween underlined and non-underlined
characters, which is most noticable with mnemonic
underlines.
Fixes: https://gitlab.gnome.org/GNOME/pango/issues/426
|
|\
| |
| |
| |
| |
| |
| | |
Drop some leftover code
Closes #418
See merge request GNOME/pango!144
|
| |
| |
| |
| |
| |
| |
| |
| | |
In d6bc8daa6935b53c1, we added code to remove "hyphen runs".
But we no longer create such runs, so this code is harmful
and can cause crashes under certain circumstances.
Closes: https://gitlab.gnome.org/GNOME/pango/issues/418
|
|/
|
|
| |
The COMMON characters like symbol only line don't need hyphen.
|