Message-ID: <3C20B37A.3060706 at inria.fr> Date: Wed, 19 Dec 2001 10:34:18 -0500 From: Maxence Guesdon MIME-Version: 1.0 To: lablgtk at kaba.or.jp Subject: Fixed font problems in text widgets Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, When i set a fixed font for a text widget, the letters are in this fixed font, but the cursor doesn't follow : it is like the cursor believes the font is still the old one (not fixed, in this case). Practically, when i type the 'i' letter various times, the cursor remains a few characters behind or ahead [:-(] Here is an example : ------ fichier text.ml (* ocamlc -I +lablgtk lablgtk.cma text.ml *) (* lablgtk version 1.2.2 *) open GMain class text () = let wt = GEdit.text ~editable:true ~word_wrap:true ~line_wrap:true () in object val wt = wt method wt = wt method coerce = wt#coerce end let test () = let _ = Main.init () in let tfont = Gdk.Font.load "*-courier-medium-r-*-14-*" in let w = GWindow.window () in let text = new text () in let style = text#wt#misc#style#copy in text#wt#misc#set_style style; style#set_font tfont; w#add text#coerce; w#show (); Main.main () let _ = test () Thanks for any help -- Maxence Guesdon