| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Avoid overflow when updating the end_index of
attributes in pango_attr_list_update. This is
a real risk, because end_index is commonly set
to G_MAXUINT to mean 'until the very end'.
Test included.
Fixes: #455
|
|
|
|
|
| |
The arguments to pango_attr_list_update are ints,
but negative numbers don't make sense here.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This broke when PangoAttrIterator was changed to
use an array for the stack of current attributes, in
dec6c0868ef2c36. We were not always walking the array
in the right order. The first attribute to check is
at the *end* of the array.
This showed up as misrendering in epsilon_0 example
in gtk3-demo's text view markup demo.
Test included.
|
| |
|
|
|
|
|
| |
Avoid declaring a variables in a for loop initialization, so that we
won't accidentally break building on older compilers.
|
|
|
|
|
|
|
|
| |
There were a few cases left where empty attribute
lists could lead to crashes. This was observed causing
crashes in gnumeric.
Testcases included.
|
|
|
|
|
| |
This was showing up as the colored Google link
in the gtk4-demo links demo losing its colors.
|
|
|
|
|
| |
When allowing attributes to be NULL, we need
to take that into account here too.
|
|
|
|
|
|
| |
There were some breakage introduced in the porting
to GPtrArray - we sometimes ran into assertions, and
sometimes forgot to add the new attribute altogether.
|
| |
|
|
|
|
| |
It's only very rarely used, and will become even less important later.
|
|
|
|
| |
One less linked list.
|
| |
|
|
|
|
| |
A private function to find empty attribute lists
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new `pango_attr_list_equal` API that allows comparing the
attributes included in two PangoAttrLists and returns TRUE if the lists
contain the same attributes and apply to the same ranges.
The function avoids any copying of attributes or lists and applies a
minor optimization of skipping the equality check for attributes that
were already found in both lists. Other possible optimizations that
could be added if necessary would be storing the length of the
attributes list in the PangoAttrList class to avoid the `g_slist_length`
calls or reusing the `other_iter` pointer in case all attributes from 0
to n were already found.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add a new PangoOverline enum, and overline
and overline_color attributes, which parallel
the attributes we have for underlines and
strikethrough.
For now, the enum just has 'none' and 'single'
values.
|
|
|
|
|
|
|
|
|
| |
Add a text attribute that allows to suppress
insertion of hyphens at intra-word line breaks.
This is useful for non-paragraph-like contexts,
where line breaks are needed, but hyphens are not
expected.
|
|
|
|
|
|
|
|
| |
Makes it usable by language bindings, and avoids warnings when
generating introspection data.
We already have the necessary public API, we're just missing a GType for
it.
|
|
|
|
| |
Otherwise the introspection scanner will be majorly confused.
|
|
|
|
|
| |
Allow to opt-in to showing spaces, line breaks,
and default-ignorable chars, separately.
|
|
|
|
| |
Clean up some headers, and shovel docs around.
|
|\
| |
| |
| |
| | |
Better hyphens
See merge request GNOME/pango!89
|
| |
| |
| |
| |
| | |
Add a new attribute type, and parse allow_breaks="false"
in markup. This is useful to prevent hyphenation of words.
|
| |
| |
| |
| | |
Ensure that we declare variables at the top of the block.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a function that can update positions of
attributes as the underlying text is changing.
This is meant to be used to update an attribute
list as text transformations are applied, like
capitalization.
|
|/
|
|
|
| |
This was a gap in the attribute api - no way
to get attributes back out of a list.
|
| |
|
|
|
|
|
|
| |
Based on a patch by Matijs van Zuijlen <matijs@matijs.net>.
Closes https://gitlab.gnome.org/GNOME/pango/issues/259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These checks are preceded by other checks or code which demonstrates
that the values are definitely always non-NULL.
In the case of pango_attr_list_insert_internal(), the final branch of
the function never needs to update list->attributes_tail, as the middle
branch handles the case of appending to the list. The final case is just
for insertions in the middle of the list.
Coverity IDs: 1391710, 1391711
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778654
|
|
|
|
| |
Add attributes types for foreground and background alpha.
|
|
|
|
|
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=738505
Patch from Matthias Clasen, based on early patch from Akira TAGOH.
There's room for improvement in how this is done, but it works now
for simple cases, which is what most people will be using it for.
Finally!
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=731022
|
|
|
|
| |
This reverts commit 19a252d9a3d63e7816f9a77bab65bd161675440a.
|
| |
|
|
|
|
| |
Patch from Rafał Mużyło.
|
|
|
|
|
|
|
|
| |
When handling PANGO_ATTR_SCALE on a font description with an absolute
size, properly preserve the absolute flag when setting the scaled
size.
https://bugzilla.gnome.org/show_bug.cgi?id=708778
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=681423
|
|
|
|
|
|
|
| |
G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop
using it in Pango.
https://bugzilla.gnome.org/show_bug.cgi?id=652202
|
|
|
|
| |
pango_attr_list_filter
|
|
|
|
| |
pango_attr_list_filter
|
| |
|
| |
|
| |
|
|
|
|
| |
Bug #539622.
|