> Your code seems basically OK - attached (assuming the attachment > works!) is a screen-shot of your code running on this Mac - you can > check it and see if it has rendered your strings correctly. > It looks OK to me, but then it is not a language I know... > > I think the problem is that you need to explicitly set font that > contains the necessary glyphs to render the characters you need. The > default fonts that fltk picks tend to be more suitable for LGC > languages groups, so I suspect that on your system the fonts don't > provide the required glyphs.
The attachment seems not to have worked, so I have posted the png's here for you to check - they will be there for a few days, then I'll need to take them down: http://9edge.dyndns.org/tests/ One was generated from your code on OSX and pretty much just worked straight away. The other was generated on a box running ubuntu-9.04, and for that I had to add some font-selection code to your example. The code that worked is pasted below (mail-interface permitting!) so that you can see what little I changed to get it working. The actual choice of font may depend on what fonts you actually have installed on your machine. I just picked one that seemed to cover the range of glyphs you were using, but do not know how widely used it is or whether it is really appropriate for your language needs. --------- /* language text testing example - with font setting */ /* fltk-config --compile test.cxx */ #include<FL/Fl.H> #include<FL/Fl_Window.H> #include<Fl/Fl_Button.H> #include<iostream> #include<string.h> using namespace std; class MainWindow : public Fl_Window { private: Fl_Button btnDownload; Fl_Button btnAttendence; Fl_Button btnMeasurement; Fl_Button btnUpload; public: MainWindow(int width, int height, char *L); static void cb_btnDownload (Fl_Widget *w, void *data); static void cb_btnAttendence (Fl_Widget *w, void *data); static void cb_btnMeasurement (Fl_Widget *w, void *data); static void cb_btnUpload (Fl_Widget *w, void *data); }; MainWindow::MainWindow(int width, int height, char *L): Fl_Window(width, height, L), btnDownload(40, 40, 170, 30), btnAttendence(40, 90, 170, 30), btnMeasurement(40, 140, 170, 30), btnUpload(40, 190, 170, 30) { color(FL_BLUE); begin(); btnDownload.label("डाà¤à¤¨à¤²à¥à¤¡"); btnDownload.labelfont(FL_SYMBOL); btnDownload.callback(cb_btnDownload); btnAttendence.label("à¤à¤ªà¤¸à¥à¤¥à¤¿à¤¤à¤¿"); btnAttendence.labelfont(FL_SYMBOL); btnAttendence.callback(cb_btnAttendence); btnMeasurement.label("à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤à¤¤à¤¿"); btnMeasurement.labelfont(FL_SYMBOL); btnMeasurement.callback(cb_btnMeasurement); btnUpload.label("ठपलà¥à¤¡"); btnUpload.labelfont(FL_SYMBOL); btnUpload.callback(cb_btnUpload); end(); } void MainWindow::cb_btnDownload(Fl_Widget *w, void *data) { printf("Downloading\n"); } void MainWindow::cb_btnAttendence(Fl_Widget *w, void *data) { cout<<"Taking attendence.."<<endl; } void MainWindow::cb_btnMeasurement(Fl_Widget *w, void *data) { cout<<"Taking Measurements.."<<endl; } void MainWindow::cb_btnUpload(Fl_Widget *w, void *data) { cout<<"Uploading.."<<endl; } int main(int argc, char **argv) { Fl::visual(FL_DOUBLE|FL_INDEX); MainWindow window(240, 270, "emuster"); window.show(); Fl::set_font(FL_SYMBOL, " Lohit Hindi"); return Fl::run(); } /* end of file */ -- Ian
_______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

