FORUMS
Remove All Ads from XDA

[Q] Is there a way to DISABLE font smoothing?

18 posts
Thanks Meter: 1
 
By sarge425, Junior Member on 9th September 2011, 08:46 PM
Post Reply Email Thread
Archos 101 has a problem that all the fonts are blurred, including text in 3-rd party apps. It looks just awfull. On windows I have an option to turn that off. Loking for some method to do the same on Android.
 
 
9th September 2011, 09:08 PM |#2  
Lenn's Avatar
Senior Member
Flag Lippstadt
Thanks Meter: 174
 
More
There are many apps for font changing
but you need root your device for this

Maybe there is an option like this in that apps, just try it
10th September 2011, 04:42 AM |#3  
Senior Member
Thanks Meter: 357
 
Donate to Me
More
One could recompile the skia library.
10th September 2011, 03:00 PM |#4  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by arpruss

One could recompile the skia library.

Can that library be relpaced in current Android installation without rewriting full Android image?
10th September 2011, 03:24 PM |#5  
Senior Member
Thanks Meter: 357
 
Donate to Me
More
Quote:
Originally Posted by sarge425

Can that library be relpaced in current Android installation without rewriting full Android image?

I would think so, unless Archos has customized the stock library and the 2.2 source code doesn't match it. I'll try a recompile and see what happens.
10th September 2011, 03:43 PM |#6  
OP Junior Member
Thanks Meter: 1
 
More
That sounds interesting...
Looking into sourcecode of AOS, i noticed that "freetype" library included too. May be it involved in font decoding?
10th September 2011, 07:12 PM |#7  
Senior Member
Thanks Meter: 357
 
Donate to Me
More
I compiled libskia from the 2.2 sources, making only one change (enable bytecode interpreter in FreeType). Zygote doesn't start up.

Maybe Archos has made some modifications to the stock code.

It might also be worth checking if FreeType reads some config files. Normally, FreeType works with fontconfig, and fontconfig has some configuration files.
The Following User Says Thank You to arpruss For This Useful Post: [ View ] Gift arpruss Ad-Free
11th September 2011, 11:38 AM |#8  
OP Junior Member
Thanks Meter: 1
 
More
I found exact places where text rendering is done. It is in file trunk/src/ports/SkFontHost_FreeType.cpp
Most work done via calls to freetype library, however some "subpixel rendering" attempts can be noticed in the source.
11th September 2011, 03:18 PM |#9  
Senior Member
Thanks Meter: 357
 
Donate to Me
More
Quote:
Originally Posted by sarge425

I found exact places where text rendering is done. It is in file trunk/src/ports/SkFontHost_FreeType.cpp
Most work done via calls to freetype library, however some "subpixel rendering" attempts can be noticed in the source.

Right. I don't think the subpixel rendering is currently implemented. People say that subpixel rendering doesn't work vertically, and these tablets are often used vertically. I couldn't find anywhere in the code where the font code would have access to the current screen orientation, which would be crucial to subpixel rendering.

In any case, it would be easy to disable all antialiasing, in SkFontHost or in FreeType (libskia.so includes FreeType, I think--at least there is no separate libfreetype or libft2 or the like on the device). But since I can't get Android to start up on my archos when I install my compile of libskia.so, that's moot.

By the way, did you notice that the skia library includes PDF rendering? One could make a very lightweight pdf viewer if one hooked into that (but it might stop working with a new release of the skia library, since this isn't an official Android API).
11th September 2011, 03:42 PM |#10  
OP Junior Member
Thanks Meter: 1
 
More
Things seems to be more simple. In the file SkFontHost_FreeType.cpp I found a string "FT_Render_Glyph(fFace->glyph, FT_RENDER_MODE_LCD);" and some text down. According to FreeType2 docs, parameter FT_RENDER_MODE_LCD is used for subpixel lcd rendering, and FT_RENDER_MODE_NONE means 1-bit mode (anti-aliasing off).

Another problem is that freetype uses subpixel glypth positioning, which not good.
11th September 2011, 04:12 PM |#11  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by arpruss

I couldn't find anywhere in the code where the font code would have access to the current screen orientation

I found that place in SkScalerContext_FreeType constructor.

Btw, inability to replace libskia is really bad. I have only remaining way to binary patch that lib
Post Reply Subscribe to Thread

Tags
antialiasing, font

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes