Problem: Dillo2 does not recognize True Type font
I built dillo2 for my Debian5 desktop and found that Chinese text were not correctly displayed. All Chinese glyphs are displayed in empty blocks. I found that it's because the dillo2 that I built only recognized type1 font and did not recognize truetype font. I did a small test as the stated in the following to find the cause. I know it is not normal, because people don't have such problem. I wonder if this problem can be solved by setting proper ./configure options or by modifying Makefile. If you have any idea, please help. Thanx. At first, I suspect that FLTK2 does not support multi-national language dispaly. So I wrote a small program to test it. I used: "g++ -o fltkhello1 fltkhello1.cxx -I/usr/local/include -L/local/lib -lfltk2 -lXext -lXft -lX11 -lXi -lm" to compile. The result is not not satisfying. With the help from fltk-dev mail list, I tried "fltk2-config --compile fltkhello1.cxx" and got correct result. In fact, "fltk2-config --compile fltkhello1.cxx" will execute the following command to compile: gcc -I/usr/local/include -I/usr/include/freetype2 -Wno-non-virtual-dtor -o fltkhello1 fltkhello1.cxx -L/usr/local/lib /usr/local/lib/libfltk2.a -lX11 -lXi -lXinerama -lXcursor -lXft -lpthread -lm -lXext -lsupc++ The interesting part is: my previous faulty compile command made my program only recognize type1 font (such as Bitstream Charter), and no truetype font is recognized. The problem was corrected by calling "fltk2-config --compile fltkhello1.cxx". Because in my desktop, all the Chinese glyphs are provided by truetype font, it caued FLTK2 program won't dispaly Chinese glyphs. I also add some code in Dillo 2 source code to hardcode fontname to be used to draw text, I found that only typ1 font was recognized, all truetype fonts are not recognized.
Eric wrote:
I built dillo2 for my Debian5 desktop and found that Chinese text were not correctly displayed. All Chinese glyphs are displayed in empty blocks. I found that it's because the dillo2 that I built only recognized type1 font and did not recognize truetype font. I did a small test as the stated in the following to find the cause. I know it is not normal, because people don't have such problem. I wonder if this problem can be solved by setting proper ./configure options or by modifying Makefile. If you have any idea, please help. Thanx.
At first, I suspect that FLTK2 does not support multi-national language dispaly. So I wrote a small program to test it. I used: "g++ -o fltkhello1 fltkhello1.cxx -I/usr/local/include -L/local/lib -lfltk2 -lXext -lXft -lX11 -lXi -lm" to compile. The result is not not satisfying. With the help from fltk-dev mail list, I tried "fltk2-config --compile fltkhello1.cxx" and got correct result. In fact, "fltk2-config --compile fltkhello1.cxx" will execute the following command to compile: gcc -I/usr/local/include -I/usr/include/freetype2 -Wno-non-virtual-dtor -o fltkhello1 fltkhello1.cxx -L/usr/local/lib /usr/local/lib/libfltk2.a -lX11 -lXi -lXinerama -lXcursor -lXft -lpthread -lm -lXext -lsupc++ The interesting part is: my previous faulty compile command made my program only recognize type1 font (such as Bitstream Charter), and no truetype font is recognized. The problem was corrected by calling "fltk2-config --compile fltkhello1.cxx". Because in my desktop, all the Chinese glyphs are provided by truetype font, it caued FLTK2 program won't dispaly Chinese glyphs.
I also add some code in Dillo 2 source code to hardcode fontname to be used to draw text, I found that only typ1 font was recognized, all truetype fonts are not recognized.
Hmm...I've always used Bitstream Cyberbit for Asian text, and the mighty wikipedia claims it's TTF ( http://en.wikipedia.org/wiki/Unicode_typefaces ) Dillo's configure.in has AC_MSG_CHECKING([FLTK2]) if sh -c "fltk2-config --version" >/dev/null 2>&1 then AC_MSG_RESULT(yes) LIBFLTK_CXXFLAGS=`fltk2-config --cxxflags` LIBFLTK_CFLAGS=`fltk2-config --cflags` LIBFLTK_LIBS=`fltk2-config --use-images --ldflags` else AC_MSG_RESULT(no) AC_ERROR(FLTK2 must be installed!) fi to get the fltk flags...
The font that I mentioned as type1 was "Bitstream Charter", not "Bitstream Cyberbit". Thanx for the tips about configure.in. I will have a further look.
Hmm...I've always used Bitstream Cyberbit for Asian text, and the mighty wikipedia claims it's TTF ( http://en.wikipedia.org/wiki/Unicode_typefaces )
Dillo's configure.in has
AC_MSG_CHECKING([FLTK2]) if sh -c "fltk2-config --version" >/dev/null 2>&1 then AC_MSG_RESULT(yes) LIBFLTK_CXXFLAGS=`fltk2-config --cxxflags` LIBFLTK_CFLAGS=`fltk2-config --cflags` LIBFLTK_LIBS=`fltk2-config --use-images --ldflags` else AC_MSG_RESULT(no) AC_ERROR(FLTK2 must be installed!) fi
to get the fltk flags...
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Truely, It seems people don't have trouble in making dillo2 recognize treutype fonts. My situation is not normal, so I am trying to find why and how to cope with the situation. On Sun, Jul 19, 2009 at 6:41 AM, corvid <corvid@lavabit.com> wrote:
Eric wrote:
The font that I mentioned as type1 was "Bitstream Charter", not "Bitstream Cyberbit".
Right, I'm saying that in my circumstances I'm able to use a truetype font without having to do anything special.
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Hi Eric, On Sun, Jul 19, 2009 at 01:13:54AM +0800, Eric Liao wrote:
I built dillo2 for my Debian5 desktop and found that Chinese text were not correctly displayed. All Chinese glyphs are displayed in empty blocks. I found that it's because the dillo2 that I built only recognized type1 font and did not recognize truetype font. I did a small test as the stated in the following to find the cause. I know it is not normal, because people don't have such problem. I wonder if this problem can be solved by setting proper ./configure options or by modifying Makefile. If you have any idea, please help. Thanx.
At first, I suspect that FLTK2 does not support multi-national language dispaly. So I wrote a small program to test it. I used: "g++ -o fltkhello1 fltkhello1.cxx -I/usr/local/include -L/local/lib -lfltk2 -lXext -lXft -lX11 -lXi -lm" to compile. The result is not not satisfying. With the help from fltk-dev mail list, I tried "fltk2-config --compile fltkhello1.cxx" and got correct result. In fact, "fltk2-config --compile fltkhello1.cxx" will execute the following command to compile: gcc -I/usr/local/include -I/usr/include/freetype2 -Wno-non-virtual-dtor -o fltkhello1 fltkhello1.cxx -L/usr/local/lib /usr/local/lib/libfltk2.a -lX11 -lXi -lXinerama -lXcursor -lXft -lpthread -lm -lXext -lsupc++ The interesting part is: my previous faulty compile command made my program only recognize type1 font (such as Bitstream Charter), and no truetype font is recognized. The problem was corrected by calling "fltk2-config --compile fltkhello1.cxx". Because in my desktop, all the Chinese glyphs are provided by truetype font, it caued FLTK2 program won't dispaly Chinese glyphs.
Maybe the -I/usr/include/freetype2 option is needed on your system to get the right freetype includes? You might try export CPPFLAGS=-I/usr/include/freetype2 before calling the dillo configure script to make sure gcc looks in /usr/include/freetype2 first when searching for freetype includes. Cheers, Johannes
participants (3)
-
corvid@lavabit.com
-
ericshliao@gmail.com
-
Johannes.Hofmann@gmx.de