Bare x11 how to draw truetype or other anti-aliased font?

How to draw text using barebone X11 socket connection?

I connect to the x11 server via a socket and process the protocol manually. I do not use Xlib or XCB, I leave Qt, GTK or even Freetype alone. I have one unsolved problem, I can’t draw fonts other than ancient raster fonts. I would like to do something like FreeSans or other Unicode-enabled fonts with sub-pixel LCD support, but using only the built-in x11 functionality. Probably using some x11 extension. But which one? Which function to use? How to choose a font, locally or on a server? Can X11 render a font for me using the provided style information, including color, background color, font name, size and layout?

+4
source share
1 answer

, X , pixmap "". Core X, ( , , cairo).

: 1) FreeType; 2) CreateGlyphSet Xrender; 3) CompositeGlyphs8/16/32. 12 " Glyph" Xrender . , .

( , ..). , 100% , .

raw socket + xrender javascript- x: https://github.com/sidorares/node-x11

+4

All Articles