summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix PangoFc with non-identity scale matrix (again!)Behdad Esfahbod2015-05-111-9/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=700592
* Remove gmodule dependency and deprecate some more symbolsBehdad Esfahbod2015-04-051-1/+0
|
* Fix cairotwisted curve_length()Behdad Esfahbod2014-02-111-1/+1
|
* Bug 652841 - Various pieces of dead code found by gcc/clang static analyzerBehdad Esfahbod2011-06-171-2/+2
|
* Bug 627978 - explicitly link with the math lib (-lm) for use of 'cos'Behdad Esfahbod2010-08-251-0/+1
|
* Use git.mkBehdad Esfahbod2009-04-171-0/+2
|
* [cairotwisted] Plug couple other leaksBehdad Esfahbod2009-03-301-0/+3
|
* [cairotwisted] Plug leakBehdad Esfahbod2009-03-301-1/+5
|
* Fix warning.Behdad Esfahbod2008-12-261-1/+1
| | | | svn path=/trunk/; revision=2770
* Handle close_path correctly.Behdad Esfahbod2008-11-261-6/+12
| | | | | | | | | 2008-11-26 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (parametrize_path), (point_on_path): Handle close_path correctly. svn path=/trunk/; revision=2745
* 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
* Optimize double math.Behdad Esfahbod2007-12-061-46/+70
| | | | | | | | | 2007-12-05 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (point_on_path): Optimize double math. svn path=/trunk/; revision=2517
* Add some more comments to document the math involved.Behdad Esfahbod2007-12-031-4/+21
| | | | | | | | | | 2007-12-03 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c: Add some more comments to document the math involved. svn path=/trunk/; revision=2510
* Document cairotwisted example.Behdad Esfahbod2007-11-301-123/+165
| | | | | | | | | | | 2007-11-30 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (two_points_distance), (curve_length), (parametrize_path), (point_on_path), (draw_twisted), (main): Document cairotwisted example. svn path=/trunk/; revision=2509
* Bug 485536 – underline_position can be zeroBehdad Esfahbod2007-11-303-5/+40
| | | | | | | | | | | | | | | | | 2007-11-29 Behdad Esfahbod <behdad@gnome.org> Bug 485536 – underline_position can be zero * pango/pango-utils.c (pango_cairo_quantize_line_geometry): Document that returned position may be zero. * pango/pangocairo-win32font.c (pango_cairo_win32_font_create_metrics_for_context): * pango/pangofc-font.c (get_face_metrics): Handle case of underline_position==0 after rounding. svn path=/trunk/; revision=2506
* Implement bezier curve length function that flattens the curve and sum theBehdad Esfahbod2007-10-201-7/+69
| | | | | | | | | | | 2007-10-20 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (curve_length): Implement bezier curve length function that flattens the curve and sum the length of straight lines approximating it. svn path=/trunk/; revision=2451
* Put cairotwisted in public domainPANGO_1_16_5Behdad Esfahbod2007-07-261-0/+1
| | | | svn path=/trunk/; revision=2379
* New APIBehdad Esfahbod2007-05-044-3/+215
| | | | | | | | | | | | | | | | | | | | | 2007-05-04 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo.h: * pango/pangocairo-context.c: * pango/pangocairo-render.c: New API PangoCairoShapeRendererFunc and pango_cairo_context_[sg]et_shape_renderer() * docs/pango-sections.txt, docs/tmpl/pangocairo.sgml: Document new * API. * examples/Makefile.am, examples/cairoshape.c: New example to show off new API/feature. svn path=/trunk/; revision=2261
* *.c, *.h: Replace preceding sequences of 8 spaces with tabs.Behdad Esfahbod2007-01-162-103/+103
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Replace preceding sequences of 8 spaces with tabs. svn path=/trunk/; revision=2165
* Replace C++-style // comments with C-style /* */ ones.Behdad Esfahbod2007-01-161-2/+2
| | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * examples/pangowin32tobmp.c (SaveBitmap): * modules/tibetan/tibetan-fc.c: Replace C++-style // comments with C-style /* */ ones. svn path=/trunk/; revision=2164
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-163-21/+21
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Improve text-on-path example.Behdad Esfahbod2007-01-161-24/+75
| | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (point_on_path), (draw_text), (draw_twisted), (draw_dream), (draw_wow), (main): Improve text-on-path example. svn path=/trunk/; revision=2156
* Move into pango-view/Behdad Esfahbod2007-01-1634-3636/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * examples/pango-view.c: * examples/pangocairo-view.c: * examples/pangoft2-view.c: * examples/pangox-view.c: * examples/pangoxft-view.c: * examples/renderdemo.c: * examples/renderdemo.h: * examples/test-arabic.txt: * examples/test-chinese.txt: * examples/test-devanagari.txt: * examples/test-gurmukhi.txt: * examples/test-hebrew.txt: * examples/test-ipa.txt: * examples/test-lao.txt: * examples/test-latin.txt: * examples/test-mixed.txt: * examples/test-syriac.txt: * examples/test-tamil.txt: * examples/test-thai.txt: * examples/test-tibetan.txt: * examples/viewer-cairo.c: * examples/viewer-cairo.h: * examples/viewer-main.c: * examples/viewer-pangocairo.c: * examples/viewer-pangoft2.c: * examples/viewer-pangox.c: * examples/viewer-pangoxft.c: * examples/viewer-win32.c: * examples/viewer-x.c: * examples/viewer-x.h: * examples/viewer.h: Move into pango-view/ * Makefile.am: * configure.in: * examples/Makefile.am: * pango-view/Makefile.am: Update. svn path=/trunk/; revision=2152
* Oops. Replace GType* with GType.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (parse_enum): Oops. Replace GType* with GType. svn path=/trunk/; revision=2151
* Use pango_layout(_iter)?_get_line_readonly() instead ofBehdad Esfahbod2007-01-161-1/+4
| | | | | | | | | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c (draw_text): * pango/pangocairo-win32font.c (max_glyph_width): * pango/pangofc-font.c (max_glyph_width): * pango/pangowin32.c (max_glyph_width), (pango_win32_render_layout): * pango/pangox.c (pango_x_render_layout): Use pango_layout(_iter)?_get_line_readonly() instead of pango_layout(_iter)?_get_line(). svn path=/trunk/; revision=2146
* New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. NewBehdad Esfahbod2007-01-161-82/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove .cvsignore files (moved to svn:ignore prop)Behdad Esfahbod2007-01-091-11/+0
| | | | svn path=/trunk/; revision=2137
* Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21Behdad Esfahbod2007-01-041-35/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-01-04 Behdad Esfahbod <behdad@gnome.org> Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21 * pango/pango-types.h: * pango/pango-matrix.c: New public API: pango_matrix_transform_distance() pango_matrix_transform_point() pango_matrix_transform_rectangle() pango_matrix_transform_pixel_rectangle() * pango/pango-utils.h: * pango/pango-utils.c: New public API: pango_units_from_double() pango_units_to_double() pango_extents_to_pixels() * pango/pango-layout.c (pango_layout_get_pixel_extents), (pango_layout_line_get_pixel_extents): Use pango_extents_to_pixels(). * pango/pangocairo-fcfont.c: (pango_cairo_fc_font_glyph_extents_cache_init), (compute_glyph_extents): Use pango_units_from_double(). * examples/renderdemo.c (do_output): Use pango_matrix_transform_pixel_rectangle(); * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: Update. svn path=/trunk/; revision=2126
* Improve option help for --gravityBehdad Esfahbod2006-12-251-1/+1
|
* New generated public header file pango-features.h. Currently contains theBehdad Esfahbod2006-12-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-12-06 Behdad Esfahbod <behdad@gnome.org> * configure.in: * pango/Makefile.am: New generated public header file pango-features.h. Currently contains the version information. In the future, can be expanded to define which backends have been enabled, etc. * pango/pango.def: * pango/pango-utils.h: * pango/pango-utils.c: New public macros and functions: PANGO_VERSION_ENCODE(), PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO, PANGO_VERSION, PANGO_VERSION_STRING, PANGO_VERSION_CHECK(), pango_version(), pango_version_string(), pango_version_check(). * docs/pango-docs.sgml: * docs/pango-sections.txt: * docs/tmpl/pango-version.sgml: Docs for new symbols, in a new section. * examples/renderdemo.c (show_version): If run-time Pango lib version is different than the compile-time one, show that one too. * pango/pango.h: #include <pango-utils.h> as well as almost all other public pango-*.h headers (though, the other ones were already included indirectly). The only public pango-*.h header pango.h shouldn't include are pango-ot.h (which is really misnamed) and pango-modules.h (that should not be needed by 99.99% users anyway). * docs/Makefile.am: * docs/check.docs: Test to check that all symbols are documented and properly hooked into documentation tree. * pango/pango.rc.in: * pango/pangoft2.rc.in: * pango/pangowin32.rc.in: Update, reflecting some internal symbol changes. * pango/check.defs: Improve.
* Set context language to pango_language_get_default() instead of hardcodingBehdad Esfahbod2006-12-061-1/+1
| | | | | | | | | 2006-12-06 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (do_output): Set context language to pango_language_get_default() instead of hardcoding "en-US". * pango/pango-utils.c (pango_language_get_default): Improve docs.
* Gurmukhi test text from supreet sethi.Behdad Esfahbod2006-12-062-0/+27
| | | | | | | | 2006-12-06 Behdad Esfahbod <behdad@gnome.org> * examples/Makefile.am: * examples/test-gurmukhi.txt: Gurmukhi test text from supreet sethi.
* Bug 371388 – Add Thai langauage engine Patch from TheppitakBehdad Esfahbod2006-11-271-2/+2
| | | | | | | | | | | | | | | 2006-11-27 Behdad Esfahbod <behdad@gnome.org> 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.
* Add Lao text samples from Anousak Souphavanh.Behdad Esfahbod2006-11-223-0/+4
| | | | | | | | | 2006-11-22 Behdad Esfahbod <behdad@gnome.org> * examples/HELLO.utf8: * examples/Makefile.am: * examples/test-lao.txt: Add Lao text samples from Anousak Souphavanh.
* Do not require pangoft2 unconditionally.Behdad Esfahbod2006-10-241-1/+4
| | | | | | | 2006-10-24 Behdad Esfahbod <behdad@gnome.org> * examples/Makefile.am (cairosimple_LDADD): Do not require pangoft2 unconditionally.
* Replace by a better one.Behdad Esfahbod2006-10-181-8/+11
| | | | | | 2006-10-18 Behdad Esfahbod <behdad@gnome.org> * examples/test-thai.txt: Replace by a better one.
* Added.Behdad Esfahbod2006-10-172-0/+9
| | | | | | | 2006-10-17 Behdad Esfahbod <behdad@gnome.org> * examples/Makefile.am: * examples/test-thai.txt: Added.
* Add part of Jabberwocky as Latin test text.Behdad Esfahbod2006-10-072-0/+10
| | | | | | | 2006-10-07 Behdad Esfahbod <behdad@gnome.org> * examples/Makefile.am: * examples/test-latin.txt: Add part of Jabberwocky as Latin test text.
* .Behdad Esfahbod2006-10-021-0/+1
|
* A simple text-on-path example using pangocairo.Behdad Esfahbod2006-09-082-3/+404
| | | | | | | | | 2006-09-08 Behdad Esfahbod <behdad@gnome.org> * examples/cairotwisted.c: A simple text-on-path example using pangocairo. * examples/Makefile.am: Update.
* Bug 353525 – libpangoft2-1.0.so.0: undefined reference toBehdad Esfahbod2006-08-301-0/+3
| | | | | | | | | | 2006-08-30 Behdad Esfahbod <behdad@gnome.org> Bug 353525 – libpangoft2-1.0.so.0: undefined reference to `pango_font_description_get_gravity' * examples/Makefile.am: Explicitly link to the just built pangoft2 for pangocairo uses, like we already do for pangoxft.
* pango/Makefile.am examples/Makefile.am pango/testfonts.c RenameTor Lillqvist2006-08-232-0/+451
| | | | | | | | | | 2006-08-23 Tor Lillqvist <tml@novell.com> * pango/Makefile.am * examples/Makefile.am * pango/testfonts.c * examples/pangowin32tobmp.c: Rename pango/testfonts.c to examples/pangowin32tobmp.c. (#104151)
* Correct switched return value of EAST/WEST.Behdad Esfahbod2006-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-20 Behdad Esfahbod <behdad@gnome.org> * pango/pango-matrix.c (pango_matrix_to_gravity): Correct switched return value of EAST/WEST. * pango/pango-types.h (PangoGravity): Add PANGO_GRAVITY_AUTO. * pango/pango-context.h: Add pango_context_get_gravity(). * examples/renderdemo.c (parse_gravity), (parse_options): * pango/pango-context.c (pango_context_init), (update_resolved_gravity), (pango_context_set_matrix), (pango_context_set_base_gravity), (pango_context_get_gravity), (itemize_state_init), (get_shaper_and_font): * pango/pango-layout.c (line_set_resolved_dir): * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init), (_pango_cairo_fc_font_new): * pango/pangofc-fontmap.c (pango_fc_make_pattern), (pango_fc_font_map_load_fontset): * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/main.sgml: Update to above.
* Change the --rotate parameter to double now that we depend on aBehdad Esfahbod2006-08-202-3/+3
| | | | | | | | 2006-08-20 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (parse_options): * examples/renderdemo.h: Change the --rotate parameter to double now that we depend on a recent-enough glib.
* Minor adjustment.Behdad Esfahbod2006-08-161-3/+7
|
* Render block progression and line direction arrows, and a base gravityBehdad Esfahbod2006-08-163-18/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-16 Behdad Esfahbod <behdad@gnome.org> * examples/viewer-pangocairo.c (render_callback): Render block progression and line direction arrows, and a base gravity roof-top. * pango/pango-matrix.c (pango_matrix_to_gravity): New function. * pango/pango-utils.c (pango_gravity_to_rotation): New function. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Use pango_gravity_to_rotation(). * pango/pango-utils.h: * pango/pango-types.h: Reorder a bit. * examples/Makefile.am: * examples/test-chinese.txt: New test text for Chinese. * pango/check.defs: New script that checks that all the exported symbols are listed in the respective .def file. (only checks the libraries actually built. No win32 for example.) * pango/Makefile.am: Hook check.defs as a 'make check' test. * pango/pango.def: * pango/pangoft2.def: * pango/pangocairo.def: Update. * docs/tmpl/glyphs.sgml: * docs/tmpl/main.sgml: * docs/pango-sections.txt: Update.
* Adjust color.Behdad Esfahbod2006-08-161-1/+1
|
* Render the header with SOUTH gravity.Behdad Esfahbod2006-08-151-2/+3
| | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * examples/renderdemo.c (do_output): Render the header with SOUTH gravity. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init): Center baseline for east/west gravity in pango_font_metrics too.
* Remove excess LRM.Behdad Esfahbod2006-08-152-6/+24
| | | | | | | | | | | | | | 2006-08-15 Behdad Esfahbod <behdad@gnome.org> * examples/HELLO.utf8: Remove excess LRM. * examples/viewer-pangocairo.c (render_callback): Draw baselines in border-drawing mode. * pango/pango-layout.c (pango_layout_line_get_extents): Make sure we set logical_rect.y on empty lines. Previously empty lines had wrong baseline. The code apparently was written like that intentionally, but I cannot find out why.