🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
font in X11
hi
i want draw text with .ttf font in X11,
"/var/lib/defoma/fontconfig.d"
i must using Xft.h ?
Any idea?
The package freetype2-devel should do it if you're on a RPM distribution, the header, well, #include <ft2build.h> does it for me.
this program that uses #include<ft2build.h>
compile with
gcc exp.c -o exp -L /usr/X11R6/lib -lX11 ?
compile with
gcc exp.c -o exp -L /usr/X11R6/lib -lX11 ?
Quote: Original post by z_k
this program that uses #include<ft2build.h>
compile with
gcc exp.c -o exp -L /usr/X11R6/lib -lX11 ?
gcc exp.c -o exp -L /usr/X11R6/lib -lX11 `freetype-config --cflags --libs`
This is the usual way to work with most free/open source software.
Also, you should include:
#include <ft2build.h>#include FT_FREETYPE_H
As explained here.
FWIW, Xft(3) says:
Quote:
Xft(3) Xft(3)
NAME
Xft - X FreeType interface library
DESCRIPTION
Xft is a simple library designed to interface the FreeType rasterizer
with the X Rendering Extension. This manual page barely scratches the
surface of this library.
I suspect, therefore, that you'll need to use Xft if you want things like antialiased font rendering. I could be wrong though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement