summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* Use a better size for missing spaceMatthias Clasen2021-12-211-39/+4
| | | | | | | | | | Follow the Microsoft Typography recommendations from https://docs.microsoft.com/en-us/typography/develop/character-design-standards/whitespace and use half of an em for missing space. Update affected tests. Fixes: #647
* fc: Implement get_absolute_sizeMatthias Clasen2021-12-211-0/+14
| | | | No surprises here.
* Add a private api to get the font sizeMatthias Clasen2021-12-212-1/+21
| | | | | | | | Add a private vfunc to get the (absolute) size of a font. This default implementation just pulls it out of the font description, but we can do implement this cheaper without copying the font description.
* CosmeticsMatthias Clasen2021-12-191-9/+10
| | | | | Rename some variables, so we actually know what these matrices are.
* Fix line height with emulated small capsfix-small-caps-line-heightMatthias Clasen2021-12-194-14/+40
| | | | | | | | When we change font scale for emulating small caps, keep the original font around in the analysis, and use it for calculating the run height. Fixes: #622
* Add some private apiMatthias Clasen2021-12-192-0/+63
| | | | | | Add some api to let us store another font in a PangoAnalysis. This will be used in the following commits.
* Improve line width accountingMatthias Clasen2021-12-181-1/+1
| | | | | | | We want to avoid trading chars for hyphens in the margin beyond the set width. Fixes: #646
* layout: Fix a cornercase of line width accountingMatthias Clasen2021-12-181-8/+12
| | | | | We don't collapse space at the very end, so we should count such spaces towards the line width.
* serializer: Fix a typoMatthias Clasen2021-12-181-1/+1
| | | | | | Oops, we were not serializing the height at all. Update all affected tests.
* Add some docsMatthias Clasen2021-12-181-0/+25
| | | | Add doc comments for some private API.
* fc: CleanupMatthias Clasen2021-12-183-3/+3
| | | | | | Stop using fcfont->matrix. This is just a redundant copy of the matrix that is already available in the font key. Just use that.
* cairo: Work harder to measure spacemore-space-tweaksMatthias Clasen2021-12-171-3/+21
| | | | | | | | | | | When coming up with a width for a missing space, we were just measuring the hex digits. But in subsetted fonts, such as the ones we use for ci, hex digits might well be missing. Take that into account and still provide some nonzero width for space. Update affected tests.
* shape: More tweaks to space handlingMatthias Clasen2021-12-171-4/+16
| | | | | | | | | | | | | | It is a difficult dance between HarfBuzz and pango which glyphs we let hb synthesize, and which ones we need to fake ourselves. HarfBuzz knows how to create other spaces from 0x20, so if the font is lacking spaces, we want to tell HarfBuzz that we don't have that glyph *except* for 0x20 where we need to fake one, and provide HarfBuzz with a suitable width. Update affected tests.
* Revert "Fix advance widths with transforms"fix-vertical-regressionMatthias Clasen2021-12-171-16/+29
| | | | | | | | | This reverts commit ccb651dd2a876a4f4a4cb9351f05332173e709ba. This broke vertical text rendering, see https://gitlab.com/inkscape/inkscape/-/issues/2950. Update affected tests and add a vertical test.
* Merge branch 'fix-spaceless-fonts' into 'main'Matthias Clasen2021-12-161-1/+9
|\ | | | | | | | | | | | | Fix handling of space-less fonts Closes #641 See merge request GNOME/pango!552
| * Fix handling of space-less fontsfix-spaceless-fontsMatthias Clasen2021-12-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | HarfBuzz knows how to synthesize spaces, we just need to tickle it in the right way. Test included. Update affected tests. Fixes: #641
* | Merge branch 'arabic-format' into 'main'Matthias Clasen2021-12-161-18/+22
|\ \ | |/ | | | | | | | | | | Fix Arabic format chars Closes #642 See merge request GNOME/pango!553
| * Fix Arabic format charsMatthias Clasen2021-12-161-18/+22
| | | | | | | | | | | | | | We can't treat these like spaces, since they are visible and need the proper font. Fixes: #642
* | Add a missing includemissing-includeMatthias Clasen2021-12-161-0/+1
|/ | | | | | This was breaking the build on some macOs versions. Fixes: #640
* pango-item-private.h: fix x86-64 x32 buildsAlexander Kanavin2021-12-131-1/+1
| | | | Fixes: #637
* gtkjsonparser.c: Include stdlib.hChun-wei Fan2021-12-131-0/+1
| | | | It is needed for strtol()/strtoul().
* docs: Cosmeticsmisc-doc-fixupsMatthias Clasen2021-12-1013-161/+169
| | | | | Add more links to GLib apis and to various Unicode specs.
* docs: Some cross-linkingMatthias Clasen2021-12-101-2/+6
|
* docs: CosmeticsMatthias Clasen2021-12-101-1/+1
|
* docs: Expand PangoTabArray docsMatthias Clasen2021-12-102-7/+11
|
* Document new variant valuesMatthias Clasen2021-12-101-1/+2
|
* g-i: add missing since annotationsBilal Elmoussaoui2021-12-101-0/+6
|
* serializer: Use gtk_json_parser_select_stringnewer-json-parserMatthias Clasen2021-12-091-101/+315
| | | | Take advantage of the new parser api.
* json: Fix up select_stringMatthias Clasen2021-12-091-1/+1
| | | | There was a copy-paste error here.
* Update to a newer json parserMatthias Clasen2021-12-092-22/+124
|
* Merge branch 'broken-underlines' into 'main'Matthias Clasen2021-12-091-9/+16
|\ | | | | | | | | | | | | fc: Handle fonts with broken metrics better Closes #616 See merge request GNOME/pango!537
| * fc: Handle fonts with broken metrics betterMatthias Clasen2021-12-081-9/+16
| | | | | | | | | | | | | | | | | | It seems that some fonts don't have meaningful values for underline and strikethrough metrics. Ignore these font-provided values if they are zero. Fixes: #616
* | layout: Handle a corner caseMatthias Clasen2021-12-091-1/+3
| | | | | | | | | | | | | | | | | | We can't break in a tab run. This fixes an assertion found by afl. Testcase included. Fixes: #638
* | Fix break-latin.cMatthias Clasen2021-12-081-21/+19
|/ | | | | | | | The loop termination condition in break_latin() was incorrect. Fix this by copying the loop setup from break_arabic(). Fixes #636
* Merge branch 'fix-tabs-nowrap' into 'main'Matthias Clasen2021-12-071-1/+26
|\ | | | | | | | | | | | | Fix line width computation Closes #635 See merge request GNOME/pango!535
| * Fix line width computationMatthias Clasen2021-12-061-1/+26
| | | | | | | | | | | | | | | | | | | | We an only use the line_width - remaining_width shortcut if we are actually maintaining remaining_width, i.e. not if we don't wrap lines. Testcase included. Fixes: #635
* | Plug a memory leak in the json parserMatthias Clasen2021-12-061-0/+2
| |
* | Update the json parserMatthias Clasen2021-12-053-239/+763
|/ | | | | This includes better error reporting, with error locations.
* Fix a crash in tab handlingtab-crash-fixMatthias Clasen2021-12-051-3/+19
| | | | | | | | | | When we uninsert the current tab run, we need to reset our tab state to prevent last_tab->glyphs to become a dangling pointer. Test included. Fixes: #634
* tabs: Fix build with clang in mingw Biswapriyo Nath2021-12-031-0/+1
| | | | Include stdlib.h for qsort function declaration. This fixes the error: implicit declaration of function 'qsort' is invalid in C99
* doc: fixesMatthias Clasen2021-12-024-5/+5
|
* jsonparser: Plug a memory leakserializer-rewriteMatthias Clasen2021-12-021-0/+2
|
* Add pango_font_deserializeMatthias Clasen2021-12-022-0/+89
| | | | | This will make the font serialization useful in GTK, where we serialize fonts in node files.
* Small fixesMatthias Clasen2021-12-022-8/+4
| | | | | Properly document deserialization errors, and drop unused enum values.
* assorted serializer fixesMatthias Clasen2021-12-021-29/+23
|
* serializer: Move all error handling to the parserMatthias Clasen2021-12-021-222/+108
| | | | Just let the parser carry the error.
* Add gtk_json_parser_set_errorMatthias Clasen2021-12-022-0/+12
|
* serializer: Replace json-glibMatthias Clasen2021-12-026-855/+2484
| | | | Replace json-glib by a homegrown json parser/printer.
* tabs: Add a missing setterMatthias Clasen2021-12-022-0/+23
| | | | | Add pango_tab_array_set_positions_in_pixels, to help the serializer out.
* Fix up tab sizingtab-speedupMatthias Clasen2021-12-021-23/+18
|