LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-15-2005, 07:44 PM   #46
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35

You're 90% there.

Playing around with FreeType on my PC and comparing with your screenshot: The bytecode interpreter isn't being enabled, which it should be if it's built in and the autohinter is disabled (this behaviour cannot be changed in FreeType)

I'm not sure you've enabled the bytecode interpreter in the FreeType code properly before compiling it?

Just to be on the safe side, make sure that it has been enabled in the FreeType source code before you compile it. To enable the bytecode interpreter, in the FreeType source files you downloaded, in an editor of your choice open up <path_to_downloaded_freetype_source_code>/include/freetype/config/ftoption.h (in my case, /home/<myuser>/src/freetype-2.1.9/include/freetype/config/option.h)

Find:
Code:
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER  */
If it's easier, just search for '#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER' and uncomment the /* and */ on _both_ ends to replace it with:
Code:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
Then in the <path_to_freetype_source> directory you can run 'make distclean;./configure;make;make install' (or checkinstall) to build and install it.

If FreeType gives any errors up whilst compiling and still doesn't work, report them back and we can try to hunt down why it doesn't want to play nice.

Last edited by cathectic; 02-15-2005 at 08:02 PM.
 
Old 02-15-2005, 08:12 PM   #47
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by cathectic
You're 90% there.

Playing around with FreeType on my PC and comparing with your screenshot: The bytecode interpreter isn't being enabled, which it should be if it's built in and the autohinter is disabled (this behaviour cannot be changed in FreeType)

I'm not sure you've enabled the bytecode interpreter in the FreeType code properly before compiling it?
Yes, it's properly enabled.
Code:
mingdao@james:~$ less ~/downloads/freetype-2.1.9/include/freetype/config/ftoption.h
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
  /* important patent issues related to the use of the interpreter.        */
  /*                                                                       */
  /* By undefining this, you will only compile the code necessary to load  */
  /* TrueType glyphs without hinting.                                      */
  /*                                                                       */
  /*   Do not #undef this macro here, since the build system might         */
  /*   define it for certain configurations only.                          */
  /*                                                                       */
#define  TT_CONFIG_OPTION_BYTECODE_INTERPRETER
It was properly enabled last night when I compiled it,
before I removed it. This morning before I compiled it
again I read /freetype-2.1.9/docs/UPGRADE.UNX
Code:
 2. Determine the correct installation path
  ------------------------------------------

    By  default,  the  configure  script  will install  the  library  in
    "/usr/local".   However,  many Unix  distributions  now install  the
    library  in "/usr",  since FreeType  is becoming  a  critical system
    component.

    If FreeType is already installed on your system, type

      freetype-config --prefix

    on  the command  line.   This should  return  the installation  path
    (e.g.,  "/usr"  or "/usr/local").   To  avoid  problems of  parallel
    FreeType  versions, use  this path  for the  --prefix option  of the
    configure script.

    Otherwise, simply use "/usr" (or  whatever you think is adequate for
    your installation).
and found that Slackware-10.0 has
Code:
mingdao@james:~/downloads/freetype-2.1.9/docs$ freetype-config --prefix
/usr
so this morning I recompiled with./configure --prefix=/usr
and didn't get any errors -- actually, it didn't do anything
for ./configure, or make; but checkinstall did install it again.
But now I get
Code:
mingdao@james:~/downloads/freetype-2.1.9/docs$ freetype-config --prefix
/usr/local
so ain't that the pits...
Quote:
Then in the <path_to_freetype_source> directory you can run ./configure;make;make install (or checkinstall) to build and install it.

If FreeType gives any errors up whilst compiling and still doesn't work, report them back and we can try to hunt down why it doesn't want to play nice.
So, since I know that line is properly uncommented in
/freetype-2.1.9/include/freetype/config/ftoption.h --
but the path is NOT where /freetype-2.1.9/docs/UPGRADE.UNX
says that it should be, what about that issue? Should I
rip it all out and compile again and get it in /usr or not?

And I still don't know how to do that gnome-config thing.

And just in case it matters, here's the output of
Code:
mingdao@james:~$ find / -iname '*freetype*' 2>/dev/null
/var/log/removed_packages/freetype-2.1.9-i686-1
/var/log/packages/freetype-2.1.9-i686-1
/var/log/packages/freetype-2.1.9-i686-1.tgz
/var/log/scripts/freetype-2.1.9-i686-1
/var/log/removed_scripts/freetype-2.1.9-i686-1
/usr/bin/freetype-config
/usr/doc/freetype-2.1.9
/usr/lib/libfreetype.la
/usr/lib/libfreetype.so
/usr/lib/pkgconfig/freetype2.pc
/usr/lib/libfreetype.so.6.3.5
/usr/lib/libfreetype.so.6
/usr/lib/libfreetype.a
/usr/X11R6/lib/X11/doc/freetype-2.1.7
/usr/X11R6/lib/modules/fonts/libfreetype.so
/usr/X11R6/man/man3/FcFreeTypeQuery.3.gz
/usr/X11R6/man/man3/FcFreeTypeCharIndex.3.gz
/usr/X11R6/man/man3/FcFreeTypeCharSet.3.gz
/usr/X11R6/include/fontconfig/fcfreetype.h
/usr/local/bin/freetype-config
/usr/local/lib/libfreetype.la
/usr/local/lib/libfreetype.so
/usr/local/lib/pkgconfig/freetype2.pc
/usr/local/lib/libfreetype.so.6.3.7
/usr/local/lib/libfreetype.so.6
/usr/local/lib/libfreetype.a
/usr/local/share/aclocal/freetype2.m4
/usr/local/include/freetype2
/usr/local/include/freetype2/freetype
/usr/local/include/freetype2/freetype/freetype.h
/usr/share/idl/mozilla-1.7/nsIFreeType2.idl
/usr/share/aclocal/freetype2.m4
/usr/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html
/usr/include/mozilla-1.7/gfx/nsIFreeType2.h
/usr/include/freetype2
/usr/include/freetype2/freetype
/usr/include/freetype2/freetype/freetype.h
/usr/include/freetype
/home/mingdao/downloads/freetype-2.1.9
/home/mingdao/downloads/freetype-2.1.9/objs/libfreetype.la
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.la
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.so
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.lai
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.so.6.3.7
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.so.6
/home/mingdao/downloads/freetype-2.1.9/objs/.libs/libfreetype.a
/home/mingdao/downloads/freetype-2.1.9/builds/mac/freetype.make
/home/mingdao/downloads/freetype-2.1.9/builds/unix/freetype-config
/home/mingdao/downloads/freetype-2.1.9/builds/unix/freetype2.m4
/home/mingdao/downloads/freetype-2.1.9/builds/unix/freetype2.in
/home/mingdao/downloads/freetype-2.1.9/builds/unix/freetype2.pc
/home/mingdao/downloads/freetype-2.1.9/builds/unix/freetype-config.in
/home/mingdao/downloads/freetype-2.1.9/builds/amiga/include/freetype
/home/mingdao/downloads/freetype-2.1.9/builds/atari/FREETYPE.PRJ
/home/mingdao/downloads/freetype-2.1.9/builds/win32/visualc/freetype.dsp
/home/mingdao/downloads/freetype-2.1.9/builds/win32/visualc/freetype.dsw
/home/mingdao/downloads/freetype-2.1.9/builds/win32/visualc/freetype.sln
/home/mingdao/downloads/freetype-2.1.9/builds/win32/visualc/freetype.vcproj
/home/mingdao/downloads/freetype-2.1.9/builds/freetype.mk
/home/mingdao/downloads/freetype-2.1.9/include/freetype
/home/mingdao/downloads/freetype-2.1.9/include/freetype/freetype.h
/home/mingdao/downloads/freetype-2.1.9.tar.bz2
/home/mingdao/tarballs/freetype-2.1.9-i686-1.tgz
/home/mingdao/OpenOffice.org1.1.4/program/filter/libfreetype.so.6
/libfreetype.so
/libfreetype.so.6
mingdao@james:~$
 
Old 02-15-2005, 08:37 PM   #48
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
actually, it didn't do anything for ./configure, or make
Do you mean as in make responded 'nothing to do' (in which case you could try running 'make clean' or 'make distclean' first?) or in that when you compile it, nothing is ever displayed?

In terms of where it's installed to, it doesn't matter - I've always just done ./configure, which puts it in /usr/local, but since it updates /usr/lib and /usr/local/lib this isn't really a problem.

gnome-config isn't that important with the .fonts.conf I gave out. You may not have it if you don't have Gnome installed. If not, don't worry about it.

As long as you're using the .fonts.conf I gave out in post #41 (and you've deleted /etc/fonts/local.conf if you created one earlier) and you have the recompiled FreeType w/bytecode interpreter installed, I'm at somewhat of a loss as to why it's not doing what it should be doing...

Last edited by cathectic; 02-15-2005 at 08:41 PM.
 
Old 02-16-2005, 12:25 AM   #49
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
99% there

Well, I had a long reply and my ISP had a problem,
so while I was offline I recompiled, and this was the
problem. When freetype2 was compiled without the
./configure --prefix=/usr
it didn't work, because that meant the new compile
went into /usr/local but the original one with Slack is
compiled into /usr -- just like I posted before.

So I removed the compile I'd done before, and the
Slackpack I made with checkinstall, and the directory
and contents from untarring freetype-2.1.9.tar.bz2
and started all over -- and it works!

However, I'm still not out of the woods. The fonts in
the menus and most places look okay, but the fonts
in the coded sections of this page are not.

Also, the fonts in OOo are still horrible, but you did
tell me that OOo does something or another on it's
on.

My fonts that you see in this latest screenshot do look
like the ones in the darkside, so with the menus and
most of them I'm really happy. Just a little more work
to be done...

Thank you so much for your patience. I gotta run,
because I'm in the middle of Chinese class...

latest screenshot
 
Old 02-16-2005, 06:29 AM   #50
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
However, I'm still not out of the woods. The fonts in the menus and most places look okay, but the fonts in the coded sections of this page are not.
You need to change the default monospace font. Not sure what a good replacement might be - Courier New perhaps (but in Firefox/Thunderbird, you may want to increase it's size as it looks a bit small)? Just copy and paste this in to .fonts.conf (before the </fontconfig> closing tag) and edit as need be.
Code:
 <match target="pattern" name="family" >
  <test name="family" qual="any" >
   <string>monospace</string>
  </test>
<!-- Put your default monospace font here - perhaps courier? -->
  <edit mode="assign" name="family" >
   <string>Courier New</string>
  </edit>
 </match>
Also, if you're happy with your changes, and you decide that you like your users, you can use the .fonts.conf as an /etc/fonts/local.conf (don't worry if it doesn't exist, you can just create it) to make your changes systemwide (users should still be able to override it if they don't like it with a .fonts.conf of their own).

Quote:
Also, the fonts in OOo are still horrible, but you did tell me that OOo does something or another on it's on.
In OpenOffice.org, try toggling antialiasing on and off in OOo - goes against everything else, but then again, OOo is just plain difficult (Options --> View --> Screen Font Antialiasing). Alternatively, you can go to Options --> Fonts --> Apply Replacement Table, and then add an entry for 'Interface User' and replace it with something else (didn't have much luck getting that to work, but it is apparently the quasi official way of doing font changes in OOo, for future reference.)
Quote:
Thank you so much for your patience.
It was a challenge, and you did get it working, that's what matters. I'll write it up at somepoint, and put it with a resubmission of my original howto in LinuxQuestions Answers as an alternative method.

Update: It works fine with KDE and qt progams after I passed the '/usr' prefix when compiling freetype (but KDE is still funny and wants to be restarted before it plays nice).

Last edited by cathectic; 02-16-2005 at 10:41 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LCD Monitor Problem pbeckler SUSE / openSUSE 3 08-31-2005 01:39 PM
LCD Monitor Problem pbeckler Fedora - Installation 1 08-31-2005 09:32 AM
SuSE 9.2 LCD Monitor Problem NCAussie SUSE / openSUSE 2 05-17-2005 06:34 AM
Problem about my LCD monitor jpan Linux - Hardware 1 10-07-2004 08:39 PM
LCD Monitor problem thllgo Linux - Hardware 4 10-09-2003 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration