summaryrefslogtreecommitdiff
path: root/pango/shape.c
Commit message (Collapse)AuthorAgeFilesLines
* shape: Bring back careful rounding codebring-back-better-roundingMatthias Clasen2021-06-271-4/+73
| | | | | | | | | | | | | | | | When we added the round-glyph-positions option in c43da2d3 and b5634799, we lost some code that was careful to round in device coordinates. The reason we lost it is that the rounding needs fontconfig- specific data that is only available in the backend, and the rounding now happens in the frontend. Bringing it back is annoying, since we've run out of vfunc slots to get info from the backend. This commit works around that limitation in a hacky way. Fixes: #562
* introspection: Stop using allow-noneMatthias Clasen2021-05-191-2/+2
| | | | | The allow-none annotation has been deprecated for a long time already. Instead use optional and nullable everywhere.
* docs: Tweak shaping docsMatthias Clasen2021-03-111-42/+36
| | | | Add summaries, convert markup, etc.
* Amend the shaping api docsshape-docsMatthias Clasen2020-11-071-4/+19
| | | | | | | Discuss problems with extra_attr indices in the docs for pango_shape() and friends. See: #511
* Add a pango_shape variant that takes flagsMatthias Clasen2019-08-031-22/+71
| | | | | The only flag currently defined affects whether glyph positions are rounded or not.
* Remove unused remnants of shape engineKhaled Hosny2019-07-191-1/+0
|
* Rename _pango_fc_shapeMatthias Clasen2019-07-181-5/+5
| | | | It is all harfbuzz now, so call it pango_hb_shape.
* Switch to using harfbuzz for shapingMatthias Clasen2019-07-181-61/+73
| | | | | | Drop internal shape engine uses and call _pango_fc_shape directly. This makes us use harfbuzz for shaping, on all backends.
* Some more doc tweaksMatthias Clasen2019-07-141-1/+1
|
* Fix introspection annotationEmmanuele Bassi2014-06-201-1/+1
| | | | Missing colon broke the g-ir-scanner.
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-0/+10
| | | | Patch from Rafał Mużyło.
* Add pango_shape_full()Behdad Esfahbod2012-09-261-5/+58
| | | | | | | | | | | | | | | | Variant of pango_shape() that takes the full paragraph text as input. This is then passed in entirety to HarfBuzz, which would allow certain cross-run interactions (in Arabic for example). When combined with upcoming HarfBuzz 0.9.5+, this fixes: Red Hat Bug 858736 - [Spanish] Stray dotted circle rendered https://bugzilla.redhat.com/show_bug.cgi?id=858736 and partially: Bug 313181 - color changes break arabic shaping https://bugzilla.gnome.org/show_bug.cgi?id=313181
* More churnBehdad Esfahbod2012-08-281-1/+1
|
* Bug 596614 - Pango application receives SIGSEGV on pasting text with U+202EBehdad Esfahbod2009-11-171-3/+31
| | | | | Fixed all modules to reverse glyphs if run is rtl. Except for Hangul module. Fixed pango_shape() to detect that, warn, and reverse.
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Behdad svn path=/trunk/; revision=2657
* Bug 478914 – Use something invalid instead of '?' when validating inputBehdad Esfahbod2007-12-101-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-10 Behdad Esfahbod <behdad@gnome.org> Bug 478914 – Use something invalid instead of '?' when validating input text * pango/pango-layout.c (pango_layout_set_text): Set invalid input bytes to -1, which gives a unichar value of -1, and eventually a glyph value of -1, aka PANGO_GLYPH_INVALID_INPUT. * pango/fonts.c (pango_font_get_glyph_extents), (pango_font_get_metrics), (pango_font_get_font_map): * pango/modules.c (build_map): * pango/pango-context.c (get_script), (get_shaper_and_font), (string_from_script), (itemize_state_process_run): * pango/pango-coverage.c (pango_coverage_get): * pango/pango-impl-utils.h: * pango/pango-utils.c: * pango/pangocairo-font.c (pango_cairo_font_get_scaled_font), (_pango_cairo_font_private_get_hex_box_info), (_pango_cairo_font_private_get_glyph_extents_missing): * pango/pangocairo-private.h: * pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame), (_pango_cairo_renderer_draw_box_glyph), (_pango_cairo_renderer_draw_unknown_glyph): * pango/pangofc-fontmap.c (pango_fc_font_map_get_patterns): * pango/pangoft2-private.h: * pango/pangoft2-render.c (pango_ft2_font_render_box_glyph), (pango_ft2_font_render_glyph), (pango_ft2_renderer_draw_glyph): * pango/pangoft2.c (pango_ft2_font_get_face), (pango_ft2_font_get_glyph_extents): * pango/pangox.c (pango_x_find_subfont), (pango_x_render): * pango/pangoxft-font.c (_pango_xft_font_get_mini_font), (get_glyph_extents_missing), (pango_xft_font_get_font): * pango/pangoxft-private.h: * pango/pangoxft-render.c (get_total_matrix), (draw_box), (_pango_xft_renderer_draw_box_glyph), (_pango_xft_renderer_draw_unknown_glyph), (pango_xft_renderer_draw_glyphs): * pango/shape.c (pango_shape): Render PANGO_GLYPH_INVALID_INPUT to a single-width box with a cross inside. Also cleanup spewed warnings and warn at the source, where we fail to find a shaper, instead of at every location that we see a NULL font. * pango/pango-font.h: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: New public macro: PANGO_GLYPH_INVALID_INPUT svn path=/trunk/; revision=2519
* Bug 466755 – pango hangul is crashing in gnome-about because it isBehdad Esfahbod2007-08-141-13/+33
| | | | | | | | | | | | | | | | | 2007-08-14 Behdad Esfahbod <behdad@gnome.org> Bug 466755 – pango hangul is crashing in gnome-about because it is failing to retrieve a font. * pango/pangofc-font.c (pango_fc_font_real_get_glyph), (pango_fc_font_kern_glyphs), (pango_fc_font_get_raw_extents): Protect against NULL face. * pango/shape.c (pango_shape): Improve error message by writing out shaping engine type name and the text too. svn path=/trunk/; revision=2396
* Zero glyphs->num_glyphs before calling into shape engine.Behdad Esfahbod2007-06-051-0/+2
| | | | | | | | | | | | | | | | | | 2007-06-04 Behdad Esfahbod <behdad@gnome.org> * pango/shape.c (pango_shape): Zero glyphs->num_glyphs before calling into shape engine. * pango/pango-engine.c (fallback_engine_shape): Improve, to support clusters and what not. * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): Use "pango_script_get_sample_language (PANGO_SCRIPT_LATIN)" instead of hardcoding "en". Handle cairo_scaled_font_extents() failure. svn path=/trunk/; revision=2332
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-161-6/+6
| | | | | | | | | 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-5/+5
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Remove unnecessary 'static' in type definition that causes a relocation.Behdad Esfahbod2006-09-131-1/+3
| | | | | | | | | 2006-09-13 Behdad Esfahbod <behdad@gnome.org> * pango/pango-engine.h: Remove unnecessary 'static' in type definition that causes a relocation. * pango/shape.c (pango_shape): Make sure last_cluster is invalid.
* Oops, undo stuff that were committed accidentally.Behdad Esfahbod2006-09-131-3/+1
|
* Part of Bug 355782 – Misaligned extents in pangoBehdad Esfahbod2006-09-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | 2006-09-13 Behdad Esfahbod <behdad@gnome.org> Part of Bug 355782 – Misaligned extents in pango * pango/pango-layout.c (cluster_width): Rewrite based on is_cluster_start instead of accessing log_clusters directly. This is more robust as next_cluster uses that, so the two match now. * pango/pango-layout.c (update_cluster): Remove the cluster_start_index parameter and use iter->cluster_start instead. * pango/pango-layout.c (pango_layout_iter_copy): Fix typo in copying iter->cluster_width. * pango/pango-layout.c (pango_layout_iter_get_cluster_extents): Add an assert to make sure iter->cluster_width is correctly set. * pango/pango-layout.c (pango_layout_iter_get_char_extents): Remove assert that was readded above to check more cases.
* Fix handling of WEST and EAST gravity effect on bidi level.Behdad Esfahbod2006-08-151-2/+13
| | | | | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c (itemize_state_add_character): Fix handling of WEST and EAST gravity effect on bidi level. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_glyph_extents_cache_init): For NORTH gravity (upside down text), swap ascent and descent, and for EAST/WEST, center baseline between ascent/descent. * pango/shape.c (pango_shape): If glyph width is negative, negate it and shift glyph by that amount. This allows having font matrices that essentially move the glyph origin to the right of the glyph to still work.
* Change g_critical to g_warning. We already handle them gracefully.Behdad Esfahbod2006-02-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 2006-02-21 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c, pango/glyphstring.c, pango/pango-fontmap.c, pango/pango-ot-buffer.c, pango/pangocairo-font.c, pango/pangoft2.c, pango/pangoxft-font.c, pango/shape.c: Change g_critical to g_warning. We already handle them gracefully. Bug 331994 – --disable-debug removes G_DISABLE_CAST_CHECKS Patch from charlet@act-europe.fr * configure.in: Do not lose PANGO_DEBUG_FLAGS when reassigning. Bug 331995 – pango_layout_set_text optimization Patch from charlet@act-europe.fr * pango/pango-layout.c: Do not validate input text if asserts are disabled. Moreover, do not truncate input text on invalid sequence. Bug 331996 – avoid crashes in win32 font handling Patch from charlet@act-europe.fr * pango/pangofc-fontmap.c, pango/pangowin32-fontmap.c, pango/pangowin32.c: if (!font) return NULL in a number of places.
* Bug 314548 – pango_shape() is missing const correctness Patch fromBehdad Esfahbod2006-02-091-1/+1
| | | | | | | | | | | | | | | | | | 2006-02-09 Behdad Esfahbod <behdad@gnome.org> Bug 314548 – pango_shape() is missing const correctness Patch from Antoine Dopffer. * modules/arabic/arabic-fc.c, modules/basic/basic-fc.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, modules/thai/thai-shaper.c, modules/thai/thai-shaper.h, modules/tibetan/tibetan-fc.c, pango/pango-context.c, pango/pango-engine-private.h, pango/pango-engine.c, pango/pango-engine.h, pango/pango-glyph.h pango/pango-layout.c, pango/shape.c: Make PangoAnalysis *analysis const in all shaper interfaces.
* Warn only once per font-description that cannot be loaded.Behdad Esfahbod2006-02-061-2/+2
| | | | | | | | | | 2006-02-06 Behdad Esfahbod <behdad@gnome.org> * pango/pango-fontmap.c (pango_font_map_real_load_fontset): Warn only once per font-description that cannot be loaded. * pango/pangox.c: Make it not crash if no font found, like other backends.
* Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that IBehdad Esfahbod2006-02-031-26/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-02-02 Behdad Esfahbod <behdad@gnome.org> Finish the 'glyph 0' work of this morning: PANGO_GLYPH_NULL that I introduced is renamed to PANGO_GLYPH_EMPTY. It means, no rendering should be performed. The backends however, still return 0 if a glyph is not found. The modules then are free to replace this 0 glyph with an unknown character. * modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c, modules/basic/basic-fc.c, modules/basic/basic-win32.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, 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/pangox.c, pango/pangowin32.c: Adapt to above change. Backends return 0 if glyph not found. * pango/fonts.c (pango_font_get_glyph_extents): If font is not usable (!PANGO_IS_FONT (font)), return the generic UNKNOWN_GLYPH metrics. This is used when your backends are misconfigured and you don't find *any* font at all. * pango/pango-engince.c: Add unknown glyphs in fallback shaper, instead of empty glyphs. * pango/shape.c: Call the fall-back shaper if shaper fails, instead of generating a dummy glyph string ourselves. * pango/pango-layout.c (imposed_shape, shape_tab): Use PANGO_GLYPH_EMPTY instead of glyph 0. * pango/pango-renderer.c (pango_renderer_draw_glyph): No-op on PANGO_GLYPH_EMPTY instead of glyph 0. * pango/pangocairo-atsuifont.c, pango/pangocairo-win32font.c, pango/pangocairo-fcfont.c, pango/pangocairo-font.c, pango/pangocairo-private.h: install_font returns a boolean now. * pango/pangocairo-render.c, pango/pangoxft-render.c: Handle font and hex-box failures more gracefully by drawing a generic unknown-box glyph. * pango/pangoft2.c, pango/pangoft2-render.c: Draw the generic unknown-box glyph here too. For unknown glyphs though, if the font is TTF (FT_IS_SFNT), use the zero-indexed glyph, otherwise, draw a box of proper size.
* Oops!Behdad Esfahbod2006-02-021-1/+0
|
* Use PANGO_GLYPH_NULL for when no glyph should be drawn. UseBehdad Esfahbod2006-02-021-3/+12
| | | | | | | | | | | | | | | | | | | | | | | 2006-02-02 Behdad Esfahbod <behdad@gnome.org> * modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c, modules/basic/basic-fc.c, modules/basic/basic-win32.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, 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/fonts.c, pango/pango-engine-private.h pango/pango-types.h, pango/pangocairo-fcfont.c, pango/pangocairo-font.c, pango/pangocairo-private.h, pango/pangocairo-render.c, pango/pangofc-decoder.c, pango/pangofc-font.c, pango/pangoft2-render.c, pango/pangoft2.c pango/pangowin32.c, pango/pangox.c, pango/pangoxft-font.c pango/pangoxft-private.h, pango/pangoxft-render.c, pango/shape.c: Use PANGO_GLYPH_NULL for when no glyph should be drawn. Use PANGO_GLYPH_UNKNOWN_FLAG for all backends to mark unknown flags. There's no need for pango_font_get_unknown_glyph() anymore, since all backends know how to handle PANGO_GLYPH_UNKNOWN_FLAG gracefully. We may add that in the future however. (fixes bug #73147, closes bug #329524)
* Improve error handling in high-frequency functions: Only warn once.Behdad Esfahbod2006-01-311-13/+10
| | | | | | | | | | | | | | | 2006-01-30 Behdad Esfahbod <behdad@gnome.org> * pango/shape.c (pango_shape): * pango/fonts.c (pango_font_get_glyph_extents): * pango/pangocairo-font.c (_pango_cairo_font_install): Improve error handling in high-frequency functions: Only warn once. * pango-impl-utils.h, pangoutils.h: * pangocairo-private.h, pangocairo-font.c: Add machinery for above: _pango_warning_history and _pango_cairo_warning_history.
* Oops, removed all my changes the other time :(Behdad Esfahbod2006-01-301-3/+21
| | | | | | | | | | | | 2006-01-30 Behdad Esfahbod <behdad@gnome.org> Bug 328314 – Examples should use GOption instead of argcontext.c Patch from Antoine Dopffer. * examples/renderdemo.c: Use GOption for parsing cmd-line options. * examples/argcontext.c, examples/argcontext.h: Removed.
* Do not crash if the (win32 typically) shaper fails. Bug #304702:Behdad Esfahbod2006-01-291-8/+13
| | | | | | | | | | | | | | | | 2006-01-29 Behdad Esfahbod <behdad@gnome.org> Do not crash if the (win32 typically) shaper fails. Bug #304702: * pango/pango-engine.c (_pango_engine_shape_shape): Set num_glyphs to zero if failing. * pango/pango-shape.c (pango_shape): Instead of crashing if the shaper failed to produce any glyphs, print out a warning message containing the name of the font, and mark the font such that we don't keep printing warning for the same font. Moreover, inject one whitespace glyph per character, so you just see nothing, but everything works otherwise.
* Do not crash if the (win32 typically) shaper fails. Bug #304702:Behdad Esfahbod2006-01-291-5/+39
| | | | | | | | | | | | | | 2006-01-29 Behdad Esfahbod <behdad@gnome.org> Do not crash if the (win32 typically) shaper fails. Bug #304702: * pango/pango-engine.c (_pango_engine_shape_shape): Set num_glyphs to zero if failing. * pango/pango-shape.c (pango_shape): Instead of crashing if the shaper failed to produce any glyphs, print out a warning message containing the name of the font, and mark the font such that we don't keep printing warning for the same font.
* 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)
* Minor doc fixes. (#167922, #167924, Billy Biggs)Owen Taylor2005-02-211-1/+1
| | | | | | | | 005-02-21 Owen Taylor <otaylor@redhat.com> * pango/fonts.c (pango_font_get_glyph_extents): * pango/shape.c (pango_shape): Minor doc fixes. (#167922, #167924, Billy Biggs)
* Make PangoEngine{,Lang,Shape} GObjects, and use a GTypeModule-basedOwen Taylor2003-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sat Aug 2 23:19:16 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-engine.[ch] modules/*/*-{fc,win32,x}.c pango/modules.c pango/break.c pango/pango-context.c pango/pango-layout.c pango/pango-modules.h pango/querymodules.c pango/shape.c: Make PangoEngine{,Lang,Shape} GObjects, and use a GTypeModule-based module-loading system closely based on the one used for GtkIMContext and GtkThemeEngine. * pango/pango-impl-utils.h: OK, I'm tired of typing in get_type() functions. * pango/pango-script.[ch] pango/pango-script-table.h tests/testscript.c tools/gen-script-table.pl: Add port of script-range code from ICU in preparation for future use. (#91542) * tools/gen-script-for-lang.c: Utility program to determine the script for each fontconfig .orth file. * docs/tmpl/{scripts.sgml,pango-engine-lang.sgml, pango-engine-shape.sgml} docs/pango-sections.txt docs/pango-docs.sgml: Redo to go along with the above changes. * configure.in: chmod +x tests/runtests.sh
* Set is_cluster_start attributes based on the log_clusters[] set by theOwen Taylor2002-07-311-0/+16
| | | | | | | | Tue Jul 30 23:10:14 2002 Owen Taylor <otaylor@redhat.com> * pango/shape.c (pango_shape): Set is_cluster_start attributes based on the log_clusters[] set by the shape engine. (Fix for #84307, Reported by Alex Larsson, others.)
* removed the arbitrary limit to 10 fonts. Instead make the command lineHans Breuer2001-11-231-4/+5
| | | | | | | | | | | | | | | | | | | | 2001-11-23 Hans Breuer <hans@breuer.org> * testfonts.c : removed the arbitrary limit to 10 fonts. Instead make the command line params useful again and reduce the default result bitmap size by decreasing the default font size. * pango/pangowin32-fontcache.c (pango_win32_font_cache_load): Don't always turn on anti-aliasing. Respect the users settings from 'Properties of Display/Effects'. * pango/makefile.msc : updated, version 0.22 * pango/pango.def : updated externals * pango/font.c pango/pango-coverage.c pango-utils.c pango/pangowin32.c pango/shape.c : coding style and static correctness
* move pango_shape and pango_reorder_items in here.Havoc Pennington2000-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-15 Havoc Pennington <hp@pobox.com> * pango/pango-glyph.h: move pango_shape and pango_reorder_items in here. * pango/pango-break.h: move most of pango.h in here, so that pango.h can be the only file that includes pango-enum-types.h, so that changing any header doesn't end up rebuilding all of pango due to a rebuild of pango-enum-types.h. * pango/makeenums.pl: script to generate pango-enum-types.[hc] * pango/Makefile.am (pango_headers): built pango-enum-types.h, pango-enum-types.c that do enum type registration; add pango-break.h; do some assorted rearranging to handle the built headers * pango/pango.h: moved most of it to pango-break.h * pango/break.c: include individual headers, not pango.h * pango/shape.c: ditto * pango/reorder-items.c: ditto * pango/querymodules.c: ditto * pango/pango-layout.c: ditto * pango/pango-indic.c: ditto * pango/mapping.c: ditto * pango/itemize.c: ditto * pango/fonts.c: ditto
* add assertion that shaper != NULL to catch engine problems fasterHavoc Pennington2000-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-14 Havoc Pennington <hp@redhat.com> * pango/fonts.c (pango_font_find_shaper): add assertion that shaper != NULL to catch engine problems faster * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and module-defs.c have to go in libpangox for now since the modules use the X stuff, and static linkage won't let you play games here * examples/Makefile.am (pango_viewer_LDADD): fix order of link * modules/indic/pango-indic-script.h (pango_indic_get_char): make this a macro, so it doesn't collide between modules * modules/*/Makefile.am: Fix to work if the module isn't included * examples/Makefile.am: don't query modules if we didn't build any * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix * modules/indic/bengali.c (MODULE_ENTRY): fix prefix * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions * modules/Makefile.am (MODULES): handle case where there are no modules to query * configure.in: Fix up include_modules stuff to work with Indic * pango/glyphstring.c (pango_glyph_string_set_size): Just g_error() if the glyph string exceeds maximum integer size, instead of mysteriously crashing later.
* Every character must be part of some cluster, so when we dont' have anOwen Taylor2000-11-141-1/+11
| | | | | | | | | Tue Nov 14 18:45:24 2000 Owen Taylor <otaylor@redhat.com> * pango/shape.c (pango_shape): Every character must be part of some cluster, so when we dont' have an engine at all (pathalogical, happens now for formatting characters), create a cluster with one glyph=0 and 0 size.
* Remove tests for libunicodeOwen Taylor2000-06-211-1/+0
| | | | | | | | | | | | Wed Jun 21 12:11:56 2000 Owen Taylor <otaylor@redhat.com> * configure.in: Remove tests for libunicode * pango/utils.[ch]: Removed. The functions from here are now in GLib. * **.[ch]: Removed use of libunicode and utils.c in favor of Unicode functions in GLib. Requires latest GLib from CVS.
* Memory management functions for PangoItem.Owen Taylor2000-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Make refcounted.Owen Taylor2000-02-161-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Initial revisionOwen Taylor2000-01-131-0/+48