summaryrefslogtreecommitdiff
path: root/pango/break.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Cosmeticsmisc-doc-fixupsMatthias Clasen2021-12-101-12/+9
| | | | | Add more links to GLib apis and to various Unicode specs.
* break: Fix hyphen conditionMatthias Clasen2021-11-221-2/+7
| | | | | | | When looking at scripts, we want to look at the script of the *previous* character. And then we need to exclude SHY from the common script.
* Don't replace | with hyphensMatthias Clasen2021-11-191-2/+1
| | | | | | | | | | | I went a bit overboard in #603. The vertical bar is too common, and this usage to specialized to do it by default. To enable this, we should rather make log attrs tweakable. We still replace hyphenation points with hyphens. Fixes: #630
* Support for Catalan middle dot in word start and endJordi Mas2021-10-271-0/+6
|
* Update Line Break to Unicode 14Peng Wu2021-10-121-2/+6
|
* break: Fix up word fixupsMatthias Clasen2021-08-261-7/+14
| | | | | | | We were not correctly handling overlapping segments in all cases, with <span segment='word'>. Improve this. Update affected tests.
* break: Fix sentence boundary corner casesMatthias Clasen2021-08-261-2/+2
| | | | | | We were not correctly handling the case where wipe out a sentence boundary after the fact, and were leaving behind a stray sentence end.
* break: Follow mandatory rules more strictlyMatthias Clasen2021-08-261-4/+25
| | | | | | | | We were not putting a line break at the end of the text, in cases where a paragraph ends with a newline. Enforce this in all break apis. Update affected tests.
* Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-251-47/+363
| | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* test-break: Print out hyphensMatthias Clasen2021-08-251-7/+3
| | | | | | Print out all the log attrs we have. Update expected test outputs.
* Refine hyphenationMatthias Clasen2021-08-251-2/+13
| | | | | | | | Replace ‧ and | with a - when we break there. Update affected test output. Fixes: #603
* Add hyphens to log attrsMatthias Clasen2021-08-241-3/+102
| | | | | | The code computing this is much better off in break.c, so move it there, and keep the information in the log attr array.
* break: Add pango_attr_break apiMatthias Clasen2021-08-231-2/+40
| | | | | | | | | | | | So far, we've been applying attribute-based customization while doing per-item tailoring. But this is suboptimal, since it means we don't have a full view of the log attrs, and can't do invariant fixes that cross item boundaries. Therefore, add a separate pango_attr_break api that applies attributes to to the whole paragraph, and make PangoLayout use it.
* break: Some code reorganizationMatthias Clasen2021-08-231-46/+56
| | | | Shuffle break.c around a bit.
* break: Silence compiler warningsMatthias Clasen2021-08-221-8/+16
|
* break: Some code reorgMatthias Clasen2021-08-221-141/+130
| | | | Reshuffle things to make room for validation.
* Cosmetics: Move a function aroundMatthias Clasen2021-08-201-105/+0
| | | | | pango_find_paragraph_boundary has nothing to do with breaks, so move it to pango-utils.h
* Use the language we are givenlog-attr-languageMatthias Clasen2021-08-191-0/+1
| | | | | | pango_get_log_attrs was not using its language argument at all. Pass it into pango_default_break as part of the PangoAnalysis struct.
* break: Fix handling of tag sequencestests-and-fixesMatthias Clasen2021-07-071-0/+7
| | | | | | | | Correctly classify tag characters as Grapheme_Extend, so that we don't end up putting grapheme boundaries in the middle of tag sequences. Includes a test.
* docs: Convert gtk-doc syntax leftoversdocs-cleanupMatthias Clasen2021-05-191-30/+39
| | | | | Remove leftovers like #Type, reduce indentations to avoid markdown block quotes, etc.
* break: Fix an inconsistency with sentence breaksfix-sentence-breaksMatthias Clasen2021-05-091-3/+16
| | | | | | | | | | | When we retroactively remove a sentence boundary because of rule SB8, we were not cleaning up the sencence_start/end markers that have already been derived from it. This can be seen in urls like http://www.unicode.org/reports/tr29, where we don't have any sentence boundaries, but we leave a stray sentence_start/end at the first / after ".org".
* Slightly speed up line breakingMatthias Clasen2021-03-291-1/+4
| | | | Make a bit more use of our types.
* CosmeticsMatthias Clasen2021-03-291-11/+6
| | | | Some formatting fixes for default_break.
* docs: Tweak line breaking docsMatthias Clasen2021-03-111-24/+27
| | | | Give doc comments summaries, etc.
* break: Only call break_attrs if we really have attributesTimm Bäder2020-06-081-1/+1
|
* break: Make a local constTimm Bäder2020-06-081-2/+1
| | | | Make it clearer that we're not going to modify the attribute
* break_attrs: Bail out if we have no ALLOW_BREAKS attributesTimm Bäder2020-06-081-0/+6
|
* Allocate internal PangoAttrLists on the stackTimm Bäder2020-06-081-10/+11
|
* Merge branch 'master' into 'master'Matthias Clasen2020-06-081-3/+3
|\ | | | | | | | | Replace fallthrough comments with G_GNUC_FALLTHROUGH See merge request GNOME/pango!177
| * Replace fallthrough comments with G_GNUC_FALLTHROUGHTimm Bäder2020-04-141-3/+3
| |
* | Update Line Breaking to Unicode 13Peng Wu2020-03-101-20/+4
| |
* | Update Grapheme and Word Boundary to Unicode 13Peng Wu2020-02-271-6/+13
|/
* break: Don't determine types more than onceMatthias Clasen2019-10-121-3/+5
| | | | | | We determined the category early on, don't do the same work again later by calling isdigit or isletter wrappers.
* Ensure arguments name match the documentationEmmanuele Bassi2019-08-021-2/+2
| | | | Otherwise the introspection scanner will be majorly confused.
* Annotate implicit fallthroughMatthias Clasen2019-08-011-0/+1
| | | | This triggers compiler warnings.
* Fix a crash with line break controlMatthias Clasen2019-07-271-1/+1
| | | | | We were forgetting to copy allow-break attributes, causing them to be prematurely freed. Oops.
* Add a missing Since tagMatthias Clasen2019-07-201-0/+2
|
* break: Implement allow-breaksMatthias Clasen2019-07-201-9/+87
| | | | | | | | | We implement this in pango_tailor_break(), after the script-specific breaking. When line breaks are forbidden in a range, we remove line and char break opportunities inside the range.
* Add an offset argument to pango_tailor_breakMatthias Clasen2019-07-201-0/+2
| | | | | | Without this, it is not possible to interpret attributes, whose offsets are relative to the beginning of the paragraph.
* Fix compiler warningsMatthias Clasen2019-07-181-1/+1
|
* Fix a compiler warningMatthias Clasen2019-07-171-1/+0
|
* Deprecate pango_breakMatthias Clasen2019-07-161-9/+9
| | | | | To break correctly, use pango_default_break and pango_tailor_break.
* Add pango_tailor_breakMatthias Clasen2019-07-161-16/+42
| | | | | | This function lets you apply language-specific tailoring on top of breaks produced by pango_default_break.
* Merge branch 'kill-lang-engine' into 'master'Matthias Clasen2019-07-091-50/+16
|\ | | | | | | | | Remove lang engine use See merge request GNOME/pango!73
| * Remove language engine remnantsMatthias Clasen2019-07-091-40/+0
| | | | | | | | | | Drop all internal use of language engines. The lang_engine field in PangoAnalysis is now unused.
| * break: Call break_script directlyMatthias Clasen2019-07-091-11/+17
| | | | | | | | No need to go through the engine api anymore.
* | Revert "break: Mark breaks induced by soft hyphens"Matthias Clasen2019-07-091-8/+1
|/ | | | This reverts commit 50b1e8532c5211cebd3cea935f9ac91a087d5c35.
* break: Mark breaks induced by soft hyphensMatthias Clasen2019-07-071-1/+8
| | | | | | Use a bit in PangoLogAttr to mark line breaks that are due to soft hyphens; we want to insert hyphens here later, if the break is taken.
* Respect Dependent Vowels for Indic languagePeng Wu2019-04-091-63/+7
| | | | For Dependent Vowels, the grapheme needs to be deleted by character.
* Fixes emoji backspace deletion behaviorPeng Wu2019-04-021-1/+2
|