summaryrefslogtreecommitdiff
path: root/pango/pangox-fontmap.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings.Behdad Esfahbod2008-12-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 143542 – PangoFT2Fontmap leakBehdad Esfahbod2008-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-22 Behdad Esfahbod <behdad@gnome.org> Bug 143542 – PangoFT2Fontmap leak * pango/fonts.c: * pango/pangoatsui.c (pango_atsui_font_finalize), (_pango_atsui_font_set_font_map): * pango/pangocairo-font.c (_pango_cairo_font_get_metrics), (_pango_cairo_font_private_get_hex_box_info): * pango/pangocairo-win32font.c (_pango_cairo_win32_font_new): * pango/pangofc-font.c (pango_fc_font_get_metrics): * pango/pangofc-fontmap.c (pango_fc_font_map_add), (_pango_fc_font_map_remove), (cleanup_font): * pango/pangowin32-fontmap.c (pango_win32_font_neww), (pango_win32_font_map_real_find_font): * pango/pangowin32.c (pango_win32_font_finalize): * pango/pangox-fontmap.c (pango_x_font_map_load_font): * pango/pangox.c (pango_x_font_new), (pango_x_font_finalize): Make the reference the font->fontmap reference weak. The code for setting the reference must look like this: g_assert (font->fontmap == NULL); font->fontmap = (PangoFontMap *) fontmap; g_object_add_weak_pointer (G_OBJECT (font->fontmap), (gpointer *) (gpointer) &font->fontmap); And releasing it like: g_assert (font->fontmap != NULL); g_object_remove_weak_pointer (G_OBJECT (font->fontmap), (gpointer *) (gpointer) &font->fontmap); font->fontmap = NULL; I have converted all fontmaps. The win32 and atsui ones can use some simple testing. The PangoFc fonts actually don't need the weakref as the fontmap already provides a similar link by itself. svn path=/trunk/; revision=2704
* Make the following API public:Behdad Esfahbod2008-08-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-05 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c: * pango/pango-context.h: Make the following API public: pango_context_new() pango_context_set_font_map() * pango/pango-fontmap.c (pango_font_map_create_context): * pango/pango-fontmap.h: New public API: pango_font_map_create_context() * pango/pangocairo-context.c (pango_cairo_create_context): * pango/pangocairo-font.c (_pango_cairo_font_get_metrics), (_pango_cairo_font_private_get_hex_box_info): * pango/pangocairo-fontmap.c (pango_cairo_font_map_create_context): * pango/pangocairo.h: Deprecate pango_cairo_font_map_create_context(). * pango/pangofc-font.c (pango_fc_font_get_metrics): * pango/pangofc-fontmap.c (pango_fc_font_map_create_context): * pango/pangofc-fontmap.h: Deprecate pango_fc_font_map_create_context(). * pango/pangoft2-fontmap.c (pango_ft2_font_map_create_context), (pango_ft2_get_context): * pango/pangoft2.h: Deprecate pango_ft2_font_map_create_context(). * pango/pangowin32.c (pango_win32_get_context), (pango_win32_font_get_metrics): * pango/pangowin32.h: Deprecate pango_win32_get_context(). * pango/pangoxft-font.c (_pango_xft_font_get_mini_font): * pango/pangoxft-fontmap.c (pango_xft_get_context): * pango/pangoxft.h: Deprecate pango_xft_get_context(). * pango/pangox-fontmap.c (pango_x_font_map_for_display): * pango/pangox.c (get_context_info), (pango_x_get_context), (pango_x_context_set_funcs), (pango_x_render_layout_line): Deprecate pango_x_get_context(), again. * docs/pango-sections.txt: * docs/tmpl/fonts.sgml: * pango-view/viewer-pangocairo.c (pangocairo_view_get_context): * pango-view/viewer-pangoft2.c (pangoft2_view_get_context): * pango-view/viewer-pangox.c (pangox_view_get_context): * pango-view/viewer-pangoxft.c (pangoxft_view_get_context): * pango/check.defs: * pango/pango.def: Update. svn path=/trunk/; revision=2675
* 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 481537 – compiler warning fixes Patch from Kjartan MaraasBehdad Esfahbod2007-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2007-10-15 Behdad Esfahbod <behdad@gnome.org> Bug 481537 – compiler warning fixes Patch from Kjartan Maraas * pango/break.c (pango_get_log_attrs): * pango/pango-attributes.c (pango_attr_list_insert_internal): * pango/pango-layout.c (process_item), (justify_clusters): * pango/pango-markup.c (span_parse_boolean): * pango/pango-ot-ruleset.c (pango_ot_ruleset_finalize), (pango_ot_ruleset_new): * pango/pango-utils.c (pango_scan_int): * pango/pangocairo-font.c (_pango_cairo_font_install): * pango/pangofc-font.c (pango_fc_font_create_metrics_for_context): * pango/pangoft2.c (load_fallback_face): * pango/pangox-fontmap.c (pango_x_get_coverage_win): * pango/pangox.c (itemize_string_foreach): Fix warnings. svn path=/trunk/; revision=2444
* Switch some g_new (*, 1) to g_slice_new ()... I know...Behdad Esfahbod2007-09-071-2/+7
| | | | | | | | | | | | | | | | | | 2007-09-07 Behdad Esfahbod <behdad@gnome.org> * pango/pangox-fontcache.c (free_cache_entry), (pango_x_font_cache_free), (pango_x_font_cache_new), (pango_x_font_cache_load): * pango/pangox-fontmap.c (pango_x_font_map_finalize), (pango_x_insert_font): * pango/pangox.c (free_context_info), (pango_x_get_context), (pango_x_font_init), (pango_x_font_get_metrics), (pango_x_insert_subfont), (free_metrics_info), (pango_x_font_finalize): Switch some g_new (*, 1) to g_slice_new ()... I know... svn path=/trunk/; revision=2422
* Add G_UNLIKELY() to type registration block in _get_type() functions.Behdad Esfahbod2007-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-20 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c (pango_font_description_get_type), (pango_font_metrics_get_type): * pango/glyphstring.c (pango_glyph_string_get_type): * pango/pango-attributes.c (pango_attr_list_get_type): * pango/pango-color.c (pango_color_get_type): * pango/pango-item.c (pango_item_get_type): * pango/pango-language.c (pango_language_get_type): * pango/pango-layout.c (pango_layout_line_get_type), (pango_layout_iter_get_type): * pango/pango-matrix.c (pango_matrix_get_type): * pango/pango-ot-info.c (pango_ot_info_get_type): * pango/pango-ot-ruleset.c (pango_ot_ruleset_get_type): * pango/pango-tabs.c (pango_tab_array_get_type): * pango/pangoatsui-fontmap.c (pango_atsui_family_get_type), (pango_atsui_face_get_type): * pango/pangofc-fontmap.c (pango_fc_face_get_type), (pango_fc_family_get_type): * pango/pangowin32-fontmap.c (pango_win32_family_get_type), (pango_win32_face_get_type): * pango/pangox-fontmap.c (pango_x_font_map_get_type), (pango_x_face_get_type), (pango_x_family_get_type): * pango/pangox.c (pango_x_font_get_type): Add G_UNLIKELY() to type registration block in _get_type() functions. svn path=/trunk/; revision=2364
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-33/+33
| | | | | | | | | 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-102/+102
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Spell-check the docs.Behdad Esfahbod2007-01-071-7/+7
| | | | svn path=/trunk/; revision=2130
* Bug 369670 – Checked g_free callsBehdad Esfahbod2006-11-021-2/+1
| | | | | | | | | | | | | 2006-11-02 Behdad Esfahbod <behdad@gnome.org> Bug 369670 – Checked g_free calls * pango/pango-coverage.c (pango_coverage_unref): * pango/pango-layout.c (pango_layout_finalize), (pango_layout_set_text): * pango/pangofc-font.c (pango_fc_font_finalize): * pango/pangox-fontmap.c (pango_x_font_map_read_alias_file): Remove redundant checks before g_free() calls.
* Make TypeInfo structs not static. Reduces relocations.Behdad Esfahbod2006-10-131-3/+3
| | | | | | | | | | | | | | | | | | | 2006-10-13 Behdad Esfahbod <behdad@gnome.org> * pango/pango-ot-info.c (pango_ot_info_get_type): * pango/pango-ot-ruleset.c (pango_ot_ruleset_get_type): * pango/pangoatsui-fontmap.c (pango_atsui_family_get_type), (pango_atsui_face_get_type): * pango/pangocairo-font.c (pango_cairo_font_get_type): * pango/pangocairo-fontmap.c (pango_cairo_font_map_get_type): * pango/pangofc-fontmap.c (pango_fc_face_get_type), (pango_fc_family_get_type): * pango/pangowin32-fontmap.c (pango_win32_family_get_type), (pango_win32_face_get_type): * pango/pangox-fontmap.c (pango_x_font_map_get_type), (pango_x_face_get_type), (pango_x_family_get_type): * pango/pangox.c (pango_x_font_get_type): Make TypeInfo structs not static. Reduces relocations.
* Minor doc syntax update.Behdad Esfahbod2006-08-311-3/+3
| | | | | | | 2006-08-31 Behdad Esfahbod <behdad@gnome.org> * pango/pango-layout.c, pango/pangox-fontmap.c, pango/pangox.c: Minor doc syntax update.
* Update docs to note a size value of zero may have been set explicitly.Behdad Esfahbod2006-05-111-1/+1
| | | | | | | | | | | | | | | | | | 2006-05-11 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c (pango_font_description_set_size): Update docs to note a size value of zero may have been set explicitly. * pango/pango-context.c (pango_context_load_font): Don't warn if font size if zero. * pango/pangoatsui-fontmap.c (pango_atsui_font_map_load_font): * pango/pangox-fontmap.c (pango_x_font_map_load_font): Don't return if size is zero (probably will fail with no fonts found.) * pango/pangoxft-fontmap.c (pango_xft_font_map_default_substitute): * Xft chokes on size zero. Reassing PIXEL_SIZE to 1.0 if it's zero.
* Bug 337924 – cleanups for issues reported by various compilers PatchBehdad Esfahbod2006-04-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Change char* to char[] in the ft error table, to avoid relocations.Behdad Esfahbod2006-03-311-3/+3
| | | | | | | | | | 2006-03-31 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c: * pango/pango-utils.c: * pango/pangox-fontmap.c: * pango/pangoft2.c (_pango_ft2_ft_strerror): Change char* to char[] in the ft error table, to avoid relocations.
* 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.
* AC_DEFINE various version components.Behdad Esfahbod2006-02-051-2/+2
| | | | | | | | 2006-02-05 Behdad Esfahbod <behdad@gnome.org> * configure.in: AC_DEFINE various version components. * *.c: Change various const return types to G_CONST_RETURN.
* Make matrix parameter const.Behdad Esfahbod2006-01-211-2/+2
| | | | | | | | | | | | | | | 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.
* Make sure #include <config.h> is the first include in the file. (bugBehdad Esfahbod2006-01-141-0/+1
| | | | | | | 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)
* pango/Makefile.am, pango/fonts.c, pango/glyphstring.c,Behdad Esfahbod2006-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 2006-01-05 Behdad Esfahbod <behdad@gnome.org> * pango/Makefile.am, * pango/fonts.c, * pango/glyphstring.c, * pango/pango-attributes.c, * pango/pango-color.c, * pango/pango-impl-utils.h, * pango/pango-item.c, * pango/pango-layout.c, * pango/pango-tabs.c, * pango/pango-utils.c, * pango/pango-utils.h, * pango/pangoatsui-fontmap.c, * pango/pangocairo-font.c, * pango/pangocairo-fontmap.c, * pango/pangofc-fontmap.c, * pango/pangowin32-fontmap.c, * pango/pangox-fontmap.c, * pango/pangox.c, * pango/opentype/pango-ot-info.c, * pango/opentype/pango-ot-ruleset.c: Intern strings to avoid unnecessary strdups in the type system. (bug #325832, Matthias Clasen)
* Turn various gcc warnings off. Adding const, adding static, fullyBehdad Esfahbod2005-11-041-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use -export-symbols-regex to control symbol exports, including notOwen Taylor2005-07-221-1/+17
| | | | | | | | | | | | | | | | | 2005-07-22 Owen Taylor <otaylor@redhat.com> * pango/Makefile.a configure.in: Use -export-symbols-regex to control symbol exports, including not exporting the symbols from opentype/. * modules/*/Makefile.am: Control symbol exports here as well, simplify using AC_SUBST() of MODULE_LIBTOOL_OPTIONS from configure.in. * pango/pangox-fontmap.c (engine_shape_covers): Cut-and-paste engine_shape_covers to avoid using a symbol from libpango. * pango/pango-utils.c: Make accidentally exported pango_aliases_ht static.
* Add some missing statics. (#142299, Morten Welinder)Owen Taylor2004-05-271-3/+3
| | | | | | | Thu May 27 15:42:20 2004 Owen Taylor <otaylor@redhat.com> * pango/pangox-fontmap.c pango/pangox.c: Add some missing statics. (#142299, Morten Welinder)
* Convert PangoStretch to and from FC_WIDTH, so we can actually getManish Singh2004-03-121-8/+0
| | | | | | | | | | | | Thu Mar 11 17:28:06 2004 Manish Singh <yosh@gimp.org> * pango/pangofc-fontmap.c: Convert PangoStretch to and from FC_WIDTH, so we can actually get fontconfig to match on condensed and expanded versions of fonts, and have the info survive a pango_fc_face_describe roundtrip. Fixes #131561. * pango/pangox-fontmap.c: Remove unused function free_coverages_foreach.
* Fix some leftover references to INCLUDE_XFT_MODULES, INCLUDED_FC_MODULES.Owen Taylor2003-10-311-5/+0
| | | | | | | | | | | Fri Oct 31 13:01:25 2003 Owen Taylor <otaylor@redhat.com> * pango/Makefile.am (libpangox_1_0_la_LDFLAGS): Fix some leftover references to INCLUDE_XFT_MODULES, INCLUDED_FC_MODULES. (#125588, Martin Kretzschmar) * pango/pangox-fontmap.c (pango_x_face_get_coverage): Fix some code that was never quite finished.
* Modules now declare a list of scripts that they cover instead of a list ofOwen Taylor2003-09-231-29/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Sep 23 18:03:57 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-engines.[ch] pango/pango-engines-private.h: Modules now declare a list of scripts that they cover instead of a list of code point ranges. Also, there is now a ->covers() virtual function that allows a module to decide live whether the font covers a particular codepoint; remove old get_coverage() method. * pango/pango-fontset.[ch]: Add a foreach() function to iterate over all the fonts in a fontset (with a true return stopping iteration). * pango/pango-context.c: Complete rewrite using script-run information to improve language tags. Switch to an approach where we handle one run at a time rather than computing information for each character individually then later breaking the result into runs. * pango/pango-fontset.[ch]: Switch over to using pango-impl-utils.h. * modules/basic/basic-x.c pango/pangox-fontmap.c: Adapt to the change from get_coverage => covers. * pango/pango-modules.h pango/modules.c: Switch PangoMap over to being based on script rather than being based on codepoint. Remove the no longer needed pango_map_get_entry(). * pango/modules.c: Handle new script-based modules. * pango/pango-fc-fontmap.c pango/pango-win32-fontmap.c pango/pang-fontmap.[ch]: Add a shape_engine_type field to PangoFontmapClass, pango_font_map_get_shape_engine_type(); this allows generic code to find a shaper for a particular fontmap. * pango/pango-script.[ch]: Add pango_script_get_sample_language(), pango_language_includes_script(); functions for determining the relationship between scripts and language. * tools/gen-script-for-lang.c: Modify to spit out a useful table. * pango/pango-script-lang-table.h: Version of table generated from current fontconfig data. * pango/pangox.c: Remove complicated code to compute coverages; no longer useful now that we just have the basic shaper as a legacy thing. * modules/*/*.c: Adapt to identifying shape engines by language range. * modules/thai/thai-fc.c modules/thai/thai-shaper.[ch]: Remove now unused "has_glyph" function and XTIS support. * modules/thai/thai-fc.c: Handle non-Thai characters as well, since the Thai module now gets spaces, punctuation, and so forth.
* Add some macro definitions for gcc-3.3 that suppress the bogusOwen Taylor2003-08-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | Fri Aug 22 18:09:52 2003 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add some macro definitions for gcc-3.3 that suppress the bogus strict-aliasing warnings. * pango/pango-utils.c (read_config_file): Use g_hash_table_new_full() to simplify code and fix gcc-3.3 warnings. * pango/pangox-fontmap.c (pango_x_real_get_coverage_win) * pango/querymodules.c (query_module): Suppress gcc-3.3 warnings. * pango/modules.c (pango_find_map): Fix warning from missing declaration of pango_module_get_type(). * pango/pango-context.c/pango-engine.c: Fix name confusion for pango_get_fallback_shaper().
* Make PangoEngine{,Lang,Shape} GObjects, and use a GTypeModule-basedOwen Taylor2003-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sat Aug 2 23:19:16 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-engine.[ch] modules/*/*-{fc,win32,x}.c pango/modules.c pango/break.c pango/pango-context.c pango/pango-layout.c pango/pango-modules.h pango/querymodules.c pango/shape.c: Make PangoEngine{,Lang,Shape} GObjects, and use a GTypeModule-based module-loading system closely based on the one used for GtkIMContext and GtkThemeEngine. * pango/pango-impl-utils.h: OK, I'm tired of typing in get_type() functions. * pango/pango-script.[ch] pango/pango-script-table.h tests/testscript.c tools/gen-script-table.pl: Add port of script-range code from ICU in preparation for future use. (#91542) * tools/gen-script-for-lang.c: Utility program to determine the script for each fontconfig .orth file. * docs/tmpl/{scripts.sgml,pango-engine-lang.sgml, pango-engine-shape.sgml} docs/pango-sections.txt docs/pango-docs.sgml: Redo to go along with the above changes. * configure.in: chmod +x tests/runtests.sh
* Remove.Owen Taylor2003-08-021-0/+3
| | | | | | | | | | | | Sat Aug 2 14:10:31 2003 Owen Taylor <otaylor@redhat.com> * pango/Makefile.am pango/pango-intset.[ch] pango/pango-indic.[ch]: Remove. * pango/pangox.c (pango_x_apply_ligatures): Make a noop, remove associated code. * pango/pangox-fontmap.c pango/pangox.[ch]: Deprecate everything.
* Use g_object_new() rather than g_type_create_instance() (Patch fromOwen Taylor2003-05-271-1/+1
| | | | | | | | | | | | Tue May 27 12:32:43 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (pango_context_new) pango/pango-layout.c (pango_context_new) pango/pango-win32.c (pango_win32_font_map_for_display) pango/pangox-fontmap.c (pango_x_font_map_for_display) pango/pangox.c (pango_x_font_new): Use g_object_new() rather than g_type_create_instance() (Patch from Benjamin Otte, #112786)
* Get rid of unnecessary casts for g_object_{ref,unref}Manish Singh2002-10-141-5/+5
| | | | | | | | | | Mon Oct 14 15:39:41 2002 Manish Singh <yosh@gimp.org> * pango/pango-context.c pango/pango-layout.c pango/pangoft2.c pango/pangowin32-fontmap.c pango/pangowin32.c pango/pangox-fontmap.c pango/pangox.c pango/pangoxft-font.c pango/pangoxft-fontmap.c pango/testfonts.c pango/opentype/pango-ot-ruleset.c: Get rid of unnecessary casts for g_object_{ref,unref}
* use XAddExtension() magic to automatically clean up our information whenOwen Taylor2002-08-091-0/+38
| | | | | | | | | | | | | | | Thu Aug 8 23:14:27 2002 Owen Taylor <otaylor@redhat.com> * pango/pangox-fontmap.c pango/pangoxft-fontmap.c: use XAddExtension() magic to automatically clean up our information when XCloseDisplay() is called. * NEWS: Some updates for 1.1.x features. * README: Update a bit. * configure.in: Print Xft for the Xft backend, not Xft2 when printing summary.
* Rewrite average_digit_width computation to go through the same shapingOwen Taylor2002-03-251-6/+6
| | | | | | | | | | | | | | | | | Mon Mar 25 14:52:29 2002 Owen Taylor <otaylor@redhat.com> * pango/pangox.c (pango_x_font_get_metrics): Rewrite average_digit_width computation to go through the same shaping hack as the average_char_width code. (Part of #53425) * pango/pangox.c (pango_x_font_describe): Implement except for results of pango_x_font_load(). * pango/pangox.c (pango_x_load_font): Document as "don't use". * pango/pangox.[ch] (pango_x_load_font): Add missing const.
* isspace -> g_ascii_isspace (pango_font_description_from_string): isspaceDarin Adler2002-02-101-1/+0
| | | | | | | | | | | | | | | | * pango/fonts.c: (getword): isspace -> g_ascii_isspace (pango_font_description_from_string): isspace -> g_ascii_isspace * pango/modules.c: Remove unneeded <ctype.h> include. * pango/pango-markup.c: (xml_isspace): New. (pango_parse_markup): isspace -> xml_isspace (span_parse_func): isdigit -> g_ascii_isdigit * pango/pango-utils.c: (pango_trim_string): isspace -> g_ascii_isspace (pango_skip_space): isspace -> g_ascii_isspace (pango_scan_word): isspace -> g_ascii_isspace (pango_scan_string): isspace -> g_ascii_isspace (pango_scan_int): isspace -> g_ascii_isspace * pango/pangoft2-fontmap.c: Remove unneeded <ctype.h> include. * pango/pangox-fontmap.c: Remove unneeded <ctype.h> include.
* Add new function pango_context_load_fontset() to wrapAlex Larsson2001-11-181-0/+2
| | | | | | | | | | | | | | | | | 2001-11-18 Alex Larsson <alexl@redhat.com> * pango/pango-context.[ch]: Add new function pango_context_load_fontset() to wrap pango_font_map_load_fontset(). Add PangoContext arguments to load_font and load_fontset. * pango/pango-fontmap.[ch]: * pango/pangoft2-fontmap.c: * pango/pangowin32-fontmap.c: * pango/pangox-fontmap.c: * pango/pangoxft-font.c: * pango/pangoxft-fontmap.c Add PangoContext arguments to load_font and load_fontset.
* Patch from Darin Adler, with updates, to use g_ascii_* instead ofOwen Taylor2001-11-021-1/+3
| | | | | | | | | | | | | Fri Nov 2 08:50:16 2001 Owen Taylor <otaylor@redhat.com> * pango/{fonts.c,pango-color.c,pango-utils.c, pangoft2-fontmap.c,pangowin32-fontcache.c, pangowin32-fontmap.c, pangox-fontmap.c}: Patch from Darin Adler, with updates, to use g_ascii_* instead of locale-dependent variants (#55833). * pango/fonts.c: Use g_ascii_dtostr, g_ascii_strtod().
* Documentation updates.Matthias Clasen2001-10-261-1/+19
| | | | | | | | | | | | * pango/fonts.c, pango/pangoft2.c, pango/pangowin32.c, pango/pangoxft-font.c, pango/pangox-fontmap.c, pango/pangoft2-fontmap.c, pango/pangoxft-fontmap.c, pango/pangowin32-fontmap.c, docs/pango-sections.txt, docs/tmpl/coverage-maps.sgml, docs/tmpl/fonts.sgml, docs/tmpl/freetype-fonts.sgml, docs/tmpl/glyphs.sgml, docs/tmpl/layout.sgml, docs/tmpl/main.sgml, docs/tmpl/modules.sgml, docs/tmpl/tab-stops.sgml, docs/tmpl/text-attributes.sgml, docs/tmpl/win32-fonts.sgml: Documentation updates.
* Version 0.20PANGO_0_20Owen Taylor2001-09-251-1/+1
| | | | | | | | | | | | | | | | | | | Tue Sep 25 11:54:03 2001 Owen Taylor <otaylor@redhat.com> * configure.in: Version 0.20 * NEWS: Updated * configure.in (GLIB_REQUIRED_VERSION): Require GLib 1.3.9 * examples/Makefile.am (EXTRA_DIST): Add the viewer-qt in case someone (say Tim) makes dist without qt installed. (reported by Tony Graham) * examples/Makefile.am (pango.modules): Don't use grep -q (reported by Tony Graham) * docs/pango-sections.txt: Fix small typo.
* Up to 0.19.Owen Taylor2001-09-181-302/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Sep 18 15:47:08 2001 Owen Taylor <otaylor@redhat.com> * configure.in (PANGO_MINOR_VERSION): Up to 0.19. * pango/pango-font.h pango/pango-fontmap.[ch] pango/fonts.c pango/pangoxft-fontmap.c pango/pangoft-fontmap.c pango/pango-context.[ch] pango/pangox-fontmap.c: Add new PangoFontFace and PangoFontFamily object types, and change the font listing API to list faces and families, instead of face names and font descriptions. * pango/pango-font.h pango/fonts.c: Make PangoFontDescription an opaque heap-allocated structure, add accessors and convenience functions. * pango/pango-font.h pango/pango-private.h: Make PangoFontMetrics heap allocated, protect the structure definition with #ifdef PANGO_ENABLE_BACKEND, and add getters for the fields. * pango/pango-attributes.[ch] ( pango_attr_iterator_get_font): instead of providing a base font description and one to fill in, provide a single font description to modify based on the attributes. * pango/pango-attributes.[ch]: Fix PangoAttrFontDesc to have a PangoFontDescription by reference, not by value. * pango/pango-utils.[ch]: make pango_parse_style() and friends take pointers to individual enumerations instead of to a PangoFontDescription structure. * pango/*.c: Fix for the PangoFontDescription and PangoFontMetrics changes. * pango/pango-{break,engine,indic,ot,xft}.h pango/Makefile.am pango/opentype/Makefile.am: Protect portions with PANGO_ENABLE_ENGINE to shrink the public API. * modules/*/Makefile.am: -DPANGO_ENABLE_ENGINE. * pango/{pangox.h,pangox-private.h} modules/basic/basic-x.c: Move pango_x_font_get_unknown_glyph() into public header since it is used from modules. * pango/pango-{context,font,fontmap,modules.utils}.h pango/Makefile.am: Protect portions with PANGO_ENABLE_BACKEND to shrink the public API. * pango/*.h: Use G_BEGIN/END_DECLS * examples/viewer-qt.[cc,h]: Fix for changes to font listing API, PangoFontDescription. * pango/pango-indic.h modules/indic/*: Since we install this header fix it up to Pango conventions, namespece ZERO_WIDTH_JOINER, ZERO_WIDTH_NON_JOINER. * docs/pango-sections.txt: Updated.
* Require GLib-1.3.7Owen Taylor2001-06-291-1/+1
| | | | | | | | | | Thu Jun 28 21:49:30 2001 Owen Taylor <otaylor@redhat.com> * configure.in (GLIB_REQUIRED_VERSION): Require GLib-1.3.7 * pango/pangoft2-fontmap.c pango/pangowin32-fontmap.c pango/pangox-fontmap.c pango/pangoxft-fontmap.c: Fix args to g_type_init().
* Add a new PangoLanguage type to represent language tags; these canOwen Taylor2001-06-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sat Jun 9 17:36:09 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-types.h pango/pango-utils.c: Add a new PangoLanguage type to represent language tags; these can efficiently be compared and don't need to be copied. Also add pango_language_matches() to match a language tag against a pattern. * pango/pango-item.[ch] pango/pango-layout.c: Move extra_attrs from PangoItem to PangoAnalysis. Add a language tag field to PangoAnalysis. (#55894) * pango/pango-attributes.[ch] (pango_attr_iterator_get_font): Return the language tag as well. * pango/pango-attributes.[ch]: Rename PangoAttrLang to PangoAttrLanguage, and make it hold a PangoLanguage. * pango/pango-context.[ch]: Rename pango_context_{get,set}_lang() to pango_context_{get,set}_language(). * **.[ch]: Adapt to PangoLanguage and s/lang/language/ changes. * modules/basic/basic-x.c modules/basic/tables-big.i: Add support for ordering character sets differently for different language tags. * pango/itemize.c: Remove old, unused file. * pango/pango-context.c (pango_itemize): Reduce number of mallocs by allocating one array of PangoAnalysis instead of many arrays.
* Actually advance through list. (Problem noticed by Erwann Chenede)Owen Taylor2001-05-311-0/+2
| | | | | | | | | | | | | Thu May 31 12:31:20 2001 Owen Taylor <otaylor@redhat.com> * pango/pangox-fontmap.c (pango_x_font_map_for_display): Actually advance through list. (Problem noticed by Erwann Chenede) * modules/Makefile.am (install-data-local): Move rule for generation of /etc/pango/pango.modules to here, since we are now built _after_ the library. (Problem noticed by KUSANO Takayuki)
* Move some fontmap stuff to pangox-private.h to access fontmap->resolutionHavoc Pennington2001-04-271-33/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2001-04-27 Havoc Pennington <hp@redhat.com> * pango/pangox-fontmap.c: Move some fontmap stuff to pangox-private.h to access fontmap->resolution in pangox.c * pango/pangox.c (get_font_metrics_from_subfonts): multiply avg. width by PANGO_SCALE, and consider that avg width from X is in decipoints * modules/basic/basic-x.c: mark some chars unknown when shaping, with a flag PANGO_X_UNKNOWN_FLAG * pango/pangox.c (pango_x_font_get_metrics): use lookup_lang not lang when calling get_font_metrics_from_string (pango_x_render): render unknown chars * pango/pango-layout.c: (pango_layout_set_single_paragraph_mode): add mode where we don't break on para separators, instead we shape them and display glyphs (pango_layout_get_single_paragraph_mode): getter for above (pango_layout_check_lines): handle single paragraph mode
* pass 0 as first argument to g_type_init().Tim Janik2001-02-041-1/+1
| | | | | | | | | | | | | | | | Sun Feb 4 07:48:47 2001 Tim Janik <timj@gtk.org> * pango/pango-attributes.c (pango_color_get_type): pass 0 as first argument to g_type_init(). * pango/pangoxft-fontmap.c (pango_xft_get_font_map): * pango/pangowin32-fontmap.c (pango_win32_font_map_for_display): * pango/pangoft2-fontmap.c (pango_ft2_font_map_for_display): * pango/pangox-fontmap.c (pango_x_font_map_for_display): * pango/pango-context.c (pango_context_new): likewise. * i dare saying that i doubt the usefullness of all these g_type_init() calls though.
* Fix low underline code to deal with run_ink == NULL.Owen Taylor2000-11-141-2/+3
| | | | | | | | | | | | | | | | | Tue Nov 14 11:10:24 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_run_get_extents): Fix low underline code to deal with run_ink == NULL. * pango/pango-utils.c (pango_read_line): Return number of lines read to allow decent parse errors line numbers. * pango/pangox-fontmap.c (pango_x_font_map_read_alias_file): Fix line number count. * examples/pangox.aliases: Include extra international fonts for all styles, not just roman, reindent so it looks halfway legible.
* Add a per-PangoXFontMap cache for X Atoms.Robert Brady2000-11-081-0/+50
| | | | | | | | | | | | | | | | | | | | | 2000-11-08 Robert Brady <rwb197@zepler.org> * pango/pangox-fontmap.c, pango/pangox-private.h: Add a per-PangoXFontMap cache for X Atoms. * pango/pango-intset.c, pango/pango-intset.h: Integer set. * pango/pangox.c, pango/pangox.h: Mainly add two new functions, font_struct_get_ligatures, to parse X font properties for ligature info, and pango_x_apply_ligatures, which does that actual ligation. Also add utility functions pango_x_fallback_shaper, pango_x_find_first_subfont. * pango/pango-indic.c, pango/pango-indic.h: Utility functions for Indic scripts. * pango/Makefile.am: Add pango-intset, pango-indic.
* Add a new attribute for scaling a font; also required addingHavoc Pennington2000-11-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-01 Havoc Pennington <hp@pobox.com> * pango/pango-attributes.c (pango_attr_scale_new): Add a new attribute for scaling a font; also required adding PangoAttrFloat. (pango_attr_iterator_get_font): Add PANGO_ATTR_SCALE handling. * pango/pango-utils.c (pango_parse_stretch): Take a plain string not a GString (pango_parse_weight): ditto (pango_parse_variant): ditto (pango_parse_style): ditto * pango/pangox-fontmap.c (pango_x_font_map_read_alias_file): pass GString::str instead of the GString itself to pango_parse_* * pango/pangoft2-fontmap.c (pango_ft2_insert_face): ditto * pango/pangowin32-fontmap.c (pango_win32_font_map_read_alias_file): ditto * pango/pango-layout.c (get_tab_pos): adapt to new pango_itemize() signature (pango_layout_check_lines): Raise attr list copy/creation out of the loop over paragraphs. Adapt to pango_itemize() changes. * pango/pango-context.c (pango_itemize): pass in a starting index and a cached iterator (add_engines): Easy optimization, pass in n_chars instead of recomputing it. Also, pass on the start index and cached iterator. * docs/pango-sections.txt: Add new stuff docs/pango_markup.sgml: Docs on markup format * pango/pango-layout.c (pango_layout_get_attributes): New function to retrieve the AttrList from a layout (pango_layout_set_markup): Set layout from markup (pango_layout_set_markup_with_accel): Set layout from markup including accelerator parsing. * pango/pango-attributes.h (pango_parse_markup): New function to convert a tag string to an attribute list * pango/pango-markup.c (pango_parse_markup): implement * docs/Makefile.am, docs/pango-docs.sgml, docs/pango-sections.txt, docs/pango_markup.sgml: oooooh, documentation for the above patch! * docs/tmpl/pango-unused.sgml: Remove from CVS; just causes problems, and was full of checked-in conflict markers.
* adapted g_Type_register_*() calls. GLib wants an additional flag field toTim Janik2000-10-251-1/+1
| | | | | | | | Wed Oct 25 15:39:49 2000 Tim Janik <timj@gtk.org> * *.c: adapted g_Type_register_*() calls. GLib wants an additional flag field to specify tape flags per node. added 0s all over the place, making the assumption that no pango types are abstract ones.
* Don't produce a warning unless loading all fonts fails, if loading allOwen Taylor2000-08-221-7/+22
| | | | | | | | | | | | | Mon Aug 21 22:02:38 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (load_font): Don't produce a warning unless loading all fonts fails, if loading all fonts fails, try with "Sans [style]", if that fails, try with "Sans", if that fails, exit - we are completely screwed. * pango/pangox-fontmap.c (pango_x_font_map_load_font): Equate PANGO_STYLE_OBLIQUE and PANGO_STYLE_ITALIC, but with a big penalty.