I'm using FLTK 1.3.5 and X11. Again, the old binary runs and displays the proper fonts.The newly built binary (built on the new system) displays the "miniature" fonts.
Hi,I cloned my project and removed all the modules from it, then replaced main.c with the source for hello.cIt built and linked with no errors, but runs just the same (small fonts).I tried changing the font size from the original 36 point to 72 point, no change.Where does FLTK get fonts from?Do they come from X11 or are they loaded from somewhere at runtime?It seems to be acting like it can't find the fonts and is reverting to a default.What can I try next?
{"sans"},
{"mono"},
{"serif"},
{"symbol"},
{"screen"},
{"zapf dingbats"},
{"courier"},
{"times"},
{"symbol"},
{"lucidatypewriter"},
Under Xlib, we look for
{"-*-helvetica-medium-r-normal--*"},
{"-*-helvetica-bold-r-normal--*"},
{"-*-helvetica-medium-o-normal--*"},
{"-*-helvetica-bold-o-normal--*"},
{"-*-courier-medium-r-normal--*"},
{"-*-courier-bold-r-normal--*"},
{"-*-courier-medium-o-normal--*"},
{"-*-courier-bold-o-normal--*"},
{"-*-times-medium-r-normal--*"},
{"-*-times-bold-r-normal--*"},
{"-*-times-medium-i-normal--*"},
{"-*-times-bold-i-normal--*"},
{"-*-symbol-*"},
{"-*-lucidatypewriter-medium-r-normal-sans-*"},
{"-*-lucidatypewriter-bold-r-normal-sans-*"},
{"-*-*zapf dingbats-*"}
I will dig into XFT tonight.More info - I built two more test programs...fonts.cxx - Runs, but all fonts are the same (miniature).UTF8.cxx - Runs, fonts change size, but this font is very coarsely bitmapped.Fullscreen.cxx - Won't compile, needs config.h. There are many versions of config.h, I don't know which one to use.unitests.cxx - Won't compile, many errors.Again, the old binary runs with the proper font types and sizes.It was built with the same configuration in NetBeans.Thanks for all your help. if you think of any more specific things for me to try, that would be much appreciated.
UTF8.cxx - Runs, fonts change size, but this font is very coarsely bitmapped.
A quick fix involving a patch to the FLTK code would be:
in file <FLTK source tree>/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx, line #43replace the present#if 1by#if 0
Hi Everyone,Once again, the old binary (built on 5-year-old Linux) runs fine, shows the proper fonts.The new binary (built on the current Linux) shows the "miniature" fonts.So, somehow, the fonts are available in the system, just not for the new build.Apparently the new build doesn't find the fonts or somehow have access to them.Is there a test I can do, or a build option to allow FLTK to find the font resource?
... the old binary (built on 5-year-old Linux) runs fine, shows the proper fonts.
The new binary (built on the current Linux) shows the "miniature" fonts.So, somehow, the fonts are available in the system, just not for the new build.
Apparently the new build doesn't find the fonts or somehow have access to them.
Is there a test I can do, or a build option to allow FLTK to find the font resource?
Hello Everyone,
First of all, Thank You to all who have responded with excellent help messages.I appreciate your knowledge and insight more than words can say.That being said, I still have no joy.
I have tried everything that all of you have suggested.
I rebuilt FLTK 1.3.9 as suggested, along with installing and updating all the requisite utilities.My application still builds with no errors, but without the proper font sizes.
It is interesting to note that the demo program (in the test directory) runs, but has similar problems.The font test doesn't change fonts when different ones are selected.
Only when I scroll down to "common" can I get the fonts to change size.
What can I try now?
On Wednesday, April 10, 2024 at 8:19:45 AM UTC-5 Albrecht-S wrote:
[...]
Download a new snapshot of FLTK 1.4 (recommended) or the latest release tarball (currently 1.3.9) from the FLTK website, expand it, `cd` to the just expanded FLTK root dir, and then execute:
$ ./configure
This runs the configure script with all default options. Please save the output somewhere so you can post it if the build doesn't work.
I installed 1.4.x without issue but still no joy.The fonts demo does not change when I select different fonts.The log file is attached.
make distclean autoconf ./configure 2>&1 | tee fltk-1.4-configure.txtThen post `fltk-1.4-configure.txt` which will contain the entire output you saw on your display. TIA.
Configuration Summary ------------------------------------------------------------------------- Directories: prefix=/usr/local bindir=${exec_prefix}/bin datadir=${datarootdir} datarootdir=${prefix}/share exec_prefix=${prefix} includedir=${prefix}/include libdir=${exec_prefix}/lib mandir=${datarootdir}/man Build fluid: YES Build tests: YES Cross-compiling: NO Graphics: Wayland or X11 with cairo + Xfixes + Xinerama + Xcursor + Xrender + Pango Image Libraries: JPEG=System PNG=System ZLIB=System Forms library: YES Large Files: YES OpenGL: YES Threads: YES Allow std:: : NO ...
On 4/15/24 08:13 TwoTrees Innerworld wrote:
I installed 1.4.x without issue but still no joy.The fonts demo does not change when I select different fonts.The log file is attached.
Sorry, this is not what I meant - although it may contain all info, but it's way too verbose to be helpful.
configure:8835: result: no configure:8835: checking for X11/Xft/Xft.h configure:8835: result: no configure:8893: WARNING: could not find the required Xft headers and/or libraries. configure:8895: please install Xft headers and libraries or use 'configure --disable-xft'. configure:9146: checking for X11/extensions/Xfixes.h configure:9146: gcc -c -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 conftest.c >&5 conftest.c:57:10: fatal error: X11/extensions/Xfixes.h: No such file or directory 57 | #include <X11/extensions/Xfixes.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.This means that you did NOT (successfully) install all prerequisites, at least Xft is missing. We would have seen this in the original configure output because it would have issued this message:
WARNING: could not find the required Xft headers and/or libraries. please install Xft headers and libraries or use 'configure --disable-xft'.Having Xft development headers (and libs) installed is essential for correct font handling!
sudo apt-get install g++ sudo apt-get install gdb sudo apt-get install git # OPTIONAL: to download FLTK from Git sudo apt-get install make sudo apt-get install cmake # OPTIONAL: install CMake... sudo apt-get install autoconf # ...or autoconf (or both) sudo apt-get install libx11-dev sudo apt-get install libglu1-mesa-dev sudo apt-get install libxft-dev sudo apt-get install libxcursor-devPlease check that there are no error messages. If you are not sure, please capture the output in a text file and post it here.
$ cat /etc/issue.net; uname -a; g++ --version Raspbian GNU/Linux 10 Linux raspi3 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
--
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 on the web visit https://groups.google.com/d/msgid/fltkgeneral/5625637f-b188-4fde-a13a-38b1de3ee3dcn%40googlegroups.com.
OK, partial joy.I installed all the updates and fltk-1.4.xThe test program runs and displays fonts correctly and with different point sizes.
The new problem is that now my Netbeans project won't successfully build anymore.The modules seem to compile fine, but I get a ton of what I believe are linker errors.
It starts like this...g++ -I/usr/local/include -L/usr/local/lib -lwiringPi -o dist/Debug/GNU-Linux/fltk build/Debug/GNU-Linux/a_to_d.o build/Debug/GNU-Linux/distance.o build/Debug/GNU-Linux/getdisljump.o build/Debug/GNU-Linux/getdisnew.o build/Debug/GNU-Linux/kbhit.o build/Debug/GNU-Linux/main.o build/Debug/GNU-Linux/menu.o build/Debug/GNU-Linux/parallel.o build/Debug/GNU-Linux/serial.o -L/usr/local/lib -Wl,-rpath,'/usr/local/lib' -lfltk -lfltk_forms -lfltk_images -lpthread -ldl -lm -lX11 -lwiringPi -lXext -lstdc++
[...]
Fl_Xlib_Graphics_Driver_font_xft.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver9set_fontsEPKc+0x1c): undefined reference to `FcInit'
/usr/bin/ld: Fl_Xlib_Graphics_Driver_font_xft.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver9set_fontsEPKc+0x2c): undefined reference to `FcPatternCreate'
/usr/bin/ld: Fl_Xlib_Graphics_Driver_font_xft.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver9set_fontsEPKc+0x40): undefined reference to `FcObjectSetBuild'
/usr/bin/ld: Fl_Xlib_Graphics_Driver_font_xft.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver9set_fontsEPKc+0x54): undefined reference to `FcFontList'
[...]
Do you know what happened? Did something move?
Thanks again for all the help!
What I found useful was to add
`fltk-config --use-images --ldstaticflags`
as part of my build command using an archaic makefile flow.
Phil.
What I found useful was to add
`fltk-config --use-images --ldstaticflags`
as part of my build command using an archaic makefile flow.
We have JOY!Using fltk-config --use-images --use-forms --ldstaticflagsto get the proper linker options and adding them to my linker control file,I now have a successful build and correct font displays!
I don't understand why this changed, i.e. why the additional options were necessaryafter installing the support packages, when I had a successful build before.
Anyway, it is running now and I am OVERJOYED!
Thank you all for all your help and patience in helping me to get this running again.
You all are awesome...
- al
On Tuesday, April 16, 2024 at 10:08:41 AM UTC-5 Albrecht-S wrote:
On 4/16/24 14:02 'pvrose' via fltk.general wrote:
What I found useful was to add
`fltk-config --use-images --ldstaticflags`
as part of my build command using an archaic makefile flow.
Yup, that's AFAICT the main motivation to create fltk-config in the first place.
--
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 on the web visit https://groups.google.com/d/msgid/fltkgeneral/6ffcff0b-2695-4583-a0f9-27246d5b3345n%40googlegroups.com.