summaryrefslogtreecommitdiff
path: root/pango/pango-renderer.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Tweak renderer docsMatthias Clasen2021-03-111-19/+19
| | | | Add summaries, convert markup, etc.
* docs: Port PangoRenderer to the new doc formatMatthias Clasen2021-03-111-381/+384
| | | | Replace gtk-doc'isms and use gi-docgen links instead.
* docs: Move PangoRenderer docs to the right fileMatthias Clasen2021-03-111-0/+12
|
* docs: Replace lots of vestigial xml markupMatthias Clasen2021-03-111-3/+3
| | | | | We want to use pure markdown, since docbook is going away as the intermediate format.
* renderer: Move overline to priv data structureSimon McVittie2020-08-161-11/+12
| | | | | | | | | | This reverts the ABI break caused by adding the overline to the public data structure, and is binary- and source-compatible with Pango 1.45.0 and older, but not compatible with versions 1.45.1 to 1.46.0 inclusive. Resolves: https://gitlab.gnome.org/GNOME/pango/-/issues/497 Bug-Debian: https://bugs.debian.org/968337 Signed-off-by: Simon McVittie <smcv@debian.org>
* renderer: Fix a division-by-zeroMatthias Clasen2020-06-081-3/+10
| | | | | | | | We need to check if height is zero before dividing by it. For completeness, check width at the same time. This was pointed out in https://gitlab.gnome.org/GNOME/pango/-/merge_requests/167
* Replace fallthrough comments with G_GNUC_FALLTHROUGHTimm Bäder2020-04-141-1/+1
|
* Don’t use underline position in overlinesKhaled Hosny2019-11-021-2/+1
| | | | | | This matches what web browsers do. Fixes https://gitlab.gnome.org/GNOME/pango/issues/432
* renderer: Implement overlinesMatthias Clasen2019-10-311-1/+120
| | | | | | | Implement overlines in PangoRenderer. This adds a new render part, and mirrors the machinery we have for underlines and strikethrough.
* Draw strikethrough continuouslyMatthias Clasen2019-10-311-13/+17
| | | | | | Average strikethrough position and thickness across consecutive struckthrough runs. This gives an OK result in common cases.
* renderer: Handle new underline valuesMatthias Clasen2019-10-311-0/+15
| | | | | | | Handle these by using the lowest position across a sequence of runs with the same underline. Closes: https://gitlab.gnome.org/GNOME/pango/issues/62
* doc cleanupsMatthias Clasen2019-07-231-2/+2
| | | | Clean up some headers, and shovel docs around.
* Drop deprecated instance private data APIEmmanuele Bassi2018-08-301-6/+3
| | | | | | | GLib 2.58 deprecated g_type_class_add_private(), at long last. Use the G_ADD_PRIVATE macro, and the generated instance private data getter function.
* layout/renderer: Don't heap-allocate short lived layout iteratorsTimm Bäder2017-10-271-7/+8
| | | | | | | Use the new _pango_layout_get_iter and _pango_layout_iter_destroy instead. https://bugzilla.gnome.org/show_bug.cgi?id=788643
* 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
* pango/pango-renderer.c: Fix BuildChun-wei Fan2015-09-041-2/+2
| | | | | Some compilers insist on using a number for a guint16 return type, and does not like using NULL in place of 0, so fix this.
* Add alpha support to PangoRendererMatthias Clasen2015-08-111-0/+70
| | | | | | Add pango_renderer_get/set_alpha to allow associating alpha values with the various colors. The alpha is stored as a value between 0 and 65536, with 0 meaning 'unset'.
* Add many missing nullability annotations.Evan Nemerson2014-10-161-11/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Revert "Fix leftover markup in docs"Matthias Clasen2014-08-301-1/+1
| | | | This reverts commit 19a252d9a3d63e7816f9a77bab65bd161675440a.
* Fix leftover markup in docsMatthias Clasen2014-08-301-1/+1
|
* TypoBehdad Esfahbod2014-05-081-1/+1
| | | | Oops
* Bug 729840 - Missing annotation for get_colorBehdad Esfahbod2014-05-081-2/+2
|
* More churnBehdad Esfahbod2012-08-281-1/+1
|
* introspection: assorted fixes to avoid regressions in Vala bindingsEvan Nemerson2012-08-121-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=681423
* Bug 652841 - Various pieces of dead code found by gcc/clang static analyzerBehdad Esfahbod2011-06-171-1/+0
|
* Stop using G_CONST_RETURN in PangoRyan Lortie2011-06-091-1/+1
| | | | | | | G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop using it in Pango. https://bugzilla.gnome.org/show_bug.cgi?id=652202
* pango/pango-renderer.c: parent_class is already defined in ↵Javier Jardón2011-04-301-5/+1
| | | | G_DEFINE_ABSTRACT_TYPE
* Fixing (transfer none) introspection annotation for the return value in ↵Alberto Ruiz2011-04-251-1/+1
| | | | pango_renderer_get_layout
* adding allow-none introspection metadata to pango_renderer_set_matrixAlberto Ruiz2011-04-251-1/+1
|
* adding allow-none introspection metadata to pango_renderer_set_colorAlberto Ruiz2011-04-251-1/+1
|
* adding allow-none introspection metadata to pango_renderer_draw_glyph_itemAlberto Ruiz2011-04-251-1/+1
|
* Bug 560792 – Make PangoLayoutLine with line->layout==NULL renderableBehdad Esfahbod2009-01-281-15/+21
| | | | | | | | | | | | 2009-01-28 Behdad Esfahbod <behdad@gnome.org> Bug 560792 – Make PangoLayoutLine with line->layout==NULL renderable * pango/pango-renderer.c (pango_renderer_draw_layout_line), (pango_renderer_draw_glyph_item), (pango_renderer_set_matrix): Handle line->layout == NULL. svn path=/trunk/; revision=2814
* Bug 469049 – Fix all compiler warningsBehdad Esfahbod2008-12-261-13/+12
| | | | | | | | | | | | | | | | | | | | | 2008-12-25 Behdad Esfahbod <behdad@gnome.org> Bug 469049 – Fix all compiler warnings * pango-view/viewer-pangocairo.c (render_callback): * pango/fonts.c (append_field), (pango_font_description_to_string): * pango/opentype/harfbuzz-dump.c: * pango/pango-bidi-type.c (pango_log2vis_get_embedding_levels): * pango/pango-coverage.c (pango_coverage_set): * pango/pango-markup.c (span_parse_func): * pango/pango-renderer.c (pango_renderer_default_draw_error_underline): * pango/pango-utils.c (pango_scan_string): * pango/pangocairo-render.c (pango_cairo_renderer_draw_trapezoid), (draw_error_underline), (pango_cairo_renderer_class_init): Fix all the remaining warnings. svn path=/trunk/; revision=2767
* Fix warnings.Behdad Esfahbod2008-12-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-12-25 Behdad Esfahbod <behdad@gnome.org> * pango/break.c (pango_default_break): * pango/fonts.c (find_field_any), (pango_font_class_init), (pango_font_init), (pango_font_metrics_ref), (pango_font_metrics_unref), (pango_font_family_class_init), (pango_font_family_init), (pango_font_face_class_init), (pango_font_face_init): * pango/pango-attributes.c (pango_attr_list_ref), (pango_attr_list_unref), (pango_attr_iterator_get_font): * pango/pango-layout.c (pango_layout_set_height), (extents_free), (no_shape_filter_func), (pango_layout_line_ref), (pango_layout_line_unref), (pango_layout_get_item_properties): * pango/pango-markup.c (end_element_handler), (text_handler), (b_parse_func), (big_parse_func), (span_parse_func), (i_parse_func), (markup_parse_func), (s_parse_func), (sub_parse_func), (sup_parse_func), (small_parse_func), (tt_parse_func), (u_parse_func): * pango/pango-ot-info.c (get_glyph_class): * pango/pango-renderer.c (get_item_properties), (pango_renderer_default_prepare_run): * pango/pango-utils.c (_pango_shape_shape): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_get_font_type), (pango_cairo_fc_font_map_context_substitute), (pango_cairo_fc_font_map_context_key_get), (pango_cairo_fc_font_map_context_key_copy), (pango_cairo_fc_font_map_context_key_free), (pango_cairo_fc_font_map_context_key_hash), (pango_cairo_fc_font_map_context_key_equal): * pango/pangocairo-fontmap.c (pango_cairo_font_map_new_for_font_type), (pango_cairo_font_map_set_default): * pango/pangocairo-render.c (pango_cairo_renderer_init): * pango/pangox-fontcache.c (free_cache_entry): * pango/pangox-fontmap.c (close_display_cb), (list_families_foreach), (pango_x_font_map_load_font), (ignore_error): * pango/pangox.c (average_width_foreach), (subfonts_foreach), (pango_x_font_find_shaper), (pango_x_get_unknown_glyph), (pango_x_get_item_properties), (pango_x_apply_ligatures), (pango_x_font_get_unknown_glyph): * pango/pangoxft-fontmap.c (pango_xft_font_map_init), (close_display_cb): * pango/querymodules.c (show_version): Fix warnings. svn path=/trunk/; revision=2765
* Bug 563803 – pango_renderer_finalize fails to call parent finalizeBehdad Esfahbod2008-12-091-12/+24
| | | | | | | | | | | | | | | | 2008-12-09 Behdad Esfahbod <behdad@gnome.org> Bug 563803 – pango_renderer_finalize fails to call parent finalize * pango/pango-renderer.c (pango_renderer_class_init), (pango_renderer_finalize): Call parent finalize. * pango/pango-renderer.c (add_strikethrough), (pango_renderer_default_draw_glyph_item), (pango_renderer_default_draw_error_underline): Clean up a bit. svn path=/trunk/; revision=2755
* Improve docs.Behdad Esfahbod2008-08-061-1/+1
| | | | svn path=/trunk/; revision=2677
* New public API:Behdad Esfahbod2008-08-061-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-30 Behdad Esfahbod <behdad@gnome.org> * docs/pango-sections.txt: * docs/tmpl/pango-renderer.sgml: * pango/pango-renderer.c: * pango/pango-renderer.h: New public API: PangoRenderer::draw_glyph_item() pango_renderer_draw_glyph_item() Make layout and layout-line default renderers go through draw_glyph_item(), which then by default falls back to draw_glyphs(). The advantage in draw_glyph_item() is that it has access to the text and cluster information. * pango/pangocairo.h: * pango/pangocairo-render.c: New public API: pango_cairo_show_glyph_item() svn path=/trunk/; revision=2674
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Behdad svn path=/trunk/; revision=2657
* Bug 472629 – Add pango_renderer_get_layout(_line)Behdad Esfahbod2007-10-241-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | 2007-10-24 Behdad Esfahbod <behdad@gnome.org> Bug 472629 – Add pango_renderer_get_layout(_line) * pango/pango-renderer.h: * pango/pango-renderer.c: New public API: pango_renderer_get_layout() pango_renderer_get_layout_line() * pango/pangocairo-render.c (pango_cairo_renderer_draw_shape), (release_renderer), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Use above API to simplify shape_renderer implementation. * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/pango-renderer.sgml: Update. svn path=/trunk/; revision=2460
* Bug 468953 – pango-renderer.c: using function without prototypeBehdad Esfahbod2007-08-211-0/+1
| | | | | | | | | | | 2007-08-21 Behdad Esfahbod <behdad@gnome.org> Bug 468953 – pango-renderer.c: using function without prototype * pango/pango-renderer.c: #include <pango-impl-utils.h> svn path=/trunk/; revision=2412
* Bug 467056 – Shape attribute handling is not consistentBehdad Esfahbod2007-08-151-3/+7
| | | | | | | | | | | | | | | | | | | 2007-08-15 Behdad Esfahbod <behdad@gnome.org> Bug 467056 – Shape attribute handling is not consistent * pango/pango-impl-utils.h: * pango/pango-layout.c (pango_layout_line_index_to_x), (shape_run), (pango_layout_line_x_to_index), (pango_layout_run_get_extents), (update_run): * pango/pango-renderer.c (pango_renderer_draw_layout_line): * pango/pango-utils.c (_pango_shape_shape), (_pango_shape_get_extents): Fix handling of extents for shaped runs. Previsouly a shaped run with more than one character was not correctly positioned. svn path=/trunk/; revision=2401
* Fix various typos reported by Peter Moulder.Behdad Esfahbod2007-06-031-1/+1
| | | | | | | | | | | | | 2007-06-03 Behdad Esfahbod <behdad@gnome.org> * docs/tmpl/main.sgml: * pango/pango-layout.c (process_item): * pango/pango-ot-info.c: * pango/pango-renderer.c (pango_renderer_draw_layout_line): Fix various typos reported by Peter Moulder. svn path=/trunk/; revision=2329
* Move PANGO_UNITS_ROUND here... ...from here.Behdad Esfahbod2007-04-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-04-30 Behdad Esfahbod <behdad@gnome.org> * pango/pango-types.h: Move PANGO_UNITS_ROUND here... * pango/pangofc-private.h: ...from here. * pango/pango-gravity.c: Document that pango_gravity_to_rotation() returns angle in radians but pango_matrix_rotate() takes degrees. * pango/pango-layout.c (pango_layout_run_get_extents): * pango/pango-renderer.c (pango_renderer_draw_layout_line): Retain metrics hinting when centering baseline (used for Latin, etc in vertical mode). * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init): Respect metrics hinting setting when moving glyphs around for vertical writing. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Apply the gravity rotation before the pattern's matrix, such that vertical text gets correct italic direction. * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): Make hexbox font inherit most properties from the current font. That is, bold hexbox digits for a bold font, etc. svn path=/trunk/; revision=2238
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-6/+6
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Replace preceding sequences of 8 spaces with tabs. svn path=/trunk/; revision=2165
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-161-72/+72
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Fix background rendering being off in presence of rise attributes.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * pango/pango-renderer.c (pango_renderer_draw_layout_line): Fix background rendering being off in presence of rise attributes. svn path=/trunk/; revision=2148
* Don't introduce bitfields in public struct and rename PangoAnalysis.Behdad Esfahbod2007-01-081-2/+2
| | | | | | | | | | | | | | | | | | 2007-01-08 Behdad Esfahbod <behdad@gnome.org> * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: * docs/tmpl/main.sgml: * pango/pango-context.c (itemize_state_add_character): * pango/pango-item.h: * pango/pango-layout.c (pango_layout_run_get_extents): * pango/pango-renderer.c (pango_renderer_draw_layout_line): Don't introduce bitfields in public struct and rename PangoAnalysis. centered_baseline to PangoAnalysis.flags and introduce PANGO_ANALYSIS_FLAGS_CENTERED_BASELINE. svn path=/trunk/; revision=2134
* Spell-check the docs.Behdad Esfahbod2007-01-071-2/+2
| | | | svn path=/trunk/; revision=2130
* Add new functions: pango_layout_iter_get_line_readonly()Behdad Esfahbod2006-12-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 2006-12-05 Behdad Esfahbod <behdad@gnome.org> * docs/pango-sections.txt: * docs/tmpl/layout.sgml: * pango/pango-layout.c (pango_layout_get_lines_readonly), (pango_layout_get_line_readonly), (pango_layout_iter_get_run_readonly), (_pango_layout_iter_get_line), (pango_layout_iter_get_line), (pango_layout_iter_get_line_readonly): * pango/pango-layout.h: * pango/pango-renderer.c (pango_renderer_draw_layout): * pango/pango.def: Add new functions: pango_layout_iter_get_line_readonly() pango_layout_get_lines_readonly() pango_layout_iter_get_line_readonly() pango_layout_iter_get_run_readonly() These should be used when you do not intend to modify the run/line, which is more than most of the time. So, update your app, benefit from more optimizations (in this case, line extents caching)!