summaryrefslogtreecommitdiff
path: root/pango/pangocairo-render.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Convert gtk-doc syntax leftoversdocs-cleanupMatthias Clasen2021-05-191-7/+6
| | | | | Remove leftovers like #Type, reduce indentations to avoid markdown block quotes, etc.
* Revert "Merge branch 'fix-deadlocks' into 'master'"revert-1fedc11aMatthias Clasen2021-03-311-84/+0
| | | This reverts merge request !309
* Add dashed and dotted lineslinesMatthias Clasen2021-03-301-0/+84
| | | | | | | Extend the PangoUnderline and PangoOverline enumerations to cover dashed and dotted variants of the various lines, add api to PangoRenderer to render such lines, and implement it in the cairo renderer.
* pangocairo: Tweak docsMatthias Clasen2021-03-111-7/+21
| | | | Convert link syntax, and summaries.
* docs: Port PangoCairo apis to the new doc formatMatthias Clasen2021-03-111-26/+26
| | | | | | Replace gtk-doc'isms and use gi-docgen links instead. Cross-gir links are still an open issue.
* docs: Convert the pangocairo section to pango_cairo.mdMatthias Clasen2021-03-111-132/+0
|
* docs: Replace lots of vestigial xml markupMatthias Clasen2021-03-111-11/+10
| | | | | We want to use pure markdown, since docbook is going away as the intermediate format.
* pangocairo-render: Make a local constTimm Bäder2020-06-101-1/+1
| | | | | | | | Avoiding this warning: ../pango/pangocairo-render.c:506:19: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] for (row = 0, p = name; row < rows; row++) ^ ~~~~
* renderer: Implement overlinesMatthias Clasen2019-10-311-0/+2
| | | | | | | Implement overlines in PangoRenderer. This adds a new render part, and mirrors the machinery we have for underlines and strikethrough.
* cairo: Render visible space differentlyMatthias Clasen2019-07-251-0/+77
| | | | | | | | | Instead of a [SPC] hex box, just render a centered dot, as is commonly used to indicate space. Also render synthetic glyphs for tabs and newlines. This makes single-paragraph mode prettier.
* cairo: Better hex boxes for ignorablesMatthias Clasen2019-07-251-6/+20
| | | | | | For ignorable characters such as U+00AD, Soft Hyphen, render a hex box with their 'nickname', which is a 2-6 character short form such as SHY.
* Documentation tweaksMatthias Clasen2019-07-131-2/+2
|
* cairo: Don't render hex box for spaceMatthias Clasen2019-07-071-1/+6
| | | | | | Even if a font has no space glyph, we don't want to render a hex box for it, since just rendering nothing does a decent approximation of space.
* Header cleanupMatthias Clasen2019-07-041-0/+1
| | | | | | | Abolish the PANGO_ENABLE_BACKEND and PANGO_ENABLE_ENGINE defines. All backend-only apis are moved into private headers, all apis that were engine-only are marked as deprecated, since engines are.
* 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.
* trivial: fix a typoMatthias Clasen2017-06-301-1/+1
| | | | s/bytess/bytes/ in a warning.
* 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
* Add alpha support to PangoCairoRendererMatthias Clasen2015-08-111-4/+9
| | | | | | Make PangoCairoRenderer use cairo_set_source_rgba() to apply colors with alpha. Note that this means we are only using the alpha if the corresponding color has been set.
* Bug 750463 - hexboxes broken for some combining charactersBehdad Esfahbod2015-06-071-4/+6
| | | | Round lsb.
* Bug 750463 - hexboxes broken for some combining charactersBehdad Esfahbod2015-06-051-3/+6
|
* 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
|
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-0/+133
| | | | Patch from Rafał Mużyło.
* Fix a copy-paste errorMatthias Clasen2012-11-291-1/+1
| | | | This was spotted by Coverity.
* More churnBehdad Esfahbod2012-08-281-1/+1
|
* Annotations: add missing colons after symbol namesPavel Holejsovsky2012-06-041-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=677407
* Bug 652841 - Various pieces of dead code found by gcc/clang static analyzerBehdad Esfahbod2011-06-171-1/+0
|
* Bug 596837 - Typo in pango_cairo_show_layout documentationBehdad Esfahbod2009-09-301-1/+1
|
* Bug 469049 – Fix all compiler warningsBehdad Esfahbod2008-12-261-23/+62
| | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update to cairo-1.7.6 API.Behdad Esfahbod2008-09-221-2/+2
| | | | | | | | | | | 2008-09-22 Behdad Esfahbod <behdad@gnome.org> * configure.in: * pango/pangocairo-render.c (pango_cairo_renderer_show_text_glyphs), (save_current_point): Update to cairo-1.7.6 API. svn path=/trunk/; revision=2721
* Fix cluster iteration.Behdad Esfahbod2008-08-061-2/+2
| | | | | | | | | 2008-08-06 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyph_item): Fix cluster iteration. svn path=/trunk/; revision=2687
* Implement draw_glyph_item using cairo_show_text_glyphs().Behdad Esfahbod2008-08-061-85/+101
| | | | | | | | | | | | | | 2008-08-06 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (pango_cairo_renderer_show_text_glyphs), (pango_cairo_renderer_draw_glyphs), (pango_cairo_renderer_draw_glyph_item): Implement draw_glyph_item using cairo_show_text_glyphs(). * configure.in: Require cairo >= 1.7.1 svn path=/trunk/; revision=2686
* Oops.Behdad Esfahbod2008-08-061-1/+1
| | | | svn path=/trunk/; revision=2678
* Improve docs.Behdad Esfahbod2008-08-061-1/+1
| | | | svn path=/trunk/; revision=2677
* New public API:Behdad Esfahbod2008-08-061-4/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 501334 – Make pango_cairo_[show_]*[_path]() functions preserveBehdad Esfahbod2008-04-211-26/+43
| | | | | | | | | | | | | | | | | 2008-04-21 Behdad Esfahbod <behdad@gnome.org> Bug 501334 – Make pango_cairo_[show_]*[_path]() functions preserve current point * pango/pangocairo-render.c (_pango_cairo_renderer_draw_box_glyph), (_pango_cairo_renderer_draw_unknown_glyph), (acquire_renderer), (release_renderer), (save_current_point), (restore_current_point), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Preserve current point around pango_cairo_* functions(). svn path=/trunk/; revision=2602
* Bug 478914 – Use something invalid instead of '?' when validating inputBehdad Esfahbod2007-12-101-17/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-10 Behdad Esfahbod <behdad@gnome.org> Bug 478914 – Use something invalid instead of '?' when validating input text * pango/pango-layout.c (pango_layout_set_text): Set invalid input bytes to -1, which gives a unichar value of -1, and eventually a glyph value of -1, aka PANGO_GLYPH_INVALID_INPUT. * pango/fonts.c (pango_font_get_glyph_extents), (pango_font_get_metrics), (pango_font_get_font_map): * pango/modules.c (build_map): * pango/pango-context.c (get_script), (get_shaper_and_font), (string_from_script), (itemize_state_process_run): * pango/pango-coverage.c (pango_coverage_get): * pango/pango-impl-utils.h: * pango/pango-utils.c: * pango/pangocairo-font.c (pango_cairo_font_get_scaled_font), (_pango_cairo_font_private_get_hex_box_info), (_pango_cairo_font_private_get_glyph_extents_missing): * pango/pangocairo-private.h: * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame), (_pango_cairo_renderer_draw_box_glyph), (_pango_cairo_renderer_draw_unknown_glyph): * pango/pangofc-fontmap.c (pango_fc_font_map_get_patterns): * pango/pangoft2-private.h: * pango/pangoft2-render.c (pango_ft2_font_render_box_glyph), (pango_ft2_font_render_glyph), (pango_ft2_renderer_draw_glyph): * pango/pangoft2.c (pango_ft2_font_get_face), (pango_ft2_font_get_glyph_extents): * pango/pangox.c (pango_x_find_subfont), (pango_x_render): * pango/pangoxft-font.c (_pango_xft_font_get_mini_font), (get_glyph_extents_missing), (pango_xft_font_get_font): * pango/pangoxft-private.h: * pango/pangoxft-render.c (get_total_matrix), (draw_box), (_pango_xft_renderer_draw_box_glyph), (_pango_xft_renderer_draw_unknown_glyph), (pango_xft_renderer_draw_glyphs): * pango/shape.c (pango_shape): Render PANGO_GLYPH_INVALID_INPUT to a single-width box with a cross inside. Also cleanup spewed warnings and warn at the source, where we fail to find a shaper, instead of at every location that we see a NULL font. * pango/pango-font.h: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: New public macro: PANGO_GLYPH_INVALID_INPUT svn path=/trunk/; revision=2519
* Bug 472629 – Add pango_renderer_get_layout(_line)Behdad Esfahbod2007-10-241-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 347236 – provide pango_cairo_font_get_scaled_font Bug 347235 – AddBehdad Esfahbod2007-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-10 Behdad Esfahbod <behdad@gnome.org> Bug 347236 – provide pango_cairo_font_get_scaled_font Bug 347235 – Add pango_cairo_font_map_get_font_type Bug 353291 – Provide pango_cairo_font_map_new_for_font_type * pango/pangocairo-font.c: New public API: pango_cairo_font_get_scaled_font() * pango/pangocairo-fontmap.c: New public API: pango_cairo_font_map_new_for_font_type() pango_cairo_font_map_get_font_type() * pango/pangocairo-fcfontmap.c: Implement get_font_type() method. * pango/pangocairo.h: * pango/pangocairo-private.h: * docs/pango-sections.txt: * docs/tmpl/pangocairo.sgml: * pango/pangocairo.def: Update. svn path=/trunk/; revision=2336
* Bug 337593 – move glyph extents code (and cache) from pangocairo-*font.cBehdad Esfahbod2007-06-101-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-09 Behdad Esfahbod <behdad@gnome.org> Bug 337593 – move glyph extents code (and cache) from pangocairo-*font.c into pangocairo-font.c * pango/pangocairo-fontmap.c: * pango/pangocairo-fcfontmap.c: Remove per-fontmap renderer. We've not been using it for a while and there is no reason to use it. * pango/pangocairo-font.c * pango/pangocairo-fcfont.c: Most most code (including glyph extents caching) from fcfont.c to font.c. Simplifies individual backends a lot. ATSUI and Win32 cairo backends should adapt. * pango/pangocairo-render.c * pango/pangocairo-private.h: Update to reflect above changes. svn path=/trunk/; revision=2335
* New APIBehdad Esfahbod2007-05-041-1/+34
| | | | | | | | | | | | | | | | | | | | | 2007-05-04 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo.h: * pango/pangocairo-context.c: * pango/pangocairo-render.c: New API PangoCairoShapeRendererFunc and pango_cairo_context_[sg]et_shape_renderer() * docs/pango-sections.txt, docs/tmpl/pangocairo.sgml: Document new * API. * examples/Makefile.am, examples/cairoshape.c: New example to show off new API/feature. svn path=/trunk/; revision=2261
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-21/+21
| | | | | | | | | 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-54/+54
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Avoid some floating-point operations by caching the y value for theBehdad Esfahbod2006-12-181-8/+10
| | | | | | | | 2006-12-17 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Avoid some floating-point operations by caching the y value for the baseline, using it for glyphs having y_offset of 0.
* Improve upon last change. Suggested by Carl Worth: use cairo_rectangle(x +Behdad Esfahbod2006-12-041-11/+2
| | | | | | | | | 2006-12-04 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame): Improve upon last change. Suggested by Carl Worth: use cairo_rectangle(x + width, y, -width, height) to do a rectangle with the other orientation.
* Fix handling of boxes drawn in do_path mode. Previously we were doing oneBehdad Esfahbod2006-12-041-21/+54
| | | | | | | | | | | | | | 2006-12-04 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame), (_pango_cairo_renderer_draw_box_glyph), (_pango_cairo_renderer_draw_unknown_glyph): Fix handling of boxes drawn in do_path mode. Previously we were doing one rectangle and stroke it if in show mode, and leave it alone if in path mode. That doesn't really work. Now we do two rectangles, for the outer and inner rects of the box border, but with different orientations, such that pango_cairo_layout_path(); cairo_fill(); works for hexboxes now.
* Use G_LOCK_* wrappers for GStaticMutex.Behdad Esfahbod2006-11-301-3/+3
| | | | | | | 2006-11-30 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (acquire_renderer), (release_renderer): Use G_LOCK_* wrappers for GStaticMutex.
* Revert two of the cast changes from last commit, to make sure theBehdad Esfahbod2006-11-281-1/+1
| | | | | | | | | | | | 2006-11-28 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-font.c (_pango_cairo_font_install), (_pango_cairo_font_get_font_face), (_pango_cairo_font_get_scaled_font): * pango/pangocairo-private.h: * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Revert two of the cast changes from last commit, to make sure the test-pangocairo-fontmap-mismatch test doesn't crash.