FLTK logo

Re: [fltk.general] seg fault with fl_draw fltk1.4.4

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

Re: seg fault with fl_draw fltk1.4.4 "'Albrecht Schlosser' via fltk.general" Oct 26, 2025  
 
On 10/26/25 16:43 'Klaus Rudolph' wrote:

Albrecht-S schrieb am Sonntag, 26. Oktober 2025 um 16:18:06 UTC+1:
Hi Klaus,

this group is moderated, at least for first-time posters. Please wait some time for your post to appear. Thanks.
A moderator may enable you to post w/o moderation at some time...


Sorry, I will wait next time!

No problem. You are now enabled to post anyway. ;-)

>>  fl_font(FL_COURIER, 20);

Yep, my prog works now! Perfect!

Great, thanks for the feedback.

Maybe it should be mentioned in the docs that some font has to be set before.

Good point. Someone (maybe not me) should do this...

Interestingly with 1.3.3 it has worked without setting the font.

This *may* be an unintended side effect *or* it may be a platform specific side effect. For instance, it's possible that the X11 platform code sets a default font (e.g. in 1.3.x) and that your code used Wayland - where no default font is set - in 1.4. Note that Wayland is the new default, if present.

Anyway, it's not guaranteed, and you should always set a font at least once at the beginning of any draw() method to ensure that this font is used and not an arbitrary font that has been set previously. Imagine that this can be random: it would be the last font that's been used in the widget drawn last before the widget in question.

--
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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/ad560234-2485-4da8-978b-d76130a633dc%40aljus.de.
[ Direct Link to Message ]
 
     
[ Previous Message ] [ New Message | Reply ] [ Next Message ]
 
 

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