summaryrefslogtreecommitdiff
path: root/pango/pangocairo-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Drop cairo metrics implementation"Khaled Hosny2019-08-141-0/+2
| | | | | | This reverts commit c5d86c368128bb9a0be913829da79649fb81f486. Closes #409
* Drop cairo metrics implementationMatthias Clasen2019-08-121-2/+0
| | | | We can use the hb-based implementation in pangofc-font.c.
* Decorate the symbols in the headers with version macrosChun-wei Fan2016-06-291-0/+1
| | | | | | | 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
* [cairo] Scale font metrics to user spaceBehdad Esfahbod2010-05-041-1/+1
| | | | Bug 457990 - font metrics are not converted to user space in cairo backend
* [cairo] Refactor common code in create_metrics_for_context()Behdad Esfahbod2010-05-041-2/+2
|
* Remove desc argument from _pango_cairo_font_private_initialize(). ReplaceBehdad Esfahbod2009-01-281-1/+1
| | | | | | | | | | | | | | | 2009-01-09 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-atsuifont.c (_pango_cairo_atsui_font_new): * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): * pango/pangocairo-font.c (_pango_cairo_font_private_initialize): * pango/pangocairo-private.h: * pango/pangocairo-win32font.c (_pango_cairo_win32_font_new): Remove desc argument from _pango_cairo_font_private_initialize(). Replace it with gravity, the only thing from desc we actually needed. This is in preparation for lazy loading of fonts in the pangofc fontmap. svn path=/trunk/; revision=2803
* Remove context argument from _pango_cairo_font_private_initialize().Behdad Esfahbod2009-01-281-1/+2
| | | | | | | | | | | | | | | | 2009-01-09 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-atsuifont.c (_pango_cairo_atsui_font_new): * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): * pango/pangocairo-font.c (_pango_cairo_font_private_initialize): * pango/pangocairo-private.h: * pango/pangocairo-win32font.c (_pango_cairo_win32_font_new): Remove context argument from _pango_cairo_font_private_initialize(). Replace it with pango_ctm and font_options, the only things from context we actually needed. This is in preparation for lazy loading of fonts in the pangofc fontmap. svn path=/trunk/; revision=2801
* Bug 478914 – Use something invalid instead of '?' when validating inputBehdad Esfahbod2007-12-101-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Part of Bug 347236 – provide pango_cairo_font_get_scaled_fontBehdad Esfahbod2007-07-211-7/+0
| | | | | | | | | | | | | | | | | | | | | | | 2007-07-21 Behdad Esfahbod <behdad@gnome.org> Part of Bug 347236 – provide pango_cairo_font_get_scaled_font * docs/Makefile.am: * docs/pango-sections.txt: * docs/tmpl/atsui-fonts.sgml: * docs/tmpl/opentype.sgml: * docs/tmpl/pango-engine-lang.sgml: * docs/tmpl/pango-engine-shape.sgml: * docs/tmpl/pangocairo.sgml: * pango/pangoatsui.h: * pango/pangocairo-atsuifont.h: * pango/pangocairo-font.c (pango_cairo_font_get_scaled_font): * pango/pangocairo-private.h: * pango/pangocairo.h: Export PangoCairoFont and cleanup various standard macros. svn path=/trunk/; revision=2375
* Add G_GNUC_CONST and G_GNUC_PURE annotations.Behdad Esfahbod2007-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-11 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.h: * pango/pango-font.h: * pango/pango-glyph.h: * pango/pango-gravity.h: * pango/pango-language.h: * pango/pango-layout.h: * pango/pango-matrix.h: * pango/pango-ot-private.h: * pango/pango-ot.h: * pango/pango-renderer.h: * pango/pango-script.h: * pango/pango-tabs.h: * pango/pango-utils.h: * pango/pangoatsui-private.h: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.h: * pango/pangocairo-fc.h: * pango/pangocairo-private.h: * pango/pangocairo-win32.h: * pango/pangocairo.h: * pango/pangofc-decoder.h: * pango/pangofc-font.h: * pango/pangofc-fontmap.h: * pango/pangoft2-private.h: * pango/pangoft2.h: * pango/pangowin32-private.h: * pango/pangox-private.h: * pango/pangoxft-render.h: * pango/pangoxft.h: Add G_GNUC_CONST and G_GNUC_PURE annotations. svn path=/trunk/; revision=2345
* Bug 347236 – provide pango_cairo_font_get_scaled_font Bug 347235 – AddBehdad Esfahbod2007-06-111-0/+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-36/+68
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* *.c, *.h: Removed spaces followed b tabs.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Removed spaces followed b tabs. svn path=/trunk/; revision=2166
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Revert two of the cast changes from last commit, to make sure theBehdad Esfahbod2006-11-281-0/+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.
* Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that IBehdad Esfahbod2006-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* Use PANGO_GLYPH_NULL for when no glyph should be drawn. UseBehdad Esfahbod2006-02-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | 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-1/+4
| | | | | | | | 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.
* Improve error handling in high-frequency functions: Only warn once.Behdad Esfahbod2006-01-311-0/+8
| | | | | | | | | | | | | | | 2006-01-30 Behdad Esfahbod <behdad@gnome.org> * pango/shape.c (pango_shape): * pango/fonts.c (pango_font_get_glyph_extents): * pango/pangocairo-font.c (_pango_cairo_font_install): Improve error handling in high-frequency functions: Only warn once. * pango-impl-utils.h, pangoutils.h: * pangocairo-private.h, pangocairo-font.c: Add machinery for above: _pango_warning_history and _pango_cairo_warning_history.
* Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNingBehdad Esfahbod2006-01-141-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Draw an empty dashed box on missing glyphs for cairo-fc backend.Behdad Esfahbod2005-12-061-0/+2
| | | | | | | | 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.
* Turn various gcc warnings off. Adding const, adding static, fullyBehdad Esfahbod2005-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-04 Behdad Esfahbod <behdad@gnome.org> * configure.in, examples/argcontext.c examples/cairoview.c, examples/renderdemo.c, examples/renderdemo.h examples/xftview.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-shaper.c, modules/hebrew/hebrew-shaper.h, modules/indic/indic-fc.c, modules/indic/mprefixups.c, modules/syriac/syriac-fc.c, pango/break.c pango/fonts.c, pango/modules.c, pango/pango-coverage.c pango/pango-engine.c, pango/pango-engine.h, pango/pango-fontmap.c, pango/pango-fontset.c, pango/pango-impl-utils.h, pango/pango-layout.c, pango/pango-layout.h, pango/pango-renderer.c, pango/pango-script.c, pango/pango-utils.c, pango/pangocairo-fc.h, pango/pangocairo-font.c, pango/pangocairo-fontmap.c, pango/pangocairo-private.h, pango/pangofc-decoder.c, pango/pangofc-font.c, pango/pangofc-fontmap.c pango/pangoft2.c, pango/pangox-fontcache.c, pango/pangox-fontmap.c pango/pangox.c, pango/pangoxft-font.c, pango/querymodules.c, pango/opentype/ftglue.c, pango/opentype/ftxgpos.c, pango/opentype/ftxopen.c, pango/opentype/pango-ot-buffer.c, pango/opentype/pango-ot-info.c, pango/opentype/pango-ot-ruleset.c, tests/dump-boundaries.c, tests/testboundaries.c, tests/testcolor.c tests/testiter.c, tests/testscript.c: Turn various gcc warnings off. Adding const, adding static, fully initializing structs, match signedness in comparisons. (#317804) * tests/testscript.c, tools/gen-script-for-lang.c: (scripts_for_file): Pass error->message instead of error to fail(), which was wrong. (compare_lang): Fix typo comparing a and a instead of a and b.
* Rework handling of context-specific options: drop get_render_key() and addOwen Taylor2005-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-07-19 Owen Taylor <otaylor@redhat.com> * pango/pango-fcfontmap.[ch]: Rework handling of context-specific options: drop get_render_key() and add a opaque "context key" (get_context_key() and friends). Also add a function to get the resolution. * pango/pango-fcfontmap.c pango/pangofc-font.h: - Move the 'lang' into the fontset key lookup and get rid of the funky list-of-hash-tables - Make lookups of fontsets and fonts dependent on the context key for the context. - Simplify the pattern/fontset caching to have one finite-size cache rather than an infinite first-level and a finite-size second level. * pango/pangocairo.h pango/pangocairo-private.h pango/pangocairo-fontmap.c: Add pango_cairo_context_get/set_resolution(), pango_cairo_context_set/get_font_options to allow controlling the resolution and font rendering options for a specific PangoContext. * pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap pango/pangocairo-win32font.c: Implement resolution and font options handling adapt to related Cairo changes. * docs/pango-sections.txt docs/Makefile.am pango/pangowin32.c: Doc updates and build fixes. * pango/pangofc-fontmap.c (pango_fc_make_pattern): Create patterns with FC_SIZE as well as FC_PIXEL_SIZE to work around a libgnomeprint bug. (#309477)
* Update to new Cairo font API.Owen Taylor2005-04-071-2/+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
* Open the file with mode "wb", include cairo-png.h.Owen Taylor2005-02-031-4/+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/+78
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.