summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bidi: Don't blow the stackbidi-stack-sizeMatthias Clasen2021-07-301-2/+21
| | | | | | Limit stack allocation to a reasonable size, so things don't blow up when somebody hands us a ridiculous-size paragraph.
* break: Cache per-character dataMatthias Clasen2021-07-301-48/+66
|
* Revert "Split pango_default_break into functions"Matthias Clasen2021-07-301-472/+342
| | | | This reverts commit a7aeaf146761fd3136e56153216e102ed2dfb868.
* Split pango_default_break into functionsMatthias Clasen2021-07-301-342/+472
| | | | This makes it easier to see what part is taking time.
* break: Some more rearrangementMatthias Clasen2021-07-301-55/+61
|
* Revert "break: Rewrite some things"Matthias Clasen2021-07-301-160/+144
| | | | This reverts commit ddeb511f8629de50ab010707cbec8455a8cb9a77.
* break: Rewrite some thingsMatthias Clasen2021-07-301-144/+160
|
* break: Speed things up a bitMatthias Clasen2021-07-301-262/+225
| | | | | | | | | | | This is not revolutionary, but it helps a bit: We don't need to check the line break rules one-by-one. After we applied one, most of the following rules can be skipped, since they would just do the same. This is not ideal, since we still do far too many checks when following the if-else cascade to the end, but its a start.
* break: Fix some formatting issuesMatthias Clasen2021-07-301-28/+31
| | | | | I can ignore the tabs, but the broken indentation is just too irritating.
* break: CosmeticsMatthias Clasen2021-07-301-7/+9
|
* Reduce memory allocation during itemizationMatthias Clasen2021-07-307-57/+105
| | | | Use the stack for more temporary allocations.
* Merge branch 'fix-tests-build' into 'main'Matthias Clasen2021-07-301-0/+1
|\ | | | | | | | | tests: Fix implicit function declaration warnings with gcc See merge request GNOME/pango!381
| * tests: Fix implicit function declaration warnings with gccBiswapriyo Nath2021-07-291-0/+1
|/ | | | This includes stdlib.h for strtol, strtoll and strtod functions declaration
* Merge branch 'better-ellipsize' into 'main'Matthias Clasen2021-07-222-9/+11
|\ | | | | | | | | | | | | ellipsize: Try harder to find the right font Closes #575 See merge request GNOME/pango!380
| * Correctly handle font attributesbetter-ellipsizeMatthias Clasen2021-07-222-9/+11
|/ | | | | | | | | | pango_attr_iterator_get_attributes only returns the innermost attribute of each kind. That is correct for attributes that supersede each other, but not for font descriptions, which get merged. So, keep all font attributes in the returned list. Update affected tests.
* Merge branch 'approximated-sizes' into 'main'Matthias Clasen2021-07-213-9/+25
|\ | | | | | | | | | | | | font-desc: Use local double values to store sizes Closes #580 See merge request GNOME/pango!377
| * font-desc: Use local volatile double values to store sizesMarco Trevisan (TreviƱo)2021-07-213-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under i386 multiplying double and integer values and cast it to integer may end up to compute the wrong value when only 387 FPU is used, because the temporary value will be stored in a register whose precision isn't good enough. And so, some multiplications which are expected to produce an integer, will actually return a truncated value, that will be eventually floored. An example is 1.2 * 12800 that is clearly 15360.0, but will produce 15359 when casted to int in the said i386 environment. So use a temporary double variable to ensure that we do this computation in the double scope, before casting to int. And this will avoid using the said register, even when using more aggressive optimizations (as per marking the local variable volatile). Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/580
| * Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2021-07-106-12/+64
| |\ | | | | | | | | | | | | tests: Avoid a possible invalid access See merge request GNOME/pango!376
| | * Try harder to skip tests on MacOsMatthias Clasen2021-07-102-0/+48
| | | | | | | | | | | | | | | | | | For tests where the wrong fonts break things, check that we have Cantarell, and skip them if not.
| | * tests: Fix an assertionMatthias Clasen2021-07-101-3/+4
| | | | | | | | | | | | | | | We were rounding things differently, giving us off-by-one errors on MacOs.
| | * tests: Locale handling fixesMatthias Clasen2021-07-106-9/+12
| |/ | | | | | | | | The return value of setlocale is only good until the next call. Also, consistently use en_US.UTF-8.
* | Merge branch 'thai' into 'main'Matthias Clasen2021-07-211-5/+9
|\ \ | | | | | | | | | | | | Use GMutex for the shared thai brk See merge request GNOME/pango!378
| * | Use GMutex for the thai_brkPeng Wu2021-07-211-5/+9
| | | | | | | | | | | | Use GMutex to protect the thai_brk in multithreading.
* | | Try harder to skip tests on MacOsMatthias Clasen2021-07-212-0/+48
| | | | | | | | | | | | | | | | | | For tests where the wrong fonts break things, check that we have Cantarell, and skip them if not.
* | | tests: Fix an assertionMatthias Clasen2021-07-211-3/+4
| | | | | | | | | | | | | | | We were rounding things differently, giving us off-by-one errors on MacOs.
* | | tests: Locale handling fixesMatthias Clasen2021-07-216-9/+12
|/ / | | | | | | | | The return value of setlocale is only good until the next call. Also, consistently use en_US.UTF-8.
* | Mention main in NEWSMatthias Clasen2021-07-171-0/+5
| | | | | | | | This is part of #579.
* | ci: Update branch references to mainMatthias Clasen2021-07-172-2/+2
| | | | | | | | | | | | Change ci to point at the main branch instead of master. This is part of #579
* | docs: Update branch references to mainMatthias Clasen2021-07-176-6/+6
|/ | | | | | | Change the source locations in the gi-docgen files to point to main instead of master. This is part of #579
* Merge branch 'space-itemization' into 'master'Matthias Clasen2021-07-101-15/+71
|\ | | | | | | | | itemize: Improve handling of spaces See merge request GNOME/pango!374
| * itemize: Improve handling of spacesspace-itemizationMatthias Clasen2021-07-101-15/+71
| | | | | | | | | | | | | | | | | | Put spaces into the previous or the next item, depending on which one has the 'better' font. This reduces space variations in the presence of font fallback. See: #249
* | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2021-07-105-25/+25
|\ \ | |/ | | | | | | Add a way to show fonts in test-layout output See merge request GNOME/pango!371
| * Quiet another compiler warningMatthias Clasen2021-07-101-1/+1
| |
| * Drop an unused functionMatthias Clasen2021-07-101-6/+0
| |
| * Quiet a compiler warningMatthias Clasen2021-07-101-4/+6
| | | | | | | | | | Another case where using a GPtrArray instead of a GArray of pointers is nicer.
| * language: Silence compiler warningsMatthias Clasen2021-07-101-9/+11
| | | | | | | | | | Use a GPtrArray instead of a GArray of pointers, to avoid case-align warnings.
| * Silence compiler warningsMatthias Clasen2021-07-101-1/+2
| |
| * tests: Add a way to show fonts in test-layoutMatthias Clasen2021-07-101-1/+5
| | | | | | | | | | | | | | This is sometimes useful, even if we want to avoid it in ci. So add an environment variable, PANGO_TEST_SHOW_FONT to make it show the actual font instead of 'OMITTED'.
| * Remove an obsolete version checkMatthias Clasen2021-07-101-3/+0
|/ | | | | We require harbuzz to be at least 2.0.0 for a while now. No need to check that version at runtime.
* Merge branch 'attr-list-change-fix' into 'master'Matthias Clasen2021-07-102-18/+270
|\ | | | | | | | | | | | | Remove an erroneous early exit Closes #564 See merge request GNOME/pango!372
| * Add more testcases for pango_attr_list_changeattr-list-change-fixMatthias Clasen2021-07-091-9/+264
| | | | | | | | | | | | Add more cases to cover move of the branches in this complicated function. Among other things, this tests the fix in the previous commit.
| * Remove an erroneous early exitMatthias Clasen2021-07-091-9/+6
|/ | | | | | | | pango_attr_list_change was returning early in one case, missing to do some necessary cleanup of the list. Fixes: #564
* CosmeticsMatthias Clasen2021-07-091-3/+3
|
* Merge branch 'fix-empty-line-spacing-2' into 'master'Matthias Clasen2021-07-091-13/+17
|\ | | | | | | | | | | | | layout: make the height of an empty line match a regular line Closes #577 See merge request GNOME/pango!363
| * layout: make the height of an empty line match a regular lineArtem Rebrov2021-07-081-13/+17
| | | | | | | | | | When using line-spacing, the height of an empty line is the same as when line-spacing has zero value. Take the value from font metrics.
* | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2021-07-091-6/+11
|\ \ | | | | | | | | | | | | docs: Small layout docs improvements See merge request GNOME/pango!370
| * | docs: Small layout docs improvementsMatthias Clasen2021-07-091-6/+11
|/ / | | | | | | | | Add some more default values, and correct the docs for pango_layout_set_spacing wrt to the default value.
* | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2021-07-098-104/+89
|\ \ | | | | | | | | | | | | win32: Don't export private symbol See merge request GNOME/pango!369
| * | ci: Update ci imagesMatthias Clasen2021-07-093-2/+4
| | | | | | | | | | | | | | | | | | Include llvm on the image, so that we can use llvm-symbolizer, too try and get meaningful stacktraces out of asan.
| * | Improve attribute test infrastructureMatthias Clasen2021-07-093-101/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make attribute_from_string() parse enum attribute values in the same way as PangoMarkup, and use it in the attribute tests. Still to do: Do the same for flags. The flags parsing function isn't exported, so this needs our tests to be statically linked.