maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   libfreetype with bytecode interpreter enabled (https://talk.maemo.org/showthread.php?t=21658)

anpaza 2008-07-06 20:29

libfreetype with bytecode interpreter enabled
 
I have noticed that the fonts in Maemo could gain a little from better hinting, so I've rebuilt the freetype library with bytecode interpreter enabled.

Note that in some countries the involved algorithms are patented by m$ and apple, so it is illegal to use them without paying a few megabucks to them. So if the respective patent is valid in your country - don't use it. I personally don't care since US patents do not work in my country.

here is it.

After installing the package you'd better reboot, you'll notice the difference immediately after rebooting.

Here's a example screenshot before and after installing the modified library:

Before:
http://cs.ozerki.net/zap/maemo/mc.png

After:
http://cs.ozerki.net/zap/maemo/mc-hinted.png

You may notice that some fonts (e.g. the one on titlebar and on the statusbar) significantly changed, while other (the fixed font used by the terminal) is just like before. That's because the terminal font is unhinted, so it does not benefit from the bytecode interpreter (the "dejavu sans mono" font has hinting, but I haven't tried it yet).

If you decide to roll back, execute as root "apt-get -f install" which should eventually install the old version. If this doesn't work, get this.

qwerty12 2008-07-06 20:36

Re: libfreetype with bytecode interpreter enabled
 
Hmm, there was already one with bytecode enabled on the itt wiki, but it messed up my terminal (dpad wouldn't work), does this exhibit same behaviour?

anpaza 2008-07-06 20:46

Re: libfreetype with bytecode interpreter enabled
 
Try it again ;-)

Well, I'm running it for about a hour and I haven't observed any side effects :-)

By the way, the fonts in browser imho become much better, more contrasty and such...

yabbas 2008-07-06 22:10

Re: libfreetype with bytecode interpreter enabled
 
Don't think we need it as the antialiasing is good already :) but a good hack nontheless!

Any idea on possible performance hits?

coffeedrinker 2008-07-06 23:55

Re: libfreetype with bytecode interpreter enabled
 
Quote:

Originally Posted by qwerty12 (Post 199951)
Hmm, there was already one with bytecode enabled on the itt wiki, but it messed up my terminal (dpad wouldn't work), does this exhibit same behaviour?


change your terminal font

btw, I wrote the wiki :)

anpaza 2008-07-07 10:15

Re: libfreetype with bytecode interpreter enabled
 
Quote:

Originally Posted by yabbas (Post 199979)
Don't think we need it as the antialiasing is good already :)

Try it, you'll see the difference, I promise :-) Dunno if you'll like it, but it's more noticeable than on my screenshots... I used mc because I forgot to make some screenshots before installing it.

Quote:

Originally Posted by yabbas (Post 199979)
Any idea on possible performance hits?

There aren't any noticeable changes in speed, although I *think* (with my limited understanding of freetype) that with bytecode interpreter it should be actually faster. The reason is that if freetype doesn't use the bytecode interpreter, it will use the auto-hinter which has to perform some analysis of every glyph... with bytecode hinting the analysis is performed beforehand by the font designer.

By the way, are there any benchmarks for ITOS? I would be interested to see one...

Here's a animated gif from the Russian internet-tablet forum:

http://xs229.xs.to/xs229/08281/freetype-bci348.gif

You can see that the renderer with bytecode interpreter gives sharper glyphs with less grayscale pixels around. Especially note the font from the URL bar, it seems properly hinted so it gains most from enabled bci. At the same time, you can see the font on titlebar has not changed at all - this is because not all Cyrillic glyphs in Nokia fonts contain proper hints.

pakr 2008-07-07 15:08

Re: libfreetype with bytecode interpreter enabled
 
anpaza, would it be possible to keep the package name consistent with the maemo package? So apt-get would not complain all the time and as soon as a newer version would overwrite your package, one could come here to bug you for an update...

Code:

# apt-get upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  osso-software-version-rx34: Depends: libfreetype6 (= 2.3.5-1osso1) but 2.3.5-1maemo2 is installed
E: Unmet dependencies. Try using -f.


TA-t3 2008-07-07 16:49

Re: libfreetype with bytecode interpreter enabled
 
In my opinion the way dependencies are set for osso-software-version-rx34 is broken. In practice it enforces a frozen installation as far as Nokia-provided packages are concerned (note that it says '=', not '>=', so no no naming convention will fix that problem for this libfreetype6 package, save from using the exact same package/version name and deliberately --reinstall'ing the new package (to overwrite the existing one)).

I can see the reasoning from Nokia's point of view, but in practice it just leads to pain for the end user.

qwerty12 2008-07-07 16:58

Re: libfreetype with bytecode interpreter enabled
 
apt-get install osso-software-version-rx34-unlocked.

Problem solved.

anpaza 2008-07-08 10:43

Re: libfreetype with bytecode interpreter enabled
 
qwert12, thank you for the hint. I'll try to either add osso-software-version-rx34-unlocked as a dependency for libfreetype6, or try to play with the Provides: tag


All times are GMT. The time now is 10:04.

vBulletin® Version 3.8.8