ANNOUNCEMENT: Git branch `master` is now FLTK 1.5 development

63 views
Skip to first unread message

Albrecht Schlosser

unread,
Mar 8, 2025, 8:11:33 PM3/8/25
to fltkg...@googlegroups.com
Hi, FLTK developers and users,

our Git `master` branch is now the FLTK 1.5.0 development with some important changes.

The major changes in `master` are:

- FLTK 1.5.0 and higher requires at least a C++11 capable compiler in C++11 mode or higher (may be raised later)
- building FLTK 1.5 (from `master`) with CMake automatically requests C++11 mode (or higher)
- you may need to update your own application build process to use C++11 or higher as well
- autotools build support (configure + bundled Makefiles) have been removed from FLTK 1.5 (in `master`)
- hence CMake is required to build FLTK 1.5.0 or higher.

But don't worry, FLTK 1.5 will stay backwards (API) compatible with 1.4.x.

FLTK 1.4 (latest release 1.4.2) has been switched to maintenance mode in a new branch `branch-1.4`. If you like to follow 1.4 development on Git, then please checkout `branch-1.4` and use `git pull` to follow this branch. Before you can do this you may need to set the `upstream` branch in git (if git issues an error message "There is no tracking information for the current branch ...". Then use, for instance

$ git fetch
$ git checkout branch-1.4
$ git branch --set-upstream-to=origin/branch-1.4 branch-1.4


Replace origin with the name of your `remote` repository name if it is not 'origin', e.g. 'upstream'. (Hint: git remote -v).

Albrecht

pvr...@btinternet.com

unread,
Jun 18, 2025, 10:26:24 AM6/18/25
to fltkg...@googlegroups.com
I finally got round to updating my copies of FLTK. (It was 1.4.2 on Debian, and 1.4.0 on Windows).

The default Windows font for FL_HELVETICA has changed to "Microsoft Sans Serif" (and I don't like it). However I had a problem as I was overriding the default font for FL_COURIER and the font name was not maintained correctly. The following code should show the problem, but I can't solve all the dependencies to get it to link under MSVC, and I've run out of time.

#include <FL/Fl.H>
#include <cstdio>

int main(int argc, char** argv)
{
      Fl::set_font(FL_COURIER, "Courier New");
      const char* name = Fl::get_font_name(FL_COURIER, nullptr);
      printf("Read font = %s\n", name);

}

The call to Fl::get_font_name() returned "ourier New" in my app (many seconds apart).

It works OK on Debian with gcc toolset.

BTW, I didn't see a branch for the current 1.4 head after pulling the latest using MSVC. 

Regards 
Phil Rose.

From: 'Albrecht Schlosser' via fltk.general <fltkg...@googlegroups.com>
Sent: Sunday, March 9, 2025 1:11 AM
To: fltkg...@googlegroups.com <fltkg...@googlegroups.com>
Subject: [fltk.general] ANNOUNCEMENT: Git branch `master` is now FLTK 1.5 development
 
--
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 visit https://groups.google.com/d/msgid/fltkgeneral/b7a9f27b-1e15-4f36-8e7d-8a9a549abc2f%40aljus.de.

Ian MacArthur

unread,
Jun 18, 2025, 12:25:19 PM6/18/25
to fltk.general
On Wednesday, 18 June 2025 at 15:26:24 UTC+1 Phil wrote:
I finally got round to updating my copies of FLTK. (It was 1.4.2 on Debian, and 1.4.0 on Windows).

The default Windows font for FL_HELVETICA has changed to "Microsoft Sans Serif" (and I don't like it). However I had a problem as I was overriding the default font for FL_COURIER and the font name was not maintained correctly. The following code should show the problem, but I can't solve all the dependencies to get it to link under MSVC, and I've run out of time.

#include <FL/Fl.H>
#include <cstdio>

int main(int argc, char** argv)
{
      Fl::set_font(FL_COURIER, "Courier New");
      const char* name = Fl::get_font_name(FL_COURIER, nullptr);
      printf("Read font = %s\n", name);

}

The call to Fl::get_font_name() returned "ourier New" in my app (many seconds apart).


There's Weird Stuff(TM) done with font names under Win32, so it *might* be worth making the code say something like...

     Fl::set_font(FL_COURIER, " courier new");

The key being a leading space, and all lower case. See if that helps. I *think* it does (I'm pretty sure I was forcing Courier New just recently but can't actually find the code now...)


 

It works OK on Debian with gcc toolset.

BTW, I didn't see a branch for the current 1.4 head after pulling the latest using MSVC. 

Hmm, I see it in :

$ git branch
* branch-1.4
  master

Maybe need to force a fetch or something, to see the added branches?  ("git fetch --prune origin" being my favourite for this sort of thing...)

 

Albrecht Schlosser

unread,
Jun 18, 2025, 1:13:51 PM6/18/25
to fltkg...@googlegroups.com
On 6/18/25 18:25 Ian MacArthur wrote:
On Wednesday, 18 June 2025 at 15:26:24 UTC+1 Phil wrote:
I finally got round to updating my copies of FLTK. (It was 1.4.2 on Debian, and 1.4.0 on Windows).

The default Windows font for FL_HELVETICA has changed to "Microsoft Sans Serif" (and I don't like it).

Did you like the old font "Arial" more? IIRC "Microsoft Sans Serif" is an almost identical replacement of "Arial" (with way more glyphs), hence the new font should be "the same" for most applications.

However I had a problem as I was overriding the default font for FL_COURIER and the font name was not maintained correctly. [...]


There's Weird Stuff(TM) done with font names under Win32, so it *might* be worth making the code say something like...

     Fl::set_font(FL_COURIER, " courier new");

The key being a leading space, and all lower case. See if that helps.

I agree with the first part, but I don't think it's "all lower case", although this *may* work ("Weird Stuff", as Ian wrote). I suggest to use the original font name spelling with the leading space, i.e. " Courier New". I can't test this right now though...

There's documentation on how to set the previous "Arial" font as FL_HELVETICA:
```
#ifdef _WIN32
  // reset Windows fonts to pre-1.4.2 state
  Fl::set_font(FL_HELVETICA,     " Arial");
  Fl::set_font(FL_HELVETICA + 1, "BArial");
  Fl::set_font(FL_HELVETICA + 2, "IArial");
  Fl::set_font(FL_HELVETICA + 3, "PArial");
#endif
```
https://www.fltk.org/doc-1.4/migration_1_4.html#migration_1_4_windows_font

Note the leading character per font name and the upper-case 'A'.

See also https://www.fltk.org/doc-1.4/group__fl__attributes.html#ga15dee80a622a9ab2798acfdc0aabcd95

pvr...@btinternet.com

unread,
Jun 18, 2025, 5:19:18 PM6/18/25
to fltkg...@googlegroups.com
Thanks Albrecht,


From: 'Albrecht Schlosser' via fltk.general <fltkg...@googlegroups.com>
Sent: Wednesday, June 18, 2025 6:13 PM
Subject: Re: [fltk.general] ANNOUNCEMENT: Git branch `master` is now FLTK 1.5 development
 
On 6/18/25 18:25 Ian MacArthur wrote:
On Wednesday, 18 June 2025 at 15:26:24 UTC+1 Phil wrote:
I finally got round to updating my copies of FLTK. (It was 1.4.2 on Debian, and 1.4.0 on Windows).

The default Windows font for FL_HELVETICA has changed to "Microsoft Sans Serif" (and I don't like it).

Did you like the old font "Arial" more? IIRC "Microsoft Sans Serif" is an almost identical replacement of "Arial" (with way more glyphs), hence the new font should be "the same" for most applications.

There were enough differences to make it noticeably different. The body of the lower-case letters was only half the height of the upper-case ones. The letters are more closely spaced horizontally: this made the first point stand-out more and make words wholly in upper case and numbers less readable. But in the latter case if it becomes an issue, I'll change that display to a monospaced font such as Courier New.

However I had a problem as I was overriding the default font for FL_COURIER and the font name was not maintained correctly. [...]


There's Weird Stuff(TM) done with font names under Win32, so it *might* be worth making the code say something like...

     Fl::set_font(FL_COURIER, " courier new");

The key being a leading space, and all lower case. See if that helps.

I agree with the first part, but I don't think it's "all lower case", although this *may* work ("Weird Stuff", as Ian wrote). I suggest to use the original font name spelling with the leading space, i.e. " Courier New". I can't test this right now though...

There's documentation on how to set the previous "Arial" font as FL_HELVETICA:
```
#ifdef _WIN32  // reset Windows fonts to pre-1.4.2 state  Fl::set_font(FL_HELVETICA,     " Arial");  Fl::set_font(FL_HELVETICA + 1, "BArial");  Fl::set_font(FL_HELVETICA + 2, "IArial");  Fl::set_font(FL_HELVETICA + 3, "PArial"); #endif
```

I didn't read that because I was migrating from 1.4.0. 

Note the leading character per font name and the upper-case 'A'.


Putting that space (or B, I or P) in front of the font family name worked. Thanks again,

Phil Rose.


Reply all
Reply to author
Forward
0 new messages