FLTK logo

Re: [fltk/fltk] fl_font(...) performance issue (#147)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] fl_font(...) performance issue (#147) David Freese Oct 22, 2020  
 

Font discovery is very fast. That is what takes place on Run 0 and 1. It is the execution of fl_font(nbr, size) that eats up the CPU. You can see the same thing occur if you create a browser with each line either:

(1) snprintf(tempstr, sizeof(tempstr), "@f%d@S14%s", font_nbr, Fl::get_font_name(font_nbr));

or

(2) snprintf(tempstr, sizeof(tempstr), "@s14%s", Fl::get_font_name(font_nbr));

Fl_Browser lst_Font(....);

lst_Font.add(tempstr);

Case (1) takes about 23 seconds to populate all 2560 fonts.

Case (2) takes less than a second to populate all 2560 fonts.

David


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.