Brilliant! Works like a charm.
To summarize:
On RaspberryPi running the Raspbian OS, there is some problem with the PIXEL
desktop manager and GTK-3 when rendering fonts, but GTK-2 works without
problems. So to get around this inconvenience build the IUP library for use
with GTK-2 as Antonio explained, by defining an environment variable via export
USE_GTK2=1 before compiling the IUP library. The result works without problems.
Thanks again Antonio!
Matic
________________________________
From: Antonio Scuri <antonio.sc...@gmail.com>
Sent: Sunday, July 1, 2018 7:00 PM
To: IUP discussion list.
Subject: Re: [Iup-users] RaspberryPi font problem
Yes, define USE_GTK2 before building the main library.
Best,
Scuri
Em dom, 1 de jul de 2018 às 13:16, Matic Kukovec
<kukovecma...@hotmail.com<mailto:kukovecma...@hotmail.com>> escreveu:
Hey Antonio,
I read through a bit of forums and it seems that this is a known problem with
the Rapbian's PIXEL desktop and the way it uses Gtk3.
Now I am trying to compile IUP with Gtk2, but I have both libgtk2.0-dev and
libgtk-3-dev installed. Is there a way to force IUP to use the Gtk2 libraries
during compilation?
Matic
________________________________
From: Matic Kukovec <kukovecma...@hotmail.com<mailto:kukovecma...@hotmail.com>>
Sent: Saturday, June 30, 2018 9:44:35 PM
To: Antonio Scuri; IUP discussion list.
Subject: Re: [Iup-users] RaspberryPi font problem
Hey Antonio,
Tried it, no difference.
The printf statement prints: 3.22.11
Matic
________________________________
From: Antonio Scuri <antonio.sc...@gmail.com<mailto:antonio.sc...@gmail.com>>
Sent: Saturday, June 30, 2018 7:28 PM
To: IUP discussion list.
Subject: Re: [Iup-users] RaspberryPi font problem
Try using the same font of the system and just changing its size, just as a
test to see how it behaves.
Add this to your test:
printf("%s\n", IupGetGlobal("GTKVERSION"));
Best,
Scuri
Em sáb, 30 de jun de 2018 às 06:16, Matic Kukovec
<kukovecma...@hotmail.com<mailto:kukovecma...@hotmail.com>> escreveu:
Hi,
This problem is only present on the RaspberryPi. I am using the official
Raspbian OS without any modifications.
I am trying to change the Font on controls in a simple C program:
#include <stdlib.h>
#include <stdio.h>
#include <iup.h>
int main(int argc, char **argv)
{
Ihandle *dlg, *button, *label, *vbox;
IupOpen(&argc, &argv);
label = IupLabel("My test message in IUP.");
IupSetAttribute(label, "FONT", "Courier 30");
vbox = IupVbox(label, NULL);
dlg = IupDialog(vbox);
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
Now, whatever value is put for X in IupSetAttribute(label, "FONT", X), the
font is always the default system font (PibotoLt Regular, size 12). The size of
the label changes according to the selected font size, but the text is always
the system text. Note that all the fonts I tested with are installed on the
system.
Example code above with IupSetAttribute(label, "FONT", "Courier 12"):
[X]
... and the same code with IupSetAttribute(label, "FONT", "Courier 30"):
[X]
Also note that this is a RaspberryPi specific problem, on for example Lubuntu
or Peppermint this works without problems.
Any Ideas?
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