Owen Taylor wrote:
hi ,On Fri, 2005-07-22 at 12:12 +0530, Girish wrote:hi , Aim: presently i am working on pango . we have our own tool kit which provides various widget set like gtk . Now i wanted to add pango facility to our tool kit . Problem: i have already implemented the code to support pango for rendering and cursor movement in entry widget . but with respect to numeric values ,punctuations ,commas , apostrophes , etc pango layout changes its "layout rectangle's " size automatically and it will not return correct byte index with in the utf8 encoded string when func "pango_layout_move_cursor_visually()" called ( it will return some junk value). for other alphabets pango works perfectly.This stuff works fine in GtkEntry. You'll have to be much more specific about what you are doing and what isn't working. Thanks, Owen Thanks for your replay. :-) After tracing i found that there is a problem with font family. explanation: i am using the function pango_xft_render_layout (draw,font_color,layout, x * PANGO_SCALE, y * PANGO_SCALE); to render UTF8 encoded string .With out setting any font family , default family is "serif" . So in this case text related to indian languages like Hindhi, kannada , telugu, Bengali ..etc are not properly visible inspite of installing all the freetype fonts related to the languages . this is scrren shot before setting font family so i set the font family like (segment of code ): -------------------------------------------------------------------------------------------------------------------------------------------------------------- printf(" family name ....%s \n", pango_font_description_get_family(desc)); // prints "sarif " pango_font_description_set_family(desc,"Pothana2000,Gargi_1.7,Sampige"); // here Pothana2000 for telugu language , Sampige for kannada ,Gargi_1.7 for HIndhi . pango_layout_set_font_description(layout,desc); -------------------------------------------------------------------------------------------------------------------------------------------------------------- After Setting font family: Problem : please observe the 3 rd line in both above and below diagrams. Its working fine with letters , but when i enter numbers , punctuations.. it will display like .... ( it will change pango layout's dimentions with respect to ' y ' co-ordinate). please provide a solution . Thanks in advance regards Girish -- ---------------------------------------------------------------------- " Faith begins when ability fails..." Girish A J Associate - Software, Ph: (80) 2361 8184-86 Ext 135 PicoPeta Simputers Pvt Ltd. Fax: (80) 2361 7568 146 5th Cross, RMV Extension, email: girish picopeta com Bangalore - 560 080. Mobile:9845332138 URL http://www.picopeta.com -------------------------------------------------------------------------- |