summaryrefslogtreecommitdiff
path: root/pango/break.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix is_char_break issue in pango_default_break functionPeng Wu2017-11-151-6/+4
| | | | | | For most cases, the is_char_break variable should be TRUE. https://bugzilla.gnome.org/show_bug.cgi?id=789625
* Update pango_default_break function for Line BreakPeng Wu2017-10-271-459/+421
| | | | | | Support Line Break of Unicode 9.0. https://bugzilla.gnome.org/show_bug.cgi?id=788115
* Fix pango_default_break function for sentence start/endPeng Wu2017-08-301-10/+29
| | | | | | Skip the space characters in sentence start/end. https://bugzilla.gnome.org/show_bug.cgi?id=785978
* Fix backspacing for more Emoji sequencesMatthias Clasen2017-08-171-1/+4
| | | | | | | Behdad pointed out that I didn't get it right for flags and for sequences ending in a skin tone modifier. Fix that.
* Fix backspace-deletes-character for EmojiMatthias Clasen2017-08-151-3/+11
| | | | | | | | We want to delete the entire cluster if it is an Emoji. To do so, look at prev_GB_type to find Emoji. This fixes backspacing for sequences like "man health worker" or "family: man, woman, boy, girl".
* break: Stop lumping ZWJ with ExtendMatthias Clasen2017-08-151-11/+26
| | | | | | | | | | ZWJ is treated as its own class in TR29, and us lumping them together and then manually checking wc == 0x200d in various places was causing us to inadvertedly inserting grapheme breaks in the middle of Emoji ZWJ sequences where they are not suppose to be. Add test cases to verify this.
* break.c: Fix indentation a bitMatthias Clasen2017-08-151-97/+96
| | | | | Messed up whitespace makes this unwieldy function even harder to read.
* Update pango_default_break function for Sentence BoundaryPeng Wu2017-07-311-443/+305
| | | | | | | Re-write the code for Sentence Boundary, and use the code style like Grapheme Boundary and Word Boundary. https://bugzilla.gnome.org/show_bug.cgi?id=782813
* Update pango_default_break function for Word BoundaryPeng Wu2017-07-311-16/+59
| | | | | | | Improve Word Boundary Rule for Hebrew_Letter, Single_Quote, Double_Quote and Regional Indicator. https://bugzilla.gnome.org/show_bug.cgi?id=782813
* Update pango_default_break function for Emoji ZWJ sequencePeng Wu2017-07-311-1/+116
| | | | | | Support Grapheme Boundaries Rule GB10, GB11, GB12 and GB13. https://bugzilla.gnome.org/show_bug.cgi?id=782813
* Avoid deprecation warningsMatthias Clasen2016-08-291-0/+2
| | | | | Now that we're using new-style deprecations, we have to fight a little harder to get rid of them inside pango.
* Avoid some overhead in pango_default_breakMatthias Clasen2015-09-131-4/+14
| | | | | We already have the Unicode type, so we can determine isspace without doing the full type determination again.
* Use g_unichar_get_script directlyMatthias Clasen2015-09-121-1/+1
| | | | Instead of going through a wrapper.
* Revert "Use UTF-8 pragma for MSVC"Behdad Esfahbod2015-04-141-4/+0
| | | | | | | This reverts commit c8b1d5bea67155ae51cb9a145d43df79a52faeb4. See discussion: https://bugzilla.gnome.org/show_bug.cgi?id=747772
* Use UTF-8 pragma for MSVCBehdad Esfahbod2015-04-131-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=747772
* MinorBehdad Esfahbod2015-04-061-1/+1
|
* Fix regression after 137832fa931e875b900dedd1c8909b46d1f7e8adBehdad Esfahbod2015-04-061-2/+2
|
* Fix tailoring of run boundary break propertiesBehdad Esfahbod2015-04-061-6/+7
| | | | I have no idea how this was never caught before.
* [modules] Move language modules in source tree and remove modules/Behdad Esfahbod2015-04-041-12/+74
| | | | | | | This should complete the kill-modules effort. What is left is leftover removal and unbreaking stuff. Bug 733882 - Kill Pango modules, engines, and config files
* [break] Call language engine on each script changeBehdad Esfahbod2015-04-041-27/+4
| | | | In preparation for merging all language engines into one.
* Avoid uninitialized memoryMatthias Clasen2015-02-101-0/+1
| | | | | | | | pango_default_break() was not clearing the is_char_break field, causing unwanted breaks in the middle of clusters, occasionally. Patch by Gene Hightower, https://bugzilla.gnome.org/show_bug.cgi?id=744118
* Add many missing nullability annotations.Evan Nemerson2014-10-161-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Bug 700577 - Support invalid UTF-8 chars in pango_find_paragraph_boundary()Behdad Esfahbod2013-05-271-1/+1
|
* don't break words between a letter adjacent to a numberJosé Aliste2013-05-021-17/+2
| | | | | | | Newer Unicode specs (6.2 for instance) say that one should not break between letter or numbers that are adjacent. This also makes us to match word selection with many text capable apps.
* Fix grapheme boundaries of surrogates and unassigned default ignorablesBehdad Esfahbod2012-12-021-0/+10
|
* Fix line break of surrogate charactersBehdad Esfahbod2012-12-021-2/+4
|
* Fix grapheme properties of U+FFxx rangeBehdad Esfahbod2012-12-021-1/+1
| | | | Oops!
* Fix grapheme properties of joiner / nonjoinerBehdad Esfahbod2012-12-021-1/+1
| | | | Oops!
* Remove Thai/Lao Prepend/Extend propertiesTheppitak Karoonboonyanan2012-12-021-9/+0
| | | | | | | | In UAX#29 revision 19 (reissued for Unicode 6.1.0), Prepend and Extend GCB properties have been dropped for Thai/Lao. So, drop the hard coding accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=576156
* Bug 682952 - remove old glib checkBehdad Esfahbod2012-08-291-4/+0
|
* More churnBehdad Esfahbod2012-08-281-6/+5
|
* introspection: assorted fixes to avoid regressions in Vala bindingsEvan Nemerson2012-08-121-4/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=681423
* break.c: Fix compilation against newer GLib versionsChun-wei Fan2011-09-171-4/+8
| | | | | | | | G_UNICODE_COMBINING_MARK was renamed as G_UNICODE_SPACING_MARK soon after the GLib 2.29.14 release, so fix that in break.c and pango-ot-info.c. To support GLib on and before 2.29.14, a convenience definition for G_UNICODE_SPACING_MARK is defined.
* Handle NUL in text in places that g_utf8_strlen () was usedBehdad Esfahbod2009-07-151-1/+2
| | | | | | | | | | 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
* Use g_debug() instead of g_message()Behdad Esfahbod2009-04-061-1/+1
|
* [pango] Allocate PangoScriptIter on stack.Chris Wilson2009-03-201-6/+7
| | | | | | | Move the PangoScriptIter structure definition to a private header file, so that we can embed the iterator within other structures or allocate a local iterator on the stack. This eliminates the frequent short-lived allocations associated with the iterator.
* Fix warnings.Behdad Esfahbod2008-12-261-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-12-25 Behdad Esfahbod <behdad@gnome.org> * pango/break.c (pango_default_break): * pango/fonts.c (find_field_any), (pango_font_class_init), (pango_font_init), (pango_font_metrics_ref), (pango_font_metrics_unref), (pango_font_family_class_init), (pango_font_family_init), (pango_font_face_class_init), (pango_font_face_init): * pango/pango-attributes.c (pango_attr_list_ref), (pango_attr_list_unref), (pango_attr_iterator_get_font): * pango/pango-layout.c (pango_layout_set_height), (extents_free), (no_shape_filter_func), (pango_layout_line_ref), (pango_layout_line_unref), (pango_layout_get_item_properties): * pango/pango-markup.c (end_element_handler), (text_handler), (b_parse_func), (big_parse_func), (span_parse_func), (i_parse_func), (markup_parse_func), (s_parse_func), (sub_parse_func), (sup_parse_func), (small_parse_func), (tt_parse_func), (u_parse_func): * pango/pango-ot-info.c (get_glyph_class): * pango/pango-renderer.c (get_item_properties), (pango_renderer_default_prepare_run): * pango/pango-utils.c (_pango_shape_shape): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_get_font_type), (pango_cairo_fc_font_map_context_substitute), (pango_cairo_fc_font_map_context_key_get), (pango_cairo_fc_font_map_context_key_copy), (pango_cairo_fc_font_map_context_key_free), (pango_cairo_fc_font_map_context_key_hash), (pango_cairo_fc_font_map_context_key_equal): * pango/pangocairo-fontmap.c (pango_cairo_font_map_new_for_font_type), (pango_cairo_font_map_set_default): * pango/pangocairo-render.c (pango_cairo_renderer_init): * pango/pangox-fontcache.c (free_cache_entry): * pango/pangox-fontmap.c (close_display_cb), (list_families_foreach), (pango_x_font_map_load_font), (ignore_error): * pango/pangox.c (average_width_foreach), (subfonts_foreach), (pango_x_font_find_shaper), (pango_x_get_unknown_glyph), (pango_x_get_item_properties), (pango_x_apply_ligatures), (pango_x_font_get_unknown_glyph): * pango/pangoxft-fontmap.c (pango_xft_font_map_init), (close_display_cb): * pango/querymodules.c (show_version): Fix warnings. svn path=/trunk/; revision=2765
* 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
* Part of Bug 97545 – Make pango_default_break follow Unicode TR #29Behdad Esfahbod2008-04-251-23/+219
| | | | | | | | | | | | | | | | 2008-04-24 Behdad Esfahbod <behdad@gnome.org> Part of Bug 97545 – Make pango_default_break follow Unicode TR #29 * docs/tmpl/main.sgml: * pango/break.c (pango_default_break): * pango/pango-break.h: * tests/testboundaries_ucd.c (main): Add new PangoLogAttr member is_word_boundary, that implements UAX#29's Word Boundaries semantics. Test fully passes for it. svn path=/trunk/; revision=2618
* Minor optimization.Behdad Esfahbod2008-04-241-8/+12
| | | | svn path=/trunk/; revision=2616
* Part of Bug 97545 – Make pango_default_break follow Unicode TR #29Behdad Esfahbod2008-04-241-123/+87
| | | | | | | | | | | | 2008-04-24 Behdad Esfahbod <behdad@gnome.org> Part of Bug 97545 – Make pango_default_break follow Unicode TR #29 * pango/break.c (pango_default_break): Make Grapheme Boundary code exactly follow UAX#29 of Unicode 5.1.0 svn path=/trunk/; revision=2615
* Update GraphemeBoundary to Unicode 5.1.0. Pretty close now. Passes theBehdad Esfahbod2008-04-241-36/+54
| | | | | | | | | | 2008-04-24 Behdad Esfahbod <behdad@gnome.org> * pango/break.c (pango_default_break): Update GraphemeBoundary to Unicode 5.1.0. Pretty close now. Passes the TR14 test. svn path=/trunk/; revision=2614
* Allow line break at the end of string. UAX#14 rule LB3 says "Always breakBehdad Esfahbod2008-04-241-1/+1
| | | | | | | | | | | | 2008-04-24 Behdad Esfahbod <behdad@gnome.org> * pango/break.c (pango_default_break): Allow line break at the end of string. UAX#14 rule LB3 says "Always break at the end of text." With this test, Pango passes the LineBreakTest.txt, sans the bug in the test file that I've already reported to unicoRe. svn path=/trunk/; revision=2613
* Minor.Behdad Esfahbod2008-04-241-2/+2
| | | | svn path=/trunk/; revision=2612
* Bug 518084 – Thai is not Virama language Patch from TheppitakBehdad Esfahbod2008-02-281-1/+0
| | | | | | | | | | | | 2008-02-28 Behdad Esfahbod <behdad@gnome.org> Bug 518084 – Thai is not Virama language Patch from Theppitak Karoonboonyanan * pango/break.c: Remove Thai Phinthu from VIRAMA() svn path=/trunk/; revision=2580
* Bug 481537 – compiler warning fixes Patch from Kjartan MaraasBehdad Esfahbod2007-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2007-10-15 Behdad Esfahbod <behdad@gnome.org> Bug 481537 – compiler warning fixes Patch from Kjartan Maraas * pango/break.c (pango_get_log_attrs): * pango/pango-attributes.c (pango_attr_list_insert_internal): * pango/pango-layout.c (process_item), (justify_clusters): * pango/pango-markup.c (span_parse_boolean): * pango/pango-ot-ruleset.c (pango_ot_ruleset_finalize), (pango_ot_ruleset_new): * pango/pango-utils.c (pango_scan_int): * pango/pangocairo-font.c (_pango_cairo_font_install): * pango/pangofc-font.c (pango_fc_font_create_metrics_for_context): * pango/pangoft2.c (load_fallback_face): * pango/pangox-fontmap.c (pango_x_get_coverage_win): * pango/pangox.c (itemize_string_foreach): Fix warnings. svn path=/trunk/; revision=2444
* Bug 472891 – Bad consistency check in pango_get_log_attrsMathias Hasselmann2007-09-021-1/+1
| | | | | | | | | | | 2007-09-02 Mathias Hasselmann <mathias.hasselmann@gmx.de> Bug 472891 – Bad consistency check in pango_get_log_attrs * pango/break.c: Invert the consistency check. svn path=/trunk/; revision=2420
* Bug 462137 – memory corruption in pango_default_breakBehdad Esfahbod2007-07-311-1/+4
| | | | | | | | | | | | 2007-07-31 Behdad Esfahbod <behdad@gnome.org> Bug 462137 – memory corruption in pango_default_break * pango/break.c (pango_default_break): Handle the case of an empty string correctly. svn path=/trunk/; revision=2385
* Add is_expandable_space to PangoLogAttr.Behdad Esfahbod2007-05-021-0/+3
| | | | | | | | | | | | 2007-05-02 Behdad Esfahbod <behdad@gnome.org> * docs/tmpl/main.sgml: * pango/break.c (pango_default_break): * pango/pango-break.h: Add is_expandable_space to PangoLogAttr. svn path=/trunk/; revision=2250
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-753/+753
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Replace preceding sequences of 8 spaces with tabs. svn path=/trunk/; revision=2165