projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new win32 component to the release tarball
[rrdtool.git]
/
src
/
rrd_afm.h
diff --git
a/src/rrd_afm.h
b/src/rrd_afm.h
index
cedc994
..
a236847
100644
(file)
--- a/
src/rrd_afm.h
+++ b/
src/rrd_afm.h
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * RRDtool 1.2.
9 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.
19 Copyright by Tobi Oetiker, 1997-2007
****************************************************************************
* rrd_afm.h Parsing afm tables to find width of strings.
****************************************************************************/
****************************************************************************
* rrd_afm.h Parsing afm tables to find width of strings.
****************************************************************************/
@@
-7,6
+7,13
@@
#ifndef RRD_AFM_H
#define RRD_AFM_H
#ifndef RRD_AFM_H
#define RRD_AFM_H
+#include <stdlib.h>
+
+#ifdef HAVE_MBSTOWCS
+#define afm_char wchar_t
+#else
+#define afm_char unsigned char
+#endif
/*
If the font specified by the name parameter in the routes below
is not found
/*
If the font specified by the name parameter in the routes below
is not found
@@
-21,8
+28,10
@@
/* measure width of a text string */
/* fontname can be full name or postscript name */
/* measure width of a text string */
/* fontname can be full name or postscript name */
-double afm_get_text_width
( double start, const char* font, double size,
+double afm_get_text_width( double start, const char* font, double size,
double tabwidth, const char* text);
double tabwidth, const char* text);
+double afm_get_text_width_wide( double start, const char* font, double size,
+ double tabwidth, const afm_char* text);
double afm_get_ascender(const char* font, double size);
double afm_get_descender(const char* font, double size);
double afm_get_ascender(const char* font, double size);
double afm_get_descender(const char* font, double size);
@@
-35,11
+44,11
@@
const char *afm_get_font_name(const char* font);
#ifdef __APPLE__
/* need charset conversion from macintosh to unicode. */
extern const unsigned char afm_mac2iso[128];
#ifdef __APPLE__
/* need charset conversion from macintosh to unicode. */
extern const unsigned char afm_mac2iso[128];
-#define afm_
host2unicode
(c) \
- ( (c) >= 128 ? afm_mac2iso[(c) - 128] : (c))
+#define afm_
fix_osx_charset
(c) \
+ ( (c) >= 128
&& (c) <= 255
? afm_mac2iso[(c) - 128] : (c))
#else
/* UNSAFE macro */
#else
/* UNSAFE macro */
-#define afm_
host2unicode(a_unsigned_char) ((unsigned int)(a_unsigned_char)
)
+#define afm_
fix_osx_charset(x) (x
)
#endif
#endif
#endif
#endif