aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/mi')
-rw-r--r--nx-X11/programs/Xserver/mi/Imakefile3
-rw-r--r--nx-X11/programs/Xserver/mi/miglblt.c12
2 files changed, 14 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/mi/Imakefile b/nx-X11/programs/Xserver/mi/Imakefile
index def061051..de7015c73 100644
--- a/nx-X11/programs/Xserver/mi/Imakefile
+++ b/nx-X11/programs/Xserver/mi/Imakefile
@@ -179,6 +179,9 @@ NormalLibraryTarget(cbrt,cbrt.o)
SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES))
SpecialCObjectRule(miscrinit,$(ICONFIGFILES),$(EXT_DEFINES))
+SpecialCObjectRule(miglblt,$(ICONFIGFILES),$(FONT_DEFINES))
+SpecialCObjectRule(mipolytext,$(ICONFIGFILES),$(FONT_DEFINES))
+
#ifdef ItsyCompilerBug
SpecialCObjectRule(mipolycon,$(_NOOP_),-O0)
#endif
diff --git a/nx-X11/programs/Xserver/mi/miglblt.c b/nx-X11/programs/Xserver/mi/miglblt.c
index e317541a4..60c28fad4 100644
--- a/nx-X11/programs/Xserver/mi/miglblt.c
+++ b/nx-X11/programs/Xserver/mi/miglblt.c
@@ -55,6 +55,11 @@ SOFTWARE.
#include <nx-X11/Xproto.h>
#include "misc.h"
#include <X11/fonts/fontstruct.h>
+#ifdef HAS_XFONT2
+# include <X11/fonts/libxfont2.h>
+#else
+# include <X11/fonts/fontutil.h>
+#endif /* HAS_XFONT2 */
#include "dixfontstr.h"
#include "gcstruct.h"
#include "windowstr.h"
@@ -203,13 +208,18 @@ miImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
CharInfoPtr *ppci; /* array of character info */
void *pglyphBase; /* start of array of glyphs */
{
- ExtentInfoRec info; /* used by QueryGlyphExtents() */
+ ExtentInfoRec info; /* used by xfont2_query_glyph_extents (libXfont2)
+ resp. QueryGlyphExtents() (libXfont1) */
XID gcvals[3];
int oldAlu, oldFS;
unsigned long oldFG;
xRectangle backrect;
+#ifdef HAS_XFONT2
+ xfont2_query_glyph_extents(pGC->font, ppci, (unsigned long) nglyph, &info);
+#else
QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info);
+#endif /* HAS_XFONT2 */
if (info.overallWidth >= 0)
{