summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Fix link syntax in a few placesdoc-fixesMatthias Clasen2021-05-231-1/+1
|
* docs: Convert gtk-doc syntax leftoversdocs-cleanupMatthias Clasen2021-05-191-178/+240
| | | | | Remove leftovers like #Type, reduce indentations to avoid markdown block quotes, etc.
* introspection: Stop using allow-noneMatthias Clasen2021-05-191-4/+4
| | | | | The allow-none annotation has been deprecated for a long time already. Instead use optional and nullable everywhere.
* Fix various broken linksMatthias Clasen2021-03-111-2/+2
| | | | All these were pointed out by gi-docgen warnings.
* docs: Tweak attributes docsMatthias Clasen2021-03-111-20/+32
| | | | Give doc comments summaries, etc.
* docs: Port PangoAttribute to the new doc formatMatthias Clasen2021-03-111-400/+396
| | | | Replace gtk-doc'isms and use gi-docgen links instead.
* docs: Convert markup and attributes docs to pango_markup.mdMatthias Clasen2021-03-111-11/+0
|
* docs: Replace lots of vestigial xml markupMatthias Clasen2021-03-111-1/+1
| | | | | We want to use pure markdown, since docbook is going away as the intermediate format.
* Fix a corner-case of pango_attr_list_splicefix-attribute-splicingMatthias Clasen2021-02-171-2/+5
| | | | | | | | | | | | | | When the 'other' list contains attributes that are unlimited or exceed the range given to pango_attr_list_splice, those attributes were 'leaking' out of the range. The visible effect of this is that the underline of preedit text extends outside the preedit in some GTK entries. Fix this by clipping the inserted attributes to the range. The documentation is not very explicit about this, but I believe this is the expected behavior. Tests included.
* Avoid overflow when updating attr listsattr-list-overflowMatthias Clasen2021-01-231-1/+4
| | | | | | | | | | | 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
* Add some preconditionsMatthias Clasen2021-01-231-0/+4
| | | | | The arguments to pango_attr_list_update are ints, but negative numbers don't make sense here.
* Fix attr iterators with overlapping attributesfix-nested-attributesMatthias Clasen2020-09-171-11/+6
| | | | | | | | | | | | | 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.
* Adjust "Since" tags to refer to 1.46Rico Tzschichholz2020-08-061-2/+2
|
* pango-attributes.c: Fix on older compilersChun-wei Fan2020-06-241-2/+4
| | | | | Avoid declaring a variables in a for loop initialization, so that we won't accidentally break building on older compilers.
* Fix crashes with empty attribute listsMatthias Clasen2020-06-221-52/+54
| | | | | | | | There were a few cases left where empty attribute lists could lead to crashes. This was observed causing crashes in gnumeric. Testcases included.
* Fix another problem with pango_attr_list_changeMatthias Clasen2020-06-171-7/+11
| | | | | This was showing up as the colored Google link in the gtk4-demo links demo losing its colors.
* Fix a crash in pango_attr_list_equalMatthias Clasen2020-06-101-0/+3
| | | | | When allowing attributes to be NULL, we need to take that into account here too.
* Fix pango_attr_list_changeMatthias Clasen2020-06-101-3/+9
| | | | | | There were some breakage introduced in the porting to GPtrArray - we sometimes ran into assertions, and sometimes forgot to add the new attribute altogether.
* attrs: Save attribute list in a GPtrArrayTimm Bäder2020-06-101-301/+225
|
* attrlist: Remove attributes_tailTimm Bäder2020-06-101-24/+11
| | | | It's only very rarely used, and will become even less important later.
* attrs: Save iterator stack in a GPtrArrayTimm Bäder2020-06-101-58/+70
| | | | One less linked list.
* layout: Treat empty attr lists like NULL onesTimm Bäder2020-06-081-1/+1
|
* attributes: Add _pango_attr_list_has_attributesTimm Bäder2020-06-081-0/+6
| | | | A private function to find empty attribute lists
* Allocate internal PangoAttrLists on the stackTimm Bäder2020-06-081-23/+27
|
* Allocate internal PangoAttrListIterators on the stackTimm Bäder2020-06-081-17/+23
|
* Add API to compare PangoAttrListsJonas Dreßler2020-06-071-0/+76
| | | | | | | | | | | | | | 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 missing "transfer none" annotation to pango_attr_iterator_get()Rico Tzschichholz2019-11-211-1/+1
|
* Add an overline attributeMatthias Clasen2019-10-311-0/+54
| | | | | | | | | | 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 an insert-hyphens attributeMatthias Clasen2019-08-041-0/+27
| | | | | | | | | 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.
* Add a boxed type for PangoAttrIteratorEmmanuele Bassi2019-08-021-0/+5
| | | | | | | | 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.
* Ensure arguments name match the documentationEmmanuele Bassi2019-08-021-1/+1
| | | | Otherwise the introspection scanner will be majorly confused.
* Add an attribute for showing invisible charsMatthias Clasen2019-07-251-0/+25
| | | | | Allow to opt-in to showing spaces, line breaks, and default-ignorable chars, separately.
* doc cleanupsMatthias Clasen2019-07-231-2/+2
| | | | Clean up some headers, and shovel docs around.
* Merge branch 'better-hyphens' into 'master'Matthias Clasen2019-07-221-0/+27
|\ | | | | | | | | Better hyphens See merge request GNOME/pango!89
| * Add an allow-breaks attributeMatthias Clasen2019-07-201-0/+27
| | | | | | | | | | Add a new attribute type, and parse allow_breaks="false" in markup. This is useful to prevent hyphenation of words.
* | pango/pango-attributes.c: Trivial fix for pre-C99Chun-wei Fan2019-07-201-1/+1
| | | | | | | | Ensure that we declare variables at the top of the block.
* | Add a function to update attribute listsMatthias Clasen2019-07-191-0/+81
| | | | | | | | | | | | | | | | | | 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.
* | Add pango_attr_list_get_attributesMatthias Clasen2019-07-191-0/+21
|/ | | | | This was a gap in the attribute api - no way to get attributes back out of a list.
* Some more doc tweaksMatthias Clasen2019-07-141-1/+1
|
* Make PangoAttribute a boxed typeMatthias Clasen2019-07-111-0/+4
| | | | | | Based on a patch by Matijs van Zuijlen <matijs@matijs.net>. Closes https://gitlab.gnome.org/GNOME/pango/issues/259
* pango: Remove some unnecessary NULL checksPhilip Withnall2017-02-161-3/+0
| | | | | | | | | | | | | | | | 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 attribute types for fg and bg alphaMatthias Clasen2015-08-111-0/+48
| | | | Add attributes types for foreground and background alpha.
* Bug 738505 - Add fontfeatures support in PangoAttributes and markupBehdad Esfahbod2015-06-181-11/+40
| | | | | | | | | | | 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!
* Minor doc fixBehdad Esfahbod2015-05-051-1/+1
|
* Add many missing nullability annotations.Evan Nemerson2014-10-161-11/+11
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Revert "Fix leftover markup in docs"Matthias Clasen2014-08-301-1/+1
| | | | This reverts commit 19a252d9a3d63e7816f9a77bab65bd161675440a.
* Fix leftover markup in docsMatthias Clasen2014-08-301-1/+1
|
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-1/+12
| | | | Patch from Rafał Mużyło.
* pango_attr_iterator_get_font(): handle scaling absolute font sizesOwen W. Taylor2013-09-251-2/+6
| | | | | | | | 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
* Fix warningBehdad Esfahbod2012-08-291-1/+2
|