FLTK logo

Re: [fltk.general] Use of FL_FREE_FONT crashes?

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

Re: Use of FL_FREE_FONT crashes? imm Jul 22, 2021  
 
On Thu, 22 Jul 2021, 16:36 lifeattickville wrote:
A quick sanity check before I submit a sample / issue.

Was toying with some code which happened to set the tooltip font to FL_FREE_FONT. When attempting to show the tooltip, I got a crash in Fl_Xlib_Graphics_Driver::get_font_name - as the font name is NULL.

Linux Mint 20.2, FLTK 1.4 built from source a couple of weeks ago.

To be expected?


Hi Kevin,

Yes, as Albrecht says, FL_FREE_FONT gives the index for the first unassigned (thus free) font entry.

So you can assign your own font to that index (or higher.) 

But if you use it before a face is assigned to it, then it will be null...
-- 
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/CAGFM6daMccz949qLS_CmPn3GSGHccjwGCCRB1PzRCSdRDBCXMQ%40mail.gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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