Thanx for your help. I installed Kochi Gothic font and used your code but still not got the correct result. The four Chinese glyphs are displayed as empty blocks. What can be the cause?
On Thu, Jul 16, 2009 at 1:44 PM, Greg Ercolano <[email protected]> wrote: > Eric Liao wrote: > > The result of running "od -tx1 < foo.txt": 0000000 e4 b8 ad e6 96 87 e6 > b8 ac e8 a9 a6 > > This worked for me. > > I don't have iLiHei, but Kochi Gothic worked for me. > I guess change it as you need. > > #include <fltk/Font.h> > #include <fltk/Window.h> > #include <fltk/Output.h> > #include <fltk/run.h> > // Chinese font test -- erco 07/15/089 > int main() { > fltk::Font *f = fltk::font("Kochi Gothic", 0); > fltk::Window *win = new fltk::Window(500,300,"Chinese Test"); > win->begin(); > fltk::Output *output = new fltk::Output(140,10,340,200,"Output"); > output->labelsize(22); > output->labelfont(f); > output->textsize(22); > output->textfont(f); > output->value("\xe4\xb8\xad\xe6\x96\x87\xe6\xb8\xac\xe8\xa9\xa6"); > win->end(); > win->resizable(win); > win->show(); > return fltk::run(); > } > _______________________________________________ > fltk-dev mailing list > [email protected] > http://lists.easysw.com/mailman/listinfo/fltk-dev >
_______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
