Active Topics

 


Reply
Thread Tools
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:
Slixor's Avatar
Posts: 79 | Thanked: 5 times | Joined on Jan 2008 @ England
#2
sorry im a noob, but wtf is freetype and bytecode :S and what does this tutorial do?
 
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#3
Originally Posted by Slixor View Post
sorry im a noob, but wtf is freetype and bytecode :S and what does this tutorial do?
If you don't know then it's not relevant to your interests.

coffeedrinker, stick this in the wiki ASAP. It's just going to get buried the the forums.
 

The Following User Says Thank You to GeneralAntilles For This Useful Post:
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Any screenshots or font tips? I tried this some time ago with 770/OS2006 and the results were not great. It worked for fonts copied from Windows but some other tablet fonts looked worse. Also I wanted it mainly for Opera which ignored it anyway. This may be different with Microb now.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#5
I don't know how to wiki it but I'll look into it. If I can't maybe someone could copy it there.

I posted info about this in a thread back in August and posted a screen shot there.

http://internettablettalk.com/forums...ead.php?t=8396

I use Microsoft fonts but the Nokia font looks beautiful too, nice and sharp. The fonts basically can look like Windows fonts with the cleartype turned off, so no blurry edges.
 
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#6
Originally Posted by coffeedrinker View Post
I don't know how to wiki it but I'll look into it. If I can't maybe someone could copy it there.
Go here, and write yourself up an article.

Originally Posted by coffeedrinker View Post
The fonts basically can look like Windows fonts with the cleartype turned off, so no blurry edges.
*shudders*
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#7
Well, I put up a wiki here:
http://internettablettalk.com/wiki/i...de_interpreter

but I don't know how to do the code block for the fonts.conf file. Maybe someone could fix that up

Antilles, you need to remember that I'm twice your age and *need* my fonts very sharp. My first computer had nice green fonts on a black screen with less resolution than my n800
 

The Following User Says Thank You to coffeedrinker For This Useful Post:
Posts: 34 | Thanked: 9 times | Joined on Mar 2006 @ Wien
#8
coffeedrinker, thank you for the patched library and great How-To. Now fonts (espatially in microb, are much better). Also I add changes in priority of font selection. Default fonts are not looking well without antialiasing. I add Tahoma, Verdana, Lucida Console, Times New Roman and some others (from Win XP, not! from Vista) to /usr/share/fonts/corefonts and add local.conf to /etc/fonts for prioritaze corefonts.
local.conf
Code:
xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<alias>
		<family>serif</family>
		<prefer>
			<family>Times New Roman</family>
			<family>Bitstream Vera Serif</family>
			<family>DejaVu Serif</family>
			<family>Thorndale AMT</family>
			<family>Luxi Serif</family>
			<family>Nimbus Roman No9 L</family>
			<family>Times</family>
		</prefer>
	</alias>
	<alias>
		<family>sans-serif</family>
		<prefer>
			<family>Tahoma</family>
			<family>Verdana</family>
			<family>Arial</family>
			<family>Bitstream Vera Sans</family>
			<family>DejaVu Sans</family>
			<family>Albany AMT</family>
			<family>Luxi Sans</family>
			<family>Nimbus Sans L</family>
			<family>Helvetica</family>
		</prefer>
	</alias>
	<alias>
		<family>monospace</family>
		<prefer>
			<family>Lucida Console</family>
			<family>Courier New</family>
			<family>Bitstream Vera Sans Mono</family>
			<family>DejaVu Sans Mono</family>
			<family>Cumberland AMT</family>
			<family>Luxi Mono</family>
			<family>Nimbus Mono L</family>
			<family>Courier</family>
		</prefer>
	</alias>
</fontconfig>
And some screenshots... (in microb minimum font size set to 14!!!)
Attached Images
   
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#9
Well, another thing I did under 2007 was to change the fonts for the whole system. I haven't got around to this yet in 2008.

Basically, you can just edit the default theme in /usr/share/themes/ (this is different in 2008 which uses a link to the theme directory).

So just copy the theme you like, link to it and then edit the theme. You change the font name in the theme file (gtkrc in the gtk-2.0 directory) and and delete the .cache file for the change.

Like I said, I haven't messed with all this in 2008 yet, so poke around a little.
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#10
Here is how to *easily* fix your system fonts in OS 2008. No theme editing required. It will not change the sizes but will use a different font.

In your /home/user/.fonts.conf file add:

<match target="pattern" >
<test name="family" qual="any" >
<string>Nokia Sans</string>
</test>
<edit mode="assign" name="family" >
<string>Tahoma</string>
</edit>
</match>

Of course, instead of Tahoma use the font you prefer.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:51.