I was able to get a list of font names and the index of the list
e.g. I found something like
Nr: 43 Attrib: name BPdots Nr: 44 Attrib: Bold name BPdots bold Nr: 45 Attrib: name BPdots Light Nr: 46 Attrib: name BPdotsDiamond Nr: 47 Attrib: Bold name BPdotsDiamond bold Nr: 48 Attrib: name BPdotsDiamond Light Nr: 49 Attrib: name BPdotsMinus Nr: 50 Attrib: Bold name BPdotsMinus bold Nr: 51 Attrib: name BPdotsPlus Nr: 52 Attrib: Bold name BPdotsPlus bold Nr: 53 Attrib: name BPdotsSquares Nr: 54 Attrib: Bold name BPdotsSquares bold Nr: 55 Attrib: name BPdotsSquares Light Nr: 56 Attrib: name BPdotsVertical Nr: 57 Attrib: Bold name BPdotsVertical bold
which means, font with name "BPdots bold" has index 44.
If I do:
fl_font(44, 40);
fl_draw( "Hallo world", 10,20);
it works as expected, I got the selected font in size 40. Perfect!
My question is:
If I have the name like "BPdots bold", how can I set my font? OK, I can run through the list and get the index. But I expect there is some function, which already do this for me.
Both this did not select the font I want to see. ( or maybe did nothing )
Any hints how I can achieve this? Is there some more documentation? BTW: I use # 1 in Fl::set_font( 1, "BPdots" ); But can I have some "free" number? Maybe totally on the wrong path?
Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.