I have need for a font browser that can selectively show all, fixed, or proportional fonts. To test for fixed vice proportional I am using the boolean (fl_width('.') == fl_width('W'), which requires that fl_font(font_nbr, font_size) be executed before the fl_width call. My fresh Debian 20.x with LibreOffice and Gimp has >2500 fonts on the system.
This test program demonstrates the problem.:
// ================================
// font test program
// ================================
Build with $ fltk-config --compile find_fonts.cxx
Running find_fonts produces:
$ ./find_fonts
2650 fonts recognized
Start pass 0: 19:11:56
End Pass 0: 19:11:56
Start pass 1: 19:11:56
End Pass 1: 19:11:56
Start pass 2: 19:11:56
End Pass 2: 19:12:19
Simply adding the fl_font(...) adds 23 seconds to the process. This on a high end i5 processor.
Execute as "find_fonts -p" to print the font names and whether fixed or proportional. The program also tags adjacent duplicate fonts. That is probably a font data base issue.
fltk was built with libxft.
Any help would be appreciated.
Thank you. David
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.