View Single Post
Posts: 355 | Thanked: 598 times | Joined on Sep 2009 @ Nizhny Novgorod, Russia
#139
You can specify transformation matrix when requesting the font from Xft:
Code:
XftMatrix matrix = { 0, -1, 1, 0 };
xftFont = XftFontOpen(dpy, src,
    XFT_FAMILY, XftTypeString, "sans",
    XFT_PIXEL_SIZE, XftTypeInteger, 26,
    XFT_MATRIX, XftTypeMatrix, &matrix,
    NULL
);
And you will get text rotated on 90°
But I'm not sure yet whether it is possible to change the matrix on already created font. May be it is possible with XftPatternAddMatrix (FcPatternAddMatrix), but I havn't tried yet.
 

The Following 2 Users Say Thank You to Mitrandir For This Useful Post: