summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* itemize: Ignore width in horizontal contextignore-width-in-horizontal2Matthias Clasen2021-08-031-0/+3
| | | | | | | | | Changes in width only need to break runs in vertical context. Update tests and add a new test. Fixes: #503
* itemize: Fix up gravity state initializationgravity-fixMatthias Clasen2021-08-021-4/+5
| | | | | | | | itemize_state_init was setting gravity-related fields to their initial values too late, after update_attr_iterator has already set them to the values for the first run. Test included.
* gravity: Remove redundant codeMatthias Clasen2021-08-021-11/+7
| | | | | | Just pass PANGO_GRAVITY_AUTO on to pango_gravity_get_for_script_and_width. It has just the same fallback handling.
* attributes: Add helper api for introspectionintrospection-fixesMatthias Clasen2021-08-012-0/+273
| | | | | | | | Add functions to cast PangoAttribute to the various struct types, so language bindings can get at the payload. Fixes: #476
* layout: Add some api for introspectionMatthias Clasen2021-08-012-0/+74
| | | | | | Add accessors for PangoLayoutLine fields. Fixes: #553
* Clean up rounding codeprivate-vfuncsMatthias Clasen2021-07-314-54/+93
| | | | | | Add private api to get the necessary information from the font backend, and drop the hack that was added in d4356779945855f7cc.
* Add pango_font_get_languagesMatthias Clasen2021-07-315-4/+69
| | | | | | Start using private vfuncs for PangoFont, and use it to replace the recently introduced pango_fc_font_get_languages with a frontend api.
* Add version macros for 1.50Matthias Clasen2021-07-311-0/+24
|
* CosmeticsMatthias Clasen2021-07-311-1/+1
|
* Correctly handle font attributesbetter-ellipsizeMatthias Clasen2021-07-221-9/+10
| | | | | | | | | | 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
* | Use GMutex for the thai_brkPeng Wu2021-07-211-5/+9
|/ | | | Use GMutex to protect the thai_brk in multithreading.
* 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
* 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.
* 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.
* 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.
* | 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.
* | Fix a compiler warningMatthias Clasen2021-07-091-1/+0
| |
* | Merge branch 'win32-cmap-free' into 'master'Matthias Clasen2021-07-093-2/+65
|\ \ | | | | | | | | | | | | pangowin32: Clear cmap on finalize See merge request GNOME/pango!318
| * | pangowin32: Clear cmap on finalizeSeungha Yang2021-04-073-2/+65
| | | | | | | | | | | | | | | Implement copy method for format_4_cmap and format_12_cmap, and free don't leak the struct.
* | | Add a few missing chars to pango_is_zero_widthmissing-zerowidth-charsMatthias Clasen2021-07-091-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | The documentation for this function states that all bidi control chars are zero width, but it was missing the Isolate ones. Add them. Updated tests included.
* | | fontconfig: Ignore woff fontswoff-offMatthias Clasen2021-07-091-1/+9
| |/ |/| | | | | | | | | | | | | harfbuzz creates a face, but doesn't seem to find any glyphs in woff fonts, so filter them out. Sadly, fontfonfig does not have useful format information about this, so we need to crudely filter by filename.
* | 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.
* | layout: Zero out log attrsMatthias Clasen2021-07-061-1/+1
| | | | | | | | This makes tests more reproducible.
* | layout: Add a missing annotationMatthias Clasen2021-07-061-1/+1
| | | | | | | | pango_layout_get_tabs returns a copy.
* | layout: Document default valuesMatthias Clasen2021-07-061-0/+8
| | | | | | | | | | Since these are not properties, their default values aren't documented anywhere. Until now.
* | layout: Correct a g_return_val_if_failMatthias Clasen2021-07-061-1/+1
| | | | | | | | | | The convention is to return the initial value if the 'this' check fails. Correct this for auto_dir.
* | layout: Explicitly initialize single_paragraphMatthias Clasen2021-07-061-0/+1
| | | | | | | | This makes it obvious what the initial value is.
* | layout: Remove an overeager assertionMatthias Clasen2021-07-061-5/+3
| | | | | | | | | | | | | | | | | | | | pango_layout_get_direction contained an assertion that would be hit when just iterating over all chars in the text of the layout (it gets hit when you get to the final newline). Remove the assertion, so that this function is less of a trap.
* | CosmeticsMatthias Clasen2021-07-061-2/+2
| |
* | renderer: Fix averaging of strikethroughsfix-strikethrough-averagingMatthias Clasen2021-07-051-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In 85bdfead1b36945db251 I made consecutive runs average their strikeout positions, but I did handle the accounting properly, causing previous runs to influence the strikeout of later runs, if we have to draw them separately (due to color change). It would be nicer to average even across color changes and draw the line continuously in that case as well, but that would require two passes over the runs. Fixes: #574
* | docs: Add some details for PangoWrapimprove-wrap-docsMatthias Clasen2021-07-021-0/+5
| | | | | | | | | | | | This clarifies things for myself. Fixes: #573
* | Use an enum instead of numeric values for fc_initializedFederico Mena Quintero2021-07-011-5/+16
| |
* | Use atomic reference counting for PangoFcPatternsFederico Mena Quintero2021-07-011-18/+3
| | | | | | | | | | | | | | There was a data race in accessing the ref_count of this struct; now with g_atomic_rc_box it's done properly across threads. Fixes https://gitlab.gnome.org/GNOME/pango/-/issues/571
* | Extract function to free the contents of a PangoFcPatternsFederico Mena Quintero2021-07-011-7/+14
| |
* | fc: Drop a broken optimizationdrop-broken-optimizationMatthias Clasen2021-07-011-3/+0
| | | | | | | | | | | | | | | | | | We were trying to cut short the wait for FcInit in pango_fc_font_map_set_config. But there was a thinko: while it is true that the fontmap which had set_config called on it does not need to wait for FcInit anymore, other threads fontmaps still do. Instead of making this more complicated, just drop the optimization.
* | Clarify docs of pango_fc_fontmap_get_configget-config-docsMatthias Clasen2021-07-011-1/+2
| | | | | | | | | | | | | | The return value is owned by Pango. transfer=none doesn't really work for non-GObject types, so just spell it out. Fixes: #572
* | Merge branch 'bring-back-better-rounding' into 'master'Matthias Clasen2021-06-281-4/+73
|\ \ | | | | | | | | | | | | | | | | | | shape: Bring back careful rounding code Closes #562 See merge request GNOME/pango!344
| * | shape: Bring back careful rounding codebring-back-better-roundingMatthias Clasen2021-06-271-4/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we added the round-glyph-positions option in c43da2d3 and b5634799, we lost some code that was careful to round in device coordinates. The reason we lost it is that the rounding needs fontconfig- specific data that is only available in the backend, and the rounding now happens in the frontend. Bringing it back is annoying, since we've run out of vfunc slots to get info from the backend. This commit works around that limitation in a hacky way. Fixes: #562
* | | Add missing bidi typestest-coverageMatthias Clasen2021-06-282-4/+15
| | | | | | | | | | | | | | | The api is deprecated, but it is very ugly to randomly miss a few values here. Just add them.
* | | tabs: CosmeticsMatthias Clasen2021-06-281-1/+1
| | |
* | | utils: Make pango_version_check more preciseMatthias Clasen2021-06-281-0/+2
| | | | | | | | | | | | | | | The expectation of version comparisons is that major versions have to match exactly.
* | | matrix: CosmeticsMatthias Clasen2021-06-281-6/+7
| | |
* | | markup: Don't accept attributes on <markup>Matthias Clasen2021-06-281-0/+1
| | | | | | | | | | | | Better to enforce this.