summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* layout: Use char_offset in a few placesitem-offsetMatthias Clasen2021-08-281-23/+9
| | | | There is more we can do here, but this is a start.
* test-itemize: Print more informationMatthias Clasen2021-08-283-1/+19
| | | | | | | Print out the items num_chars and char_offset, so we can check that the char_offset implementation works. Update affected test outputs.
* test-itemize: Improve generationMatthias Clasen2021-08-281-3/+3
| | | | | | | | | It is very annoying that gtest will dump its random seed into the output as soon as one calls g_test_init(). This pollutes our generated output. Work around that by deferring the g_test_init() call until after we've dealt with generating output.
* item: Add a char offsetMatthias Clasen2021-08-284-9/+106
| | | | | | | | | | | | | Add a char_offset field to PangoItem, compute it as part of itemization and update it when splitting items. Keeping this number around cuts down on the amount of list and utf8 walking we need to do later. We have to do some extra shenanigans to preserve abi in the face of pango's open-coded structs, so we introduce a PangoItemPrivate type that is used internally. On 64bit, PangoItem has a 4 byte whole, so we can keep the size of PangoItemPrivate the same. No such luck on 32bit.
* CosmeticMatthias Clasen2021-08-283-23/+23
| | | | | | Improve the itemization code to have all variants take the same code paths, so we can do fixups in one place.
* tests: Only print known analysis flagsMatthias Clasen2021-08-281-1/+5
| | | | We're going to steal one bit for private purposes.
* pango-view: Show caret slopes as wellMatthias Clasen2021-08-271-0/+19
| | | | | When annotating caret positions, render the diagonal of the caret position rectangle as well.
* carets: Fix rect for negative slopesMatthias Clasen2021-08-271-0/+4
| | | | | | The intention was to flip the rectangle horizontally. We do return a negative width, but we forgot to flip the origin.
* Merge branch 'ligature-caret-rtl-fixes' into 'main'Matthias Clasen2021-08-271-11/+69
|\ | | | | | | | | Fixes for using ligature carets in rtl See merge request GNOME/pango!446
| * pango-view: Allow showing glyph ink rectsligature-caret-rtl-fixesMatthias Clasen2021-08-271-11/+69
| |
* | Merge branch 'ligature-caret-rtl-fixes' into 'main'Matthias Clasen2021-08-274-28/+114
|\ \ | |/ | | | | | | Some fixes for ligature caret positioning in rtl See merge request GNOME/pango!445
| * docs: Some detail for PangoGlyphGeometryMatthias Clasen2021-08-271-0/+13
| |
| * Try harder to find positions in clustersMatthias Clasen2021-08-271-3/+32
| | | | | | | | | | | | | | Try to find a single non-mark glyph in a multi-glyph cluster to use its ligature caret information. This fixes situations in Arabic where you can have marks on top of ligatures, e.g. ﻉﻭ.
| * Take kerning into account for ligature caretsMatthias Clasen2021-08-271-0/+3
| | | | | | | | | | | | | | The ligature caret positions returned by hb_ot_layout_get_ligature_carets are 'unshaped' metrics. We need to take the kerning into account that is applied during shaping, and shows up in the glyphstring as x_offset.
| * Fixes for rtl cursor positionsMatthias Clasen2021-08-271-1/+4
| | | | | | | | Still not working quite right, but getting closer.
| * test-shape: Show cluster boundaries correctlyMatthias Clasen2021-08-271-11/+12
| | | | | | | | | | | | Cluster boundaries were cutting off the first character of a new cluster. Not great if the tools print out misleading information.
| * test-shape: Add an option for hex charsMatthias Clasen2021-08-271-1/+20
| | | | | | | | | | This is useful when trying to understand the output for scripts I don't read.
| * pango-viewer: Number caretsMatthias Clasen2021-08-271-0/+7
| | | | | | | | | | When showing caret positions, put a little number next to them to indicate the order.
| * pango-view: Be more careful about caret positionsMatthias Clasen2021-08-271-12/+23
|/ | | | | Don't show carets where they don't belong. Skip non-cursor positions.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-269-61/+184
|\ | | | | | | | | Tweak the drawing See merge request GNOME/pango!444
| * doc: Update pango_glyph_string_index_to_xMatthias Clasen2021-08-266-2/+131
| | | | | | | | | | | | What the docs were saying is no longer strictly true, now that we are using font metrics. Update them, and add an illustration.
| * Tweak the drawingMatthias Clasen2021-08-263-59/+53
| | | | | | | | | | Since the text is talking about zero-width rectangles, show one of those, instead of a sloped caret.
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-267-3/+141
|\ \ | |/ | | | | | | docs: Add another illustration See merge request GNOME/pango!443
| * docs: Add another illustrationMatthias Clasen2021-08-266-1/+138
| | | | | | | | Show cursor positions.
| * NEWS: UpdatesMatthias Clasen2021-08-261-2/+3
|/
* Merge branch 'more-log-attr-things' into 'main'Matthias Clasen2021-08-2625-109/+751
|\ | | | | | | | | Fixes and validation for log attrs See merge request GNOME/pango!442
| * More break testsmore-log-attr-thingsMatthias Clasen2021-08-266-0/+25
| |
| * Add code to validate log attrsMatthias Clasen2021-08-264-1/+587
| | | | | | | | | | | | This is just used in tests for now. If we decide to make an external log attr api, we can make this public.
| * break: Fix up word fixupsMatthias Clasen2021-08-262-14/+21
| | | | | | | | | | | | | | 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-indic: Don't wipe out mandatory breaksMatthias Clasen2021-08-261-4/+7
| | | | | | | | These are required for a conforming implementation.
| * break: Follow mandatory rules more strictlyMatthias Clasen2021-08-2614-95/+116
|/ | | | | | | | 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.
* NEWS: UpdatesMatthias Clasen2021-08-251-0/+10
|
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-261-8/+16
|\ | | | | | | | | pango-view: Don't omit the last caret position See merge request GNOME/pango!441
| * pango-view: Don't omit the last caret positionMatthias Clasen2021-08-251-8/+16
| | | | | | | | We want to draw n+1 dots, the last one with trailing == 1.
* | Merge branch 'ligature-carets' into 'main'Matthias Clasen2021-08-261-36/+89
|\ \ | |/ |/| | | | | | | | | Use ligature caret lists Closes #39 See merge request GNOME/pango!438
| * Use ligature caret listsligature-caretsMatthias Clasen2021-08-251-36/+89
| | | | | | | | | | | | | | | | Some fonts provide information about where to place carets inside ligatures. Use it, when it is available. Fixes: #39
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-251-4/+43
|\ \ | |/ |/| | | | | hyphen: Try harder to insert needed hyphens See merge request GNOME/pango!440
| * hyphen: Try harder to insert needed hyphensMatthias Clasen2021-08-251-4/+43
|/ | | | | | | We were forgetting to reshape runs in some situations, leading to them not having hyphens appended. This was happening when runs fit fully onto the end of a line that is wrapped anyway.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-251-11/+21
|\ | | | | | | | | tests: Make test-shape work like the others See merge request GNOME/pango!439
| * tests: Improve test-shapeMatthias Clasen2021-08-251-5/+20
| | | | | | | | This helps with understanding clusters.
| * tests: Make test-shape work like the othersMatthias Clasen2021-08-251-6/+1
|/ | | | | | There was some extra code here that was getting in the way of using all the dumper tests on the same input files. Get rid of it.
* Merge branch 'break-tailoring' into 'main'Matthias Clasen2021-08-2516-51/+509
|\ | | | | | | | | Allow more break tailoring with attributes See merge request GNOME/pango!424
| * Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-2516-51/+509
| | | | | | | | | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-251-2/+52
|\ \ | |/ |/| | | | | pango-viewer: Visualize caret positions See merge request GNOME/pango!437
| * pango-viewer: Visualize caret positionsMatthias Clasen2021-08-251-2/+52
|/ | | | | | With --annotate=256, show caret positions. This will be helpful in improving our handling of caret positions inside clusters.
* Merge branch 'hyphen-log-attr' into 'main'Matthias Clasen2021-08-2518-201/+275
|\ | | | | | | | | | | | | Add hyphens to log attrs Closes #603 See merge request GNOME/pango!436
| * Add some new tests for hyphenshyphen-log-attrMatthias Clasen2021-08-254-0/+16
| |
| * test-break: Print out hyphensMatthias Clasen2021-08-259-42/+66
| | | | | | | | | | | | Print out all the log attrs we have. Update expected test outputs.
| * Refine hyphenationMatthias Clasen2021-08-255-21/+83
| | | | | | | | | | | | | | | | Replace ‧ and | with a - when we break there. Update affected test output. Fixes: #603