2006-12-04 Behdad Esfahbod * === Released 1.15.1 === * configure.in: Version 1.15.1 * NEWS: Updated. 2006-12-04 Behdad Esfahbod Bug 135683 – Cache glyphstring extents Cache line extents. This avoids the final pango_font_get_glyph_extents() call per glyph per layout rendering. Now we don't make any pango_font_get_glyph_extents() calls when rendering a layout (some conditions apply). * pango/pango-layout.c (pango_layout_get_lines), (pango_layout_get_line), (pango_layout_line_leaked), (pango_layout_line_get_extents), (pango_layout_line_new), (pango_layout_iter_get_run), (pango_layout_iter_get_line): Cache line extents. Line extents are cached only if the user doesn't have a pointer to the line or any of its runs. Functions that give away such pointers mark the line as "leak"ed. * pango/pango-layout.c (pango_layout_index_to_line_and_extents), (pango_layout_xy_to_index), (pango_layout_index_to_pos): Use _pango_layout_iter_get_line() which is like pango_layout_iter_get_line() but doesn't leak the line. * pango/pango-layout-private.h: Add pango_layout_iter_get_line() duplicate _pango_layout_iter_get_line_readonly() that doesn't leak the line. * pango/pango-renderer.c (pango_renderer_draw_layout): Use _pango_layout_iter_get_line_readonly(). 2006-12-04 Behdad Esfahbod * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame): Improve upon last change. Suggested by Carl Worth: use cairo_rectangle(x + width, y, -width, height) to do a rectangle with the other orientation. 2006-12-04 Behdad Esfahbod * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame), (_pango_cairo_renderer_draw_box_glyph), (_pango_cairo_renderer_draw_unknown_glyph): Fix handling of boxes drawn in do_path mode. Previously we were doing one rectangle and stroke it if in show mode, and leave it alone if in path mode. That doesn't really work. Now we do two rectangles, for the outer and inner rects of the box border, but with different orientations, such that pango_cairo_layout_path(); cairo_fill(); works for hexboxes now. 2006-12-04 Behdad Esfahbod Red Hat Bug 211964: [ta] Rendering issue with Tamil Patch from LingNing Zhang * modules/indic/indic-ot-class-tables.c (indic_ot_find_syllable): Handle 2 split matra. 2006-12-04 Behdad Esfahbod * pango/pango-renderer.c (pango_renderer_draw_layout_line), (pango_renderer_draw_glyphs), (pango_renderer_draw_rectangle), (pango_renderer_draw_error_underline), (pango_renderer_draw_trapezoid), (pango_renderer_draw_glyph), (pango_renderer_activate), (pango_renderer_deactivate), (pango_renderer_set_color), (pango_renderer_get_color), (pango_renderer_part_changed), (pango_renderer_prepare_run), (pango_renderer_set_matrix): Replace PANGO_IS_RENDERER with PANGO_IS_RENDERER_FAST that is just a NULL-check. 2006-12-01 Behdad Esfahbod Red Hat Bug 213632: ZWJ (200d) and ZWNJ (200c) showing same output Patch from LingNing Zhang * modules/indic/indic-ot.c (indic_ot_reorder): Handle ZWNJ. 2006-12-01 Behdad Esfahbod * pango/pango-layout.c (pango_layout_run_get_width), (update_run), (pango_layout_iter_copy), (pango_layout_iter_get_run_extents): Don't cache run_logical_rect in PangoLayoutIter. Just cache run_width that can be fastly computed using pango_glyph_string_get_width(). Avoids one pango_font_get_glyph_extents() call per glyph per layout rendering. We are down to 1 now. 2006-11-30 Behdad Esfahbod * pango/pango-layout.c (pango_layout_get_extents_internal): Rework the way we compute the real_width to avoid calling pango_layout_get_extents(), and so, avoid one pango_font_get_glyph_extents() call per glyph per layout rendering. We now make 2 such calls. 2006-11-30 Behdad Esfahbod * pango/pango-renderer.c (pango_renderer_draw_layout_line): Don't call into pango_glyph_string_extents() if we don't need anything out of it! (Ok, that function returns immediately in that case, but still, avoiding the call overhead.) 2006-11-30 Behdad Esfahbod * pango/pangocairo-render.c (acquire_renderer), (release_renderer): Use G_LOCK_* wrappers for GStaticMutex. 2006-11-28 Behdad Esfahbod * pango/pangocairo-font.c (_pango_cairo_font_install), (_pango_cairo_font_get_font_face), (_pango_cairo_font_get_scaled_font): * pango/pangocairo-private.h: * pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs): Revert two of the cast changes from last commit, to make sure the test-pangocairo-fontmap-mismatch test doesn't crash. 2006-11-28 Behdad Esfahbod * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_font_face), (pango_cairo_fc_font_install), (pango_cairo_fc_font_finalize), (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_shutdown), (_pango_cairo_fc_font_new): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_set_resolution), (pango_cairo_fc_font_map_get_resolution_cairo), (pango_cairo_fc_font_map_get_renderer), (pango_cairo_fc_font_map_finalize), (pango_cairo_fc_font_map_get_resolution_fc), (pango_cairo_fc_font_map_create_font): * pango/pangocairo-font.c (_pango_cairo_font_install), (_pango_cairo_font_get_font_face), (_pango_cairo_font_get_scaled_font), (_pango_cairo_font_get_hex_box_info): * pango/pangocairo-fontmap.c (pango_cairo_create_layout): * pango/pangocairo-render.c (set_color), (_pango_cairo_renderer_draw_unknown_glyph), (pango_cairo_renderer_draw_glyphs), (pango_cairo_renderer_draw_rectangle), (pango_cairo_renderer_draw_error_underline): Use simple, fast, casts instead of PANGO_CAIRO_*() macros where the object cannot have reached us if it wasn't of the right type. 2006-11-27 Behdad Esfahbod Bug 371388 – Add Thai langauage engine Patch from Theppitak Karoonboonyanan * configure.in: Look for libthai and enable thai-lang module. * modules/thai/Makefile.am: Hook thai-lang module. * modules/thai/thai-lang.c: New Thai language engine that uses libthai to do dictionary-based Thai line-breaking. * examples/test-thai.txt: Improved. 2006-11-25 Behdad Esfahbod * pango/pangocairo-render.c (acquire_renderer), (release_renderer), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Make renderer-cache really thread-safe this time. Last try was not quite thread-safe theoretically, because pointer assignments are not necessarily atomic on some archs. Anyway, this one should do it. 2006-11-22 Behdad Esfahbod * examples/HELLO.utf8: * examples/Makefile.am: * examples/test-lao.txt: Add Lao text samples from Anousak Souphavanh. 2006-11-22 Behdad Esfahbod Bug 377975 – bug in _pango_glyph_item_iter_next_cluster * pango/pango-glyph-item.c (_pango_glyph_item_iter_next_cluster), (_pango_glyph_item_iter_prev_cluster): Fix condition for ending a cluster. 2006-11-21 Behdad Esfahbod * pango/pango-glyph-item.c: Fix typo in private docs. 2006-11-20 Behdad Esfahbod Bug 356666 – pango is not thread-safe, nautilus does not honour that * pango/pangocairo-render.c (acquire_renderer), (release_renderer), (_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line), (_pango_cairo_do_layout): Instead of using a per-fontmap renderer, use a locally cached one, but make sure only one thread uses the cached renderer. Fixes the raciest point in pangocairo. 2006-11-14 Behdad Esfahbod Bug 352795 – configure.in: Bug in "checking Whether to write dependencies into .pc files" * configure.in: Make libtool magic robust. 2006-11-14 Behdad Esfahbod * pango/pango-context.c (itemize_state_process_run): Choose shaper/font for unassigned Unicode codepoints too. This is needed to be able to render scripts being encoded before next version of Unicode is out. 2006-11-08 Roozbeh Pournader Bug 350132 – backspacing doesn't work properly for Arabic * modules/arabic/arabic-lang.c: Add more backspace_deletes_character cases. 2006-11-08 Behdad Esfahbod Bug 369670 – Crash when selecting text using the keyboard * pango/pango-layout.c (pango_layout_move_cursor_visually): Don't index vis2log_map[] with a negative value. 2006-11-02 Behdad Esfahbod 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. 2006-10-24 Behdad Esfahbod * examples/Makefile.am (cairosimple_LDADD): Do not require pangoft2 unconditionally. 2006-10-24 Behdad Esfahbod * pango/pangoft2-fontmap.c (pango_ft2_font_map_class_init), (pango_ft2_font_map_get_resolution): Implement get_resolution for FT2 fontmaps. 2006-10-18 Behdad Esfahbod * modules/arabic/arabic-lang.c: Do not include arabic-ot.h. 2006-10-18 Behdad Esfahbod * examples/test-thai.txt: Replace by a better one. 2006-10-17 Behdad Esfahbod * examples/Makefile.am: * examples/test-thai.txt: Added.