Jump to content
  • Advertisement
Sign in to follow this  
z_k

font in X11

This topic is 3999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i want draw text with .ttf font in X11, "/var/lib/defoma/fontconfig.d" i must using Xft.h ? Any idea?

Share this post


Link to post
Share on other sites
Advertisement
for this i must install freetype-2.3.5 ?
which headerfile must included ?

Share this post


Link to post
Share on other sites
The package freetype2-devel should do it if you're on a RPM distribution, the header, well, #include <ft2build.h> does it for me.

Share this post


Link to post
Share on other sites
this program that uses #include<ft2build.h>
compile with
gcc exp.c -o exp -L /usr/X11R6/lib -lX11 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
setting font for drawing text in X11 doing with XsetFont() & XLoadQueryfont().....
this function use special font that exists in /usr/etc/X11/font/X11R7/100bpi/ (for exp)
max font size in this file is 24 ,i want draw text with big font size (exp. 70)
i must use Xft ?

Share this post


Link to post
Share on other sites
for using XftFontOpenName (xdisplay, screen, "sans-11")
which header file must include ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!