Hi again,

Just as a followup to anyone reading this thread, the problem was that Nim 
loads shared libraries on Linux with dlopen by using only the RTLD_NOW flag.
The solution was to add the global flag when calling dlopen, like so: libHandle 
= dlopen(myLibrary, RTLD_NOW | RTLD_GLOBAL), which is needed for GTK to find 
all of it's needed libraries. This fixes the problem.

Matic
________________________________
From: Matic Kukovec <kukovecma...@hotmail.com>
Sent: Tuesday, June 26, 2018 11:50 PM
To: IUP discussion list.
Subject: Re: [Iup-users] Fonts on RaspberryPi?

@Eric, @Antonio
Thanks for the suggestions. I was not completely accurate with the example I 
gave. The code is equivalent, but it is written in Nim 
(nim-lang.org<http://nim-lang.org>), which compiles to C and which I thought 
should be the same as pure C.
So I tried the same example directly in C and it works. So the problem is 
somewhere on the Nim side of things.

Thanks again for the help.
Matic

________________________________
From: Antonio Scuri <antonio.sc...@gmail.com>
Sent: Tuesday, June 26, 2018 12:50 PM
To: IUP discussion list.
Subject: Re: [Iup-users] Fonts on RaspberryPi?

 It seems that's something weird going on with your fonts. Sorry I have no 
experience with your system.

  Try another application just to show the list of installed fonts, maybe you 
got some clue.

Best,
Scuri


Em seg, 25 de jun de 2018 19:32, Matic Kukovec 
<kukovecma...@hotmail.com<mailto:kukovecma...@hotmail.com>> escreveu:
Hi Antonio,

Thanks for the reply. I tried creating a IupFontDlg with:

Ihandle* dlg = IupFontDlg();
IupPopup(dlg, IUP_CURRENT, IUP_CURRENT);

but the code throws a segfault at the second line along with these errors 
(shutdown is the name of the application):

(shutdown:19761): Gtk-WARNING **: 
/home/pi/gtk+3.0-3.22.11/./gtk/gtkliststore.c:516: Invalid type (null)
(shutdown:19761): Gtk-WARNING **: 
/home/pi/gtk+3.0-3.22.11/./gtk/gtkliststore.c:516: Invalid type (null)
(shutdown:19761): GLib-GObject-CRITICAL **: g_value_type_transformable: 
assertion 'G_TYPE_IS_VALUE (src_type)' failed
(shutdown:19761): GLib-GObject-CRITICAL **: g_value_type_transformable: 
assertion 'G_TYPE_IS_VALUE (src_type)' failed
(shutdown:19761): GLib-GObject-WARNING **: 
/build/glib2.0-F5w919/glib2.0-2.50.3/./gobject/gtype.c:4264: type id '0' is 
invalid
(shutdown:19761): GLib-GObject-WARNING **: can't peek value table for type 
'<invalid>' which is not currently referenced

... then a SEGFAULT occurs.

I have no idea what is going on?

Matic
________________________________
From: Antonio Scuri <antonio.sc...@gmail.com<mailto:antonio.sc...@gmail.com>>
Sent: Monday, June 25, 2018 11:15 PM
To: IUP discussion list.
Subject: Re: [Iup-users] Fonts on RaspberryPi?

  Hi,

  Thanks.

  Probably those fonts (or its maps to the native names) are not installed or 
available on that system.

  Arial exists only in Windows, but Courier should be mapped to Monospace, and 
Sans in already a GTK name. But I'm not familiar with Raspbian, so maybe we 
need to map to specific fonts there.

  Try displaying the IupFontDlg to see the actual list.

Best,
Scuri


Em seg, 25 de jun de 2018 às 16:55, Matic Kukovec 
<kukovecma...@hotmail.com<mailto:kukovecma...@hotmail.com>> escreveu:
Hello,

First a thank you to the creators of IUP. It's a wonderful library!

I have a simple application with a IupText and IupButton on a IupDialog that 
works perfectly on Windows and most Linux distributions.
But on the RaspberryPi 3 (Raspbian OS) the font cannot be changed on either 
IupText or IupButton. I tried many different font families and sizes and 
nothing seems to work. Examples that I tried:
IupSetAttribute(textbox, "FONT", "Courier 30")
IupSetAttribute(textbox, "FONT", "Sans 18")
IupSetAttribute(textbox, "FONT", "Arial 30")

The font always seems to stay at "PibotoLt 12" and I have no idea why?
Any ideas?

Thanks,
Matic
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net<mailto:Iup-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net<mailto:Iup-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to