summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid some overhead in itemize_state_process_runMatthias Clasen2015-09-131-10/+9
| | | | | Avoid determining the Unicode type repeatedly. Instead, just get the type once and filter out the classes we want.
* [modules] Move language modules in source tree and remove modules/Behdad Esfahbod2015-04-041-18/+1
| | | | | | | This should complete the kill-modules effort. What is left is leftover removal and unbreaking stuff. Bug 733882 - Kill Pango modules, engines, and config files
* Hide internal symbolBehdad Esfahbod2015-04-041-1/+1
|
* Deprecate module system, skip it for shaper modulesBehdad Esfahbod2015-04-041-127/+49
| | | | | | | | | | | | | | Now shaper is discovered via (previously unused!) font->find_shaper(). I'm keeping that just to allow clients override shaping. Though, even that I'm not sure we want to keep. Wraps shaper in PangoEngineShape structs to keep PangoAnalysis API intact. Deprecated pango-modules.h and some pango-engine.h. Language modules are not moved yet. Wired up PangoFc, PangoWin32, and PangoCoretext shapers.
* Add many missing nullability annotations.Evan Nemerson2014-10-161-8/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Add more Hangul jamo to previous commitBehdad Esfahbod2014-07-311-1/+3
| | | | https://github.com/GNOME/pango/commit/61aeba6257ec7691a7a5222fb69aec3cc042435b#commitcomment-7215250
* Don't break run in the middle of Hangul jamo sequenceBehdad Esfahbod2014-07-301-2/+21
| | | | | | | See comments. Bug 705727 - Incorrect rendering w/ Hangul syllable composition GSUB https://bugzilla.gnome.org/show_bug.cgi?id=705727
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-1/+17
| | | | Patch from Rafał Mużyło.
* Bug 703995 - Compiler warnings about strict aliasingBehdad Esfahbod2013-08-301-2/+2
| | | | Patch from Akira TAGOH.
* Don't change fonts just for space charactersBehdad Esfahbod2013-06-061-6/+6
| | | | | | | | | | | | | | | | Back in the days we used to always use the font from surrounding runs for any space characters. I changed that when I found that rendering MathML results in hexboxes when a font doesn't have the space characters needed... Forward to these days: HarfBuzz will silently compatibility-decompose any space character to the ASCII space. And looks like it's important for Mongolian to not break runs around NNBSP. As such, go back to never choosing a font just for space characters. Seems to work, though more testing is needed. Bug 701652 - wrong shaped classic Mongolian word suffixes
* Fix most of "failed to choose font" warningsBehdad Esfahbod2012-12-301-1/+10
| | | | | | | If we are in fallback mode, with a font that has to space glyph, then looking up engine/font for any character not in the font was failing badly. In that case, if there's only one engine (which is the case these days), just choose it.
* Track changes in layout and dependencies via serialsAlexander Larsson2012-12-061-1/+0
| | | | | | | | | We track changes in the PangoContext and automatically call pango_layout_context_changed() when needed, plus we track changes in the layout and let apps know via pango_layout_get_serial when the layout changed and needs to be redrawn. https://bugzilla.gnome.org/show_bug.cgi?id=340066
* Track changes in PangoContext via a serialAlexander Larsson2012-12-061-3/+103
| | | | | | | | | | | | Whenever a PangoContext or its fontmap changes we bump the contexts serial, you can get it via pango_context_get_serial() to see find out if the context changed since the last time and you need to relayout. You can also force the context to be "changed" by calling pango_context_changed(). https://bugzilla.gnome.org/show_bug.cgi?id=340066
* Add pango_shape_full()Behdad Esfahbod2012-09-261-3/+8
| | | | | | | | | | | | | | | | 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
* Use thread-safe qdata API for cachingMatthias Clasen2012-09-011-4/+9
| | | | | GLib gained a new API that allows to set qdata in a thread-safe way. Use it here.
* More churnBehdad Esfahbod2012-08-281-7/+6
|
* More thread-safetyBehdad Esfahbod2012-08-271-1/+1
|
* Make static data thread safe in pango-context.cAlessandro Pignotti2012-08-271-2/+2
|
* Bug 679654: Crash for PangoContext.list_familiesJohn Ralls2012-07-201-1/+1
| | | | | Add transfer container annotations so that the array is freed but not the (static) family objects.
* Fix annotation syntaxBehdad Esfahbod2011-09-081-1/+1
|
* Bug 658561 - Double free after calling Pango.Context.get_font_description()Behdad Esfahbod2011-09-081-2/+2
|
* Stop using G_CONST_RETURN in PangoRyan Lortie2011-06-091-1/+1
| | | | | | | G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop using it in Pango. https://bugzilla.gnome.org/show_bug.cgi?id=652202
* Fixed (transfer full) and (element-type) introspection annotation for the ↵Alberto Ruiz2011-04-251-4/+8
| | | | return value in pango_itemize_with_base_dir
* Fixed (transfer full) and (element-type) introspection annotation for the ↵Alberto Ruiz2011-04-251-1/+1
| | | | return value in pango_itemize
* Fixed typos in the PangoContext gtk-docAlberto Ruiz2011-04-251-3/+3
|
* Fixing (transfer none) introspection annotation for the return value in ↵Alberto Ruiz2011-04-251-4/+5
| | | | pango_context_get_font_map
* Fixing (transfer full) introspection annotation for the return value in ↵Alberto Ruiz2011-04-251-1/+2
| | | | pango_context_load_font
* Fixing (transfer none) introspection annotation for the return value in ↵Alberto Ruiz2011-04-251-1/+2
| | | | pango_context_load_fontset
* Adding allow-none introspection metadata to pango_itemizeAlberto Ruiz2011-04-251-4/+3
|
* Adding allow-none introspection metadata to pango_itemize_with_base_dirAlberto Ruiz2011-04-251-2/+2
|
* adding allow-none to pango_context_set_matrix parametersAlberto Ruiz2011-04-251-2/+2
|
* adding allow-none to pango_context_get_metrics parametersAlberto Ruiz2011-04-251-7/+7
|
* Fix introspection for list familiesAlberto Ruiz2011-04-151-2/+2
|
* Bug 410169 – gravity problem with Common charsBehdad Esfahbod2009-07-221-8/+5
| | | | | | | | | | Only show wide chars (as in g_unichar_iswide()) upright. This improves rendering of 1) digits in CJK context, and 2) Narrow Hangul characters. New public API: pango_gravity_get_for_script_and_width()
* Bug 589113 – Some characters rotated incorrectly in vertical textBehdad Esfahbod2009-07-221-3/+66
| | | | Always show full-width Unicode characters upright.
* Bug 583250 – pango_font_metrics_get_approximate_char_width is wrong when ↵Behdad Esfahbod2009-05-301-19/+10
| | | | | | | | LANG=fa_IR When computing approximate char width for context metrics use the actual size the sample string renders to. Previously it was taking average over all the fonts used by the sample str.
* Allow font_family=NULL in load_font() and load_fontset() methodsBehdad Esfahbod2009-04-061-4/+1
|
* [pango] Allocate PangoScriptIter on stack.Chris Wilson2009-03-201-6/+7
| | | | | | | Move the PangoScriptIter structure definition to a private header file, so that we can embed the iterator within other structures or allocate a local iterator on the stack. This eliminates the frequent short-lived allocations associated with the iterator.
* [pango-context] Fix assertion with enable_fallback=FALSE and no fontsBehdad Esfahbod2009-03-171-0/+3
|
* Improve warning message.Behdad Esfahbod2009-01-081-10/+1
| | | | | | | | | 2009-01-08 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c (itemize_state_process_run): Improve warning message. svn path=/trunk/; revision=2796
* Bug 566726 – Minor optimizationBehdad Esfahbod2009-01-081-16/+22
| | | | | | | | | | | 2009-01-07 Behdad Esfahbod <behdad@gnome.org> Bug 566726 – Minor optimization * pango/pango-context.c (get_shaper_and_font): Don't walk the fontset if there are no engines. svn path=/trunk/; revision=2794
* Fix possible reference leak when fallback is disabled.Behdad Esfahbod2009-01-021-5/+8
| | | | | | | | | | | 2009-01-02 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c (shaper_font_element_destroy), (get_shaper_font_cache), (shaper_font_cache_insert), (get_shaper_and_font_foreach), (itemize_state_process_run): Fix possible reference leak when fallback is disabled. svn path=/trunk/; revision=2774
* Fix docs re NULL language. Also allow NULL desc.Behdad Esfahbod2008-12-071-7/+9
| | | | | | | | | 2008-12-07 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c (pango_context_get_metrics): Fix docs re NULL language. Also allow NULL desc. svn path=/trunk/; revision=2749
* Make the following API public:Behdad Esfahbod2008-08-061-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-05 Behdad Esfahbod <behdad@gnome.org> * pango/pango-context.c: * pango/pango-context.h: Make the following API public: pango_context_new() pango_context_set_font_map() * pango/pango-fontmap.c (pango_font_map_create_context): * pango/pango-fontmap.h: New public API: pango_font_map_create_context() * pango/pangocairo-context.c (pango_cairo_create_context): * pango/pangocairo-font.c (_pango_cairo_font_get_metrics), (_pango_cairo_font_private_get_hex_box_info): * pango/pangocairo-fontmap.c (pango_cairo_font_map_create_context): * pango/pangocairo.h: Deprecate pango_cairo_font_map_create_context(). * pango/pangofc-font.c (pango_fc_font_get_metrics): * pango/pangofc-fontmap.c (pango_fc_font_map_create_context): * pango/pangofc-fontmap.h: Deprecate pango_fc_font_map_create_context(). * pango/pangoft2-fontmap.c (pango_ft2_font_map_create_context), (pango_ft2_get_context): * pango/pangoft2.h: Deprecate pango_ft2_font_map_create_context(). * pango/pangowin32.c (pango_win32_get_context), (pango_win32_font_get_metrics): * pango/pangowin32.h: Deprecate pango_win32_get_context(). * pango/pangoxft-font.c (_pango_xft_font_get_mini_font): * pango/pangoxft-fontmap.c (pango_xft_get_context): * pango/pangoxft.h: Deprecate pango_xft_get_context(). * pango/pangox-fontmap.c (pango_x_font_map_for_display): * pango/pangox.c (get_context_info), (pango_x_get_context), (pango_x_context_set_funcs), (pango_x_render_layout_line): Deprecate pango_x_get_context(), again. * docs/pango-sections.txt: * docs/tmpl/fonts.sgml: * pango-view/viewer-pangocairo.c (pangocairo_view_get_context): * pango-view/viewer-pangoft2.c (pangoft2_view_get_context): * pango-view/viewer-pangox.c (pangox_view_get_context): * pango-view/viewer-pangoxft.c (pangoxft_view_get_context): * pango/check.defs: * pango/pango.def: Update. svn path=/trunk/; revision=2675
* MinorBehdad Esfahbod2008-07-041-1/+1
| | | | svn path=/trunk/; revision=2667
* 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
* Fixed gtk-doc warnings.Wouter Bolsterlee2008-01-281-2/+2
| | | | | | | | | | | | | | | 2008-01-28 Wouter Bolsterlee <wbolster@svn.gnome.org> * pango/pango-context.c: * pango/pango-fontmap.c: * pango/pango-utils.c: * pango/pangofc-fontmap.h: * pango/pangox.c: * pango/reorder-items.c: Fixed gtk-doc warnings. svn path=/trunk/; revision=2555
* Bug 478914 – Use something invalid instead of '?' when validating inputBehdad Esfahbod2007-12-101-15/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Part of Bug 440603 – Minor ABI changeBehdad Esfahbod2007-05-231-3/+9
| | | | | | | | | | | | | | | 2007-05-23 Behdad Esfahbod <behdad@gnome.org> Part of Bug 440603 – Minor ABI change * pango/pango-context.c (pango_context_init), (pango_context_set_language), (pango_context_get_language): Make itemization use pango_language_get_default() if context has no language set on it. Ditto for pango_context_get_metrics() if both input language and context language are NULL. svn path=/trunk/; revision=2317
* Bug 436988 – Adding PangoScript to PangoAnalysisBehdad Esfahbod2007-05-081-0/+1
| | | | | | | | | | | | | | | | | | 2007-05-08 Behdad Esfahbod <behdad@gnome.org> Bug 436988 – Adding PangoScript to PangoAnalysis * pango/pango-item.h: * pango/pango-context.c (itemize_state_add_character): Add a 'script' member to PangoAnalysis. It's added as a guint8 in the padding available in that struct, though it's value is a PangoScript. * pango/pangox.c (itemize_string_foreach): Update. svn path=/trunk/; revision=2267