Help me, I want to draw true type fonts in a window

Matthieu Herrb matthieu.herrb at laas.fr
Tue Jun 24 12:56:47 PDT 2008


Lucas wrote:
> Glynn Clements wrote:
>> Lucas wrote:
>>
>>   
>>> I´m learning how to program with xft.h lib . I have a problem with my 
>>> first code. I need to draw a true type string in a window. Can somebody 
>>> help me to fix it?
>>> The code is in this link:
>>>
>>> www.inf.ufpr.br/lnf07/ttwrite1.c
>>>     
>> I suggest waiting until the window has at least been mapped before
>> trying to draw anything in it.
>>
>> Beyond that, what are you intending to do once you have figured out
>> how to use Xft in conjunction with raw Xlib calls? Most toolkits have
>> their own text rendering functionality (which will probably use Xft
>> where appropriate).
>>
>>   
> You suggestion did not work. =[
> 
> I just want to write a true type string in a window, because that, I 
> think is not necessary to use another high-level library or toolkit. But 
> if I can't do this with xft.h, I will try another tool.
> 
> Another suggestion for my code?
> 

You need to handle Expose events in your main loop and draw the text in 
that loop.

Attached is a sample program I did some time ago.


-- 
Matthieu Herrb
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: txft.c
URL: <http://lists.x.org/archives/xorg/attachments/20080624/5914102c/attachment.c>


More information about the xorg mailing list