summaryrefslogtreecommitdiff
path: root/pango/pango-script-table.h
Commit message (Collapse)AuthorAgeFilesLines
* Bug 348348 – Add a way to get the script name of a gunicharBehdad Esfahbod2007-08-211-2981/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *.c, *.h: Drop trailing whitespace.Behdad Esfahbod2007-01-161-1/+1
| | | | | | | | | 2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Drop trailing whitespace. svn path=/trunk/; revision=2163
* Minor simplification.Behdad Esfahbod2006-09-181-3/+1
| | | | | | | | | | | 2006-09-18 Behdad Esfahbod <behdad@gnome.org> * tools/gen-script-table.pl: * pango/pango-script-table.h: * pango/pango-script.c (pango_script_for_unichar): Minor simplification. * tests/testscript.c (test_script_lookup): Update to pass.
* Update to UCD 5.0.0.Behdad Esfahbod2006-07-251-938/+1051
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-07-24 Behdad Esfahbod <behdad@gnome.org> * pango/mini-fribidi/fribidi_tab_char_type_2.i: Update to UCD 5.0.0. * pango/mini-fribidi/README: Note the about update. * pango/pango-script.h: Add new values for PangoScript. * pango/pango-script.c (pango_script_for_unichar_bsearch): Default to PANGO_SCRIPT_UNKNOWN. * pango/pango-script.c (pango_script_get_sample_language): Add empty entries for new script values. * tools/gen-script-table.pl: Default to PANGO_SCRIPT_UNKNOWN as is now the default value of Scripts.txt in UCD 5.0.0. * pango/pango-script-table.h: Regenerated against UCD 5.0.0. * docs/tmpl/scripts.sgml: Document new script types. * tools/gen-script-for-lang.c (scripts_for_line): Ignore data at the end of lines as many .orth files in fontconfig now list the character name there. * pango/pango-script-lang-table.h: Regenerate against newer fontconfig 2.3.9x.
* Updates from #320666:Behdad Esfahbod2005-11-141-6/+2740
| | | | | | | | | | | | | | | | | | | | | | | | 2005-11-14 Behdad Esfahbod <behdad@gnome.org> Updates from #320666: * pango/Makefile.am: Remove pango-easy-scripts-table.h. * pango/pango-easy-scripts-table.h: Removed. The "easy" table goes into pango-scripts-table.h too. * pango/pango-script-table.h: Include "easy" table. * pango/pango-script.c: Change gunichar->script last_index caching mechanism. The caching is simply done by making int mid in the bsearch static. * tools/Makefile.am: Remove gen-easy-scripts-table.c. * tools/gen-easy-scripts-table.c: Removed. The "easy" table is generated in gen-scripts-table.pl too. * tools/gen-script-table.h: Generate "easy" table.
* Fixes bug #320666:Federico Mena Quintero2005-11-081-293/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-07 Federico Mena Quintero <federico@ximian.com> Fixes bug #320666: Instead of doing a bsearch() for every gunichar to map it to a PangoScript, use a precomputed table for the first 8192 code points. Also, remember the last script that we computed on each invocation; this will also help CJK and the other scripts above U+2000. This table also holds information on whether the characters in it are paired characters. We can use this to avoid doing the expensive get_pair_index() call most of the time. Many thanks to Matthias Clasen for his suggestions for this patch. * tools/gen-easy-scripts-table.c: New program to generate pango_easy_scripts_table. * tools/Makefile.am: Build gen-easy-scripts-table. * pango/pango-easy-scripts-table.h: New file with a mapping of the first 8192 Unicode characters to their corresponding scripts. The table also says whether each character has a paired char or not. * pango/Makefile.am (libpango_1_0_la_SOURCES): Add pango-easy-scripts-table.h. * pango/pango-script-table.h: Remove everything below U+2000, and add a note to that effect. * pango/pango-script.c (pango_script_for_unichar_with_last_index): New function. This is the old pango_script_for_unichar(), but it lets the caller keep around the computed index in pango_script_table. This works under the assumption that a character is likely to be in the same script block as the preceding character in a string. (pango_script_for_unichar): First, do a quick check against the pango_easy_scripts_table. Then, do the expensive check with pango_script_for_unichar_with_last_index(). (pango_script_iter_next): If the character is within the easy script range, find out if it is a paired character by using PANGO_PAIRED_CHAR_FLAG. (struct _PangoScriptIter): Add a last_index_for_script_lookup field. We use this to maintain the last-lookup index from pango_script_for_unichar_with_last_index(). (pango_script_iter_next): If the character is not within the easy script range, use pango_script_for_unichar_with_last_index(), and store the index in the last_index_for_script_lookup field of the PangoScriptIter.
* Updated to Unicode 4.1, adding new scripts and Arabic joining data.Roozbeh Pournader2005-08-091-95/+115
| | | | | | | | | | 2005-08-08 Roozbeh Pournader <roozbeh@farsiweb.info> * docs/tmpl/scripts.sgml, modules/arabic/arabic-ot.c, pango/pango-script.c, pango/pango-script.h, pango/pango-script-table.h, tools/gen-script-table.pl: Updated to Unicode 4.1, adding new scripts and Arabic joining data. (#312884) `
* Hand edit to fix a bug in the 4.0.0 data tables. (#173096, SukhjinderOwen Taylor2005-06-141-1/+1
| | | | | | | | | | | | 2005-06-14 Owen Taylor <otaylor@redhat.com> * pango/pango-script-table.h (struct): Hand edit to fix a bug in the 4.0.0 data tables. (#173096, Sukhjinder Sidhu) * tools/gen-script-table.pl: Some updates to handle newer formats (not actually regenerating tables at the moment, since the changes are large)
* Make PangoEngine{,Lang,Shape} GObjects, and use a GTypeModule-basedOwen Taylor2003-08-031-0/+404
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