Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 528254 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +56 lines)
Line  Link Here
0
-- a/configure.ac
0
++ b/configure.ac
Lines 33-38 Link Here
33
AC_PROG_MKDIR_P
33
AC_PROG_MKDIR_P
34
AC_ARG_VAR([LD], [Linker loader command])
34
AC_ARG_VAR([LD], [Linker loader command])
35
35
36
PKG_PROG_PKG_CONFIG
37
36
AC_ARG_VAR([MKFONTDIR],[mkfontdir command. @<:@default=mkfontdir@:>@])
38
AC_ARG_VAR([MKFONTDIR],[mkfontdir command. @<:@default=mkfontdir@:>@])
37
AC_PATH_PROG([MKFONTDIR],[mkfontdir],[],[$PATH$PATH_SEPARATOR/usr/X11R6/bin])
39
AC_PATH_PROG([MKFONTDIR],[mkfontdir],[],[$PATH$PATH_SEPARATOR/usr/X11R6/bin])
38
40
Lines 59-66 Link Here
59
	UCS-4BE)]),
61
	UCS-4BE)]),
60
    [AC_DEFINE_UNQUOTED([CONFIG_UNICODE_SET],"$with_unicode_set",[Preferred unicode set.])])
62
    [AC_DEFINE_UNQUOTED([CONFIG_UNICODE_SET],"$with_unicode_set",[Preferred unicode set.])])
61
63
62
PKG_PROG_PKG_CONFIG
63
64
# Checks for libraries.
64
# Checks for libraries.
65
65
66
# Checks for header files.
66
# Checks for header files.
Lines 108-113 Link Here
108
AC_FUNC_SELECT_ARGTYPES
108
AC_FUNC_SELECT_ARGTYPES
109
109
110
PKG_CHECK_MODULES([CORE],[fontconfig xext x11])
110
PKG_CHECK_MODULES([CORE],[fontconfig xext x11])
111
112
AC_ARG_ENABLE([fribidi],
113
    AC_HELP_STRING([--disable-fribidi],[Disable right to left support]))
114
if test "$enable_fribidi" != "no" && test "$enable_i18n" != "no"; then
115
    PKG_CHECK_MODULES(FRIBIDI, fribidi)
116
117
    AC_DEFINE(CONFIG_FRIBIDI,1, [Define to enable fribidi support])
118
119
    CORE_CFLAGS="${CORE_CFLAGS} ${FRIBIDI_CFLAGS}"
120
    CORE_LIBS="${CORE_LIBS} ${FRIBIDI_LIBS}"
121
fi
122
111
AC_SUBST([CORE_CFLAGS])
123
AC_SUBST([CORE_CFLAGS])
112
AC_SUBST([CORE_LIBS])
124
AC_SUBST([CORE_LIBS])
113
125
114
-- a/src/yfontxft.cc
126
++ b/src/yfontxft.cc
Lines 6-11 Link Here
6
#include "ypaint.h"
6
#include "ypaint.h"
7
#include "yxapp.h"
7
#include "yxapp.h"
8
#include "intl.h"
8
#include "intl.h"
9
#include <stdio.h>
10
11
#ifdef CONFIG_FRIBIDI
12
    #include <fribidi/fribidi.h>
13
#endif
9
14
10
/******************************************************************************/
15
/******************************************************************************/
11
16
Lines 69-78 Link Here
69
                           char_t * str, size_t len)
74
                           char_t * str, size_t len)
70
    {
75
    {
71
        XftColor *c = *g.color();
76
        XftColor *c = *g.color();
77
78
#ifdef CONFIG_FRIBIDI
79
80
#define STATIS_STRING_SIZE	256
81
82
		// Based around upstream (1.3.2) patch with some optimization
83
		//   on my end. (reduce unnecessary memory allocation)
84
		// - Gilboa
85
86
		char_t static_str[STATIS_STRING_SIZE];
87
		char_t *vis_str = static_str;
88
89
		if (len >= STATIS_STRING_SIZE)
90
		{
91
			vis_str = new char_t[len+1];
92
			if (!vis_str)
93
				return;
94
		}
95
96
		FriBidiCharType pbase_dir = FRIBIDI_TYPE_N;
97
		fribidi_log2vis(str, len, &pbase_dir, //input
98
						vis_str, // output
99
						NULL, NULL, NULL // "statistics" that we don't need
100
						);
101
		str = vis_str;
102
#endif
103
72
        XftDrawString(g.handleXft(), c, font,
104
        XftDrawString(g.handleXft(), c, font,
73
                      x - g.xorigin(),
105
                      x - g.xorigin(),
74
                      y - g.yorigin(),
106
                      y - g.yorigin(),
75
                      str, len);
107
                      str, len);
108
109
#ifdef CONFIG_FRIBIDI
110
111
		if (vis_str != static_str)
112
			delete[] str;
113
114
#endif
115
76
    }
116
    }
77
117
78
    static void textExtents(XftFont * font, char_t * str, size_t len,
118
    static void textExtents(XftFont * font, char_t * str, size_t len,

Return to bug 528254