summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
Commit message (Collapse)AuthorAgeFilesLines
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-13/+13
| | | | | | | | | 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-129/+129
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. NewBehdad Esfahbod2007-01-161-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.h: * pango/pango-attributes.c: New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. New public functions: pango_attr_gravity_new() pango_attr_gravity_hint_new() * pango/pango-context.c (update_attr_iterator), (itemize_state_init), (itemize_state_add_character), (get_shaper_and_font), (itemize_state_update_for_new_run): Handle gravity and gravity_hint attributes. * pango/pango-utils.h: * pango/pango-utils.c: New public function: pango_parse_enum() * pango/pango-markup.c (span_parse_func): Parse gravity and gravity_hint attributes for <span>. Optimize a bit. * pango/pango-markup.c (parse_absolute_size), (attr_strcmp), (span_parse_int), (span_parse_boolean), (span_parse_color), (span_parse_enum), (span_parse_func): Use pango_scan_int(), pango_color_parse(), and pango_parse_enum(). Also, ignore '-' and '_' differences when matching attribute names for <span>. * examples/renderdemo.c (parse_enum), (parse_ellipsis), (parse_gravity), (parse_gravity_hint), (parse_hinting), (parse_wrap): Use a generic parse_enum() that uses pango_parse_enum(). * modules/basic/basic-fc.c (basic_engine_shape): * pango/pangofc-fontmap.c (pango_fc_make_pattern): Use PANGO_GRAVITY_IS_VERTICAL(). * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/text-attributes.sgml: * docs/tmpl/utils.sgml: Update. svn path=/trunk/; revision=2145
* Bug 323173 – Add layout of mixed direction text for vertical layoutBehdad Esfahbod2007-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-15 Behdad Esfahbod <behdad@gnome.org> Bug 323173 – Add layout of mixed direction text for vertical layout * pango/pango-gravity.h: * pango/pango-gravity.c: Moved gravity stuff here. New public API: PangoGravityHint pango_gravity_get_for_matrix() pango_gravity_get_for_script() * pango/pango-context.h: * pango/pango-context.c (pango_context_init), (update_resolved_gravity), (itemize_state_update_for_new_run): Support gravity hint. New public API: pango_context_set_gravity_hint() pango_context_get_gravity_hint() * pango/pango-utils.c: * pango/pango-matrix.c: * pango/pango-matrix.h: * pango/pango-types.h: Moved gravity and matrix stuff into its own header. pango-types.h includes both pango-matrix.h and pango-gravity.h * pango/pango.h: Include new headers. * pango/pango.def: * pango/Makefile.am: Update. * docs/pango-docs.sgml: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: * docs/tmpl/main.sgml: * docs/tmpl/vertical.sgml: Add a section for Vertical Text. * examples/renderdemo.c (do_output), (parse_gravity_hint), (parse_options): Support gravity hint. * examples/test-mixed.txt: New test, mixed Latin, Arabic, Chinese text. svn path=/trunk/; revision=2144
* Spell-check the docs.Behdad Esfahbod2007-01-071-4/+4
| | | | svn path=/trunk/; revision=2130
* Bug 163677 – pango_attr_list_splice: inconsistent docs Patch from MortenBehdad Esfahbod2006-07-101-1/+3
| | | | | | | | | 2006-07-10 Behdad Esfahbod <behdad@gnome.org> Bug 163677 – pango_attr_list_splice: inconsistent docs Patch from Morten Welinder * pango/pango-attributes.c (pango_attr_list_splice): Improve docs.
* Bug 329547 – pango_layout_get_pixel_extents andBehdad Esfahbod2006-04-291-2/+2
| | | | | | | | | | | | | | | | 2006-04-29 Behdad Esfahbod <behdad@gnome.org> Bug 329547 – pango_layout_get_pixel_extents and pango_layout_get_pixel_size cause off-by-one metrics * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: * pango/pango-types.h: Define PANGO_PIXELS_FLOOR and * PANGO_PIXELS_CEIL. * pango/pango-layout.c (pango_layout_get_pixel_extents), (pango_layout_get_pixel_size): Make sure logical rects are consistent and ink rects are inclusive.
* Bug 337924 – cleanups for issues reported by various compilers PatchBehdad Esfahbod2006-04-111-2/+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.
* 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.
* Improve documentation for functions allocating memory, on how the objectBehdad Esfahbod2006-01-311-30/+57
| | | | | | | | | | | | | | | | 2006-01-31 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c, pango/glyphstring.c pango/pango-attributes.c pango/pango-color.c, pango/pango-context.c pango/pango-coverage.c, pango/pango-fontset.c pango/pango-glyph-item.c, pango/pango-item.c pango/pango-layout.c, pango/pango-ot-buffer.c pango/pango-ot-info.c, pango/pango-ot-ruleset.c pango/pango-script.c, pango/pango-tabs.c pango/pango-utils.c pango/pangocairo-fcfontmap.c, pango/pangocairo-fontmap.c pango/pangox-fontcache.c, pango/pangoxft-render.c: Improve documentation for functions allocating memory, on how the object should be freed.
* 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Use g_slice for various attribute types allocations. (bug #325040,Behdad Esfahbod2006-01-011-23/+35
| | | | | | | 2006-01-01 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.c: Use g_slice for various attribute types allocations. (bug #325040, Matthias Clasen)
* Added "Since:" tags to all interfaces added after Pango 1.0. (#319116,Behdad Esfahbod2005-11-231-0/+10
| | | | | | | | | | | 2005-11-23 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c pango/pango-attributes.c pango/pango-context.c pango/pango-glyph-item.c pango/pango-layout.c pango/pango-script.c pango/pango-utils.c pango/pangofc-font.c pango/pangoft2-fontmap.c pango/opentype/pango-ot-buffer.c pango/opentype/pango-ot-ruleset.c: Added "Since:" tags to all interfaces added after Pango 1.0. (#319116, Brian Cameron)
* Various documentation improvements.Behdad Esfahbod2005-11-171-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-16 Behdad Esfahbod <behdad@gnome.org> * docs/pango_markup.sgml docs/tmpl/coverage-maps.sgml docs/tmpl/engines.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/opentype.sgml docs/tmpl/pango-engine-lang.sgml docs/tmpl/pango-engine-shape.sgml docs/tmpl/pango-renderer.sgml docs/tmpl/pangocairo.sgml docs/tmpl/pangofc-decoder.sgml docs/tmpl/pangofc-font.sgml docs/tmpl/pangofc-fontmap.sgml docs/tmpl/scripts.sgml docs/tmpl/tab-stops.sgml docs/tmpl/text-attributes.sgml docs/tmpl/win32-fonts.sgml docs/tmpl/x-fonts.sgml docs/tmpl/xft-fonts.sgml pango/break.c pango/ellipsize.c pango/fonts.c pango/pango-attributes.c pango/pango-color.c pango/pango-context.c pango/pango-coverage.c pango/pango-fontmap.c pango/pango-glyph-item.c pango/pango-layout.c pango/pango-markup.c pango/pango-tabs.c pango/pango-types.h pango/pango-utils.c pango/pangoft2-render.c pango/pangox.c pango/pangoxft-render.c: Various documentation improvements.
* Fixed typo (#316054).Jean Brefort2005-09-121-1/+1
| | | | | | | 2005-09-12 Jean Brefort <jean.brefort@normalesup.org> * pango/pango-attributes.c: (pango_attr_list_splice): Fixed typo (#316054).
* Fixes for signed/unsigned in PangoAttrIterator ((#166700, Morten Welinder)Owen Taylor2005-07-261-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-07-26 Owen Taylor <otaylor@redhat.com> Fixes for signed/unsigned in PangoAttrIterator ((#166700, Morten Welinder) * pango/pango-attributes.c (pango_attr_iterator_range): Clamp results to G_MAXINT to avoid negative numbers from signed/unsigned conversions. * pango/pango-attributes.c: Make PangoAttrIterator start_index/end_index unsigned to match PangoAttribute. Change various local variables to match. * pango/ellipsize.c (advance_iterator_to) pango/pango-attributes.c (pango_attr_iterator_range) pango/pango-glyph-item.c (pango_glyph_item_apply_attrs) pango/pango-layout.c (pango_layout_line_get_empty_extents): Always check the return value from pango_attr_iterator() to deal with potential infinite loops when trying to advance to position G_MAXINT. * pango/pango-layout.c (pango_layout_set_text): Handle the case where the text passed in is longer than than G_MAXINT and length < 0. * pango/pango-attributes.c (pango_attr_list_splice): Be careful about integer overflow - clamp addition. (#163246, Morten Welinder)
* Based on patch from Gustavo J. A. M. Carneiro (#305975)Owen Taylor2005-07-221-2/+6
| | | | | | | | | | | | | | 2005-07-21 Owen Taylor <otaylor@redhat.com> Based on patch from Gustavo J. A. M. Carneiro (#305975) * pango/pango-layout.[ch] (pango_layout_line_ref) pango/pango-attributes.[ch] (pango_attr_list_ref): Return the argument to _ref() functions. * pango/pango-item.[ch]: Register PangoItem boxed type. * pango/pango-layout.[ch]: Register PangoLayoutLine boxed type.
* Fix various typos in the docs (#163244, Morten Welinder)Owen Taylor2005-03-021-2/+2
| | | | | | | 2005-03-02 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_get_attrs): Fix various typos in the docs (#163244, Morten Welinder)
* Add checks for CairoOwen Taylor2005-01-091-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix reversed test on attr->absolute that was causing pixels sizes to beOwen Taylor2005-01-061-2/+2
| | | | | | | | | Thu Jan 6 12:29:31 2005 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_get_font): Fix reversed test on attr->absolute that was causing pixels sizes to be used inappropriately. (#163105, Ross Burton)
* Fix doc sentences to parse. (#161812, Morten Welinder)Owen Taylor2005-01-041-2/+2
| | | | | | | Tue Jan 4 14:11:43 2005 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_list_splice): Fix doc sentences to parse. (#161812, Morten Welinder)
* Add pixel sizes for fonts (#119081, patch from Chris Lahey)Owen Taylor2004-12-161-19/+78
| | | | | | | | | | | | | | | | | | | | | Wed Dec 15 22:09:42 2004 Owen Taylor <otaylor@redhat.com> Add pixel sizes for fonts (#119081, patch from Chris Lahey) * pango/fonts.c pango/pango-font.h: Add pango_font_description_set_absolute_size(), pango_font_description_get_size_is_absolute() * pango/pango-attributes.[ch]: Add pango_attr_size_new_absolute(), change PANGO_ATTR_SIZE from PangoAttrInt to PangoAttrSize (preserves compat because first component is identical) * pango/pangowin32-fontmap.c (pango_win32_font_map_load_font): For absolute sizes, convert pixels to points, before calling pango_win32_font_new(). * pango/pangofc-fontmap.c pango/pangoft2.c pango/pangoxft-font.c: Handle absolute sizes.
* Add underline_color and strikethrough_color attribute types. (#147616,Owen Taylor2004-11-231-0/+54
| | | | | | | | | | | | | | | | | | | | | | | Tue Nov 23 10:23:43 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.[ch]: Add underline_color and strikethrough_color attribute types. (#147616, Morten Welinder) * pango/pango-markup.c docs/pango_markup.sgml: Add corresponding 'underline_color' and 'strikethrough_color' attributes for <span>. * pango/pango-renderer.c (pango_renderer_default_prepare_run): Implement underline and strikethrough colors. * pango/pango-renderer.c: Fix some bigs with updating underlines/strikethrough state. * pango/pango-renderer.c (get_total_matrix): Fix a const warning. * docs/pango-sections.txt: Update
* Remove color_set() virtual function ... it's not absolutely necessary forOwen Taylor2004-11-191-10/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fri Nov 19 17:44:33 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-renderer.[ch]: Remove color_set() virtual function ... it's not absolutely necessary for chaining renderers, and it's not clear that chaining renderers is actually useful, anyways. * pango/pango-renderer.[ch] (pango_renderer_set_color): Constify color argument. * pango/pango-render.c: Fix various bugs. * pango/pango-attributes.[ch] (pango_attr_shape_new_with_data): Add the ability to create a shape attribute with user data. * pango/pango-renderer.[ch] (PangoRendererClass): Add a draw_shape virtual function, to draw content for PangoAttrShape. * pango/pangoxft-fontmap.c (pango_xft_shutdown_display): Add note to docs that XCloseDisplay() will automatically take care of releasing Pango's allocated resources for the display. * docs/Makefile.am (SCAN_OPTIONS): Add the appropriate --deprecated-guards option. * docs/tmpl/xft-fonts.sgml: Add long description. * docs/tmpl/x-fonts.sgml: Document as dead.
* Add new letter_spacing attribute.Owen Taylor2004-06-231-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jun 23 11:17:51 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.[ch]: Add new letter_spacing attribute. * pango/pango-attributes.c (pango_attr_rise_new): Correct description; rise is in Pango units, not em-relative. * pango/pango-glyph-item.c: Break out iteration-over-clusters from ApplyAttrsState into a separate GlyphItemIter. * pango/pango-glyph-item.[ch]: New function pango_glyph_item_letter_space() to add add letter spacing to a single glyph item. * pango/pango-markup.c: Add a letter_spacing attribute. * pango/pango-layout.c: Use G_DEFINE_TYPE(). * pango/pango-layout.c (pango_layout_get_item_properties): Switch to use a structure rather than a pile of out parameters. * pango/pango-layout.c (pango_run_get_extents): Remove the unused shape_set out parameter. * pango/pangofc-decoder.[ch] pango/pangofc-fontmap.[ch]: Doc fixes. * pango/pango-types.h: Deprecate pango_get_mirror_char() * pango/pango-utils.c (pango_get_mirror_char): Add docs. * docs/pango-sections.txt docs/pango-docs.sgml: Add PangoFcDecoder and letter spacing.
* Initialize state->lang from context->language if not otherwise set.Owen Taylor2004-06-211-1/+1
| | | | | | | | | | | | Mon Jun 21 15:26:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (update_attr_iterator): Initialize state->lang from context->language if not otherwise set. Without doing this, the default language tag was, not suprisingly, having no effect! (#137334, Frederic Zhang) * pango/pango-attributes.c (pango_attr_iterator_get_font): Fix typo in doc comment.
* Fix leak when inserting an empty attributes. (#140771, Morten Welinder)Owen Taylor2004-06-211-1/+4
| | | | | | | | Mon Jun 21 11:41:18 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_list_change): Fix leak when inserting an empty attributes. (#140771, Morten Welinder)
* New attribute to turn font fallback on or off. (#105553)Noah Levitt2004-02-291-0/+27
| | | | | | | | | | | | 2003-02-29 Noah Levitt <nlevitt@columbia.edu> * docs/pango_markup.sgml: * docs/tmpl/text-attributes.sgml: * pango/pango-attributes.c: * pango/pango-attributes.h: * pango/pango-context.c: * pango/pango-markup.c: New attribute to turn font fallback on or off. (#105553)
* Fix infinite loop introduced with last change. (#133749, reported byOwen Taylor2004-02-091-1/+1
| | | | | | | | Mon Feb 9 09:52:24 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_next): Fix infinite loop introduced with last change. (#133749, reported by Mariano Suárez-Alvarez)
* Fix problem with empty markup tags (#128102, Christian Persch)Owen Taylor2004-02-051-4/+10
| | | | | | | | | | | | | | | Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> Fix problem with empty markup tags (#128102, Christian Persch) * pango/pango-context.c (itemize_state_process_run): Assert that the run is non-empty. * pango/pango-attributes.c (pango_attr_list_change): Just ignore empty attributes. * pango/pango-attributes.c (pango_attr_iterator_next): Skip empty attributes.
* Correct the documentation. (#128431, Ross Burton)Matthias Clasen2003-12-181-1/+1
| | | | | | | Thu Dec 18 01:20:31 2003 Matthias Clasen <maclas@gmx.de> * pango/pango-attributes.c (pango_attr_size_new): Correct the documentation. (#128431, Ross Burton)
* Fix _SCALE semantics. Fixes bug 121543; patch from Owen.Morten Welinder2003-11-181-4/+9
| | | | | | | 2003-11-18 Morten Welinder <terra@gnome.org> * pango/pango-attributes.c (pango_attr_iterator_get_font): Fix _SCALE semantics. Fixes bug 121543; patch from Owen.
* Doc markup and typo fixes.Matthias Clasen2003-06-251-4/+4
| | | | | | | | | | 2003-06-25 Matthias Clasen <maclas@gmx.de> * pango/pango-layout.c: * pango/pango-tabs.c: * pango/pango-attributes.c: * docs/tmpl/layout.sgml: * docs/tmpl/text-attributes.sgml: Doc markup and typo fixes.
* Return FALSE, not -1 in g_return_val_if_fail(). (#107666, MortenOwen Taylor2003-04-151-1/+1
| | | | | | | | Tue Apr 15 03:47:37 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_next): Return FALSE, not -1 in g_return_val_if_fail(). (#107666, Morten Welinder.)
* Rename PangoLayoutRun to PangoGlyphItem (with a typedef for compat), addOwen Taylor2002-12-031-1/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun Nov 17 23:28:26 2002 Owen Taylor <otaylor@redhat.com> * pango/pango-glyph-item.[ch] pango/pango-layout.h: Rename PangoLayoutRun to PangoGlyphItem (with a typedef for compat), add pango_glyph_item_split(), pango_glyph_item_apply_attrs(). * pango/pango-attributes.[ch]: Add pango_attr_list_filter(), pango_attr_iterator_get_attrs(). * pango/pango-layout.c: Remove attributes that don't affect shaping before shaping, shape and then add them back. Fixes the infamous "underscores break arabic shaping" bug (#83058) * pango/pango-item.h: Remove an extraneous include. * pango/pango-layout.c (imposed_shape): Fix bytes/chars problem for glyph->log_clusters. * pango/pango-layout.c (cluster_end_index) * pango/pango-layout.c (pango_layout_iter_next_cluster): Fix confusion between global indices and run-relative indices. * docs/tmpl/glyphs.sgml: Improve docs for log_clusters. * docs/*: Document new API and PangoOTRuleset
* Use PANGO_FONT_MASK_* not PANGO_ATTR_* when manipulating the mask. AddOwen Taylor2001-09-281-14/+15
| | | | | | | | | | Fri Sep 28 11:27:57 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_get_font): Use PANGO_FONT_MASK_* not PANGO_ATTR_* when manipulating the mask. Add fields to mask for PANGO_ATTR_FONT_DESC so it won't be overwritten by later attributes. (Fixes from Tony Graham, #61297)
* Up to 0.19.Owen Taylor2001-09-181-80/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update to the new g_boxed_type_register_static API.Alex Larsson2001-09-101-3/+1
| | | | | | | | | | | | 2001-09-10 Alex Larsson <alexl@redhat.com> * pango/fonts.c: * pango/glyphstring.c: * pango/pango-attributes.c: * pango/pango-color.c: * pango/pango-tabs.c: * pango/pango-utils.c: Update to the new g_boxed_type_register_static API.
* New file, move color handling here.Owen Taylor2001-08-301-54/+0
| | | | | | | | | | | Thu Aug 30 17:34:52 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-color.c: New file, move color handling here. * pango/pango-attributes.[ch] pango/pango-markup.c pango/pango-color.c: Export pango_color_parse, change it to take a PangoColor as its argument.
* Remove stray semicolon.Darin Adler2001-07-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/arabic/arabic-x.c: (arabic_engine_shape): Remove stray semicolon. * modules/arabic/arconv.h: * modules/arabic/arconv.c: (shape), (doublelig), (arabic_reshape): Use long* instead of int* for parameter to match what's passed in. * modules/indic/bengali-x.c: Add missing <string.h> include. (pango_indic_make_ligs): Use local variable that was added but not ever used. (pango_indic_engine_shape): Remove unused locals. * modules/indic/devanagari-x.c: Add missing <string.h> include. (pango_indic_engine_shape): Remove unused local. * modules/indic/gujarati-x.c: Add missing <string.h> include. (pango_indic_engine_shape): Remove unused local * modules/tamil/tamil-x.c: (tamil_engine_shape): Initialize a variable to quiet the compiler's unused warning. * pango/.cvsignore: Ignore more generated files. * pango/opentype/ftxgpos.c: (Get_Anchor): Add code to set up the ap variable. The old code would just use the uninitialized value. * pango/opentype/ftxopen.c: (Load_Coverage): Remove unused local. * pango/opentype/pango-ot-ruleset.c: (pango_ot_ruleset_shape): Remove unused local. * pango/pango-attributes.c: (pango_attr_list_get_type), (pango_color_get_type): Add needed function type casts (just warnings under gcc, but could be errors in other compilers). * pango/pangoxft-font.c: (pango_xft_font_get_metrics), (pango_xft_font_get_coverage), (pango_xft_get_shaper_map), (pango_xft_font_find_shaper): Switch from lang char* to PangoLanguage*. The code was still compiling, but would not have worked.
* Add a new PangoLanguage type to represent language tags; these canOwen Taylor2001-06-141-21/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removed pango_justify(), since it has no implementation that I can find.Havoc Pennington2001-04-171-1/+18
| | | | | | | | | | | 2001-04-16 Havoc Pennington <hp@pobox.com> * pango/pango-glyph.h: Removed pango_justify(), since it has no implementation that I can find. * pango/pango-attributes.c: docs * pango/pango-layout.c: docs
* fixed up g_boxed_type_register_static() since GLib signature changed.Tim Janik2001-03-071-14/+10
| | | | | | | | | Wed Mar 7 09:21:14 2001 Tim Janik <timj@gtk.org> * pango/pango-attributes.c: fixed up g_boxed_type_register_static() since GLib signature changed. * got rid of bogus g_type_init() calls.
* Added pango_attr_list_get_type, and PANGO_TYPE_ATTR_LIST.Alexander Larsson2001-02-281-0/+17
| | | | | | | 2001-02-28 Alexander Larsson <alla@lysator.liu.se> * pango/pango-attributes.[c]: Added pango_attr_list_get_type, and PANGO_TYPE_ATTR_LIST.
* properly update the tail of the list (pango_attr_list_change): flip orderHavoc Pennington2001-02-131-1/+6
| | | | | | | | | | | | | | | | | | 2001-02-12 Havoc Pennington <hp@redhat.com> * pango/pango-attributes.c (pango_attr_list_insert_internal): properly update the tail of the list (pango_attr_list_change): flip order of tmp_list2 = tmp_list2->next and prev2 = tmp_list2 to avoid setting prev2 and tmp_list2 to the same value thus creating a mangled list. * pango/pango-layout.c (pango_layout_xy_to_index): When returning FALSE, set the index/trailing to the nearest location, instead of setting them to 0. (pango_layout_line_x_to_index): Fix a bug where line->start_index wasn't used. Return boolean for whether we had to clamp the value to get an index.
* 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.
* take a PangoColor not a PangoAttrColorHavoc Pennington2001-01-261-8/+49
| | | | | | | | | | | | | | | | | 2001-01-26 Havoc Pennington <hp@redhat.com> * pango/pangox.h (PangoGetGCFunc): take a PangoColor not a PangoAttrColor * pango/pango-attributes.h: add PangoColor, add PANGO_ATTR_INVALID as a placeholder for zero in the PangoAttrType enum, corresponds to G_TYPE_INVALID. * pango/pango-attributes.c: Add PangoColor type, use for PangoAttrColor (pango_color_get_type): new function (pango_color_copy): new function (pango_color_free): new function
* Renamed pango_attribute_compare to pango_attribute_equal. Renamed compareSebastian Wilhelmi2000-11-131-34/+34
| | | | | | | | | | | | | | | | 2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * pango/pango-attributes.c, pango/pango-attributes.h: Renamed pango_attribute_compare to pango_attribute_equal. Renamed compare member of PangoAttrClass to equal. Renamed some static functions from ..._compare to ..._equal. * pango/fonts.c, pango/pango-font.h, pango/pango-context.c: Renamed pango_font_description_compare to pango_font_description_equal. * docs/pango-sections.txt, docs/tmpl/fonts.sgml, docs/tmpl/text-attributes.sgml: Changed accordingly.
* Add a new attribute for scaling a font; also required addingHavoc Pennington2000-11-011-11/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.