diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-26 23:18:53 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-26 23:18:53 +0000 |
commit | e3f92b5972401c611f26f028804c4b7056f0be00 (patch) | |
tree | 6564f810c7235e71ffff0dd844961dc1438433e6 /tests/gen-all-unicode.c | |
parent | 1170903eb4010f837197c71d2817b9933b3f9ef4 (diff) | |
download | pango-e3f92b5972401c611f26f028804c4b7056f0be00.tar.gz |
Instead of including all-unicode.txt in the distribution, include a small
Mon Nov 26 18:17:00 2001 Owen Taylor <otaylor@redhat.com>
* tests/Makefile.am tests/gen-all-unicode.c: Instead
of including all-unicode.txt in the distribution, include
a small program to generate it.
* modules/hangul/hangul-x.c (render_syllable_with_ksc5601): When
falling back to uncomposed Jamos, if we can't render a Jamo
in any way, use the unknown glyph rather than nothing.
* modules/hangul/hangul-x.c (hangul_engine_shape): Prevent
overflows for invalid sequences which can be of arbitrary
length. (#50086)
* modules/arabic/arconv.c: New versions from Roozbeh Pournader.
- Replacing the tables with automatically-generated ones
- Using binary search instead of linear search for table lookup
- Updating all the names with Unicode names (eg Nun -> Noon)
- Fixed the Hamza mixup, using the Unicode rules
- Updating missed cases (eg Superscript Alef was missing from
arabic_isvowel)
- Removing too-intelligent cases which made the code non-compliant
(eg Alef with Hamza above+Kasra was changing to Alef with Hamza below)
- Removing 'connecttoleft' from 'charstruct' (replacing it with a macro)
- Indenting in the GNU style
Diffstat (limited to 'tests/gen-all-unicode.c')
-rw-r--r-- | tests/gen-all-unicode.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/gen-all-unicode.c b/tests/gen-all-unicode.c new file mode 100644 index 00000000..2ce37fd6 --- /dev/null +++ b/tests/gen-all-unicode.c @@ -0,0 +1,45 @@ +#include <glib.h> +#include <stdio.h> + +int +main (int argc, char **argv) +{ + gunichar i; + gint j; + + /* Output all characters in the BMP twice, once directly + * concatenated, once with spaces between them + */ + for (j = 0 ; j < 2 ; j++) + { + for (i = 0; i < 65536; i++) + { + if (g_unichar_validate (i)) + { + guchar buffer[7]; + int len = g_unichar_to_utf8 (i, buffer); + buffer[len] = '\0'; + + if (j == 1) + fputs (" ", stdout); + + fputs (buffer, stdout); + + if (j == 0) + { + if (i % 40 == 0 && i != 0) + fputs ("\n", stdout); + } + else + { + if (i % 20 == 0 && i != 0) + fputs ("\n", stdout); + } + } + } + } + fputs ("\n", stdout); + + return 0; +} + |