diff options
-rw-r--r-- | do_tests.c | 18 | ||||
-rw-r--r-- | do_text.c | 13 |
2 files changed, 21 insertions, 10 deletions
@@ -1047,39 +1047,39 @@ Test test[] = { {"-caa10text", "Char in 80-char aa core line (DejaVu Sans 10)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 10, "DejaVu Sans:antialias=true:render=false:rgba=0:pixelsize=10", NULL}}, + {80, 10, "DejaVu Sans:antialias=true:rgba=0:pixelsize=10", "render=false"}}, {"-caa24text", "Char in 30-char aa core line (DejaVu Sans 24)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {30, 24, "DejaVu Sans:antialias=true:render=false:rgba=0:pixelsize=24", NULL}}, + {30, 24, "DejaVu Sans:antialias=true:rgba=0:pixelsize=24", "render=false"}}, {"-caaftext", "Char in 80-char aa core line (Courier 12)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 12, "Courier:antialias=true:render=false:rgba=0:pixelsize=12", NULL}}, + {80, 12, "Courier:antialias=true:rgba=0:pixelsize=12", "render=false"}}, {"-ca10text", "Char in 80-char a core line (DejaVu Sans 10)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 10, "DejaVu Sans:antialias=false:render=false:rgba=0:pixelsize=10", NULL}}, + {80, 10, "DejaVu Sans:antialias=false:rgba=0:pixelsize=10", "render=false"}}, {"-ca24text", "Char in 30-char a core line (DejaVu Sans 24)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {30, 24, "DejaVu Sans:antialias=false:render=false:rgba=0:pixelsize=24", NULL}}, + {30, 24, "DejaVu Sans:antialias=false:rgba=0:pixelsize=24", "render=false"}}, {"-caftext", "Char in 80-char a core line (Courier 12)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 12, "Courier:antialias=false:render=false:rgba=0:pixelsize=12", NULL}}, + {80, 12, "Courier:antialias=false:rgba=0:pixelsize=12", "render=false"}}, {"-crgb10text", "Char in 80-char rgb core line (DejaVu Sans 10)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 10, "DejaVu Sans:antialias=true:render=false:rgba=rgb:pixelsize=10", NULL}}, + {80, 10, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=10", "render=false"}}, {"-crgb24text", "Char in 30-char rgb core line (DejaVu Sans 24)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {30, 24, "DejaVu Sans:antialias=true:render=false:rgba=rgb:pixelsize=24", NULL}}, + {30, 24, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=24", "render=false"}}, {"-crgbftext", "Char in 80-char rgb core line (Courier 12)", NULL, InitAAText, DoAAText, ClearTextWin, EndAAText, V1_5FEATURE, NONROP, 0, - {80, 12, "Courier:antialias=true:render=false:rgba=rgb:pixelsize=12", NULL}}, + {80, 12, "Courier:antialias=true:rgba=rgb:pixelsize=12", "render=false"}}, #endif {"-scroll10", "Scroll 10x10 pixels", NULL, InitScroll, DoScroll, MidScroll, EndScroll, @@ -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) { |