text editor

Haris Bogdanovic fbogdanovic at xnet.hr
Fri Mar 7 05:12:56 PST 2008


Hi.

I'm trying to write a text editor in wxRuby and I've come to a problem:

I want to implements dragging of the selected text to another place and need 
to map mouse coordinates from a mouse event to text coordinates. The problem 
is that true type fonts have different width for each letter. How do I 
calculate mouse horizontal position from certain text that is selected ? 
Where do I get the width of letters of certaing true type font ?

Thanks. 








More information about the wx-users mailing list