> I have a question of how to set my custom font, for example, I have a font > named MY_FONT, then how can I use this font type to display the text in > Browser widget? > > I see it has a fl_font API, but the first parameter is a int type, so I > don't know how to set my font for Browser widget. > > Can anyone give me a sample code? Thanks.
You are just trying to load a font "by name" from the OS and then use it in your own code? Then the easiest thing is probably to use Fl::set_font(...) to load the new face into a fltk font indea then use that index. Example, suppose you decide to replace the FL_SYMBOL font with your own font face, you could do... Fl::set_font(FL_SYMBOL, " MY_FONT"); and then later assign that font to the text you are drawing inside a draw() method with... fl_font(FL_SYMBOL, size); or assign that font to a widget with... my_widget->lablefont(FL_SYMBOL); etc... SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

