Issue 111547 - Subpixel positioning for better font rendering in WYSIWYG mode
Summary: Subpixel positioning for better font rendering in WYSIWYG mode
Alias: None
Product: Writer
Classification: Application
Component: viewing (show other issues)
Version: OOo 3.2
Hardware: Unknown All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on: 108684
  Show dependency tree
Reported: 2010-05-12 04:28 UTC by loonyphoenix
Modified: 2017-05-20 11:33 UTC (History)
1 user (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description loonyphoenix 2010-05-12 04:28:40 UTC
I have recently come across a great article about font rasterization:

And I'm wondering why doesn't use that algorithm to display fonts 
in the Print Layout mode. Currently, Openoffice seems to use variable distance 
between characters to fit the pixel grid, which doesn't look good:

Instead, horizontal hinting and pixel alignment could be disabled altogether, 
utilizing subpixel rendering to achieve three times the screen resolution in 
that direction. The article goes into great depths as to why a small resulting 
fuzziness is a small price to pay for all the benefits it could bring.

I'm going to provide several examples on what this would mean for those who are 
unwilling to read the lengthy article (though I highly recommend it).

Smooth scaling:
Legible small fonts:
Exact positioning (smooth font shift by 3 pixels in 30 steps):
Fancy effects without bluriness:

I think that is pretty impressive. And it is possible with modern technology; a 
sample program, written three years ago, which demonstrates the abilities of the 
algorithm, is located here:

It's a Windows application, but it can be compiled for Linux, too. And it runs 
fine in Wine.

So, once again, what benefits this algorithm would provide:

"1. You can kern symbols with sub-pixel precision, not worrying about 
introducing extra blurriness.
2. You can freely scale the text as you want, with 100% guarantee of preserving 
a stable text layout that always fits other graphic elements.
3. You can always be sure that the calculated text width exactly corresponds 
with what you will see on screen and paper.
4. You can apply fancy vector effects such as "faux bold" and "faux italic" 
being sure the text will not look any blurrier."

What needs to be done to achieve that:

"1. Use horizontal RGB sub-pixel anti-aliasing for LCD flat panels.
2. Use vertical hinting only and completely discard the horizontal one.
3. Use accurate glyph advance values, calculated at a high resolution for 
unhinted glyphs.
4. Use accurate, high resolution values from the kerning table."

I have asked in the freetype mailing list, and it seems that all the building 
blocks needed for this to work have been around long ago, it's just that toolkit 
or end-user application uses it yet:

Thanks for your attention.
Comment 1 2010-05-12 08:02:02 UTC
Subpixel positioning and display are good ideas indeed. The way WriterEngine and EditEngine think about 
this somewhat hinders that, aka issue 108684.
Comment 2 2010-05-12 08:02:44 UTC
Comment 3 Marcus 2017-05-20 11:33:21 UTC
Reset assigne to the default "".