summaryrefslogtreecommitdiff
path: root/pango/pango-layout.h
Commit message (Collapse)AuthorAgeFilesLines
* delete lang engineHavoc Pennington2000-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-30 Havoc Pennington <hp@pobox.com> * modules/thai/thai.c: delete lang engine * modules/tamil/tamil.c: delete lang engine (tamil_engine_x_new): fix type tag for shape engine * modules/indic/myanmar.c: delete lang engine (pango_engine_x_new): fix type tag for shape engine * modules/indic/gurmukhi.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/gujarati.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/devanagari.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/pango-indic-script.h (SCRIPT_ENGINE_DEFINITION): delete lang engine * modules/indic/bengali.c: delete the lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/hangul/hangul.c: delete the lang engine (hangul_engine_x_new): fix type tag for shape engine * modules/basic/basic.c: delete the lang engine (basic_engine_x_new): fix type tag for shape engine * modules/basic/basic-win32.c: delete the lang engine (basic_engine_win32_new): this was a shape engine, use correct type tag * modules/basic/basic-ft2.c: delete the lang engine * modules/arabic/arabic.c: Delete the lang engine (arabic_engine_x_new): this is a shape engine, not a lang engine, fix type tag * pango/pango-layout.c (pango_layout_index_to_line_x): handle the fact that paragraph delimiters aren't in the layout lines (pango_layout_index_to_pos): update to handle paragraph delimiters * pango/break.c (pango_find_paragraph_boundary): New function to find paragraph boundaries * pango/pango-layout.c (get_items_log_attrs): don't separate calls to pango_break() when directional level changes * pango/pango-layout.h (struct _PangoLayoutLine): put start index of the line into the struct * pango/pango-layout.c (pango_layout_get_cursor_pos): Fixups to reflect the fact that paragraph separators are removed from the input text. * pango/pango-layout.c (can_break_at): don't special-case start of line and whitespace-following-alphabetic here, because pango_break() already handles that properly * tests/testboundaries.c, tests/Makefile.am, tests/runtests.sh: Add directory for test programs, and a script to run them all * configure.in: Create Makefile in tests * pango/break.c (pango_break): Try for a real implementation of the Unicode text boundary algorithms (pango_get_log_attrs): Allow length to be -1 * pango/pango-context.c (pango_itemize): use pango_item_new(), assert that items added to the list are sane. * pango/pango-layout.c (pango_layout_check_lines): Reimplement to honor the paragraph boundaries from pango_break() * pango/pango-layout.c (process_item): use pango_item_split() here * pango/pango-item.c (pango_item_split): New function to split an item into two items
* Add new PangoLayoutIter entry pointsHavoc Pennington2000-11-131-0/+37
| | | | | | | | | | | | | | | | | | 2000-11-13 Havoc Pennington <hp@redhat.com> * docs/pango-sections.txt: Add new PangoLayoutIter entry points * pango/glyphstring.c (pango_glyph_string_extents_range): New function * pango/pango-layout.c: Create PangoLayoutIter for iterating over a layout's visual elements * pango/pango-layout.c (pango_layout_check_lines): plug a memleak (attr iterator not freed) * pango/pango-tabs.c (pango_tab_array_free): plug a memleak (array->tabs not freed)
* Add accessor to get the text from the layoutHavoc Pennington2000-11-121-0/+1
| | | | | | | 2000-11-12 Havoc Pennington <hp@pobox.com> * pango/pango-layout.c (pango_layout_get_text): Add accessor to get the text from the layout
* Add a new attribute for scaling a font; also required addingHavoc Pennington2000-11-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a tab array field to PangoLayout, and use it when laying out the textHavoc Pennington2000-09-251-1/+7
| | | | | | | | | | 2000-09-25 Havoc Pennington <hp@redhat.com> * pango/pango-layout.c: Add a tab array field to PangoLayout, and use it when laying out the text (if it's set, otherwise use default tabs-are-8-spaces thing) * pango/pango-tabs.c, pango/pango-tabs.h: tab-related data types
* Utilize G_GNUC_CONST.Elliot Lee2000-08-301-1/+1
| | | | Utilize G_GNUC_CONST.
* New function that inserts before other attributes with matching startOwen Taylor2000-07-021-15/+17
| | | | | | | | | | | | 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.
* Add a PANGO_PIXELS macro to convert from pango units to device units andOwen Taylor2000-07-021-0/+12
| | | | | | | | | | | Sun Jul 2 17:19:11 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-types.h: Add a PANGO_PIXELS macro to convert from pango units to device units and round. * pango/pango-layout.[ch]: Add convenience functions pango_layout_get_pixel_extents, pango_layout_get_size, pango_layout_get_pixel_size pango_layout_line_get_pixel_extents.
* GTK+ should compile now... sorry about the mess...Havoc Pennington2000-06-211-6/+17
| | | | | | | | | | | | | | 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
* add comment delimiters around trailing text after #endifs to remove warningsChristopher Blizzard2000-06-191-1/+1
|
* Since we require GLib-1.3, and thus can no longer build the examplesOwen Taylor2000-05-281-1/+1
| | | | | | | | | | | | | | | | Sun May 28 16:24:43 2000 Owen Taylor <otaylor@redhat.com> * examples/Makefile.am examples/viewer-qt.cc examples/viewer-qt.h: Since we require GLib-1.3, and thus can no longer build the examples against GTK+-1.2, and since there is a nasty circular dependency if we build examples against GTK+-1.3, rewrite (optional) example program in Qt. (I wasn't going to do it in Xaw or straight Xlib...) * configure.in: Added checks for Qt. * pango/pango-layout.h: Fix constness.
* New function for visual (left-right, not forward-back) cursor navigationOwen Taylor2000-04-241-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun Apr 23 23:33:10 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_move_cursor_visually): New function for visual (left-right, not forward-back) cursor navigation within a layout. Thu Apr 20 22:16:39 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_line_x_to_index): As a hack, for x-positions at the edge of a line, fudge the position to be one before the line end (which is, for programs that don't properly handle the trailing flag), instead of at the end of the line. This works fine for whitespace-broken languages, but won't work right for languages that don't use whitespace to break lines. (GtkText* needs to keep track of whether a cursor is trailing or not) * pango/pango-layout.c (pango_layout_check_lines): Prohibit breaking a line at a non-whitespace -> space transition. (So that we never put wrap single character of whitespace at the beginning of a line) * pango/break.c (pango_break): Always allow a break before the first char. * pango/pango-layout.c (pango_layout_line_x_to_index): Remove the return value from the function, make it return the appropriate index depending on the base direction of the layoutt.
* Add a function pango_layout_line_get_x_ranges(), to allow handlingOwen Taylor2000-04-181-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add user data to PangoContextOwen Taylor2000-04-051-0/+2
| | | | | | | | | | | | | | | | | | Tue Apr 4 20:13:06 2000 Owen Taylor <otaylor@redhat.com> * pango/pango-context.h: Add user data to PangoContext * pango/pangox.[ch] examples/viewer.c: Rework system for create GC's so that the necessary information is stored on the PangoContext instead of being passed to layout_render() * pango/utils.[ch] pango/pango-context.c: fribidi-0.1.9 wants UCS-4 not UCS2; switch accordingly. * pango/fonts.c pango/pango-font.h pango/pangox.c: Add functions to get overall font metrics, possibly per-language. (Right now, just font ascent, descent.) The implementation of this for X is horribly complex.
* Use "UTF-8" with the dash as the charset name for utf-8. (Change suggestedOwen Taylor2000-03-301-0/+4
| | | | | | | | | | | Thu Mar 30 16:49:06 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/basic.c pango/utils.c (find_converter): Use "UTF-8" with the dash as the charset name for utf-8. (Change suggested by Adrian Havill <havill@turbolinux.co.jp>) * pango/pango-layout.[ch]: Add function to get logical attributes of the text string.
* Memory management functions for PangoItem.Owen Taylor2000-03-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Release pango-0.8Owen Taylor2000-03-101-23/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Mar 9 19:55:21 2000 Owen Taylor <otaylor@redhat.com> * Release pango-0.8 * docs/TEXT/coding-style: Added some notes about coding style within Pango. * modules/*.[ch]: New version from Karl Koehler adding support for vowels marks, better ligatures. * docs/tmpl/*: Doc updates * libpango/pango-layout.[ch] libpango/pangox/.[ch]: Add functions for handling paragraphs as 2-D objects, not simple lists of lines, to make things easier for people using pango-layout. * examples/viewer.c: Simplify using the now 2-D layout-capabable PangoLayout. * libpango/fonts.c (pango_font_{get_coverage,find_shaper}): Allow NULL language tag. * libpango/modules.c (_pango_find_map): Fix for allowing NULL language tag.
* First draft of highlevel driver. It currently only handles a paragraph asOwen Taylor2000-03-081-31/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Mar 8 13:34:57 2000 Owen Taylor <otaylor@redhat.com> * libpango/pango-layout.[ch]: First draft of highlevel driver. It currently only handles a paragraph as a list of lines, but it is probably necessary to make it handle 2D layout for a paragraph as well * examples/viewer.c: Move over to new layout driver (much of the code moved into pango-layout.c) * libpango/glyphs.c libpango/pango-glyphs.h: Fixes to get_extents(), add pango_glyph_string_get_logical_widths. * libpango/pango-itemize.c: Handle 0-length text properly. * libpango/pangox.c: When loading particular sized fonts, use the original XLFD, since XFree86 doesn't handle wildcards in aliases properly. * libpango/pangox.[ch] (pango_x_render_layout_line): Add function to render an entire PangoLayoutLine. * libpango/reorder-items.c: Add a note to the effect that pango_reorder_items() is basically replaced by a similar function in PangoLayout. Wed Mar 8 10:58:56 2000 Owen Taylor <otaylor@redhat.com> * modules/arabic/arconv.c (shapecount): Fix from Karl Koehler to joining behavior. * modules/Makefile.am modules/arabic/*: Added arabic shaper from Karl Koehler <koehler@or.uni-bonn.de> * modules/basic/tables-{small,big}.i: Remove arabic from the ranges that the basic shaper marks as "exact". * examples/HELLO.utf8: Partially alphabetize, add arabic.
* Convert log_clusters[] use from char offsets to byte offset - should makeOwen Taylor2000-03-071-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* The great header file reorganization. Split up roughtly by objects.Owen Taylor2000-02-011-0/+44
Wed Feb 2 00:07:13 2000 Owen Taylor <otaylor@redhat.com> * libpango/pango-*.h: The great header file reorganization. Split up roughtly by objects. * libpango/pango-font.h libpango/fonts.h: Add generic font-loading and listing interfaces. * libpango/pangox.c: Implement font-listing/loading interfaces for X. * libpango/pango-context.[ch]: Flesh out context structure. Add appropriate accesors, font loading-methods, etc. * libpango/pango-coverage.[ch]: Coverage map objects. * examples/viewer.c: First stab at adding font-selection. Majorly deficient for the moment until we add font lists and fallbacks based on coverage maps.