summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Redo the handling of absolute sizes for PangoAttribute to work aroundOwen Taylor2005-03-021-11/+24
| | | | | | | | | | | | | | | | | 2005-03-02 Owen Taylor <otaylor@redhat.com> Redo the handling of absolute sizes for PangoAttribute to work around compatibility problems with GtkHTML which was counting on the details of the implementation of size attributes. (#163154) * pango/pango-attributes.[ch] docs/tmpl/text-attributes.sgml: Split PANGO_ATTR_SIZE into PANGO_ATTR_SIZE and PANGO_ATTR_ABSOLUTE_SIZE, and use that distinction rather than the boolean field in PangoAttrSize to distinguish between attributes created pango_attr_size_new_absolute() and pango_attr_size_new()
* 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.
* Fix bug where wrong attribute list was unreferenced.Owen Taylor2000-09-111-1/+64
| | | | | | | | | | | | | | Sun Sep 10 03:01:53 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_attributes): Fix bug where wrong attribute list was unreferenced. * pango/pango-attributes.[ch]: Add function pango_attr_list_splice() to splice contents of one attribute list into another attribute list. * pango/pango-utils.h: Add include of pango-font.h since it now depends on declarations from there.
* Minor fixes to Owen's patch below to make it work.Jonathan Blandford2000-09-081-28/+127
| | | | | | | | | | | 2000-09-08 Jonathan Blandford <jrb@redhat.com> * pango/pango-attributes.c (pango_attr_list_change): Minor fixes to Owen's patch below to make it work. * pango/pango-attributes.c (pango_attribute_copy): Copy the start_index/end_index explicitly rather then rely on the copy function doing it for you, as none did so.
* If the first pango_skip_space fails, remember to free enginepair beforeElliot Lee2000-08-081-1/+3
| | | | | | | | * pango/modules.c: If the first pango_skip_space fails, remember to free enginepair before continuing. * pango/pango-layout.c (pango_layout_set_attributes): unref old attr list after reffing new one, in case setting to same thing. * pango/pango-attributes.c (pango_attr_list_insert_internal): Proper fix from Owen for the infinite loop.
* Fix segfault when tmp_list has no 'prev' pointer. Infinite loops do notElliot Lee2000-08-041-1/+1
| | | | | | | | | | 2000-08-03 Elliot Lee <sopwith@redhat.com> * pango/modules.c: Fix segfault when tmp_list has no 'prev' pointer. * pango/pango-attributes.c (pango_attr_list_insert_internal): Infinite loops do not fast programs make. * pango/pango-context.c: Set a default font size so that things don't go boom if someone forgets to set it themselves. * pango/pango-layout.c (pango_layout_index_to_pos): Exclude newlines from consideration. (pango_layout_line_index_to_x): Take shape attributes into consideration when determining position.
* A bit of code cleanup.Owen Taylor2000-07-211-0/+67
| | | | | | | | | | | | | | | | Fri Jul 21 15:17:26 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (pango_itemize): A bit of code cleanup. * pango/pango-attributes.[ch]: Add a new attribute type PangoAttrShape, for imposing specific shapes on glyphs. This is used for handling embedded pixmaps and similar objects. * pango/pango-layout.c: Hnadle PangoAttrShape. * pango/pango-context.[ch]:
* Free buffer strings.Owen Taylor2000-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | Fri Jul 21 09:59:10 2000 Owen Taylor <otaylor@redhat.com> * pango/modules.c (process_module_file): Free buffer strings. * pango/pangox-fontmap.c (pango_x_real_get_coverage_win): Add caching of coverage maps on a persistant subwindow of the root window. This window contains a property for each "lang|xlfd,xlfd" which is the result of pango_coverage_to_bytes. * pango/pango-context.c (pango_context_finalize): Free the font description. * pango/pango-coverage.c (pango_coverage_to/from_bytes): Added functions to covert a PangoCoverage structure too and from a flat block of bytes. * configure.in (X_LIBS): Add a check to detect fribidi being compiled against glib-1.2.x.
* New function that inserts before other attributes with matching startOwen Taylor2000-07-021-17/+48
| | | | | | | | | | | | Sun Jul 2 17:59:56 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.[ch] (pango_attr_list_insert_before): New function that inserts before other attributes with matching start index. * pango/pango-layout.[ch] (pango_layout_set_font_description): Add the ability to set a default font description on the layout, overriding the font description from the context.
* GTK+ should compile now... sorry about the mess...Havoc Pennington2000-06-211-0/+36
| | | | | | | | | | | | | | 2000-06-14 Havoc Pennington <hp@redhat.com> * pango/pango-attributes.c (pango_attr_list_copy): Function to copy the attribute list. 2000-06-13 Havoc Pennington <hp@redhat.com> * pango/pango-layout.h: Convert PangoLayout to GObject * pango/pango-context.h: Convert to PangoContext to GObject
* New function to copy a PangoAttrIterator.Havoc Pennington2000-06-071-4/+28
| | | | | | | 2000-06-07 Havoc Pennington <hp@redhat.com> * pango/pango-attributes.c (pango_attr_iterator_copy): New function to copy a PangoAttrIterator.
* Add a function pango_layout_line_get_x_ranges(), to allow handlingOwen Taylor2000-04-181-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Apr 17 12:04:20 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch]: Add a function pango_layout_line_get_x_ranges(), to allow handling selections not as attributes. Which is necessary, since currently setting the background/foreground results in splitting shaped runs. Fri Apr 14 13:20:05 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_check_lines): Fix bug with indent handling. * pango/pango-layout.c (process_item): Never break a line at a non-break position, even if that position ends an item. Fri Apr 14 10:43:09 2000 Owen Taylor <otaylor@redhat.com> * pango/pangox.c (pango_x_render_layout_line): Fix a missing PANGO_SCALE factor for UNDERLINE_SINGLE. * pango/pango-layout.c (pango_layout_get_cursor_pos): New function to determine cursor positions corresponding to a particular index. Wed Apr 12 15:44:22 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.[ch]: Add PANGO_ATTR_FONT_DESC, which allows an entire font description to be specified as a single attribute, instead of as 6 separate attributes.
* Doc updates.Owen Taylor2000-04-051-1/+1
| | | | | | | Tue Apr 4 20:56:29 2000 Owen Taylor <otaylor@redhat.com> * docs/tmpl/* docs/Makefile.am docs/pango-sections.txt pango/pango-attributes.c pango/pangox.c: Doc updates.
* Fix off-by-one error for RTL runs.Owen Taylor2000-04-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Mon Apr 3 15:16:06 2000 Owen Taylor <otaylor@redhat.com> * pango/glyphstring.c (pango_glyph_string_get_logical_widths): Fix off-by-one error for RTL runs. * configure.in: Add -lglib to AC_CHECK_LIB(fribidi...) (How did this work?) From Matt Wilson. * pango/pango-layout.c (pango_layout_check_lines): Correctly deal with handling character offsets when breaking lines. * modules/arabic/arabic.c (arabic_engine_shape): Fix problem with setting unknown glyph when no arabic-capable font found. Fri Mar 31 11:29:47 2000 Owen Taylor <otaylor@redhat.com> * pango/pangox.[ch] (pango_x_render_layout[_line]) examples/viewer.c: Add capability to render foreground / background colors. The interfaces here are possibly certainly not right, or convenient, but they should be a start.
* Memory management functions for PangoItem.Owen Taylor2000-03-131-21/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Mar 13 10:54:48 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-item.[ch]: Memory management functions for PangoItem. * pango/*.[ch]: Random constification. * pango/pangox.c pango/pango-layout.c pango/pango-context.c: Add an extra_attrs field to PangoItem. Use this to handle underlining for PangoLayout. * examples/viewer.c (reload_font): Make paragraphs global to save the complexity of passing it around all over the place. * pango/pango-layout.[ch] (pango_layout_context_changed): Add a function to reset the layout on changes to the layout's context. * pango/pangox.c (pango_x_make_matching_xlfd): Prefer bitmap to scaleable if the discrepancy is < 1 pixel. (Probably not the ideal criterion.) * pango/pangox.c (pango_x_font_map_for_display): Fix resolution computation error. * pango/pango-layout.c (pango_layout_check_lines): Handle text with embedded newlines. * pango/pangox.c (pango_x_render_layout): Fix y to refer to the top of the layout, not the baseline of the first line. * pango/pango-layout.c (process_item): Don't wrap if width is set to -1. * Makefile.am configure.in **/*.[ch]: move libpango/ directory and fix all headers to install under include/pango/
* Convert log_clusters[] use from char offsets to byte offset - should makeOwen Taylor2000-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Mar 6 20:55:32 2000 Owen Taylor <otaylor@redhat.com> * libpango/mapping.c example/viewer.c: * modules/hangul/hangul.c modules/basic/basic.c modules/tamil/tamil.c: Convert log_clusters[] use from char offsets to byte offset - should make it easier to have all interface deal with stuff in byte offsets. * libpango/mapping.c libpango/pango-glyph.h: Rename x_to_cp and cp_to_x to make them "member functions" of glyph_string. * libpango/pango-types.h: Add a rectangle type for use in storing glyph/glyph-string extents, plus macros for extracting ascent/descent. * libpango/fonts.c libpango/pango-font.h libpango/pangox.c: Virtualize glyph extents function into the font. * libpango/pangox.c modules/*/*.c examples/viewer.c: Convert over to new rationalized unit system - everything in 1000ths of a point or 1000ths of a glyph unit. * libpango/pango-glyph.h libpango/glyphstring.c: Add function to get extents of a glyph string. (We may want to fastpath the width in the future, since getting the width seems to be a very common and time-critical operation)
* Add size to the font description structure instead of continually passingOwen Taylor2000-02-251-0/+3
| | | | | | | | | | | | Fri Feb 25 15:04:21 2000 Owen Taylor <otaylor@redhat.com> * libpango/{fonts.c,pango-font.h,pango-context.[ch],pangox.c, pango-attributes.c,examples/viewer.c: Add size to the font description structure instead of continually passing it around as an extra argument. * libpango/pangox.c: Take screen resolution into account when choosing fonts, instead of assumming point == pixel.
* Make refcounted.Owen Taylor2000-02-161-47/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Feb 16 16:39:46 2000 Owen Taylor <otaylor@redhat.com> * libpango/pango-coverage.c (pango_coverage_get): Make refcounted. * libpango/modules.c (struct _PangoEnginePair): Since we don't currently unload engines, cache loaded engines. (Not really quite satisfactory, but should work OK) * libpango/pango-context.c (pango_context_get_font_description): Added a global font description. * libpango/modules.c (_pango_find_map): Allow NULL language tags. * libpango/pango-context.c (pango_itemize) examples/viewer.c: Switch itemize over to take a PangoAttrList. * examples/viewer.c: Conform to changes in itemization interface * libpango/font.[ch]: Add a compare function for FontDescription * libpango/pango-attributes.[ch]: Change the iteration iterface to be more convenient. * libpango/pango-context.[ch]: Add the ability to set a default font. * libpango/pango-context.[ch]: Take the font for itemization from the attributes on the text. * libpango/pangox.c: Cache currently loaded fonts, and cache coverages.
* Add documentation for attributes.Owen Taylor2000-02-151-55/+571
| | | | | | | | | Tue Feb 15 02:35:56 2000 Owen Taylor <otaylor@redhat.com> * docs/**: Add documentation for attributes. * Makefile.am libpango/pango-attributes.[ch]: Finish initial implementation of attributes APIs.
* Start of attribute lists.Owen Taylor2000-02-151-0/+386
Mon Feb 14 22:04:38 2000 Owen Taylor <otaylor@redhat.com> * libpango/pango-attributes.[ch]: Start of attribute lists.