View Single Post
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#1
A more complete version of this guide is now available at:
http://internettablettalk.com/wiki/i...de_interpreter

HowTo: freetype library with bytecode interpreter enabled

I was asked to explain how to enable freetype with the bytecode interpreter in a private message. So here goes.

WARNING: DO NOT TRY THIS FOR IT WILL UNDOUBTABLY GO WRONG FOR YOU AND YOU WILL HAVE TO REFLASH YOUR DEVICE LOSING ALL YOUR SETTINGS!!!

1. Download the freetype source code, read the readme, enable the interpreter and compile the library.
OR
1. Download the library prepared by me. I have used it on my n800 for both the 2007 and 2008 OS, although it was compiled under the 2007 OS.

The following steps require you to be root:

2. Copy the file libfreetype.so.6.3.16 (version number may vary if you compiled it yourself) to /usr/lib from wherever you saved it (the following command assumes you are in the directory you saved the file to).
cp libfreetype /usr/lib/

Move to the /usr/lib directory to complete the task.
cd /usr/lib

You may need to change permissions on the file:
chmod 644 libfreetype.so.6.3.16

3. Remove the old link to the library with the command:
rm libfreetype.so.6

4. Create a new link to the new library:
ln -s libfreetype.so.6.3.16 libfreetype.so.6

5. OPTIONAL: Copy any new fonts you wish to use to /home/user/.fonts/ (this is a directory, you may have to create it first).
mkdir /home/user/.fonts

6. OPTIONAL: Create or edit /home/user/.fonts.conf (this is a text file). In it you can set the font size to begin antialiasing, etc.

My file looks like this:
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <test compare="more" name="size" qual="any" >
   <double>6</double>
  </test>
  <test compare="less" name="size" qual="any" >
   <double>30</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
  <test compare="more" name="pixelsize" qual="any" >
   <double>6</double>
  </test>
  <test compare="less" name="pixelsize" qual="any" >
   <double>30</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
 </match>
 <match target="font" >
  <test compare="eq" name="slant" >
   <const>italic</const>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
</fontconfig>
7. Reboot in order to have the interface elements use the new library. Without reboot, only new applications will use the library.

TO UNDO THIS CHANGE:
Delete the link and recreate it to the original library and reboot.
cd /usr/lib
rm libfreetype.so.6
ln -s libfreetype.so.6.3.10 libfreetype.so.6

Last edited by coffeedrinker; 2008-01-08 at 23:03.
 

The Following 2 Users Say Thank You to coffeedrinker For This Useful Post: