summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fcfont.c
Commit message (Collapse)AuthorAgeFilesLines
* cairo: fix hinting of metricsMatthias Clasen2021-10-301-4/+3
| | | | | | | We were looking at the wrong font options here, causing metrics to not be hinted when they should be. This was causing some of the empty line height tests to fail.
* pangocairo: Round font metrics when appropriateMatthias Clasen2021-10-191-1/+13
| | | | | | | | | | | When metrics hinting is on, we used to provide rounded font metrics. We should keep doing that since otherwise we end up with logical rects sometimes being rounded and sometimes not, leading to jumping empty lines. Test included. Fixes: #421
* Revert "Drop cairo metrics implementation"Khaled Hosny2019-08-141-0/+1
| | | | | | This reverts commit c5d86c368128bb9a0be913829da79649fb81f486. Closes #409
* Drop cairo metrics implementationMatthias Clasen2019-08-121-1/+0
| | | | We can use the hb-based implementation in pangofc-font.c.
* Reinstate the return type of pango_fc_font_lock_face()Matthias Clasen2019-08-061-1/+1
| | | | | | | | | We did not remove the freetype dependency from libpango anyway, so bite the bullet, and keep including freetype headers. Changing the return type to gpointer broke C++ users, where casts from void* are not automatic.
* fc: Drop freetype from pangofc-font.hMatthias Clasen2019-07-181-1/+1
| | | | | Stop using FT_Face here, so we can stop including freetype headers.
* Header cleanupMatthias Clasen2019-07-041-2/+2
| | | | | | | 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.
* [cairo] Don't set font variations on cairo_font_options_tBehdad Esfahbod2018-01-031-9/+0
| | | | | | | We pass them in through FcPattern to the cairo_face already, no need to pass here again. Yeah, I know... /tears
* Add initial support for OpenType font variationsMatthias Clasen2018-01-031-1/+16
| | | | | | | | This commit lets PangoFontDescription carry font variation information as a string. Only pangocairo has been updated to make use of this information. We pass it to harfbuzz for shaping, and we pass it to cairo when creating scaled fonts.
* Ignore undefined macros when importing freetype / 2Emmanuele Bassi2017-05-311-0/+4
| | | | Missing inclusions of freetype via Cairo.
* 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
* Bug 703995 - Compiler warnings about strict aliasingBehdad Esfahbod2013-08-301-2/+2
| | | | Patch from Akira TAGOH.
* More thread-safetyBehdad Esfahbod2012-08-271-1/+1
|
* Make static data thread safe in pangocairo-fcfont.cAlessandro Pignotti2012-08-271-2/+2
|
* [cairo] Refactor common code in create_metrics_for_context()Behdad Esfahbod2010-05-041-4/+4
|
* Fix pangocairo-fc fontsize weirdnessBehdad Esfahbod2009-11-171-3/+2
|
* [pangofc] Add a "fontmap" property to PangoFcFontBehdad Esfahbod2009-03-131-0/+1
| | | | | | | | | | | Gecko uses its own PangoFcFontMap subclass with its own PangoFontSet. Previously we were setting font->fontmap in our own private PangoFcFontSet. Now it's up to the PangoFcFont subclass to set it when creating the new font object. Also adds the following backend-public symbol: pango_fc_font_map_find_decoder()
* Don't do anything in shutdown. Was causing double-free of cairo fontBehdad Esfahbod2009-02-021-9/+0
| | | | | | | | | | 2009-02-01 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_class_init): Don't do anything in shutdown. Was causing double-free of cairo font private data. svn path=/trunk/; revision=2825
* Bug 567165 – Apply all pattern matricesBehdad Esfahbod2009-01-281-11/+12
| | | | | | | | | | | | | | 2009-01-09 Behdad Esfahbod <behdad@gnome.org> Bug 567165 – Apply all pattern matrices * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): * pango/pangofc-fontmap.c (pango_fc_font_map_new_font): Apply all FC_MATRIX values, not just the first one. Fixes synthetic italic rotated text with ft2 and xft backends. Can't believe no one ever noticed that they are broken... svn path=/trunk/; revision=2808
* Change PangoFc font loading API such that PangoContext is not passed down.Behdad Esfahbod2009-01-281-35/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-09 Behdad Esfahbod <behdad@gnome.org> * docs/pango-sections.txt: * docs/tmpl/pangofc-fontmap.sgml: * docs/tmpl/text-attributes.sgml: * pango/pangocairo-fc.h: * pango/pangocairo-fcfont.c (get_font_size), (get_gravity_class), (get_gravity), (_pango_cairo_fc_font_new): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_font_key_substitute), (pango_cairo_fc_font_map_create_font), (pango_cairo_fc_font_map_class_init): * pango/pangofc-font.c (_pango_fc_font_get_font_key), (_pango_fc_font_set_font_key): * pango/pangofc-fontmap.c (pango_fc_font_key_equal), (pango_fc_font_key_hash), (pango_fc_font_key_free), (pango_fc_font_key_copy), (get_context_matrix), (pango_fc_font_key_init), (pango_fc_font_key_get_pattern), (pango_fc_font_key_get_matrix), (pango_fc_font_key_get_context_key), (pango_fc_font_map_init), (pango_fc_font_map_class_init), (pango_fc_font_map_add), (_pango_fc_font_map_remove), (pango_fc_make_pattern), (pango_fc_font_map_new_font), (pango_fc_default_substitute), (pango_fc_font_map_get_patterns), (pango_fc_font_map_load_fontset): * pango/pangofc-fontmap.h: * pango/pangofc-private.h: Change PangoFc font loading API such that PangoContext is not passed down. We use a new opaque struct called PangoFcFontKey. This struct is in fact our font hash key. This avoids problems where previously we were using context members that were not necessarily considered by the pangofc layer when caching. This is in preparation for lazy loading of fonts in the pangofc fontmap. svn path=/trunk/; revision=2804
* 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
* [pangocairo-fc] Remove unused memberBehdad Esfahbod2009-01-281-2/+0
| | | | svn path=/trunk/; revision=2800
* Bug 562574 – Pangocariowin32 is leaking every cairo font it ever createsBehdad Esfahbod2008-11-281-2/+2
| | | | | | | | | | | | | | | | | 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
* Bug 337593 – move glyph extents code (and cache) from pangocairo-*font.cBehdad Esfahbod2007-06-101-369/+56
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move PANGO_UNITS_ROUND here... ...from here.Behdad Esfahbod2007-04-301-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+7
| | | | | | | | | 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-24/+24
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21Behdad Esfahbod2007-01-041-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-04 Behdad Esfahbod <behdad@gnome.org> Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21 * pango/pango-types.h: * pango/pango-matrix.c: New public API: pango_matrix_transform_distance() pango_matrix_transform_point() pango_matrix_transform_rectangle() pango_matrix_transform_pixel_rectangle() * pango/pango-utils.h: * pango/pango-utils.c: New public API: pango_units_from_double() pango_units_to_double() pango_extents_to_pixels() * pango/pango-layout.c (pango_layout_get_pixel_extents), (pango_layout_line_get_pixel_extents): Use pango_extents_to_pixels(). * pango/pangocairo-fcfont.c: (pango_cairo_fc_font_glyph_extents_cache_init), (compute_glyph_extents): Use pango_units_from_double(). * examples/renderdemo.c (do_output): Use pango_matrix_transform_pixel_rectangle(); * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: Update. svn path=/trunk/; revision=2126
* Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the objectBehdad Esfahbod2006-11-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 352535 – Ink extents of empty glyphBehdad Esfahbod2006-09-111-1/+1
| | | | | | | | | | 2006-09-10 Behdad Esfahbod <behdad@gnome.org> Bug 352535 – Ink extents of empty glyph * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_glyph_extents): Return zero ink_rect for PANGO_GLYPH_EMPTY.
* Support per-item gravity.Behdad Esfahbod2006-08-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-20 Behdad Esfahbod <behdad@gnome.org> Support per-item gravity. * pango/pango-context.c (update_attr_iterator), (itemize_state_init), (itemize_state_update_for_new_run), (itemize_state_process_run): Make per-item gravity work, by setting gravity into font description before loading fonts. Also, allow the context font description to override the gravity (but not centered_baseline.) * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Get gravity from font description, not context. * pango/pangofc-fontmap.c (fontset_hash_key_equal), (fontset_hash_key_hash), (fontset_hash_key_copy), (pango_fc_make_pattern), (pango_fc_font_map_get_patterns), (pango_fc_font_map_load_fontset), (pango_fc_font_description_from_pattern): Get gravity from font description, not context. Moreover, put it into pattern, and reconstruct it out of font patterns. * pango/pangofc-private.h: Define PANGO_FC_GRAVITY, which is the key we put PangoGravity into an FcPattern under.
* Correct switched return value of EAST/WEST.Behdad Esfahbod2006-08-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-20 Behdad Esfahbod <behdad@gnome.org> * pango/pango-matrix.c (pango_matrix_to_gravity): Correct switched return value of EAST/WEST. * pango/pango-types.h (PangoGravity): Add PANGO_GRAVITY_AUTO. * pango/pango-context.h: Add pango_context_get_gravity(). * examples/renderdemo.c (parse_gravity), (parse_options): * pango/pango-context.c (pango_context_init), (update_resolved_gravity), (pango_context_set_matrix), (pango_context_set_base_gravity), (pango_context_get_gravity), (itemize_state_init), (get_shaper_and_font): * pango/pango-layout.c (line_set_resolved_dir): * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init), (_pango_cairo_fc_font_new): * pango/pangofc-fontmap.c (pango_fc_make_pattern), (pango_fc_font_map_load_fontset): * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/main.sgml: Update to above.
* Render block progression and line direction arrows, and a base gravityBehdad Esfahbod2006-08-161-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-16 Behdad Esfahbod <behdad@gnome.org> * examples/viewer-pangocairo.c (render_callback): Render block progression and line direction arrows, and a base gravity roof-top. * pango/pango-matrix.c (pango_matrix_to_gravity): New function. * pango/pango-utils.c (pango_gravity_to_rotation): New function. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Use pango_gravity_to_rotation(). * pango/pango-utils.h: * pango/pango-types.h: Reorder a bit. * examples/Makefile.am: * examples/test-chinese.txt: New test text for Chinese. * pango/check.defs: New script that checks that all the exported symbols are listed in the respective .def file. (only checks the libraries actually built. No win32 for example.) * pango/Makefile.am: Hook check.defs as a 'make check' test. * pango/pango.def: * pango/pangoft2.def: * pango/pangocairo.def: Update. * docs/tmpl/glyphs.sgml: * docs/tmpl/main.sgml: * docs/pango-sections.txt: Update.
* Return if none of logical_rect or ink_rect is non-NULL.Behdad Esfahbod2006-08-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * pango/pango-layout.c (pango_layout_run_get_extents): * pango/glyphstring.c (pango_glyph_string_extents_range): Return if none of logical_rect or ink_rect is non-NULL. * pango/pango-item.h (PangoAnalysis): Add new member centered_baseline which if set, makes item rendered such that ascent == descent. * pango/pango-context.c (itemize_state_init), (itemize_state_add_character): * pango/pango-renderer.c (pango_renderer_draw_layout_line): Implement centered_baseline. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics): When adjusting ascent/descent for vertical fonts, adjust strikethrough and underline position too. * docs/tmpl/main.sgml: Document new struct member.
* Render the header with SOUTH gravity.Behdad Esfahbod2006-08-151-6/+18
| | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (do_output): Render the header with SOUTH gravity. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init): Center baseline for east/west gravity in pango_font_metrics too.
* Fix handling of WEST and EAST gravity effect on bidi level.Behdad Esfahbod2006-08-151-2/+20
| | | | | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c (itemize_state_add_character): Fix handling of WEST and EAST gravity effect on bidi level. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_glyph_extents_cache_init): For NORTH gravity (upside down text), swap ascent and descent, and for EAST/WEST, center baseline between ascent/descent. * pango/shape.c (pango_shape): If glyph width is negative, negate it and shift glyph by that amount. This allows having font matrices that essentially move the glyph origin to the right of the glyph to still work.
* Move font_matrix rotation into font_new as we use only rotation and noBehdad Esfahbod2006-08-151-44/+12
| | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_scaled_font), (_pango_cairo_fc_font_new): Move font_matrix rotation into font_new as we use only rotation and no translation anymore.
* Oops. Exchange west<->east and north<->south gravities. The gravity is theBehdad Esfahbod2006-08-151-5/+5
| | | | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * docs/pango-sections.txt: * docs/tmpl/main.sgml: * examples/renderdemo.c (parse_gravity), (parse_options): * pango/pango-context.c (pango_context_init), (pango_context_get_base_gravity), (itemize_state_add_character): * pango/pango-types.h: * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_scaled_font): * pango/pangofc-fontmap.c (pango_fc_make_pattern): Oops. Exchange west<->east and north<->south gravities. The gravity is the side that the glyph sits on. So, for normal Latin text for example, gravity is south, not north.
* Support --gravity.Behdad Esfahbod2006-08-151-1/+47
| | | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (do_output), (parse_gravity), (parse_options): Support --gravity. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_scaled_font), (compute_glyph_extents), (_pango_cairo_fc_font_new): Load rotated scaled_fonts to handle gravity. * pango/pangofc-fontmap.c (pango_fc_make_pattern), (pango_fc_font_map_get_patterns), (pango_fc_font_map_load_fontset): Set FC_VERTICAL_LAYOUT on West and East gravity.
* Bug 329664 – Move gunichar_to_glyph cache from PangoCairoFcFont toBehdad Esfahbod2006-04-291-147/+3
| | | | | | | | | | | | | | | | 2006-04-29 Behdad Esfahbod <behdad@gnome.org> Bug 329664 – Move gunichar_to_glyph cache from PangoCairoFcFont to PangoFcFont Patch from LingNing Zhang. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_finalize), (pango_cairo_fc_font_glyph_extents_cache_init), (pango_cairo_fc_font_get_glyph_extents_cache_entry), (pango_cairo_fc_font_class_init), (pango_cairo_fc_font_init): * pango/pangofc-font.c (pango_fc_font_finalize), (pango_fc_font_real_get_glyph): Move gunichar->glyph cache to pangofc-font.c
* Bug 307196 – Unhinted fonts are measured incorrectly and drawingBehdad Esfahbod2006-04-291-0/+5
| | | | | | | | | | | | | | | 2006-04-29 Behdad Esfahbod <behdad@gnome.org> Bug 307196 – Unhinted fonts are measured incorrectly and drawing problems occur as a result * pango/pangofc-font.c (get_face_metrics), (pango_fc_font_get_raw_extents): * pango/pangoxft-font.c (_pango_xft_font_new): Rollback previous change that forced metrics hinting always on. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Set fcfont metrics hinting based on cairo font options.
* Bug 337924 – cleanups for issues reported by various compilers PatchBehdad Esfahbod2006-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-11 Behdad Esfahbod <behdad@gnome.org> Bug 337924 – cleanups for issues reported by various compilers Patch from Kjartan Maraas. * examples/viewer-x.c (update): * modules/arabic/arabic-fc.c (fallback_shape), (arabic_engine_shape): * modules/basic/basic-fc.c (fallback_shape), (basic_engine_shape): * modules/basic/basic-x.c: * modules/hangul/hangul-fc.c: * modules/hebrew/hebrew-fc.c (hebrew_engine_shape): * 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/break.c: * pango/modules.c: * pango/opentype/ftglue.c (_hb_ftglue_face_goto_table): * pango/pango-attributes.c (pango_attr_list_filter): * pango/pango-engine.c: * pango/pango-fontset.c: * pango/pango-layout.c (pango_layout_set_text), (pango_layout_xy_to_index), (pango_layout_get_cursor_pos): * pango/pango-markup.c (text_handler): * pango/pango-utils.c (read_alias_file): * pango/pangocairo-fcfont.c (G_DEFINE_TYPE_WITH_CODE): * pango/pangocairo-fcfontmap.c (G_DEFINE_TYPE_WITH_CODE): * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): * pango/pangox-fontmap.c (pango_x_make_matching_xlfd): * tests/dump-boundaries.c (fail): Remove unused variables. Remove excess semicolon after DEFINE_TYPE macros.
* Incorrect text rendering when in x86 64-bit precision modeBehdad Esfahbod2006-04-071-7/+14
| | | | | | | | | | 2006-04-07 Behdad Esfahbod <behdad@gnome.org> Incorrect text rendering when in x86 64-bit precision mode https://bugs.freedesktop.org/show_bug.cgi?id=5200 * pango/pangocairo-fcfont.c:Round metrics when converting to Pango units.
* Hook up pango-utils.h into the documentation, as we are installing itBehdad Esfahbod2006-03-311-1/+1
| | | | | | | | 2006-03-30 Behdad Esfahbod <behdad@gnome.org> Hook up pango-utils.h into the documentation, as we are installing it anyway. Move some internal stuff to pango-impl-utils.h and make source files include that instead.
* Bug 332167 – Void function returns value - breaks Solaris build ReportedBehdad Esfahbod2006-02-221-1/+1
| | | | | | | | | | 2006-02-22 Behdad Esfahbod <behdad@gnome.org> Bug 332167 – Void function returns value - breaks Solaris build Reported by Damien Carbery * pango/pangocairo-fcfont (pango_cairo_fc_font_unlock_face): Simply return.
* Bug 314239 – pangocairo crashes when font cannot be readBehdad Esfahbod2006-02-211-6/+22
| | | | | | | | | | 2006-02-21 Behdad Esfahbod <behdad@gnome.org> Bug 314239 – pangocairo crashes when font cannot be read * pango/pangocairo-fcfont.c, pango/pangocairo-font.c: Hack up to not crash if we cannot create cairo_scaled_font_t for PangoFont (font is not readable, removed, etc.)
* Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that IBehdad Esfahbod2006-02-031-2/+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.
* Use PANGO_GLYPH_NULL for when no glyph should be drawn. UseBehdad Esfahbod2006-02-021-14/+6
| | | | | | | | | | | | | | | | | | | | | | | 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)