aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-04-10 16:20:51 +0200
committerMihai Moldovan <ionic@ionic.de>2017-04-10 16:20:51 +0200
commitcc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa (patch)
treee22b443672f84f9305e682f2c6c0d0e896b967a6 /nx-X11/programs/Xserver/mi
parent9e2588e56f5b712c4501a19c1f723257c05aa6af (diff)
parentc4c5485474a03bcfd2632d12c2e6e88ba20be471 (diff)
downloadnx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.tar.gz
nx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.tar.bz2
nx-libs-cc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa.zip
Merge branch 'sunweaver-pr/switch-to-libXfont2-API' into 3.6.x
Attributes GH PR #362: https://github.com/ArcticaProject/nx-libs/pull/362
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)
{