summaryrefslogtreecommitdiff
path: root/pango/pango-language.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't assert in pango_language_get_scriptsavoid-script-lang-crashMatthias Clasen2020-09-081-1/+1
| | | | | | | | | | | The assertion in pango_language_get_scripts can actually be triggered since we last regenerated the pango_script_for_lang table. It now includes an entry for und-zsye which has no scripts. Handle this case without asserting. This commit includes a test.
* Revert "PangoLanguage: Fix clang -Wcast-align warnings"Matthias Clasen2020-06-111-15/+15
| | | | | | This reverts commit 3a9398fb989ff571aa40405987e20d548717687e. This commit was causing crashes, see #481
* PangoLanguage: Fix clang -Wcast-align warningsTimm Bäder2020-04-141-15/+15
| | | | | | | | | Clang complains when casting char* to PangoLanguage* and -Wcast-align set. We only cast it to char* to get the proper address for the private struct though, so just cast to void* afterwards. Except for the case that was stuffing PangoLanguage* sized elements into a GArray. Just use a GPtrArray there.
* Silence a compiler warningMatthias Clasen2019-05-271-1/+1
|
* Add a note to pango_language_get_scripts docsMatthias Clasen2019-05-271-0/+4
| | | | | Explain that returned script values are, in fact, from the GUnicodeScript enumeration.
* coretext: handle locale set through environment variablesKristian Rietveld2015-05-291-0/+19
|
* Add many missing nullability annotations.Evan Nemerson2014-10-161-11/+11
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Revert "Fix leftover markup in docs"Matthias Clasen2014-08-301-17/+18
| | | | This reverts commit 19a252d9a3d63e7816f9a77bab65bd161675440a.
* Fix leftover markup in docsMatthias Clasen2014-08-301-18/+17
|
* pango: Don't fail to initialize if LC_CTYPE is not setSebastian Dröge2014-06-271-1/+8
| | | | | | | | | | g_once_init_leave() does not work on NULL, and just returns... and all future calls to g_once_init_enter() will block forever. Happens on Android, so let's just fall back to the C locale if there's nothing else we can do. https://bugzilla.gnome.org/show_bug.cgi?id=732276
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-0/+9
| | | | Patch from Rafał Mużyło.
* Make pango-language.c thread-safeBehdad Esfahbod2012-08-271-12/+32
| | | | | | | Start marking static-data that is thread safe with the "MT-safe" marker. The following grep can be used to track progress: grep 'static[^(]*;' *c | grep -v MT-safe
* Update to Unicode 6.1Behdad Esfahbod2012-08-251-1/+28
|
* introspection: assorted fixes to avoid regressions in Vala bindingsEvan Nemerson2012-08-121-11/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=681423
* Remove unused macroBehdad Esfahbod2012-08-021-7/+1
|
* Get _pango_get_lc_ctype from system prefs on Mac OS XKristian Rietveld2011-11-141-0/+21
|
* Stop using G_CONST_RETURN in PangoRyan Lortie2011-06-091-3/+3
| | | | | | | 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
* Adding allow-none introspection metadata to pango_language_from_stringAlberto Ruiz2011-04-251-1/+1
|
* adding (out caller-allocates) introspection metadata to ↵Alberto Ruiz2011-04-251-1/+1
| | | | pango_language_get_scripts parameters
* adding allow-none introspection metadata to pango_language_get_scripts ↵Alberto Ruiz2011-04-251-2/+3
| | | | parameters
* Use G_DEFINE_BOXED_TYPE.Christian Persch2010-11-041-11/+3
| | | | Bug #539622.
* [pango-language] Fix small leakBehdad Esfahbod2009-03-021-2/+4
| | | | Reported by Tommi Rantala.
* Bug 551469 – Fold '@' to '-' when parsing PangoLanguagesBehdad Esfahbod2009-01-071-1/+1
| | | | | | | | | | 2009-01-06 Behdad Esfahbod <behdad@gnome.org> Bug 551469 – Fold '@' to '-' when parsing PangoLanguages * pango/pango-language.c: Fold '@' to '-' when parsing PangoLanguages. svn path=/trunk/; revision=2792
* Bug 560730 – pango 1.22.2 build failure on Solaris 10, too many arrayBehdad Esfahbod2008-11-191-5/+7
| | | | | | | | | | | 2008-11-19 Behdad Esfahbod <behdad@gnome.org> Bug 560730 – pango 1.22.2 build failure on Solaris 10, too many array initializers in pango-language.c * pango/pango-language.c: Don't use anonymous struct. svn path=/trunk/; revision=2738
* Minor doc improvement.Behdad Esfahbod2008-08-201-1/+2
| | | | svn path=/trunk/; revision=2703
* Cache language information to avoid bsearch()ing all the time.Behdad Esfahbod2008-08-201-7/+91
| | | | | | | | | | | | 2008-08-20 Behdad Esfahbod <behdad@gnome.org> * pango/pango-language.c (pango_language_private_init), (pango_language_get_private), (pango_language_from_string), (find_best_lang_match), (find_best_lang_match_cached), (pango_language_get_sample_string), (pango_language_get_scripts): Cache language information to avoid bsearch()ing all the time. svn path=/trunk/; revision=2701
* Add a macroBehdad Esfahbod2008-08-201-8/+10
| | | | svn path=/trunk/; revision=2700
* Cleanup bsearching in language arrays.Behdad Esfahbod2008-08-201-88/+73
| | | | | | | | | | | | | 2008-08-20 Behdad Esfahbod <behdad@gnome.org> * pango/pango-language.c (find_best_lang_match), (pango_language_get_sample_string), (pango_language_get_scripts), (pango_script_get_sample_language): Cleanup bsearching in language arrays. Add some language codes for scripts. svn path=/trunk/; revision=2699
* pango_language_get_scripts(): Fix a tiny typo in the documentation.Murray Cumming2008-08-201-1/+1
| | | | | | | | | 2008-08-20 Murray Cumming <murrayc@murrayc.com> * pango/pango-language.c: pango_language_get_scripts(): Fix a tiny typo in the documentation. svn path=/trunk/; revision=2698
* Fix docsBehdad Esfahbod2008-08-201-2/+3
| | | | svn path=/trunk/; revision=2697
* Bug 314094 – Get rid of poutpourri default sample stringBehdad Esfahbod2008-08-201-20/+29
| | | | | | | | | | | | | 2008-08-20 Behdad Esfahbod <behdad@gnome.org> Bug 314094 – Get rid of poutpourri default sample string * pango/pango-language-sample-table.h: * pango/pango-language.c (pango_language_get_sample_string): Use default language if provided language to get_sample_string() is NULL. svn path=/trunk/; revision=2696
* Bug 473806 – Improve pango_language_get_sample_string()Behdad Esfahbod2008-08-201-33/+24
| | | | | | | | | | | | | | | 2008-08-19 Behdad Esfahbod <behdad@gnome.org> Bug 473806 – Improve pango_language_get_sample_string() * docs/Makefile.am: * pango/Makefile.am: * pango/pango-language-sample-table.h: * pango/pango-language.c (pango_language_get_sample_string): Add language sample texts that are actually usable. Compiled from a variety of sources. See pango-language-sample-table.h. svn path=/trunk/; revision=2695
* Bug 473805 – Add API enumerating scripts for a languageBehdad Esfahbod2008-08-201-28/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-18 Behdad Esfahbod <behdad@gnome.org> Bug 473805 – Add API enumerating scripts for a language * docs/Makefile.am: * docs/pango-sections.txt: * docs/tmpl/scripts.sgml: * docs/tmpl/text-attributes.sgml: * docs/tmpl/utils.sgml: * pango/pango-language.c (pango_language_get_scripts), (pango_language_includes_script), (pango_script_get_sample_language): * pango/pango-language.h: * pango/pango-script.c: * pango/pango.def: Add a minor new public API: pango_language_get_scripts() This is what pango_language_includes_script() has been using internally. Previously one had to call that function over all possible script values to determine which scripts a language uses. The new API makes that much easier. svn path=/trunk/; revision=2693
* 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 537258 – Add a pango_language_to_string() functionBehdad Esfahbod2008-06-091-0/+15
| | | | | | | | | | | | | | | | | 2008-06-09 Behdad Esfahbod <behdad@gnome.org> Bug 537258 – Add a pango_language_to_string() function * docs/tmpl/text-attributes.sgml: * pango/pango-language.c (pango_language_to_string): * pango/pango-language.h: * pango/pango.def: Add a function implementation of pango_language_to_string(). The macro is still available. To be removed in a cycle or two from now. (bug #537466) svn path=/trunk/; revision=2651
* Bug 537257 – pango_language_from_string(NULL) not happyBehdad Esfahbod2008-06-091-5/+9
| | | | | | | | | | | | 2008-06-09 Behdad Esfahbod <behdad@gnome.org> Bug 537257 – pango_language_from_string(NULL) not happy * pango/pango-language.c (pango_language_from_string): Allow NULL. svn path=/trunk/; revision=2650
* Bug 348348 – Add a way to get the script name of a gunicharBehdad Esfahbod2007-08-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-08-20 Behdad Esfahbod <behdad@gnome.org> Bug 348348 – Add a way to get the script name of a gunichar * configure.in: Require glib 2.14, for GUnicodeScript stuff. * docs/tmpl/scripts.sgml: Document that #PangoScript is interchangeable with GUnicodeScript. * pango/pango-script.c (pango_script_for_unichar): Use g_unichar_get_script(), and document it. * tools/Makefile.am: * tools/gen-script-table.pl: * pango/Makefile.am: * pango/pango-script-table.h: Remove pango-script-table.h and its generator. * pango/pango-gravity.c (get_script_properties): * pango/pango-language.c (pango_script_get_sample_language): * pango/pango-ot-tag.c (pango_ot_tag_from_script): Protect against unexpected script values. svn path=/trunk/; revision=2406
* Add G_UNLIKELY() to type registration block in _get_type() functions.Behdad Esfahbod2007-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-20 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c (pango_font_description_get_type), (pango_font_metrics_get_type): * pango/glyphstring.c (pango_glyph_string_get_type): * pango/pango-attributes.c (pango_attr_list_get_type): * pango/pango-color.c (pango_color_get_type): * pango/pango-item.c (pango_item_get_type): * pango/pango-language.c (pango_language_get_type): * pango/pango-layout.c (pango_layout_line_get_type), (pango_layout_iter_get_type): * pango/pango-matrix.c (pango_matrix_get_type): * pango/pango-ot-info.c (pango_ot_info_get_type): * pango/pango-ot-ruleset.c (pango_ot_ruleset_get_type): * pango/pango-tabs.c (pango_tab_array_get_type): * pango/pangoatsui-fontmap.c (pango_atsui_family_get_type), (pango_atsui_face_get_type): * pango/pangofc-fontmap.c (pango_fc_face_get_type), (pango_fc_family_get_type): * pango/pangowin32-fontmap.c (pango_win32_family_get_type), (pango_win32_face_get_type): * pango/pangox-fontmap.c (pango_x_font_map_get_type), (pango_x_face_get_type), (pango_x_family_get_type): * pango/pangox.c (pango_x_font_get_type): Add G_UNLIKELY() to type registration block in _get_type() functions. svn path=/trunk/; revision=2364
* Add G_GNUC_CONST and G_GNUC_PURE annotations.Behdad Esfahbod2007-06-121-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-11 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.h: * pango/pango-font.h: * pango/pango-glyph.h: * pango/pango-gravity.h: * pango/pango-language.h: * pango/pango-layout.h: * pango/pango-matrix.h: * pango/pango-ot-private.h: * pango/pango-ot.h: * pango/pango-renderer.h: * pango/pango-script.h: * pango/pango-tabs.h: * pango/pango-utils.h: * pango/pangoatsui-private.h: * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.h: * pango/pangocairo-fc.h: * pango/pangocairo-private.h: * pango/pangocairo-win32.h: * pango/pangocairo.h: * pango/pangofc-decoder.h: * pango/pangofc-font.h: * pango/pangofc-fontmap.h: * pango/pangoft2-private.h: * pango/pangoft2.h: * pango/pangowin32-private.h: * pango/pangox-private.h: * pango/pangoxft-render.h: * pango/pangoxft.h: Add G_GNUC_CONST and G_GNUC_PURE annotations. svn path=/trunk/; revision=2345
* Bug 440603 – Minor ABI changeBehdad Esfahbod2007-05-231-5/+4
| | | | | | | | | | | | | 2007-05-22 Behdad Esfahbod <behdad@gnome.org> Bug 440603 – Minor ABI change * pango/pango-language.c (pango_language_includes_script): * pango/pango-ot-tag.c (pango_ot_tag_from_language): Accept language == NULL as legitimate input. svn path=/trunk/; revision=2315
* Bug 325714 – Pango should respect $LANGUAGEBehdad Esfahbod2007-05-141-1/+102
| | | | | | | | | | | | | | | | | | 2007-05-14 Behdad Esfahbod <behdad@gnome.org> Bug 325714 – Pango should respect $LANGUAGE * pango/pango-language.c (pango_language_matches), (parse_default_languages), (_pango_script_get_default_language), (pango_script_get_sample_language): Make pango_script_get_sample_language() use the value of env var PANGO_LANGUAGE or LANGUAGE (checked in that order) to make better guesses. The env var should be a list of language tags, like "en:fa" for example where makes Pango choose Persian (fa) fonts instead of Arabic (ar) fonts... svn path=/trunk/; revision=2294
* Move pango_script_get_sample_language() from pango-script.c toBehdad Esfahbod2007-05-141-1/+133
| | | | | | | | | | | 2007-05-14 Behdad Esfahbod <behdad@gnome.org> * pango/pango-language.c (pango_script_get_sample_language): * pango/pango-script.c: Move pango_script_get_sample_language() from pango-script.c to pango-language.c. Fits better. svn path=/trunk/; revision=2293
* Bug 437534 – pango_language_includes_script is buggyBehdad Esfahbod2007-05-101-29/+52
| | | | | | | | | | | | | 2007-05-10 Behdad Esfahbod <behdad@gnome.org> Bug 437534 – pango_language_includes_script is buggy * pango/pango-language.c (lang_compare_first_component), (lang_info_compare), (script_for_lang_compare), (pango_language_includes_script): Fix script_for_lang table lookup. svn path=/trunk/; revision=2273
* Move pango_language_includes_script() from pango-script.c toBehdad Esfahbod2007-05-091-0/+92
| | | | | | | | | | | | 2007-05-09 Behdad Esfahbod <behdad@gnome.org> * pango/pango-language.c (script_for_lang_compare), (pango_language_includes_script): * pango/pango-script.c: Move pango_language_includes_script() from pango-script.c to pango-language.c that it belongs. svn path=/trunk/; revision=2270
* Move PangoLanguage stuff into pango-language.[ch]Behdad Esfahbod2007-05-081-0/+382
2007-05-08 Behdad Esfahbod <behdad@gnome.org> * pango/Makefile.am: * pango/pango-script.h: * pango/pango-types.h: * pango/pango-utils.c: * pango/pango-language.c: * pango/pango-language.h: Move PangoLanguage stuff into pango-language.[ch] svn path=/trunk/; revision=2268