summaryrefslogtreecommitdiff
path: root/pango/pangocairo-atsuifont.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 563356 – The input area of firefox and the blank width after text inBehdad Esfahbod2008-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | 2008-12-05 Behdad Esfahbod <behdad@gnome.org> Bug 563356 – The input area of firefox and the blank width after text in gnome-menu was stretched too wide, under pango-1.22.3 * docs/tmpl/fonts.sgml: * pango/pango-impl-utils.h: * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_create_metrics_for_context): * pango/pangocairo-win32font.c (pango_cairo_win32_font_create_metrics_for_context): * pango/pangofc-font.c (pango_fc_font_create_metrics_for_context): For approximate_char_width calculation take each char's width into account. That is, do a weighted average instead of uniform average. g_unichar_iszerowidth() chars count as 0, g_unichar_iswide() chars count 2, and the rest count as 1. Pretty much wcwidth() behavior. See bug report for rationale. svn path=/trunk/; revision=2747
* Bug 562574 – Pangocariowin32 is leaking every cairo font it ever createsBehdad Esfahbod2008-11-281-1/+5
| | | | | | | | | | | | | | | | | 2008-11-28 Behdad Esfahbod <behdad@gnome.org> Bug 562574 – Pangocariowin32 is leaking every cairo font it ever creates * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_finalize): * pango/pangocairo-win32font.c (pango_cairo_win32_font_finalize): Finalize shared pangocairo font resources. Oops! * pango/pangocairo-font.c (_pango_cairo_font_private_finalize): Protect against multiple calls to finalize. This is practiced by the pangocairo-fcfont when a font is shutdown and then finalized. svn path=/trunk/; revision=2746
* 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
* Require cairo >= 1.6.4. Remove compat cruft that were added to supportBehdad Esfahbod2008-04-211-6/+1
| | | | | | | | | | | | | | | | 2008-04-21 Behdad Esfahbod <behdad@gnome.org> * configure.in: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_create_font_face): * pango/pangocairo-fontmap.c (pango_cairo_font_map_new_for_font_type): Require cairo >= 1.6.4. Remove compat cruft that were added to support older cairo that had cairo-atsui instead of cairo-quartz-font. svn path=/trunk/; revision=2601
* Really fix build without cairo-atsui.Behdad Esfahbod2008-04-091-0/+1
| | | | | | | | | | | 2008-04-09 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: Really fix build without cairo-atsui. svn path=/trunk/; revision=2591
* Try making our OS X stuff compile with latest cairo 1.5.x snapshots thatBehdad Esfahbod2008-04-081-0/+4
| | | | | | | | | | | | | 2008-04-08 Behdad Esfahbod <behdad@gnome.org> * configure.in: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: Try making our OS X stuff compile with latest cairo 1.5.x snapshots that renamed cairo-atsui to cairo-quartz-font. svn path=/trunk/; revision=2586
* Adapt the shear matrix for synthesized italic to work with cairo 1.5.13+,Richard Hult2008-03-111-2/+11
| | | | | | | | | | | 2008-03-11 Richard Hult <richard@imendio.com> * pango/pangocairo-atsuifont.c (_pango_cairo_atsui_font_new): Adapt the shear matrix for synthesized italic to work with cairo 1.5.13+, where the quartz surface has been fixed for transformed text. svn path=/trunk/; revision=2583
* Move the remaining uses of font_id from PangoCairoATSUIFont toRichard Hult2007-06-261-23/+7
| | | | | | | | | | | | 2007-06-26 Richard Hult <richard@imendio.com> * pango/pangoatsui.c: (_pango_atsui_font_set_atsu_font_id): * pango/pangocairo-atsuifont.c: (pango_cairo_atsui_font_create_metrics_for_context), (_pango_cairo_atsui_font_new): Move the remaining uses of font_id from PangoCairoATSUIFont to PangoATSUIFont. svn path=/trunk/; revision=2367
* Bug 449543 - Ship pangoatsui.hRichard Hult2007-06-241-4/+3
| | | | | | | | | | | | | | | | | | | | | | 2007-06-24 Richard Hult <richard@imendio.com> Bug 449543 - Ship pangoatsui.h * pango/pangoatsui-fontmap.c: * pango/pangoatsui-private.h: * pango/pangoatsui.c: * pango/pangoatsui.h: * pango/pangocairo-atsuifont.c: * pango/pangocairo-atsuifont.h: Move get_atsu_font_id from the cairo atsui font class to the atsui base class. Make the members of the atsui font private and adapt all users of them. * pango/Makefile.am: Ship pangoatsui.h. * modules/basic/basic-atsui.c: (basic_engine_shape): Adapt to the above changes. svn path=/trunk/; revision=2366
* Update for the changes to PangoCairoFontMap and PangoCairoFont.Richard Hult2007-06-111-230/+52
| | | | | | | | | | 2007-06-12 Richard Hult <richard@imendio.com> * pango/pangocairo-atsuifont.c: * pango/pangocairo-atsuifontmap.c: Update for the changes to PangoCairoFontMap and PangoCairoFont. svn path=/trunk/; revision=2341
* Improve the fix for bug #433805 so that the metrics actually are right,Richard Hult2007-05-201-1/+1
| | | | | | | | | | 2007-05-20 Richard Hult <richard@imendio.com> * pango/pangocairo-atsuifont.c: (_pango_cairo_atsui_font_new): Improve the fix for bug #433805 so that the metrics actually are right, thanks to Mitch for noticing and debugging help. svn path=/trunk/; revision=2314
* Bug 433805 - [Atsui] Approximate char/digit width width often 0Richard Hult2007-05-151-10/+138
| | | | | | | | | | | | | | | | 2007-05-15 Richard Hult <richard@imendio.com> Bug 433805 - [Atsui] Approximate char/digit width width often 0 * pango/pangocairo-atsuifont.c: (pango_cairo_atsui_font_get_metrics): Improve the metrics so it really is average instead of max glyph width. Also keep the metrics per language in the font so it's not constantly recreated. (pango_cairo_atsui_font_describe_absolute): Implement. * pango/pangocairo-atsuifontmap.c: Set default resolution. svn path=/trunk/; revision=2300
* Bug 434160 - [atsui] Italic versions of some faces can't be createdRichard Hult2007-05-051-3/+52
| | | | | | | | | | | | | | | 2007-05-05 Richard Hult <richard@imendio.com> Bug 434160 - [atsui] Italic versions of some faces can't be created * pango/pangoatsui-fontmap.c: * pango/pangoatsui-private.h: * pango/pangocairo-atsuifont.c: Follow the other backends and create italic faces when they are not available. Apply synthetic italic in two cases, when the font manager hands out italic faces that are not in fact italic, and for the ones we've created ourselves. svn path=/trunk/; revision=2264
* Add comment to Richard's commit.Behdad Esfahbod2007-04-271-0/+2
| | | | svn path=/trunk/; revision=2235
* Use maxAdvanceWidth instead of avgAdvanceWidth, the latter is 0 for manyRichard Hult2007-04-271-2/+2
| | | | | | | | | | 2007-04-27 Richard Hult <richard@imendio.com> * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_get_metrics): Use maxAdvanceWidth instead of avgAdvanceWidth, the latter is 0 for many fonts. This is a temporary solution, see bug #433805 for details. svn path=/trunk/; revision=2234
* Bug 419262 - Don't create coverage every time it's asked forRichard Hult2007-03-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | 2007-03-18 Richard Hult <richard@imendio.com> Bug 419262 - Don't create coverage every time it's asked for * pango/pangoatsui.c: (pango_atsui_font_get_coverage): * pango/pangoatsui-fontmap.c: Pass around a PangoATSUIFace instead of the postscript name string. Move the coverage creation from the font to the face, and get the coverage from the face instead of creating it every time. * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: (_pango_cairo_atsui_font_new): Use the face instead of the postscript name. * pango/pangoatsui-private.h: * pango/pangocairo-atsuifontmap.c: Add getters for the postscript name and coverage for the face. svn path=/trunk/; revision=2218
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | 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-8/+8
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Bug 326960 – hex box drawing for win32 and atsui backends of cairoBehdad Esfahbod2006-06-071-14/+20
| | | | | | | | | | | 2006-06-07 Behdad Esfahbod <behdad@gnome.org> Bug 326960 – hex box drawing for win32 and atsui backends of cairo Hans already fixed win32. * pango/pangocairo-atsuifont.c (compute_glyph_extents): Handle PANGO_GLYPH_UNKNOWN_FLAG.
* Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that IBehdad Esfahbod2006-02-031-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove pango.modules on uninstall. (bug #328869)Behdad Esfahbod2006-01-271-1/+7
| | | | | | | | | | 2006-01-27 Behdad Esfahbod <behdad@gnome.org> * modules/Makefile.am: Remove pango.modules on uninstall. (bug * #328869) * pango/pango-fontmap.c, pango/pangocairo-*font.c: Better error messages.
* Change cwfont to cafont in a couple places.Behdad Esfahbod2006-01-241-3/+3
| | | | | | | 2006-01-24 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-atsuifont.c: Change cwfont to cafont in a couple places.
* Make matrix parameter const.Behdad Esfahbod2006-01-211-1/+1
| | | | | | | | | | | | | | | 2006-01-21 Behdad Esfahbod <behdad@gnome.org> * pango/pango-types.h, pango/pango-utils.h (pango_matrix_get_font_scale_factor): Make matrix parameter const. * pango/fonts.c, pango/pango-context.c, pango/pango-coverage.c, pango/pango-fontset.c, pango/pango-layout.c, pango/pango-renderer.c, pango/pango-types.h, pango/pango-utils.c, pango/pangocairo-atsuifont.c, pango/pangofc-font.c, pango/pangoft2-fontmap.c, pango/pangowin32-fontmap.c, pango/pangowin32.c, pango/pangox-fontmap.c, pango/pangoxft-font.c: Replace "Returns:" with "Return value:" in docs.
* Finish ATSUI module work. Bug #322022, Matthias Clasen.Behdad Esfahbod2006-01-211-0/+10
| | | | | | | | | | | | | | | | | | 2006-01-21 Behdad Esfahbod <behdad@gnome.org> Finish ATSUI module work. Bug #322022, Matthias Clasen. * docs/tmpl/atsui-fonts.sgml: Added. * docs/pango-docs.sgml: Updated to reflect above change. * docs/pango-sections.txt: Updated to reflect above change and also document Standard ATSUI symbols. * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_get_atsu_font_id): Add docs. * pango/pangoatsui-fontmap.c: Register included ATSUI modules.
* Draw hexbox for cairo backend. Bug #313551. Based on patch by LingNingBehdad Esfahbod2006-01-141-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Add checks for ATSUI.Anders Carlsson2005-11-221-0/+271
2005-11-21 Anders Carlsson <andersca@imendio.com> * configure.in: Add checks for ATSUI. * examples/Makefile.am: Only build pango-cairoview if freetype is detected. * modules/basic/Makefile.am: Add basic ATSUI module. * pango/Makefile.am: Add ATSUI files for cairo backend. * pango/pangocairo-fontmap.c: (pango_cairo_font_map_new): Support creating ATSUI font maps here. * pango/pangoatsui-fontmap.c: * pango/pangoatsui-private.h: * pango/pangoatsui.c: * pango/pangoatsui.h: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: * pango/pangocairo-atsuifont.h: * pango/pangocairo-atsuifontmap.c: Add.