summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-01-15 06:12:19 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-01-15 06:12:19 +0000
commit08be81c00f4fce735979e6a684eeade00c1ce328 (patch)
tree5fc105b5c494741d01e484fbb43fb737cb777ccd /examples
parenta26b023b2859fed3e178a92e3d93c71672644e7d (diff)
downloadpango-08be81c00f4fce735979e6a684eeade00c1ce328.tar.gz
Eliminate PangoCFont; For X, encode charset into upper 16 bits of 32 bit
Sat Jan 15 01:06:45 2000 Owen Taylor <otaylor@redhat.com> * libpango/pangox.c libpango/pangox.h libpango/fonts.c libpango/glyphstring.c modules/basic/basic.c: Eliminate PangoCFont; For X, encode charset into upper 16 bits of 32 bit glyph IDs. Revise X core <=> module interfaces to support this change. Remove support for X_XLFD_FONT_RANGES, which has been disavowed by its proponents, in favor of checking metrics to figure out if the relevant characters are there. Rework operation of basic module to be faster and simple. * modules/Makefile.am: temporarily comment out Tamil and Hangul modules until I finish mucking with the X font interfaces.
Diffstat (limited to 'examples')
-rw-r--r--examples/HELLO.utf82
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/pango.modules4
-rw-r--r--examples/viewer.c10
4 files changed, 8 insertions, 10 deletions
diff --git a/examples/HELLO.utf8 b/examples/HELLO.utf8
index e8ae856c..f7dc6b15 100644
--- a/examples/HELLO.utf8
+++ b/examples/HELLO.utf8
@@ -1,3 +1,5 @@
+Παν語
+
This is a list of ways to say hello in various languages. Its purpose is to illustrate a number of scripts.
(Converted into UTF-8)
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4356480b..dc6591cf 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -14,4 +14,4 @@ pango.modules:
( cd ../modules && \
../libpango/pango-querymodules `find . -name '*.so'` > ../examples/pango.modules )
-EXTRA_DIST=HELLO.utf8 \ No newline at end of file
+EXTRA_DIST=HELLO.utf8 muru.utf \ No newline at end of file
diff --git a/examples/pango.modules b/examples/pango.modules
index e945bf29..28d2cb73 100644
--- a/examples/pango.modules
+++ b/examples/pango.modules
@@ -1,6 +1,2 @@
/home/otaylor/devel/pango/modules/./basic/.libs/pango-basic.so BasicScriptEngineLang PangoEngineLang PangoRenderNone 0-687:* 688-767: 896-1423:* 1425-1641:* 7680-8191:* 8192-40959:* 44032-55203:kr 63744-64011:kr 65280-65507:*
/home/otaylor/devel/pango/modules/./basic/.libs/pango-basic.so BasicScriptEngineX PangoEngineShape PangoRenderX 0-687:* 688-767: 896-1423:* 1425-1641:* 7680-8191:* 8192-40959:* 44032-55203:kr 63744-64011:kr 65280-65507:*
-/home/otaylor/devel/pango/modules/./hangul/.libs/pango-hangul.so HangulScriptEngineLang PangoEngineLang PangoRenderNone 4352-4607:* 44032-55203:*
-/home/otaylor/devel/pango/modules/./hangul/.libs/pango-hangul.so HangulScriptEngineX PangoEngineShape PangoRenderX 4352-4607:* 44032-55203:*
-/home/otaylor/devel/pango/modules/./tamil/.libs/pango-tamil.so TamilScriptEngineLang PangoEngineLang PangoRenderNone 2944-3071:*
-/home/otaylor/devel/pango/modules/./tamil/.libs/pango-tamil.so TamilScriptEngineX PangoEngineShape PangoRenderX 2944-3071:*
diff --git a/examples/viewer.c b/examples/viewer.c
index 4404631f..82da2d4a 100644
--- a/examples/viewer.c
+++ b/examples/viewer.c
@@ -214,7 +214,7 @@ break_run (char *text,
buf = pango_glyph_string_new();
pango_shape (font, text + item->offset, item->length, &item->analysis, buf);
- pango_x_extents (buf, NULL, NULL, &width, NULL, NULL, logical_ascent, logical_descent);
+ pango_x_extents (font, buf, NULL, NULL, &width, NULL, NULL, logical_ascent, logical_descent);
result = FALSE;
*new_item = NULL;
@@ -407,7 +407,7 @@ runs_x_to_cp (char *text, GList *runs, int x, int *offset)
PangoItem *item = runs->data;
pango_shape (font, text + item->offset, item->length, &item->analysis, buf);
- pango_x_extents (buf, NULL, NULL, &width, NULL, NULL, NULL, NULL);
+ pango_x_extents (font, buf, NULL, NULL, &width, NULL, NULL, NULL, NULL);
if (x >= pixels && x < pixels + width)
{
@@ -502,7 +502,7 @@ runs_char_bounds (char *text, GList *runs, int offset, int *x, int *width)
PangoItem *item = runs->data;
pango_shape (font, text + item->offset, item->length, &item->analysis, buf);
- pango_x_extents (buf, NULL, NULL, &run_width, NULL, NULL, NULL, NULL);
+ pango_x_extents (font, buf, NULL, NULL, &run_width, NULL, NULL, NULL, NULL);
if (offset >= item->offset &&
offset < item->offset + item->length)
@@ -661,14 +661,14 @@ expose_paragraph (Paragraph *para, GdkDrawable *drawable,
/* Render the glyphs to the screen */
pango_x_render (GDK_DISPLAY(), GDK_WINDOW_XWINDOW (drawable),
- GDK_GC_XGC (gc), buf, x + x_off,
+ GDK_GC_XGC (gc), font, buf, x + x_off,
y + line->ascent);
/* Advance to next x position
*/
if (run_list->next)
{
- pango_x_extents (buf, NULL, NULL, &width, NULL, NULL, NULL, NULL);
+ pango_x_extents (font, buf, NULL, NULL, &width, NULL, NULL, NULL, NULL);
x_off += width;
}