summaryrefslogtreecommitdiff
path: root/pango/ellipsize.c
Commit message (Collapse)AuthorAgeFilesLines
* Allocate internal PangoAttrLists on the stackTimm Bäder2020-06-081-6/+9
|
* Fix a doc commentMatthias Clasen2019-11-041-1/+1
|
* Remove debug spewMatthias Clasen2019-11-041-2/+0
|
* Use shape flags for ellipsisMatthias Clasen2019-11-031-5/+18
| | | | | | | 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 …
* Prevent a crash in ellipsizationMatthias Clasen2019-08-081-1/+5
| | | | | | | We were crashing when ellipsizing text without any attributes. Test included.
* Rename pango_font_coversMatthias Clasen2019-07-121-2/+2
| | | | | We already had a has_char api in pangofc, so use that name.
* Use pango_font_coversMatthias Clasen2019-07-111-3/+3
| | | | This replaces all uses of _pango_engine_shape_covers.
* Add an analysis flag to mark the ellipsis runMatthias Clasen2014-09-021-0/+2
| | | | | | | | | | | Without this, it is hard to determine if you are 'inside the ellipsis'. We need to know this in GTK+, e.g. to skip link processing. I decided not to turn the flags into an enum at the time to avoid possible language binding problems. https://bugzilla.gnome.org/show_bug.cgi?id=735719
* Handle NUL in text in places that g_utf8_strlen () was usedBehdad Esfahbod2009-07-151-2/+3
| | | | | | | | | | While pango-layout doesn't allow NUL in text, the lower level API should handle it correctly. We were using g_utf8_strlen() in a number of places. This is problematic since that function stops processing at NUL even if length>1. We now use an internal pango_utf8_strlen() instead. Inspired by: Bug 588678 – pango crash: install a new theme from gnome-appearance-properties
* Bug 377948 – Make pango_glyph_item_iter publicBehdad Esfahbod2008-08-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-06 Behdad Esfahbod <behdad@gnome.org> Bug 377948 – Make pango_glyph_item_iter public * pango/pango-glyph-item.c (pango_glyph_item_iter_copy), (pango_glyph_item_iter_free), (pango_glyph_item_iter_get_type), (pango_glyph_item_iter_next_cluster), (pango_glyph_item_iter_prev_cluster), (pango_glyph_item_iter_init_start), (pango_glyph_item_iter_init_end), (pango_glyph_item_apply_attrs), (pango_glyph_item_letter_space): * pango/pango-glyph-item.h: New public API, for iterating a PangoGlyphItem: PangoGlyphItemIter PANGO_TYPE_GLYPH_ITEM_ITER pango_glyph_item_iter_copy() pango_glyph_item_iter_free() pango_glyph_item_iter_init_start() pango_glyph_item_iter_init_end() pango_glyph_item_iter_next_cluster() pango_glyph_item_iter_prev_cluster() * pango/pango.def: * docs/tmpl/glyphs.sgml: * docs/pango-sections.txt: * pango/Makefile.am: * pango/ellipsize.c (line_iter_next_cluster), (line_iter_prev_cluster), (find_initial_span): * pango/pango-layout.c (justify_words): Update. * pango/pango-glyph-item-private.h: Remove. svn path=/trunk/; revision=2679
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Behdad svn path=/trunk/; revision=2657
* Bug 469313 – Add pango_layout_set_height() Bug 508179 – PangoGlyphUnitBehdad Esfahbod2008-01-151-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-14 Behdad Esfahbod <behdad@gnome.org> Bug 469313 – Add pango_layout_set_height() Bug 508179 – PangoGlyphUnit confusion * pango/pango-layout.h: * pango/pango-layout-private.h: * pango/pango-layout.c: * pango/ellipsize.c (_pango_layout_line_ellipsize): New public API: pango_layout_set_height() See docs for semantics. Currently only negative height values (number of lines) is implemented. * pango-view/viewer-render.c (make_layout), (output_body), (parse_options): Implement --height. * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/layout.sgml: Update. 2008-01-14 Behdad Esfahbod <behdad@gnome.org> Bug 508179 – PangoGlyphUnit confusion * pango/pangowin32.c: * pango/glyphstring.c: * pango/pango-layout.c (process_item): Remove all traces of #PangoGlyphUnit svn path=/trunk/; revision=2542
* Bug 464270 – ellipsize doesn't work consistentBehdad Esfahbod2007-08-081-6/+2
| | | | | | | | | | | | | | 2007-08-07 Behdad Esfahbod <behdad@gnome.org> Bug 464270 – ellipsize doesn't work consistent * pango/pango-glyph-item.c (_pango_glyph_item_iter_prev_cluster): Fix. Was jumping two clusters at a time. Oops! * pango/ellipsize.c (init_state): Minor cleanup. svn path=/trunk/; revision=2392
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-161-24/+24
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Fix width calculation. Was causing ellipsization to stop at a zero-widthBehdad Esfahbod2007-01-161-6/+11
| | | | | | | | | | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * pango/ellipsize.c (get_cluster_width): Fix width calculation. Was causing ellipsization to stop at a zero-width glyph that was part of a bigger cluster. * pango/ellipsize.c (remove_one_span): Skip over zero-width clusters, otherwise ellipsization will stop at a zero-width cluster. * pango/pango-glyph-item.c (_pango_glyph_item_iter_next_cluster), (_pango_glyph_item_iter_prev_cluster): Fix yet another bug with in prev_cluster that was making it not work for any interesting cluster. svn path=/trunk/; revision=2158
* Bug 363510 – Ability to query whether a PangoLayout is effectivelyBehdad Esfahbod2007-01-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> Bug 363510 – Ability to query whether a PangoLayout is effectively ellipsized (as opposed to the set_ellpisize()/get_ellipsize() methods which only set a request, or return the set request respectively) Patch from Milosz Derezynski * pango/pango-layout.h: * pango/ellipsize.c (_pango_layout_line_ellipsize): * pango/pango-layout-private.h: * pango/pango-layout.c (pango_layout_init), (pango_layout_copy), (pango_layout_is_ellipsized), (pango_layout_clear_lines), (pango_layout_line_postprocess): New public function: pango_layout_is_ellipsized() * pango/pango.def: * docs/tmpl/layout.sgml: * docs/pango-sections.txt: Update. svn path=/trunk/; revision=2150
* Spell-check the docs.Behdad Esfahbod2007-01-071-3/+3
| | | | svn path=/trunk/; revision=2130
* Bug 326099 – Setting width, indentation and ellipsizing doesn't work asBehdad Esfahbod2006-12-191-2/+7
| | | | | | | | | | | | | 2006-12-19 Behdad Esfahbod <behdad@gnome.org> Bug 326099 – Setting width, indentation and ellipsizing doesn't work as I would expect * pango/ellipsize.c (_pango_layout_line_ellipsize): Account for indentation when deciding what width to ellipsize for. * pango/pango-layout.c (get_alignment): Don't bother about conditioning on the line direction for center alignment.
* Bug 329148 – pango_glyph_item_split: assertion `split_index > 0' failedBehdad Esfahbod2006-02-171-1/+0
| | | | | | | | 2006-02-17 Behdad Esfahbod <behdad@gnome.org> Bug 329148 – pango_glyph_item_split: assertion `split_index > 0' failed * pango/ellipsize.c (init_state): Do not mistakenly set start_offset = 0.
* If locking font face failed, do not assert, just return zero glyphs withBehdad Esfahbod2006-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-01-29 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c, modules/basic/basic-fc.c modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c modules/thai/thai-ot.c, modules/thai/thai-shaper.c modules/tibetan/tibetan-fc.c: If locking font face failed, do not assert, just return zero glyphs with an implicit warning. * pango/fonts.c, pango/glyphstring.c pango/modules.c pango/pango-color.c, pango/pango-context.c pango/pango-coverage.c, pango/pango-fontmap.c pango/pango-glyph-item.c, pango/pango-item.c pango/pango-layout.c, pango/pango-markup.c pango/pango-ot-buffer.c, pango/pango-script.c pango/pango-tabs.c, pango/pango-utils.c pango/pangoatsui-fontmap.c, pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c, pango/pangocairo-fontmap.c pango/pangocairo-win32font.c, pango/pangofc-font.c pango/pangofc-fontmap.c, pango/pangoft2-fontmap.c pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32-fontcache.c, pango/pangoxft-font.c pango/pangoxft-render.c, pango/break.c pango/ellipsize.c: Use g_slice for allocating all types. Also, change some g_error's to g_critical's...
* Make sure #include <config.h> is the first include in the file. (bugBehdad Esfahbod2006-01-141-0/+1
| | | | | | | 2006-01-14 Behdad Esfahbod <behdad@gnome.org> * */*.c, */*/*.c: Make sure #include <config.h> is the first include in the file. (bug #158870, based on patch by Luis Menina)
* Various documentation improvements.Behdad Esfahbod2005-11-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-16 Behdad Esfahbod <behdad@gnome.org> * docs/pango_markup.sgml docs/tmpl/coverage-maps.sgml docs/tmpl/engines.sgml docs/tmpl/fonts.sgml docs/tmpl/freetype-fonts.sgml docs/tmpl/glyphs.sgml docs/tmpl/layout.sgml docs/tmpl/main.sgml docs/tmpl/modules.sgml docs/tmpl/opentype.sgml docs/tmpl/pango-engine-lang.sgml docs/tmpl/pango-engine-shape.sgml docs/tmpl/pango-renderer.sgml docs/tmpl/pangocairo.sgml docs/tmpl/pangofc-decoder.sgml docs/tmpl/pangofc-font.sgml docs/tmpl/pangofc-fontmap.sgml docs/tmpl/scripts.sgml docs/tmpl/tab-stops.sgml docs/tmpl/text-attributes.sgml docs/tmpl/win32-fonts.sgml docs/tmpl/x-fonts.sgml docs/tmpl/xft-fonts.sgml pango/break.c pango/ellipsize.c pango/fonts.c pango/pango-attributes.c pango/pango-color.c pango/pango-context.c pango/pango-coverage.c pango/pango-fontmap.c pango/pango-glyph-item.c pango/pango-layout.c pango/pango-markup.c pango/pango-tabs.c pango/pango-types.h pango/pango-utils.c pango/pangoft2-render.c pango/pangox.c pango/pangoxft-render.c: Various documentation improvements.
* Fixes for signed/unsigned in PangoAttrIterator ((#166700, Morten Welinder)Owen Taylor2005-07-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-07-26 Owen Taylor <otaylor@redhat.com> Fixes for signed/unsigned in PangoAttrIterator ((#166700, Morten Welinder) * pango/pango-attributes.c (pango_attr_iterator_range): Clamp results to G_MAXINT to avoid negative numbers from signed/unsigned conversions. * pango/pango-attributes.c: Make PangoAttrIterator start_index/end_index unsigned to match PangoAttribute. Change various local variables to match. * pango/ellipsize.c (advance_iterator_to) pango/pango-attributes.c (pango_attr_iterator_range) pango/pango-glyph-item.c (pango_glyph_item_apply_attrs) pango/pango-layout.c (pango_layout_line_get_empty_extents): Always check the return value from pango_attr_iterator() to deal with potential infinite loops when trying to advance to position G_MAXINT. * pango/pango-layout.c (pango_layout_set_text): Handle the case where the text passed in is longer than than G_MAXINT and length < 0. * pango/pango-attributes.c (pango_attr_list_splice): Be careful about integer overflow - clamp addition. (#163246, Morten Welinder)
* Chain up from finalize. (#307547, Paolo Borelli)Owen Taylor2005-06-141-2/+3
| | | | | | | | | | | 2005-06-14 Owen Taylor <otaylor@redhat.com> * pango/opentype/pango-ot-info.c (pango_ot_info_finalize) pango/opentype/pango-ot-ruleset.c (pango_ot_ruleset_finalize): Chain up from finalize. (#307547, Paolo Borelli) * pango/opentype/pango-ot-info.c (pango_ot_info_finalizer): make accidentally public function static.
* Initialize ellipsis_is_cjk (#151901, Christian Persch)Owen Taylor2004-09-201-0/+1
| | | | | | | Mon Sep 13 11:06:47 2004 Owen Taylor <otaylor@redhat.com> * pango/ellipsize.c (init_state): Initialize ellipsis_is_cjk (#151901, Christian Persch)
* Add PangoEllipsizeMode, pango_layout_set_ellipsize(), implement. (#59071)Owen Taylor2004-07-141-0/+750
Wed Jul 14 17:47:38 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/ellipsize.c pango/Makefile.am: Add PangoEllipsizeMode, pango_layout_set_ellipsize(), implement. (#59071) * pango/pango-layout-private.h pango/pango-layout.c: Move PangoLayout structure into a separate header file. * pango/pango-glyph-item.[ch]: Add pango_glyph_item_free(). * pango/pango-glyph-item-private.h pango/pango-glyph-item.c: Internally export the PangoGlyphItemIter functionality. * examples/renderdemo.[ch]: Add --ellipsize option.