--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/087ab59c-9dbf-40c8-a675-f2fad4edd47fn%40googlegroups.com.
On 1 March 2024, at 22:14, imm <imaca...@gmail.com> wrote:
>
>
>On Fri, 1 Mar 2024, 21:50 phil wrote:
>
>My system is debian bookworm, and I have started to test some of the user settings in my app.
>
>I have implemented a font selector for choosing which font to use in displaying the data in a spreadsheet like table. I naively coded to use Fl::get_all_fonts() and was able to find a Courier font. However populating the widget with all fonts was taking forever and a day.
>
>I decided to limit the font selector to just the FLTK default font table, and noticed that the entry selected by FL_COURIER is _NOT_ Courier but a different monospaced font. I had built FLTK library using the default settings for CMake, but I am confused by the various different options: Wayland, pango, etc. and that's a rabbit hole I don't want to go down.
>
>I am starting to get used to this different font, but I would like to get Courier back as my default monospaced font, and specified by FL_COURIER if possible, so the W11/MSVC version and my debian version look the same in this respect.
>
>The fltk "built-in" fonts generally pick up the system defaults, the names aren't literal any more, just sort of place keepers that give a clue as to roughly what you'll get...
>
>FWIW if you run the test/utf demo from the shell, and you pick a face you like it'll print the name (as seen by fltk) to the shell.
>
>You can then use that name to set that face as the FL_COURIER face.
>
>fl::set_font (FL_COURIER, " blah");
Thanks Ian,
I'll look into that. Would I have to do that for all four entries (bold, italic combos)?
Phil
>
>Something like that anyway...
>
>--
>Ian
>From my Fairphone FP3
>
>--
>You received this message because you are subscribed to the Google Groups "fltk.general" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/CAGFM6dbdMx0KXW003HCDasGMhtd%3D1qPFwcDTHkkZooLeHo1AwQ%40mail.gmail.com.
On 1 March 2024, at 22:16, w1hkj <w1...@bellsouth.net> wrote:
>My applications fldigi, flrig and a few others all enumerate the entire font list. Yes it can take enough time that you do not want to execute that code in the main thread. Set it up to do this in a separate temporary thread. See attached.
>David
>
Thanks Dave.
I've not noticed any particular lag opening either flrig or fldigi, so I'll have a look at your code. I can't open it on this device, so it's a job for tomorrow.
Phil
>On 3/1/24 15:50, 'pvr...@btinternet.com' via fltk.general wrote:
>
>My system is debian bookworm, and I have started to test some of the user settings in my app.
>
>I have implemented a font selector for choosing which font to use in displaying the data in a spreadsheet like table. I naively coded to use Fl::get_all_fonts() and was able to find a Courier font. However populating the widget with all fonts was taking forever and a day.
>
>I decided to limit the font selector to just the FLTK default font table, and noticed that the entry selected by FL_COURIER is _NOT_ Courier but a different monospaced font. I had built FLTK library using the default settings for CMake, but I am confused by the various different options: Wayland, pango, etc. and that's a rabbit hole I don't want to go down.
>
>I am starting to get used to this different font, but I would like to get Courier back as my default monospaced font, and specified by FL_COURIER if possible, so the W11/MSVC version and my debian version look the same in this respect.
>
>Regards Phil.
>
>--
>You received this message because you are subscribed to the Google Groups "fltk.general" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/087ab59c-9dbf-40c8-a675-f2fad4edd47fn%40googlegroups.com.
>
>--
>You received this message because you are subscribed to the Google Groups "fltk.general" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/dbd4c83d-e0a9-c4b1-0fb3-bdbcd8641ccf%40bellsouth.net.
>fl::set_font (FL_COURIER, " blah");
Would I have to do that for all four entries (bold, italic combos)?
So in a test program to access all those, you'd use:
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Terminal.H>
void MakeBox(int Y, Fl_Font font) {
Fl_Box *box = new Fl_Box(0,Y,400,40,"ABCDEFGHabcdefgh");
box->box(FL_FLAT_BOX);
box->color(FL_WHITE);
box->labelfont(font);
}
int main(int argc, char **argv) {
Fl::set_font(FL_COURIER, "Courier
New");
Fl::set_font(FL_COURIER_BOLD, "Courier
New Bold");
Fl::set_font(FL_COURIER_ITALIC, "Courier
New Italic");
Fl::set_font(FL_COURIER_BOLD_ITALIC,"Courier
New Bold Italic");
Fl_Window win(400,200,"Test");
MakeBox(0, FL_COURIER);
MakeBox(50, FL_COURIER_BOLD);
MakeBox(100, FL_COURIER_ITALIC);
MakeBox(150, FL_COURIER_BOLD_ITALIC);
win.show();
return Fl::run();
}
..on my system the result being:
> The fltk "built-in" fonts generally pick up the system defaults, the names aren't literal any more, just sort of place keepers that give a clue as to roughly what you'll get...
What's up with FL_SCREEN then? What font is it supposed to represent?