summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2011-02-07 22:22:16 +0000
committerIan MacArthur <imacarthur@gmail.com>2011-02-07 22:22:16 +0000
commit33af4e4ba5cec3f0fe757ca9889b23b2ba0f3b76 (patch)
tree198b2daea575779dac3dd942934e66e15a59e38b /FL
parentd140f4f3be96f7002c6d8a50d72f11baa92509d1 (diff)
Attempt to fix STR #2550 to make fl_text_extents work in Xlib-only
(i.e. non-XFT) X11 builds. This appears to be working now, though I can not test it fully, so we need more feedback. In particular the setting of the dx param is certainly wrong, but works fine in general cases. I think. Also, I suspect it may behave badly in the face of RtoL text rendering but I think we have other problems in that area anyway... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Xutf8.h59
1 files changed, 36 insertions, 23 deletions
diff --git a/FL/Xutf8.h b/FL/Xutf8.h
index 459db02b8..609a7cff7 100644
--- a/FL/Xutf8.h
+++ b/FL/Xutf8.h
@@ -48,8 +48,8 @@ typedef struct {
XUtf8FontStruct *
XCreateUtf8FontStruct (
- Display *dpy,
- const char *base_font_name_list);
+ Display *dpy,
+ const char *base_font_name_list);
void
XUtf8DrawString(
@@ -63,6 +63,19 @@ XUtf8DrawString(
int num_bytes);
void
+XUtf8_measure_extents(
+ Display *display,
+ Drawable d,
+ XUtf8FontStruct *font_set,
+ GC gc,
+ int *xx,
+ int *yy,
+ int *ww,
+ int *hh,
+ const char *string,
+ int num_bytes);
+
+void
XUtf8DrawRtlString(
Display *display,
Drawable d,
@@ -89,7 +102,7 @@ XUtf8TextWidth(
XUtf8FontStruct *font_set,
const char *string,
int num_bytes);
-int
+int
XUtf8UcsWidth(
XUtf8FontStruct *font_set,
unsigned int ucs);
@@ -100,41 +113,41 @@ XGetUtf8FontAndGlyph(
unsigned int ucs,
XFontStruct **fnt,
unsigned short *id);
-
+
void
XFreeUtf8FontStruct(
Display *dpy,
XUtf8FontStruct *font_set);
-int
-XConvertUtf8ToUcs(
- const unsigned char *buf,
- int len,
+int
+XConvertUtf8ToUcs(
+ const unsigned char *buf,
+ int len,
unsigned int *ucs);
-int
+int
XConvertUcsToUtf8(
- unsigned int ucs,
+ unsigned int ucs,
char *buf);
-int
+int
XUtf8CharByteLen(
- const unsigned char *buf,
+ const unsigned char *buf,
int len);
-int
+int
XCountUtf8Char(
- const unsigned char *buf,
+ const unsigned char *buf,
int len);
-int
-XFastConvertUtf8ToUcs(
- const unsigned char *buf,
- int len,
+int
+XFastConvertUtf8ToUcs(
+ const unsigned char *buf,
+ int len,
unsigned int *ucs);
-long
+long
XKeysymToUcs(
KeySym keysym);
@@ -147,7 +160,7 @@ XUtf8LookupString(
KeySym* keysym,
Status* status_return);
-unsigned short
+unsigned short
XUtf8IsNonSpacing(
unsigned int ucs);
@@ -156,11 +169,11 @@ XUtf8IsRightToLeft(
unsigned int ucs);
-int
+int
XUtf8Tolower(
int ucs);
-int
+int
XUtf8Toupper(
int ucs);
@@ -173,4 +186,4 @@ XUtf8Toupper(
/*
* End of "$Id$".
- */
+ */