summaryrefslogtreecommitdiff
path: root/pango/pango-language.c
Commit message (Collapse)AuthorAgeFilesLines
* language: Document issue with per-thread localeslanguage-get-defaultMatthias Clasen2021-08-211-0/+4
| | | | | | | Document that pango_language_get_default() assumes a single, globale locale. Fixes: #501
* language: Silence compiler warningsMatthias Clasen2021-07-101-9/+11
| | | | | Use a GPtrArray instead of a GArray of pointers, to avoid case-align warnings.
* docs: Link syntax fixesdocs-link-fixesMatthias Clasen2021-05-251-5/+5
| | | | | Now that gi-docgen warns about link syntax errors, we can find and fix them.
* docs: Reduce redundancydocs-cleanupsMatthias Clasen2021-05-201-5/+4
| | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate.
* docs: Convert gtk-doc syntax leftoversdocs-cleanupMatthias Clasen2021-05-191-41/+38
| | | | | Remove leftovers like #Type, reduce indentations to avoid markdown block quotes, etc.
* introspection: Stop using allow-noneMatthias Clasen2021-05-191-3/+3
| | | | | The allow-none annotation has been deprecated for a long time already. Instead use optional and nullable everywhere.
* Fix various broken linksMatthias Clasen2021-03-111-9/+9
| | | | All these were pointed out by gi-docgen warnings.
* docs: Tweak language docsMatthias Clasen2021-03-111-16/+21
| | | | Add summaries, convert markup, etc.
* docs: Port PangoLanguage to the new doc formatMatthias Clasen2021-03-111-67/+65
| | | | Replace gtk-doc'isms and use gi-docgen links instead.
* docs: Replace lots of vestigial xml markupMatthias Clasen2021-03-111-16/+15
| | | | | We want to use pure markdown, since docbook is going away as the intermediate format.
* Add pango_language_get_preferredMatthias Clasen2020-09-181-4/+32
| | | | | | This returns the list of preferred languages, as determined from the PANGO_LANGUAGES or LANGUAGES environment variables.
* Fix a cast-align warningMatthias Clasen2020-09-171-1/+1
| | | | | clang doesn't know that this is fine, and complains. So help it out.
* 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