summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'emoji-table-opt' into 'master'Matthias Clasen2019-10-251-174/+16
|\ | | | | | | | | emoji: Optimize tables See merge request GNOME/pango!152
| * emoji: Optimize tablesMatthias Clasen2019-10-241-174/+16
| | | | | | | | | | One of the Emoji tables had many adjacent ranges. Speed up our bsearch by merging them.
* | Merge branch 'coretext-gravity' into 'master'Matthias Clasen2019-10-251-0/+1
|\ \ | | | | | | | | | | | | [coretext] make setting font gravity work See merge request GNOME/pango!150
| * | [coretext] make setting font gravity workKhaled Hosny2019-10-231-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting font gravity to anything other than PANGO_GRAVITY_SOUTH causes no fonts to be matched on Core Text backend because the code for finding best match checks for equal gravity between the requested font and the fonts in the font set, and the later always have PANGO_GRAVITY_SOUTH. Hack around this by copying the gravity from the requested font. Can be tested with: $ pango-view --gravity=east --rotate=-90 utils/test-chinese.txt Currently without this change it gives: (pango-view:2824): Pango-WARNING **: 10:59:18.683: couldn't load font "serif Rotated-Left 12", modified variant/weight/stretch as fallback, expect ugly output. (pango-view:2824): Pango-ERROR **: 10:59:18.683: Could not load fallback font, bailing out. Trace/BPT trap: 5
* | fc: Be robust against missing format informationMatthias Clasen2019-10-241-2/+1
|/ | | | | | | | Some people have been seeing this assertion getting hit. So don't assert, simply skip fonts that don't have format information. Fixes: https://gitlab.gnome.org/GNOME/pango/issues/431
* Merge branch 'break-opt' into 'master'Matthias Clasen2019-10-121-3/+5
|\ | | | | | | | | break: Don't determine types more than once See merge request GNOME/pango!149
| * break: Don't determine types more than onceMatthias Clasen2019-10-121-3/+5
| | | | | | | | | | | | We determined the category early on, don't do the same work again later by calling isdigit or isletter wrappers.
* | Fixes harfbuzz codepoint cluster for hyphens.aihui zhu2019-10-081-2/+2
|/
* Make PangoFontsetSimple available againMatthias Clasen2019-09-032-37/+33
| | | | | | | | Turns out some bindings depend on this, even though it is not used in pango and not practically useful. Bring it back as deprecated API. Closes: https://gitlab.gnome.org/GNOME/pango/issues/417
* Merge branch 'hyphen-crash' into 'master'Matthias Clasen2019-09-031-14/+1
|\ | | | | | | | | | | | | Drop some leftover code Closes #418 See merge request GNOME/pango!144
| * Drop some leftover codeMatthias Clasen2019-09-021-14/+1
| | | | | | | | | | | | | | | | In d6bc8daa6935b53c1, we added code to remove "hyphen runs". But we no longer create such runs, so this code is harmful and can cause crashes under certain circumstances. Closes: https://gitlab.gnome.org/GNOME/pango/issues/418
* | Disable hyphen for COMMON charactersPeng Wu2019-09-021-0/+1
|/ | | | The COMMON characters like symbol only line don't need hyphen.
* Disable hyphen for some languagesPeng Wu2019-08-281-0/+13
| | | | | Some languages like CJK languages, usually don't use the hyphen character.
* Merge branch 'fix-glib-dependency' into 'master'Matthias Clasen2019-08-261-5/+7
|\ | | | | | | | | Don't depend on glib 2.60 symbols at runtime See merge request GNOME/pango!141
| * Don't depend on glib 2.60 symbols at runtimeAlexander Larsson2019-08-251-5/+7
| | | | | | | | | | | | | | The G_TYPE_UNICODE_STRING type was added in 2.60, which broke applications using older glib versions (such as matlab). The only usecase was a warning message anyway, so we just avoid using it.
* | Fix a problem with allow-breaksMatthias Clasen2019-08-251-2/+1
| | | | | | | | | | | | | | Fix an oversight in the calculation of log attributes. This was showing up as allow-breaks attributes being applied to the wrong ranges in later runs.
* | Move a few fc functions back to public headersMatthias Clasen2019-08-222-7/+8
| | | | | | | | These are meant to be public.
* | Move a function back to public headersMatthias Clasen2019-08-222-3/+3
| | | | | | | | pango_core_text_font_get_ctfont is meant to be public.
* | Make some class structs public againMatthias Clasen2019-08-214-186/+190
| | | | | | | | | | | | | | | | It turns out that the R GTK2 binding poke directly at many class structs. Bring the class structs back for now (deprecated), to avoid breaking their build. Closes: https://gitlab.gnome.org/GNOME/pango/issues/412
* | Revert "Update break-thai.c to Unicode 11"Matthias Clasen2019-08-211-4/+4
|/ | | | | | This reverts commit bca876de9b8cad4c912a2734561f2fe23b2d872a. See https://gitlab.gnome.org/GNOME/pango/issues/413
* Add a runtime version check for harfbuzzMatthias Clasen2019-08-191-1/+4
| | | | | | | Electron apps seem to include a static copy of a too old version of harfbuzz. Error out with a clear message in this broken situation, instead of segfaulting later.
* Fix a doc typoMatthias Clasen2019-08-141-10/+10
|
* Revert "Drop cairo metrics implementation"Khaled Hosny2019-08-145-0/+199
| | | | | | This reverts commit c5d86c368128bb9a0be913829da79649fb81f486. Closes #409
* fc: Make sure ink rectangle has positive heightMatthias Clasen2019-08-121-1/+1
| | | | | | | | We are getting extents with negative height from harfbuzz, we have to flip them around. This was causing problems in lilypond. Closes: https://gitlab.gnome.org/GNOME/pango/issues/406
* Merge branch 'mark-offset' into 'master'Matthias Clasen2019-08-121-12/+31
|\ | | | | | | | | | | | | Fix vertical offsets Closes #408 See merge request GNOME/pango!130
| * Flip vertical offsetsMatthias Clasen2019-08-121-6/+6
| | | | | | | | | | | | | | | | | | This was experimentally determined to fix placement of diacritics in Arabic text. I am not entirely sure where the negation crept in, compared to 1.43, which makes me a little uncomfortable. Fixes https://gitlab.gnome.org/GNOME/pango/issues/408
| * Add a separate v_advance funcMatthias Clasen2019-08-121-6/+25
| | | | | | | | | | It doesn't make sense to use the same function for both h and v advance.
* | Merge branch 'fc-font-struct' into 'master'Matthias Clasen2019-08-124-48/+55
|\ \ | | | | | | | | | | | | Make PangoFcFont struct available again See merge request GNOME/pango!133
| * | Make PangoFcFont struct available againMatthias Clasen2019-08-124-48/+55
| |/ | | | | | | | | | | | | Unfortunately, some applications are poking directly at PangoFcFont struct fields. Put the structs back in the public headers for now, but deprecated.
* | Merge branch 'hb-metrics' into 'master'Matthias Clasen2019-08-125-199/+0
|\ \ | | | | | | | | | | | | Drop cairo metrics implementation See merge request GNOME/pango!132
| * | Drop cairo metrics implementationMatthias Clasen2019-08-125-199/+0
| |/ | | | | | | We can use the hb-based implementation in pangofc-font.c.
* | pango/pangofc-shape.c: Fix buildChun-wei Fan2019-08-121-1/+1
|/ | | | | The hb_tag_t array was declared as an array of hb_tag_t pointers, whereas it should have been an array of hb_tag_t's.
* Merge branch 'master' into 'master'Matthias Clasen2019-08-101-4/+4
|\ | | | | | | | | Use latest version of metrics naming in pangofc-font See merge request GNOME/pango!128
| * Use latest version of metrics naming in pangofc-fontEbrahim Byagowi2019-08-101-4/+4
| |
* | Install PangoFc and PangoOT GObject-IntrospectionSimon McVittie2019-08-101-0/+2
|/ | | | | | | | | | | | | If we don't install these, we can't load PangoXft and PangoFT2, which depend on them: $ GI_TYPELIB_PATH=${DESTDIR}/usr/lib/x86_64-linux-gnu/girepository-1.0 python3 ... >>> from gi.repository import PangoXft ... gi.RepositoryError: Typelib file for namespace 'PangoOT', version '1.0' not found Signed-off-by: Simon McVittie <smcv@debian.org>
* Prevent a crash in ellipsizationMatthias Clasen2019-08-081-1/+5
| | | | | | | We were crashing when ellipsizing text without any attributes. Test included.
* Merge branch 'ellipsize-height' into 'master'Matthias Clasen2019-08-071-1/+1
|\ | | | | | | | | | | | | Pass the right attributes when shaping ellipses Closes #397 See merge request GNOME/pango!127
| * Pass the right attributes when shaping ellipsesMatthias Clasen2019-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we are splitting attributes into those that are relevant for itemization and shaping, we need to make sure to pass the right ones along when ellipsizing, or we risk picking a wildly mismatching font for the ellipsis run, causing things to shift vertically. Test included. Closes: https://gitlab.gnome.org/GNOME/pango/issues/397 Thanks to Jorge Luis Martinez Gomez for his help in tracking this down.
* | Revert no-longer-needed changesMatthias Clasen2019-08-061-46/+14
| | | | | | | | | | | | We are now producing an FcFontSet that has only font patterns with supported formats, so we no longer need to skip NULL fonts.
* | Better filtering by font formatMatthias Clasen2019-08-061-15/+47
| | | | | | | | | | As Behdad pointed out, we were mixing up font format filtering and coverage trimming.
* | Reinstate the return type of pango_fc_font_lock_face()Matthias Clasen2019-08-066-23/+11
|/ | | | | | | | | We did not remove the freetype dependency from libpango anyway, so bite the bullet, and keep including freetype headers. Changing the return type to gpointer broke C++ users, where casts from void* are not automatic.
* Add detail to docsMatthias Clasen2019-08-041-11/+41
| | | | | Explain variation syntax and allowed values for other components of pango_font_description_from_string().
* docs: Add extent imagesMatthias Clasen2019-08-041-0/+4
| | | | Add an illustration of logical and ink rects.
* Add an insert-hyphens attributeMatthias Clasen2019-08-044-2/+84
| | | | | | | | | Add a text attribute that allows to suppress insertion of hyphens at intra-word line breaks. This is useful for non-paragraph-like contexts, where line breaks are needed, but hyphens are not expected.
* fc: Ignore more unsupported font formatsKhaled Hosny2019-08-041-4/+17
| | | | | | | | | | | | | FontConfig uses FreeType’s FT_Get_X11_Font_Format() to get the font format. From the list of font formats it supports, only “TrueType” and “CFF” are supported by HarfBuzz. We now check explicitly for supported formats and reject anything else: https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/internal/services/svfntfmt.h#n36 FreeType, however, seems to use “CFF” for both OpenType fonts with CFF table (.otf) and bare CFF fonts (.cff), but the later are not supported by HarfBuzz although they rather rare (outside of PDF files, which shouldn’t be rendered with Pango), so it should be OK.
* Merge branch 'unsupported-formats' into 'master'Matthias Clasen2019-08-041-15/+54
|\ | | | | | | | | fc: Don't list fonts with unsupported formats See merge request GNOME/pango!111
| * fc: Don't return fonts with unsupported formatsMatthias Clasen2019-08-031-15/+49
| | | | | | | | | | | | | | | | Make pango_fontset_foreach skip fonts that in formats that harfbuzz doesn't support. Some reshuffling was necessary since previously the code was assuming that the first NULL indicates the end of available fonts.
| * fc: Don't list fonts with unsupported formatsMatthias Clasen2019-08-031-0/+5
| | | | | | | | We don't want to list fonts if we can't handle them.
* | Revert "Revert "shape: Simplify font function""Khaled Hosny2019-08-031-74/+0
|/ | | | This reverts commit 5590b99fb6369cd16110bce2a3e8ac6371c3c487.
* layout: Use the new glyph rounding optionMatthias Clasen2019-08-031-3/+9
| | | | | Take the glyph rounding option from PangoContext and translate it into a shape flag.