summaryrefslogtreecommitdiffstats
path: root/x11-fonts/libXft/files
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-03-19 09:16:28 +0000
committermarcus <marcus@FreeBSD.org>2004-03-19 09:16:28 +0000
commit94181782ecd900a5b4d80c15fbc2e44522c27d32 (patch)
tree23ca25e9e56f3281dd4b71b93828615761201a53 /x11-fonts/libXft/files
parent47573f0ad7a62f7b155a89fecaf806860dfc475b (diff)
downloadFreeBSD-ports-94181782ecd900a5b4d80c15fbc2e44522c27d32.zip
FreeBSD-ports-94181782ecd900a5b4d80c15fbc2e44522c27d32.tar.gz
Revert a portion of the font rendering code that enforces strict bitmap font
sizes. This was causing a problem loading certain fonts. This code is now equivalent to Xft-2.1.2.
Diffstat (limited to 'x11-fonts/libXft/files')
-rw-r--r--x11-fonts/libXft/files/patch-xftfreetype.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/x11-fonts/libXft/files/patch-xftfreetype.c b/x11-fonts/libXft/files/patch-xftfreetype.c
new file mode 100644
index 0000000..a3e878f
--- /dev/null
+++ b/x11-fonts/libXft/files/patch-xftfreetype.c
@@ -0,0 +1,57 @@
+--- xftfreetype.c.orig Fri Mar 19 04:11:09 2004
++++ xftfreetype.c Fri Mar 19 04:11:30 2004
+@@ -192,53 +192,9 @@
+ if (XftDebug() & XFT_DBG_GLYPH)
+ printf ("Set face size to %dx%d (%dx%d)\n",
+ (int) (xsize >> 6), (int) (ysize >> 6), (int) xsize, (int) ysize);
+- /*
+- * Bitmap only faces must match exactly, so find the closest
+- * one (height dominant search)
+- */
+- if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
+- {
+- FT_Short width = xsize >> 6;
+- FT_Short height = ysize >> 6;
+- int i, best = -1;
+-
+-#define xft_abs(a) ((a) < 0 ? -(a) : (a))
+-#define dist(a,b) (xft_abs((a)-(b)))
+-
+-#if !HAVE_FT_BITMAP_SIZE_Y_PPEM
+-#define y_ppem height
+-#define x_ppem width
+-#endif
+- for (i = 0; i < face->num_fixed_sizes; i++)
+- {
+- if (best == -1 ||
+- dist (height, face->available_sizes[i].y_ppem >> 6) <
+- dist (height, face->available_sizes[best].y_ppem >> 6) ||
+- (dist (height, face->available_sizes[i].y_ppem >> 6) ==
+- dist (height, face->available_sizes[best].y_ppem >> 6) &&
+- dist (width, face->available_sizes[i].x_ppem >> 6) <
+- dist (width, face->available_sizes[best].x_ppem >> 6)))
+- {
+- best = i;
+- }
+- }
+- if (FT_Set_Char_Size (face, face->available_sizes[best].x_ppem,
+- face->available_sizes[best].y_ppem, 0, 0) != 0)
+- {
+- return False;
+- }
+-#if !HAVE_FT_BITMAP_SIZE_Y_PPEM
+-#undef y_ppem
+-#undef x_ppem
+-#endif
+- }
+- else
+- {
+ if (FT_Set_Char_Size (face, xsize, ysize, 0, 0))
+- {
+ return False;
+- }
+- }
++
+ f->xsize = xsize;
+ f->ysize = ysize;
+ }
OpenPOWER on IntegriCloud