|
|
I believe no new API is necessary, as shown by this code snippet :
#include <ApplicationServices/ApplicationServices.h>
CTFontRef ft = CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, 0, NULL);
CFStringRef str = CTFontCopyFullName(ft);
char fname[60];
CFStringGetCString(str, fname, sizeof(fname), kCFStringEncodingUTF8);
Fl_Fontsize size = CTFontGetSize(ft);
// printf("%s [%d]\n", fname, size);
Fl::set_font(FL_FREE_FONT, fname);
// at this point, the system font is obtained by
fl_font(FL_FREE_FONT, size);
This requires macOS 10.5 or above.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/466/1197765090@github.com>
[ Direct Link to Message ] | |
|
| |