summaryrefslogtreecommitdiff
path: root/do_text.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2020-04-03 17:57:43 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-04-13 15:28:07 -0700
commit55e9fceffc45bb4cbbeabe8fd45028f50caec906 (patch)
treeb14f06f8a386f16db0a5c18cbeabf92c3052e71f /do_text.c
parent95a84fd5584873885f3123f25b6424008409afc1 (diff)
Fix core AA text tests which now fail due to change in fontconfig
Xft can no longer support 'render' in font names due to a change in fontconfig. Work around this by removing that from the font names and apply it to the pattern manually whenever the 'bfont' name is not NULL. Signed-off-by: Keith Packard <keithp@keithp.com> Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
Diffstat (limited to 'do_text.c')
-rw-r--r--do_text.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/do_text.c b/do_text.c
index 355ba8d..6ac9d02 100644
--- a/do_text.c
+++ b/do_text.c
@@ -411,8 +411,19 @@ InitAAText(XParms xp, Parms p, int64_t reps)
XRenderColor color;
FcValue value;
int v_len;
+ FcPattern *pat;
+ FcPattern *match;
+ FcResult result;
+
+ pat = FcNameParse((FcChar8 *) p->font);
+ match = XftFontMatch(xp->d, DefaultScreen(xp->d), pat, &result);
+ FcPatternDestroy(pat);
+ if (p->bfont) {
+ FcPatternDel(match, XFT_RENDER);
+ FcPatternAddBool(match, XFT_RENDER, False);
+ }
- aafont = XftFontOpenName (xp->d, DefaultScreen (xp->d), p->font);
+ aafont = XftFontOpenPattern (xp->d, match);
if (aafont == NULL)
{