summaryrefslogtreecommitdiff
path: root/pango/pangocairo-render.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the objectBehdad Esfahbod2006-11-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-11-28 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_font_face), (pango_cairo_fc_font_install), (pango_cairo_fc_font_finalize), (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_shutdown), (_pango_cairo_fc_font_new): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_set_resolution), (pango_cairo_fc_font_map_get_resolution_cairo), (pango_cairo_fc_font_map_get_renderer), (pango_cairo_fc_font_map_finalize), (pango_cairo_fc_font_map_get_resolution_fc), (pango_cairo_fc_font_map_create_font): * pango/pangocairo-font.c (_pango_cairo_font_install), (_pango_cairo_font_get_font_face), (_pango_cairo_font_get_scaled_font), (_pango_cairo_font_get_hex_box_info): * pango/pangocairo-fontmap.c (pango_cairo_create_layout): * pango/pangocairo-render.c (set_color), (_pango_cairo_renderer_draw_unknown_glyph), (pango_cairo_renderer_draw_glyphs), (pango_cairo_renderer_draw_rectangle), (pango_cairo_renderer_draw_error_underline): Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the object cannot have reached us if it wasn't of the right type.
* Make renderer-cache really thread-safe this time. Last try was not quiteBehdad Esfahbod2006-11-251-10/+18
| | | | | | | | | | | 2006-11-25 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (acquire_renderer), (release_renderer), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Make renderer-cache really thread-safe this time. Last try was not quite thread-safe theoretically, because pointer assignments are not necessarily atomic on some archs. Anyway, this one should do it.
* Bug 356666 – pango is not thread-safe, nautilus does not honour thatBehdad Esfahbod2006-11-201-49/+47
| | | | | | | | | | | | 2006-11-20 Behdad Esfahbod <behdad@gnome.org> Bug 356666 – pango is not thread-safe, nautilus does not honour that * pango/pangocairo-render.c (acquire_renderer), (release_renderer), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Instead of using a per-fontmap renderer, use a locally cached one, but make sure only one thread uses the cached renderer. Fixes the raciest point in pangocairo.
* Bug 315599 – PangoAttribute remains in wrong context.Behdad Esfahbod2006-07-101-0/+19
| | | | | | | | | 2006-07-10 Behdad Esfahbod <behdad@gnome.org> Bug 315599 – PangoAttribute remains in wrong context. * pango/pangocairo-render.c (_pango_cairo_do_glyph_string): Rever my commit that removed Owen's fix from last year!
* Followup on previous change.Behdad Esfahbod2006-06-061-42/+23
| | | | | | | | | | | | | | | | | 2006-06-06 Behdad Esfahbod <behdad@gnome.org> Followup on previous change. * pango/pango-renderer.c: Note that pango_renderer_draw_rectangle and pango_renderer_draw_error_underline should be called with active renderer. * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Remove excess cairo_save/restore() calls. * pango/pangocairo-render.c (_pango_cairo_do_error_underline): Don't go through renderer.
* Remove the cut&paste reference.Behdad Esfahbod2006-06-061-1/+0
|
* Bug 343355 – Add pango_cairo_show_error_underline &Behdad Esfahbod2006-06-061-131/+177
| | | | | | | | | | | | | | | | | | | | | | 2006-06-06 Behdad Esfahbod <behdad@gnome.org> Bug 343355 – Add pango_cairo_show_error_underline & pango_cairo_error_underline_path Based on patch by LingNing Zhang. * docs/pango-sections.txt, docs/tmpl/pangocairo.sgml, pango/pangocairo.def, pango/pangocairo.h, pango/pangocairo-render.c: New functions pango_cairo_show_error_underline and pango_cairo_error_underline_path. * pango/pangocairo-render.c (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout), (_pango_cairo_do_error_underline), (pango_cairo_show_glyph_string), (pango_cairo_show_layout_line), (pango_cairo_show_layout), (pango_cairo_show_error_underline), (pango_cairo_glyph_string_path), (pango_cairo_layout_line_path), (pango_cairo_layout_path), (pango_cairo_error_underline_path): Merge similar code for pango_cairo_show_* and pango_cairo_*_path functions.
* Minor.Behdad Esfahbod2006-05-301-2/+2
|
* Fix offset to center the underline in requested rectangle.Behdad Esfahbod2006-05-301-10/+1
| | | | | | | | | | 2006-05-30 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (draw_error_underline): Fix offset to center the underline in requested rectangle. * pango/pangocairo-render.c (pango_cairo_show_glyph_string): Remove unncessary renderer activation and cleanup.
* Doc.Behdad Esfahbod2006-05-281-1/+1
|
* Add more warning_history items and handle more font failures, to make sureBehdad Esfahbod2006-04-271-9/+31
| | | | | | | | | | | | | 2006-04-27 Behdad Esfahbod <behdad@gnome.org> * pango/pango-impl-utils.h: * pango/fonts.c (pango_font_get_glyph_extents), (pango_font_get_metrics), (pango_font_get_font_map): * pango/pangocairo-render.c (pango_cairo_show_glyph_string), (pango_cairo_glyph_string_path): Add more warning_history items and handle more font failures, to make sure that instead of crashing, gedit runs and draws empty boxes when pango.modules is not set properly.
* Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that IBehdad Esfahbod2006-02-031-22/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-02-02 Behdad Esfahbod <behdad@gnome.org> Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that I introduced is renamed to PANGO_GLYPH_EMPTY. It means, no rendering should be performed. The backends however, still return 0 if a glyph is not found. The modules then are free to replace this 0 glyph with an unknown character. * modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c, modules/basic/basic-fc.c, modules/basic/basic-win32.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, modules/thai/thai-fc.c, modules/tibetan/tibetan-fc.c, pango/pangox.c, pango/pangowin32.c: Adapt to above change. Backends return 0 if glyph not found. * pango/fonts.c (pango_font_get_glyph_extents): If font is not usable (!PANGO_IS_FONT (font)), return the generic UNKNOWN_GLYPH metrics. This is used when your backends are misconfigured and you don't find *any* font at all. * pango/pango-engince.c: Add unknown glyphs in fallback shaper, instead of empty glyphs. * pango/shape.c: Call the fall-back shaper if shaper fails, instead of generating a dummy glyph string ourselves. * pango/pango-layout.c (imposed_shape, shape_tab): Use PANGO_GLYPH_EMPTY instead of glyph 0. * pango/pango-renderer.c (pango_renderer_draw_glyph): No-op on PANGO_GLYPH_EMPTY instead of glyph 0. * pango/pangocairo-atsuifont.c, pango/pangocairo-win32font.c, pango/pangocairo-fcfont.c, pango/pangocairo-font.c, pango/pangocairo-private.h: install_font returns a boolean now. * pango/pangocairo-render.c, pango/pangoxft-render.c: Handle font and hex-box failures more gracefully by drawing a generic unknown-box glyph. * pango/pangoft2.c, pango/pangoft2-render.c: Draw the generic unknown-box glyph here too. For unknown glyphs though, if the font is TTF (FT_IS_SFNT), use the zero-indexed glyph, otherwise, draw a box of proper size.
* Rename _pango_cairo_get_hex_box_info to _pango_cairo_font_get_hex_box_info.Behdad Esfahbod2006-02-021-1/+1
|
* Move PANGO_UNKNOWN_GLYPH_WIDTH/HEIGHT to pango-font.h, which makesBehdad Esfahbod2006-02-021-1/+0
| | | | more sense.
* Use PANGO_GLYPH_NULL for when no glyph should be drawn. UseBehdad Esfahbod2006-02-021-8/+24
| | | | | | | | | | | | | | | | | | | | | | | 2006-02-02 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c, modules/basic/basic-fc.c, modules/basic/basic-win32.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, modules/thai/thai-fc.c, modules/tibetan/tibetan-fc.c, pango/fonts.c, pango/pango-engine-private.h pango/pango-types.h, pango/pangocairo-fcfont.c, pango/pangocairo-font.c, pango/pangocairo-private.h, pango/pangocairo-render.c, pango/pangofc-decoder.c, pango/pangofc-font.c, pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32.c, pango/pangox.c, pango/pangoxft-font.c pango/pangoxft-private.h, pango/pangoxft-render.c, pango/shape.c: Use PANGO_GLYPH_NULL for when no glyph should be drawn. Use PANGO_GLYPH_UNKNOWN_FLAG for all backends to mark unknown flags. There's no need for pango_font_get_unknown_glyph() anymore, since all backends know how to handle PANGO_GLYPH_UNKNOWN_FLAG gracefully. We may add that in the future however. (fixes bug #73147, closes bug #329524)
* pango/pangocairo-private.h, pango/pangocairo-font.c, Hint hexbox. AlsoBehdad Esfahbod2006-02-011-23/+28
| | | | | | | | 2006-01-31 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-private.h, pango/pangocairo-font.c, * pango/pangocairo-render.c: Hint hexbox. Also draw a singl-row hexbox for very small sizes.
* Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNingBehdad Esfahbod2006-01-141-30/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-01-14 Behdad Esfahbod <behdad@gnome.org> Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNing Zhang. * pango/pangocairo-private.h (_PangoCairoFontIface): Add new methods: get_font_face and get_scaled_font, and getters: _pango_cairo_font_get_font_face, _pango_cairo_font_get_scaled_font. * pango/pangocairo-private.h: Add _PangoCairoHexBoxInfo, and getter _pango_cairo_get_hex_box_info, and _pango_cairo_get_glyph_extents_missing. * pango/pangocairo-fcfont.c, pango/pangocairo-atsuifont.c, * pango/pangocairo-win32font.c: Export get_font_face and get_scaled_font methods. * pango/pangocairo-fcfont.c: Use * _pango_cairo_get_glyph_extents_missing on missing glyphs. * pango/pangocairo-font.c: Implement _pango_cairo_font_get_font_face, _pango_cairo_font_get_scaled_font, _pango_cairo_get_hex_box_info, and _pango_cairo_get_glyph_extents_missing. * pango/pangocairo-render.c * (_pango_cairo_renderer_draw_unknown_glyph): Added. * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Cleaned up to use the added function above.
* Make sure #include <config.h> is the first include in the file. (bugBehdad Esfahbod2006-01-141-0/+2
| | | | | | | 2006-01-14 Behdad Esfahbod <behdad@gnome.org> * */*.c, */*/*.c: Make sure #include <config.h> is the first include in the file. (bug #158870, based on patch by Luis Menina)
* Draw an empty dashed box on missing glyphs for cairo-fc backend.Behdad Esfahbod2005-12-061-5/+27
| | | | | | | | 2005-12-05 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-fcfont.c, pango/pangocairo-private.h, pango/pangocairo-render.c: Draw an empty dashed box on missing glyphs for cairo-fc backend.
* unset all part colors, since when drawing just a glyph string,Owen Taylor2005-10-031-0/+9
| | | | | | | | | | | 2005-09-09 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-render.c (pango_cairo_show_glyph_string): unset all part colors, since when drawing just a glyph string, prepare_run() isn't called. (#315599, Choe Hwanjin) * pango/pango-renderer.c (pango_renderer_draw_layout_line): NULL out renderer->priv->line_state.
* convert from Pango units to doubles, fix some coordinate space problemsOwen Taylor2005-08-241-33/+44
| | | | | | | | 2005-08-24 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-render.c (draw_error_underline): convert from Pango units to doubles, fix some coordinate space problems that had previously been fixed in GTK+. (#313015, Luis Villa)
* pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Handle glyphOwen Taylor2005-05-161-6/+12
| | | | | | | | | | | 2005-05-16 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_glyph_extents): pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Handle glyph == 0. * modules/indic/indic-ot.h modules/basic/basic-common.h: Treat LINE SEPARATOR as a zero-width character.
* Update for Cairo API changes.Owen Taylor2005-05-071-10/+10
| | | | | | | | 2005-05-07 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-fontmap.c pango/pangocairo-render.c examples/cairosimple.c pango/pangocairo-fcfont.c examples/cairoview.c: Update for Cairo API changes.
* Update to new Cairo font API.Owen Taylor2005-04-071-5/+4
| | | | | | | | | | | 2005-04-07 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-fcfont.c pango/pangocairo-win32font.c pango/pangocairo-render.c: Update to new Cairo font API. * pangpopangowin32.h pango/pangowin32-private.h pango/pangowin32.c pango/pangocairo-win32font.c modules/basic/basic-win32.c: Rename get_scale_factor() to get_metrics_factor() to match Cairo
* PangoCairoFontMap for win32 fonts.Owen Taylor2005-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-02-24 Owen Taylor <otaylor@redhat.com> * pango/pangocairo-win32.h pango/pangocairo-win32font.c pango/pangocairo-win32fontmap.c pango/Makefile.am: PangoCairoFontMap for win32 fonts. * pango/pangocairo-fontmap.c: Use PangoCairoWin32FontMap when available. * pango/pangowin32.h pango/pangowin32-fontmap.h pango/pangowin32.c: Add virtual pango_win32_font_select_font() to prepare a DC for use with a PangoWin32Font, and to release, pango_win32_font_scale_font() to get logical unit => Pango units scale, pango_win32_font_done_font() to release resources. * pango/pangowin32-fontmap.[ch]: Add a find_font() virtual method to allow subclasses that change how PangoFont lookup and creation happens. * pango/pangowin32-fontmap.c: Move initialization into pango_win32_font_map_init() to facilitate derivation. * pango/pangowin2.c pango/pangowin32-fontmap.c pango/pangowin32-private.h: Move PangoWin32Font/PangoWin32FontMap definitions into pangowin32-private.h to allow derivation for PangoCairoWin32Font. * modules/basic/basic-win32.c: Use pango_win32_font_select_font() and friends. * modules/basic/basic-win32.c: Use g_utf8_to_utf16 instead of g_convert for simplicity and speed. * pango/fonts.c (pango_font_get_font_map) pango/pango-font.h pango/pangofc-font.c pango/pangowin32.c pango/pango.c pango/pango.def docs/pango-sections.txt: Add a virtual function to get the fontmap for a font. * pango/pangocairo-render.c: Use pango_font_get_font_map() rather than PangoFcFontMap hack. * pango/pango-types.h: Move the declaration of PangoFontMap here to avoid interactions between pango-font.h and pango-fontmap.h. * pango/pangocairo.h: Remove accidental include of pangofc-fontmap.h.
* Rename pango_cairo_show_glyphs() to pango_cairo_show_glyph_string(). AddOwen Taylor2005-02-071-36/+193
| | | | | | | | | | 2005-02-06 Owen Taylor <otaylor@redhat.com> * pango/pangocairo.h pango/pangocairo-render.c docs/pango-sections.txt: Rename pango_cairo_show_glyphs() to pango_cairo_show_glyph_string(). Add pango_cairo_{glyph_string,layout_line,layout}_path() * docs/Makefile.am (INCLUDES): Add CAIRO_CFLAGS.
* Open the file with mode "wb", include cairo-png.h.Owen Taylor2005-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 2005-02-03 Owen Taylor <otaylor@redhat.com> * examples/cairosimple.c: Open the file with mode "wb", include cairo-png.h. * examples/xftview.c examples/cairoview.c: Set WM_NORMAL_HINTS to avoid triggering a metacity bug. * examples/cairoview.c: Include cairo-xlib.h. * configure.in: Add checks for the Win32 Cairo backend. (not committing the code yet). * examples/Makefile.am pango/Makefile.am: add CAIRO_CFLAGS. * pango/pangocairo-fc.h pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c pango/pangofc-fontmap.[ch]: Rework Cairo/Fontconfig backend to use the current Cairo API. Make some PangoFcFontMap changes to enable that. * pango/pango/pangocairo-private.h pango/pangocairo-render.c: Update for cairo_font_t changes.
* Add checks for CairoOwen Taylor2005-01-091-0/+354
Sat Jan 8 16:46:37 2005 Owen Taylor <otaylor@redhat.com> * configure.in: Add checks for Cairo * pango/Makefile.am: Add libpangocairo. * pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo.h pango/pangocairo-private.h pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c pango/pangocairo-fc.h: Start of a Cairo/FreeType backend. * pango/pangofc-fontmap.[ch]: Add a "get_render_key" virtual function to allow subclasses to specialize the details of how caching works. Add a default implementation that's a little more sophisticated than what was there before. * pango/pangoft2-private.h pangofc-font.c pangoft2.c: Move default implementations of has_char(), get_glyph() to the base class. * pango/pangofc-private.h pango/pangoft2-private.h: Move PANGO_UNITS_26_6 and friends to pango/pangofc-private.h. * examples/renderdemo.[ch] examples/pangoft2topgm.c examples/xftview.c: Allow passing in a custom function to transform drawing. * examples/Makefile.am examples/cairoview.c: Add a Cairo/Xlib example program. * examples/cairosimple.c: Simple Cairo example with output to a PNG. * pango/pango-layout.c (pango_layout_line_get_extents): Fix bug where line ink rect was always including 0, 0.