summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Document incompatibility of tabs and justificationdocument-tabsMatthias Clasen2021-08-191-1/+12
| | | | | | Not great, but these *are* conflicting features. Fixes: #595
* Merge branch 'glyph-string-const-char' into 'main'Matthias Clasen2021-08-172-24/+24
|\ | | | | | | | | Add a few missing const See merge request GNOME/pango!412
| * Add a few missing constglyph-string-const-charMatthias Clasen2021-08-172-24/+24
| | | | | | | | | | We should only pass char * when we actually modify the string. Everything else is const char *.
* | Merge branch 'fix-gravity-error' into 'main'Matthias Clasen2021-08-171-1/+1
|\ \ | |/ | | | | | | | | | | Correct an error message Closes #598 See merge request GNOME/pango!410
| * Correct an error messagefix-gravity-errorMatthias Clasen2021-08-171-1/+1
| | | | | | | | | | | | Update affected tests Fixes: #598
* | bidi: Cleanup FriBiDi API usageKhaled Hosny2021-08-171-22/+0
|/ | | | Since FriBiDi 1.x is now required, we can remove use of pre-1.x API.
* gravity: Add missing Multani scriptadd-multani-gravityMatthias Clasen2021-08-171-0/+1
| | | | | | | An unfortunate oversight in 709af063 omitted Multani, and threw the rest of the table off. Fixes: #597
* Add check for a NULL font in PangoAnalysis structureLuca Bacci2021-08-111-1/+1
| | | | Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/592
* Add pango_justify_last_lineMatthias Clasen2021-08-103-3/+62
| | | | | | | Add a way to justify the last line in a justified paragraph. Fixes: #74
* Add some forgotten documentationMatthias Clasen2021-08-101-0/+1
|
* Fix more corner cases around line endsMatthias Clasen2021-08-091-4/+18
| | | | | | We were miscounting the cursor positions in a line, causing us to jump down to the next line when moving backwards towards the start of the line.
* Fix corner cases around line endsMatthias Clasen2021-08-091-12/+16
| | | | | | | | | | pango_layout_index_to_line_and_extents needs to return a run rect even if the line has no non-empty runs. Failing to do so was causing cursors at the end of lines to have a height of 0 or 1, which is not what we want. Add a testcase.
* Merge branch 'win32-fixes' into 'main'Matthias Clasen2021-08-093-4/+32
|\ | | | | | | | | | | | | Attempt to fix some Win32-related issues Closes #583 and #578 See merge request GNOME/pango!399
| * pangowin32-fontmap.c: Look harder for the matching fontChun-wei Fan2021-08-091-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | When we look up our font from the list of fonts that we enumerated from the system, follow what the CoreText backend does, so that if the font gravity in the font description is getting in our way to find the font, look for it again without the gravity. This will enable us to find the font that really exists but was not found due to FontDescription attributes. Partially fixes #583.
| * pango/shape.c: Use the former rounding code as neededChun-wei Fan2021-08-091-0/+12
| | | | | | | | | | | | | | | | | | | | The careful rounding code that was brought back as a result of commit d4356779 only had effect if we are using a backend that supported font hinting, so on other backends, use the former rounding code that was dropped in favor of the careful rounding code that unfortunately did not apply for all backends. Should fix #578.
| * pango-markup.c: Fix buildChun-wei Fan2021-08-091-1/+1
| | | | | | | | The strchr() call's second parameter is a char, not a string.
* | docs: Add an example for split cursorsMatthias Clasen2021-08-091-1/+15
| | | | | | | | | | | | | | Show how weak and strong cursors look in practice. Fixes: #77
* | docs: CosmeticsMatthias Clasen2021-08-081-3/+2
| | | | | | | | No need to link a function to itself.
* | docs: Add one more dark mode imageMatthias Clasen2021-08-081-1/+4
|/
* Merge branch 'line-height-attribute' into 'main'Matthias Clasen2021-08-094-15/+198
|\ | | | | | | | | Implement css-like line-height See merge request GNOME/pango!390
| * Fix up logical rectangle reportingMatthias Clasen2021-08-081-24/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix up the various apis that are reporting logical rects to follow these rules: Logical rectangles of lines are affected by the line-height attribute, logical rectangles of smaller units (runs, clusters, chars, cursors, etc) are not. This fixes the text cursors and block cursors in GTK to be 'normal' height, even when applying line-height for double-spacing.
| * layout: Handle line-height attributesMatthias Clasen2021-08-081-1/+30
| | | | | | | | | | | | | | | | | | Modify the height and vertical origin of logical extents according to the line height attributes. We currently apply half the leading above and half below the content (i.e., lines are vertically centered in their modified height).
| * Add line-height attributesMatthias Clasen2021-08-084-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | Add attributes for line-height, in a relative and absolute variant. This will be used to grow the logical extents of runs in a way that is compatible with CSS semantics. In markup, we support a new line_height attribute that will be interpreted as absolute if it is an integer > 1024, and as a relative factor otherwise.
* | Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2021-08-092-3/+5
|\ \ | |/ |/| | | | | docs: Cosmetic change See merge request GNOME/pango!396
| * Specify deprecation detailsMatthias Clasen2021-08-082-2/+2
| | | | | | | | | | Unversioned deprecations come out odd in gi-docgen. Add a version to avoid that.
| * docs: Cosmetic changeMatthias Clasen2021-08-081-1/+3
| | | | | | | | Shorten the first line of the PangoBidiType docs.
* | gravity: Correct the documentationMatthias Clasen2021-08-081-2/+2
| | | | | | | | | | There was a cw vs ccw mixup here. Adding example images made it obvious.
* | docs: More detailsMatthias Clasen2021-08-081-4/+4
| | | | | | | | Add some visualizations of gravity.
* | docs: Add more detailsMatthias Clasen2021-08-081-0/+10
|/ | | | | Add some visualization of alignment and justification to the PangoLayout docs.
* docs: More detailsMatthias Clasen2021-08-081-0/+3
| | | | Add a cross-reference to the PangoAlignment docs.
* docs: Some clarificationsMatthias Clasen2021-08-082-4/+9
| | | | | Add some more detail around baseline-to-baseline distances.
* Merge branch 'bidi-revenge' into 'main'Matthias Clasen2021-08-081-187/+140
|\ | | | | | | | | | | | | Reimplement pango_layout_move_cursor_visually Closes #587, #585, and #157 See merge request GNOME/pango!389
| * Tweak the docsbidi-revengeMatthias Clasen2021-08-081-7/+6
| | | | | | | | | | Make the docs for pango_layout_move_cursor_visually a bit more clear.
| * Reimplement pango_layout_move_cursor_visuallyMatthias Clasen2021-08-081-171/+107
| | | | | | | | | | | | | | | | Reimplement this function based on pango_layout_get_cursor_pos. This is a bit less efficient, but it fixes cases where the old implementation would get stuck. Fixes: #587, #585, #157
| * Try to improve pango_layout_get_cursor_posMatthias Clasen2021-08-081-9/+27
| | | | | | | | | | Try to disambiguate run boundaries better. Not sure this works as intended, yet.
* | markup: Allow specifying size as percentagemarkup-sizesMatthias Clasen2021-08-081-1/+26
| | | | | | | | | | | | | | Accept values like 200%, in addition to other ways of specifying sizes in markup. Fixes: #23
* | markup: Allow pt for rise tooMatthias Clasen2021-08-081-2/+11
| |
* | markup: Allow specifying size in ptMatthias Clasen2021-08-081-20/+36
|/ | | | | | | | Accept values like 12.5pt, in addition to the other ways of specifying font size in markup. Fixes: #67
* Revert a non-longer needed changeMatthias Clasen2021-08-041-8/+0
| | | | | | | | | | | This reverts 681f92d78c2623, after adding the crash that it alludes to as a test case and verifying that it no longer crashes. This commit was causing split cursors to not work as intended at the end of a mixed-direction string. Broken since 2008...
* 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.