summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* Restore scaling of CoreText fonts.John Ralls2018-05-085-9/+32
| | | | Fixes bug 787867.
* Use non-deprecated libthai API when availableKhaled Hosny2018-04-111-5/+11
| | | | I’m assuming the new API is thread-safe as claimed.
* pangowin32: fix script cache hash key for 64bit buildsChristoph Reiter2018-04-091-5/+25
| | | | | | | | | | | | | | It joins the HFONT and script key to a gint64 and uses this as a hash key, but HFONT is a pointer type and on 64bit Windows it doesn't fit in 32bit and the value gets truncated. This breaks the build with meson where -Werror=pointer-to-int-cast is enabled by default. Instead of using the gint64 hash functions add our own key type and implement matching hash and equality functions for it. https://bugzilla.gnome.org/show_bug.cgi?id=795045
* build: move usp10 before gdi32Christoph Reiter2018-04-092-2/+4
| | | | | | | | | | | | | | | Without this pango on mingw64 tries to lookup up the Script* functions in gdi32 and fails. It already fails at the build stage because the introspection dump crashes with a missing entry point error. Moving usp10 before gdi32 makes things work. This might be related to the warning in the uniscribe docs: "Important Starting with Windows 8: To maintain the ability to run on Windows 7, a module that uses Uniscribe must specify Usp10.lib before gdi32.lib in its library list." https://bugzilla.gnome.org/show_bug.cgi?id=795045
* win32: remove redundant function declarationsChristoph Reiter2018-04-052-7/+0
| | | | | | The meson build uses -Werror=redundant-decls and fails. https://bugzilla.gnome.org/show_bug.cgi?id=795012
* pangowin32-fontmap.c: Add an Emoji font familyChun-wei Fan2018-03-311-1/+2
| | | | | | | | | | | | | | | | | | | Add an Emoji font family that maps to the following fonts in this order (by fallback): Segoe UI Emoji Segoe UI Symbol Segoe UI This will enable Emoji to be displayed correctly in GTK+ apps (without the use of FontConfig) on Windows Vista and later, providing that one of the aforementioned fonts are installed. Note that this only enables Emoji display (*not* colored ones) as achieving colored Emoji requires PangoWin32 and Cairo to be ported to Direct2D and DirectWrite from Uniscribe and GDI, as Uniscribe and GDI does not support colored Emoji. https://bugzilla.gnome.org/show_bug.cgi?id=794705
* meson: Check for HarfBuzz and FontConfig for PangoFT2Chun-wei Fan2018-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | It is possible that we can have the following situations, at least on Windows: -FreeType present, FontConfig missing -Cairo-FT present, with no FontConfig support. As gen-script-for-lang requires FontConfig, and PangoFT2 depends on HarfBuzz, FontConfig and Freetype, we need to check for them before we build PangoFT2, and so that we could include PangoFT2 support in PangoCairo. The tests and pango-view have an optional dependency on PangoFT2, so we need to also check whether we built PangoFT2 before we try to build things related to PangoFT2. For the tools, since gen-script-for-lang.c depends on FontConfig, check for it as well before we build it. https://bugzilla.gnome.org/show_bug.cgi?id=783274
* meson: Update rules for introspectionEmmanuele Bassi2018-02-121-143/+171
| | | | | | | | | | | | | | | Building introspection should not be gated on cross-compilation: it's perfectly acceptable to use an helper binary to run the introspection scanner when cross-compiling — in fact, it's what projects like Yocto do. Instead, we should have an option to disable the introspection generation explicitly. Additionally, when building introspection data for ancillary Pango libraries, like PangoCairo or PangoXft, we should depend on the GIR target, instead of adding an `--include-uninstalled` extra argument for the introspection scanner; this allows building Pango as a sub-project of another project, and lets Meson deal with the appropriate paths and arguments when invoking the scanner.
* Use the new FriBiDi API when availablewip/khaled/fribidiKhaled Hosny2018-02-041-0/+22
|
* Avoid converting to UTF-32 for FriBiDiKhaled Hosny2018-02-041-33/+31
| | | | | Can’t tell if this is any faster, but does not look like a complex thing to do, so why not.
* Drop now unused mini-fribidiKhaled Hosny2018-02-0412-8876/+0
|
* Switch to using external FriBiDiKhaled Hosny2018-02-043-28/+44
|
* fontmap: fix warnings from recent g_object_ref() changesChristian Hergert2018-01-051-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792231
* Avoid a memory leakMatthias Clasen2018-01-051-1/+1
| | | | | | | | We call pango_fc_font_key_init on a stack-allocated temporary lookup key, with the expectation that it does not have to be freed. In the case where we want to use it as key in the font_hash, we call copy() on it. So, don't duplicate the variations string in init() - it will get duplicated in copy() later.
* [fc] Use FcWeightFrom/ToOpenTypeDouble() if availableBehdad Esfahbod2018-01-031-58/+13
|
* [cairo] Don't set font variations on cairo_font_options_tBehdad Esfahbod2018-01-031-9/+0
| | | | | | | We pass them in through FcPattern to the cairo_face already, no need to pass here again. Yeah, I know... /tears
* [fc] Only set variations if non-emptyBehdad Esfahbod2018-01-032-3/+5
|
* [fc] Request variable fonts from fontconfigBehdad Esfahbod2018-01-031-0/+3
|
* Add initial support for OpenType font variationsMatthias Clasen2018-01-036-15/+288
| | | | | | | | This commit lets PangoFontDescription carry font variation information as a string. Only pangocairo has been updated to make use of this information. We pass it to harfbuzz for shaping, and we pass it to cairo when creating scaled fonts.
* Remove declarations for non-existing functionsKhaled Hosny2017-12-011-13/+0
|
* Drop unused _pango_ft2_ft_strerrorKhaled Hosny2017-12-012-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function is unused since 2004! Last use was dropped in commit 2cdd74591a2b885dbc31292d20dabba81d42faf0. Currently it is just causing compiler warnings: [40/111] Compiling C object 'pango/pangoft2-1.0@sha/pangoft2.c.o'. /usr/include/freetype2/freetype/fterrdef.h: In function ‘_pango_ft2_ft_strerror’: /usr/include/freetype2/freetype/fterrdef.h:235:17: warning: initializer-string for array of chars is too long "found FDEF or IDEF opcode in glyf bytecode" ) ^ ../pango/pangoft2.c:537:38: note: in definition of macro ‘FT_ERRORDEF’ #define FT_ERRORDEF( e, v, s ) { e, s }, ^ /usr/include/freetype2/freetype/fterrdef.h:234:3: note: in expansion of macro ‘FT_ERRORDEF_’ FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, ^~~~~~~~~~~~ /usr/include/freetype2/freetype/fterrdef.h:235:17: note: (near initialization for ‘ft_errors[75].msg’) "found FDEF or IDEF opcode in glyf bytecode" ) ^ ../pango/pangoft2.c:537:38: note: in definition of macro ‘FT_ERRORDEF’ #define FT_ERRORDEF( e, v, s ) { e, s }, ^ /usr/include/freetype2/freetype/fterrdef.h:234:3: note: in expansion of macro ‘FT_ERRORDEF_’ FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, ^~~~~~~~~~~~
* [pangocairo] Pick up font-options from cairo_tBehdad Esfahbod2017-11-221-0/+13
| | | | | | | | Now one can use cairo_set_font_options(), whereas before they had to use pango_cairo_context_set_font_options(). If the latter is used, it will override the former. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=790747
* Fix is_char_break issue in pango_default_break functionPeng Wu2017-11-151-6/+4
| | | | | | For most cases, the is_char_break variable should be TRUE. https://bugzilla.gnome.org/show_bug.cgi?id=789625
* Fix parameter name to match implementationMatijs van Zuijlen2017-10-271-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781857
* Update pango_default_break function for Line BreakPeng Wu2017-10-271-459/+421
| | | | | | Support Line Break of Unicode 9.0. https://bugzilla.gnome.org/show_bug.cgi?id=788115
* PangoLayout: Optimize pango_layout_get_baselineTimm Bäder2017-10-271-5/+6
| | | | | | | | | | | | | | The baseline is the baseline of the first line of text in the layout, so we can simply _get_extents_internal and use the extents of the first line we get from that. This is not a perfect solution (e.g. gtk+ calls pango_layout_get_extents before a pango_layout_get_baseline call and the former calls get_extents_internal anyway, so we compute the extents twice...) but it improves the situation pointed out by the comment in pango_layout_get_baseline. https://bugzilla.gnome.org/show_bug.cgi?id=788643
* PangoLayoutIter: Allocate an array of Extents instead of a linked listTimm Bäder2017-10-272-59/+42
| | | | | | | | Since PangoLayout caches the amount of lines it contains in ->line_count, we can use this to pre-allocate an Extents array of the appropriate size. https://bugzilla.gnome.org/show_bug.cgi?id=788643
* layout/renderer: Don't heap-allocate short lived layout iteratorsTimm Bäder2017-10-272-35/+37
| | | | | | | Use the new _pango_layout_get_iter and _pango_layout_iter_destroy instead. https://bugzilla.gnome.org/show_bug.cgi?id=788643
* layout: Move PangoLayouIter struct to private headerTimm Bäder2017-10-272-57/+80
| | | | | | | And add _pango_layout_get_iter as well as _pango_layout_iter_destroy that can be used for internal, stack allocated PangoLayoutIters. https://bugzilla.gnome.org/show_bug.cgi?id=788643
* meson: Add required gir dependencies to fix broken buildRico Tzschichholz2017-09-251-6/+18
|
* Fix warningBehdad Esfahbod2017-09-181-7/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787194
* meson: Rework gir/typelib generation and dependenciesNirbheek Chauhan2017-09-111-43/+34
| | | | | | | | | | Don't use --include-uninstalled, it's not needed with Meson because we take care of inter-gir target dependencies. Add girs and typelibs to the relevant libpango*_dep declared dependencies so that they can be used via subprojects. https://bugzilla.gnome.org/show_bug.cgi?id=787414
* meson: Build .rc files on WindowsChun-wei Fan2017-09-095-4/+43
| | | | | | | | Like the autotools builds, build the .rc files for the PangoCairo, PangoFT2, PangoWin32 and Pango DLLs so that people can see the version info more easily. https://bugzilla.gnome.org/show_bug.cgi?id=783274
* Fix multilib issue in pango-enum-types.h.templateAkira TAGOH2017-08-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=786887
* Fix pango_default_break function for sentence start/endPeng Wu2017-08-301-10/+29
| | | | | | Skip the space characters in sentence start/end. https://bugzilla.gnome.org/show_bug.cgi?id=785978
* Fix backspacing for more Emoji sequencesMatthias Clasen2017-08-171-1/+4
| | | | | | | Behdad pointed out that I didn't get it right for flags and for sequences ending in a skin tone modifier. Fix that.
* Fix backspace-deletes-character for EmojiMatthias Clasen2017-08-151-3/+11
| | | | | | | | We want to delete the entire cluster if it is an Emoji. To do so, look at prev_GB_type to find Emoji. This fixes backspacing for sequences like "man health worker" or "family: man, woman, boy, girl".
* break: Stop lumping ZWJ with ExtendMatthias Clasen2017-08-151-11/+26
| | | | | | | | | | ZWJ is treated as its own class in TR29, and us lumping them together and then manually checking wc == 0x200d in various places was causing us to inadvertedly inserting grapheme breaks in the middle of Emoji ZWJ sequences where they are not suppose to be. Add test cases to verify this.
* break.c: Fix indentation a bitMatthias Clasen2017-08-151-97/+96
| | | | | Messed up whitespace makes this unwieldy function even harder to read.
* CoreText: Remove absolute size and scaling to screen resolution.John Ralls2017-08-155-65/+34
| | | | | | | | | | | | | Cairo's CGFont backend already handles scaling fonts to the display resolution, so scaling to the screen screen resolution in Pango's CoreText backend generates double-sized text on a Retina display. The layout test depended on providing a (bogus) resolution of 96DPI and scaling the font to it in order to obtain the "expected" layout results. This is replaced by adjusting the font size in test-layout.c if Pango is compiled for CoreText. https://bugzilla.gnome.org/show_bug.cgi?id=782393
* mini-fribidi: Squash -Werror=undef failures due to use of #ifPhilip Withnall2017-08-141-0/+9
| | | | | | | | | | | | The FriBiDi code uses #if rather than #ifdef, which pedantic compilers warn about if the macro is undefined. The new Meson build sets -Werror=undef, promoting these warnings to failures, and making CI systems using certain compiler versions (in this case, Debian Jessie) sad. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=786192
* Support variation selectors for shapingMatthias Clasen2017-08-121-1/+22
| | | | | This is necessary to make some emoji sequences shape and render correctly.
* Bug 784243 - Pango gravity is not applied on markup with multiple spans.Behdad Esfahbod2017-08-111-3/+1
| | | | Patch from Harioum Pratap Singh.
* Update emoji data to version 5Behdad Esfahbod2017-08-111-10/+42
|
* Simplify hb_buffer_set_flags()Behdad Esfahbod2017-08-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a 2014 HarfBuzz commit: commit 763e5466c0a03a7c27020e1e2598e488612529a7 Author: Behdad Esfahbod <behdad@behdad.org> Date: Sat Aug 2 16:17:44 2014 -0400 Make it easier to use HB_BUFFER_FLAG_BOT/EOT Previously, we expected users to provide BOT/EOT flags when the text *segment* was at paragraph boundaries. This meant that for clients that provide full paragraph to HarfBuzz (eg. Pango), they had code like this: hb_buffer_set_flags (hb_buffer, (item_offset == 0 ? HB_BUFFER_FLAG_BOT : 0) | (item_offset + item_length == paragraph_length ? HB_BUFFER_FLAG_EOT : 0)); hb_buffer_add_utf8 (hb_buffer, paragraph_text, paragraph_length, item_offset, item_length); After this change such clients can simply say: hb_buffer_set_flags (hb_buffer, HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT); hb_buffer_add_utf8 (hb_buffer, paragraph_text, paragraph_length, item_offset, item_length); Ie, HarfBuzz itself checks whether the segment is at the beginning/end of the paragraph. Clients that only pass item-at-a-time to HarfBuzz continue not setting any flags whatsoever. Another way to put it is: if there's pre-context text in the buffer, HarfBuzz ignores the BOT flag. If there's post-context, it ignores EOT flag.
* docs: Use Markdown instead of DocbookEmmanuele Bassi2017-08-091-9/+9
| | | | | | | The example code is not correctly escaped, and gtk-doc has become slightly more strict. This is a good chance to port this bit of the API reference to Markdown, and avoid all issues in a future without inlined XML.
* fix build with mesonAlberts Muktupāvels2017-08-011-0/+1
|
* Choose emoji font for color emojiBehdad Esfahbod2017-07-312-11/+50
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785566
* Add data files and routines for emoji itemizationBehdad Esfahbod2017-07-314-0/+721
| | | | | | Ported from Chromium. Not hooked yet.
* Update pango_default_break function for Sentence BoundaryPeng Wu2017-07-311-443/+305
| | | | | | | Re-write the code for Sentence Boundary, and use the code style like Grapheme Boundary and Word Boundary. https://bugzilla.gnome.org/show_bug.cgi?id=782813