summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
...
* Update pango_default_break function for Word BoundaryPeng Wu2017-07-311-16/+59
| | | | | | | Improve Word Boundary Rule for Hebrew_Letter, Single_Quote, Double_Quote and Regional Indicator. https://bugzilla.gnome.org/show_bug.cgi?id=782813
* Update pango_default_break function for Emoji ZWJ sequencePeng Wu2017-07-311-1/+116
| | | | | | Support Grapheme Boundaries Rule GB10, GB11, GB12 and GB13. https://bugzilla.gnome.org/show_bug.cgi?id=782813
* pango: Support emoji sequence in UnicodePeng Wu2017-07-291-0/+27
| | | | | | | | | | | Checked several emoji sequences, the sequence pattern is like follows: 1. Use zero width joiner to combine two characters with any width 2. Ignore the width of variation selector, tag and emoji modifier for the purposes of finding a run or uniform-width characters. https://bugzilla.gnome.org/show_bug.cgi?id=780669
* Fix typo in meson build supportuserwithuid2017-07-251-2/+2
| | | | | | The keyword is called symbol_prefix, not symbols_prefix. https://bugzilla.gnome.org/show_bug.cgi?id=785296
* Don't check array for NULLTing-Wei Lan2017-07-181-1/+1
| | | | | | | Arrays can never be NULL, and doing unnecessary checking causes compilers to show warnings. https://bugzilla.gnome.org/show_bug.cgi?id=783428
* Cast enum to int before doing calculationTing-Wei Lan2017-07-181-2/+2
| | | | | | | | It seems that it is possible for compilers to use unsigned interger types to store enum values, so we should cast them to signed interger types before doing calculation to avoid getting unexpected results. https://bugzilla.gnome.org/show_bug.cgi?id=783428
* Drop an questionable G_UNLIKELYMatthias Clasen2017-06-301-1/+1
| | | | Owen and I agreed that this doesn't look right.
* Don't throw away text prematurelyMatthias Clasen2017-06-301-1/+1
| | | | | | | | | | | When calling into cairo to render glyphs, we want to use show_text_glyphs and pass the text along, if the surface supports that operation. But here, we throw the text away prematurely and end up always end passing no text or clusters down to cairo. https://bugzilla.gnome.org/show_bug.cgi?id=784394
* trivial: fix a typoMatthias Clasen2017-06-301-1/+1
| | | | s/bytess/bytes/ in a warning.
* Ignore undefined macros when importing freetype / 2Emmanuele Bassi2017-05-312-0/+9
| | | | Missing inclusions of freetype via Cairo.
* Ignore undefined macros when importing freetypeEmmanuele Bassi2017-05-313-0/+13
| | | | | | Recently, freetype added checks for various options and forgot to check all combinations. This breaks building projects including freetype.h and using -Werror=undef.
* [break-thai] Fix two bugs in libthai glue layerBehdad Esfahbod2017-05-231-1/+6
| | | | | | | | | | | | | | | | | | | First bug is, we were passing as count to th_brk, the UTF-8 length instead of TIS length. Ouch! I'm not sure how this was never caught... The other one was, break-thai was possibly marking a position is_line_break when break.c has already set it to is_char_break=FALSE. This broke the invariant that if a position is line-break, then it must be char-break as well. This, in turn was hitting assertions in certain conditions. Hit it with this for example: $ ./pango-view --text 'ส์" (S' --width 43 --font 156px Note that in a correct world the Latin part of that string should not reach break-thai.c at all, but that's not how pango-layout.c breaks right now. See comment before pango_break() call in pango-layout.c.
* Unmark private symbols as exportedEmmanuele Bassi2017-05-232-3/+0
| | | | | | | | Commit ce097c062ea079bf7888d2b2f1f7b17d34f976b6 was a bit too eager to mark symbols as public, and marked some internal functions as exported. If a symbol has an underscore prefix it generally means it's not meant to be public.
* meson: Remove the pango enums type from the sub-librariesEmmanuele Bassi2017-05-231-5/+5
| | | | | | | | | Sub-libraries need to be built after pango-enum-types.h has been generated; we already have a transitive dependency on the header through libpango_dep, so we do not need to add the header to the list of sources. This avoids symbols leaking in the sub-libraries.
* Don't change fonts for variation selectorsBehdad Esfahbod2017-05-221-1/+6
| | | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=781123 Patch from Takao Fujiwara.
* meson: Generate correct sonamesJan Alexander Steffens (heftig)2017-05-221-0/+5
| | | | | "soversion:" is for the version placed in the soname. The full library revision goes into "version:". This affects the symlinks, too.
* meson: Use only spaces for indentJan Alexander Steffens (heftig)2017-05-221-8/+8
| | | | This was an inconsistent mix of tabs and spaces.
* Use the appropriate symbols for the version stringEmmanuele Bassi2017-05-221-1/+1
| | | | | We need to use the `@...@` pattern so that Meson can replace the symbols.
* build: Drop the 'lib' prefix from shared librariesEmmanuele Bassi2017-05-221-4/+4
| | | | Meson adds it by itself, where appropriate.
* meson: Add a few missing things, minor fixes, TODONirbheek Chauhan2017-05-192-6/+4
|
* build: Add Meson build systemEmmanuele Bassi2017-05-193-0/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson is a meta build system that is: - fast - simpler to understand and use - portable to multiple platforms through different backends - well integrated with the GNOME platform - well maintained Using Meson allows us to build Pango much more quickly, and on all the platforms we currently target, without any loss of functionality, compared to Autotools. Some timing comparisons with hot ccache for both build systems: * autogen.sh: * meson real 0m11.149s real 0m2.525s user 0m8.153s user 0m1.609s sys 0m2.363s sys 0m1.206s * make -j$(($(nproc) + 2)) * ninja real 0m9.186s real 0m3.387s user 0m16.295s user 0m6.887s sys 0m5.337s sys 0m1.318s -------------------------------------------------------------- * autotools * meson + ninja real 0m27.669s real 0m5.772s user 0m45.622s user 0m8.465s sys 0m10.698s sys 0m2.357s System: Intel Core i7-7500U, SSD, 16GB of RAM
* ft2: Silence a compiler warningEmmanuele Bassi2017-05-191-1/+1
|
* Add prototype for _pango_color_parse_with_alpha()Emmanuele Bassi2017-05-193-13/+13
| | | | | | | | It's used in pango-markup.c and pango-color.c, so it should have an internally-available prototype, instead of an `extern` declaration at the point of use. This also avoids a compiler warning for a missing prototype.
* Correctly implement version macros for PangoEmmanuele Bassi2017-05-191-128/+135
| | | | | | | | | | | | | First of all, we need to define `PANGO_UNAVAILABLE`, as it's missing a definition, and the only reason why nobody caught this is because we're building without -Wundef, and clearly nobody attempted using min-required/max-allowed with Pango. Additionally, we really need a way to disable deprecation warnings from the compiler. The complete implementation of the version macros for GLib-based libraries includes both items above.
* Don't use deprecated hb_font_funcs_set_glyph_func()Behdad Esfahbod2017-04-171-5/+6
|
* Avoid a compiler warningMatthias Clasen2017-04-081-1/+1
| | | | | The compiler complains that rightmost_space may be used uninitialized. And it may be right.
* docs: Fix some introspection annotation syntaxPhilip Withnall2017-04-083-4/+4
| | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778663
* docs: Add (skip) annotation to some non-introspectable deprecated funcsPhilip Withnall2017-04-082-6/+6
| | | | | | | | | To make it a bit more explicit that there’s no need to worry about introspecting them. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778663
* docs: Add a few missing (transfer) annotationsPhilip Withnall2017-04-082-4/+5
| | | | | | | | | This should fix a few scanner warnings, but this is not an attempt to fix them all. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778663
* pango-utils: Fix non-escaped \r\n line endings in pango_read_line()Philip Withnall2017-04-081-1/+2
| | | | | | | | | | | | The handling for \r or \r\n line endings in pango_read_line() was broken. It should have discarded the \r or \r\n, but was only doing this for \n or \n\r. The condition (c == EOF) could never have been reached. Coverity ID: 1391696 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778816
* attributes: Make alpha work without colorMatthias Clasen2017-04-081-8/+29
| | | | | | | Improve the behavior of the cairo renderer to take alpha into account even if no color specified. https://bugzilla.gnome.org/show_bug.cgi?id=773767
* Win32: Remove "uncolored" from docsNicolas Hake2017-04-071-2/+2
| | | | | | | Since win32_render_layout and win32_render_layout_line now support rendering in color, that word no longer applies. https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Win32: Fix background rect boundsNicolas Hake2017-04-071-2/+2
| | | | | | | | Rectangle() uses x1, y1, x2, y2 coordinates instead of x, y, w, h. Fix the coordinates passed to the function so it draws the background in the correct location. https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Win32: Draw background box in correct colorNicolas Hake2017-04-071-9/+9
| | | | | | | Adding 128 to the component value would overflow in colors with full brightness and set the component to 0. https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Win32: Reset BkMode so ETO doesn't draw its ownNicolas Hake2017-04-071-0/+3
| | | | | | | | | If the DC's background mode is set to OPAQUE, ExtTextOut will draw its own background boxes around glyph items. Since we don't place any requirements on the DC, set the background mode to TRANSPARENT before rendering any glyphs (and reset it to its original value afterwards). https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Win32: Enable colored underline drawingNicolas Hake2017-04-071-3/+32
| | | | | | | | | Underline drawing was using the pen selected into DC before pango_win32_render_layout_line was called. Since layout allow the user to select underline colors, we have to create a temporary pen in the correct color before drawing it. https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Win32: Enable rendering colored textNicolas Hake2017-04-071-10/+8
| | | | | | | | | Increasing the component values by 128 may overflow and result in that component being treated as 0. Additionally, using a brush to color text is wrong; ExtTextOut instead uses the color set by SetTextColor to draw glyphs. https://bugzilla.gnome.org/show_bug.cgi?id=768679
* Bug 779232 - Wrong introspection annotation for pango_layout_get_sizeBehdad Esfahbod2017-02-251-2/+2
|
* pango-layout: Add a clarifying assertionPhilip Withnall2017-02-161-0/+4
| | | | | | | | | | | | | | In pango_layout_index_to_pos(), it looks like layout_line could be dereferenced while still NULL in the first loop iteration. This is not the case, as other bits of PangoLayout ensure its start_index is always 0, so this branch is never taken. Add an assertion to clarify that and guide static analysis. Coverity ID: 1391700 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778656
* pango: Remove some unnecessary NULL checksPhilip Withnall2017-02-162-4/+1
| | | | | | | | | | | | | | | | These checks are preceded by other checks or code which demonstrates that the values are definitely always non-NULL. In the case of pango_attr_list_insert_internal(), the final branch of the function never needs to update list->attributes_tail, as the middle branch handles the case of appending to the list. The final case is just for insertions in the middle of the list. Coverity IDs: 1391710, 1391711 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778654
* Add assertions to guard against division by zero on sample text pathsPhilip Withnall2017-02-143-3/+15
| | | | | | | | | | | | | There are a few code paths where pango_utf8_strwidth() is called on language-specific sample text. The sample text should have been chosen to never have a zero width, but we should add some assertions to ensure that’s the case. This guides static analysers into the right analysis. Coverity IDs: 1391697, 1391698, 1391699 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778602
* pangofc-shape: Fix potential array overrunPhilip Withnall2017-02-141-4/+0
| | | | | | | | | | | | | | | If this loop adds the final feature to the features array, the start and end assignment for the next feature will drop off the end of the array. I don’t think the assignments are necessary, since num_features stores the number of elements in the array (so it doesn’t need to be terminated), and the start and end elements are assigned each time a feature is parsed. Coverity ID: 1391709 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778601
* Visual Studio builds: Move projects to win32/Chun-wei Fan2017-01-201-12/+12
| | | | | | | This allows one to go down one less level in the directory tree to get to the Visual Studio project files, and so make things more in line with the rest of the GTK+ stack. This also cleans up the Visual Studio 201x projects as there are some items that can be actually combined.
* Fix build on OS XMatthias Clasen2016-09-121-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=770729
* Fix exporting pango_cairo_win32_font_map_get_typePatrick Griffis2016-09-071-0/+1
| | | | | | Introduced with commit 1147da131ad13e583e73fed956e5c944e1497bf4 https://bugzilla.gnome.org/show_bug.cgi?id=771004
* Avoid deprecation warningsMatthias Clasen2016-08-297-8/+85
| | | | | Now that we're using new-style deprecations, we have to fight a little harder to get rid of them inside pango.
* pango/pango-version-macros.h: Update copyright noticeChun-wei Fan2016-08-221-3/+5
| | | | | | | Update the copyright notice of this file, to reflect things more accurately and to give more proper acknowledgement. Please see: https://bugzilla.gnome.org/show_bug.cgi?id=767587#c16
* Export symbols with compiler directives if possibleChun-wei Fan2016-06-297-643/+13
| | | | | | | | | | Add a configure check to see whether compiler directives are available for exporting symbols, and use them if so. Likewise, update the Visual Studio projects and config.h.win32.in to do likewise for Windows builds. We can then drop the .def files that were used to export symbols on Windows builds, which should clean up things a bit.
* pango/pango-enum-types.c.template: Include config.h firstChun-wei Fan2016-06-291-0/+2
| | | | | This is to ensure that we can override the verion macros to export the symbols later.
* Decorate the symbols in the headers with version macrosChun-wei Fan2016-06-2943-75/+601
| | | | | | | From the last commit, decorate all the symbols with the version macros. Also add the version macros in the docs. https://bugzilla.gnome.org/show_bug.cgi?id=767587