summaryrefslogtreecommitdiff
path: root/modules/thai
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-06-21 16:13:42 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-06-21 16:13:42 +0000
commit0e6409a158d9dd76a31b9eccf7c4f26c5466d082 (patch)
treedc120946f7efa23c6c91c64aee2686d2637e3970 /modules/thai
parent197a2a68c145d3568cd4f0f2fee3d3b55570134f (diff)
downloadpango-0e6409a158d9dd76a31b9eccf7c4f26c5466d082.tar.gz
Remove tests for libunicode
Wed Jun 21 12:11:56 2000 Owen Taylor <otaylor@redhat.com> * configure.in: Remove tests for libunicode * pango/utils.[ch]: Removed. The functions from here are now in GLib. * **.[ch]: Removed use of libunicode and utils.c in favor of Unicode functions in GLib. Requires latest GLib from CVS.
Diffstat (limited to 'modules/thai')
-rw-r--r--modules/thai/thai-x.c26
-rw-r--r--modules/thai/thai.c26
2 files changed, 24 insertions, 28 deletions
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
index 0882f75e..aaa52140 100644
--- a/modules/thai/thai-x.c
+++ b/modules/thai/thai-x.c
@@ -24,8 +24,6 @@
#include <glib.h>
#include "pango.h"
#include "pangox.h"
-#include "utils.h"
-#include <unicode.h>
#include <fribidi/fribidi.h>
/* We handle the range U+0e01 to U+0e5b exactly
@@ -240,7 +238,7 @@ add_glyph (ThaiFontInfo *font_info,
* code pointer
*/
static int
-get_glyph (ThaiFontInfo *font_info, unicode_char_t wc)
+get_glyph (ThaiFontInfo *font_info, gunichar wc)
{
switch (font_info->type)
{
@@ -260,9 +258,9 @@ static void
add_cluster (ThaiFontInfo *font_info,
PangoGlyphString *glyphs,
int cluster_start,
- unicode_char_t base,
- unicode_char_t group1,
- unicode_char_t group2)
+ gunichar base,
+ gunichar group1,
+ gunichar group2)
{
/* If we are rendering with an XTIS font, we try to find a precomposed
* glyph for the cluster.
@@ -303,11 +301,11 @@ thai_engine_shape (PangoFont *font,
PangoGlyphString *glyphs)
{
ThaiFontInfo *font_info;
- const char *p, *next;
+ const char *p;
- unicode_char_t base = 0;
- unicode_char_t group1 = 0;
- unicode_char_t group2 = 0;
+ gunichar base = 0;
+ gunichar group1 = 0;
+ gunichar group2 = 0;
int cluster_start = 0;
pango_glyph_string_set_size (glyphs, 0);
@@ -318,9 +316,9 @@ thai_engine_shape (PangoFont *font,
while (p < text + length)
{
int group;
- unicode_char_t wc;
+ gunichar wc;
- next = unicode_get_utf8 (p, &wc);
+ wc = g_utf8_get_char (p);
if (wc >= 0xe30 && wc < 0xe50)
group = groups[wc - 0xe30];
@@ -347,7 +345,7 @@ thai_engine_shape (PangoFont *font,
break;
}
- p = next;
+ p = g_utf8_next_char (p);
}
if (base)
@@ -364,7 +362,7 @@ thai_engine_get_coverage (PangoFont *font,
if (font_info->type != THAI_FONT_NONE)
{
- unicode_char_t wc;
+ gunichar wc;
for (wc = 0xe01; wc <= 0xe3a; wc++)
pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);
diff --git a/modules/thai/thai.c b/modules/thai/thai.c
index 0882f75e..aaa52140 100644
--- a/modules/thai/thai.c
+++ b/modules/thai/thai.c
@@ -24,8 +24,6 @@
#include <glib.h>
#include "pango.h"
#include "pangox.h"
-#include "utils.h"
-#include <unicode.h>
#include <fribidi/fribidi.h>
/* We handle the range U+0e01 to U+0e5b exactly
@@ -240,7 +238,7 @@ add_glyph (ThaiFontInfo *font_info,
* code pointer
*/
static int
-get_glyph (ThaiFontInfo *font_info, unicode_char_t wc)
+get_glyph (ThaiFontInfo *font_info, gunichar wc)
{
switch (font_info->type)
{
@@ -260,9 +258,9 @@ static void
add_cluster (ThaiFontInfo *font_info,
PangoGlyphString *glyphs,
int cluster_start,
- unicode_char_t base,
- unicode_char_t group1,
- unicode_char_t group2)
+ gunichar base,
+ gunichar group1,
+ gunichar group2)
{
/* If we are rendering with an XTIS font, we try to find a precomposed
* glyph for the cluster.
@@ -303,11 +301,11 @@ thai_engine_shape (PangoFont *font,
PangoGlyphString *glyphs)
{
ThaiFontInfo *font_info;
- const char *p, *next;
+ const char *p;
- unicode_char_t base = 0;
- unicode_char_t group1 = 0;
- unicode_char_t group2 = 0;
+ gunichar base = 0;
+ gunichar group1 = 0;
+ gunichar group2 = 0;
int cluster_start = 0;
pango_glyph_string_set_size (glyphs, 0);
@@ -318,9 +316,9 @@ thai_engine_shape (PangoFont *font,
while (p < text + length)
{
int group;
- unicode_char_t wc;
+ gunichar wc;
- next = unicode_get_utf8 (p, &wc);
+ wc = g_utf8_get_char (p);
if (wc >= 0xe30 && wc < 0xe50)
group = groups[wc - 0xe30];
@@ -347,7 +345,7 @@ thai_engine_shape (PangoFont *font,
break;
}
- p = next;
+ p = g_utf8_next_char (p);
}
if (base)
@@ -364,7 +362,7 @@ thai_engine_get_coverage (PangoFont *font,
if (font_info->type != THAI_FONT_NONE)
{
- unicode_char_t wc;
+ gunichar wc;
for (wc = 0xe01; wc <= 0xe3a; wc++)
pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);