freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Glyph translucency


From: Stanislav Baiduzhyi
Subject: [ft] Glyph translucency
Date: Tue, 11 Nov 2014 14:27:05 +0100

Hi All,

I've noticed interesting behaviour in Qt5 which I cannot reproduce using freetype directly. Could anyone tell me how to achieve this? Here are the screenshots:
https://drive.google.com/open?id=0B5Kp-cB1sXJrTGJCTWE1VEQzM1U&authuser=0

Top is Qt4, bottom is Qt5, both are using enabled subpixel rendering, default LCD filter, slight hinting.

Also, here is minimal app that uses freetype directly, I'm using it to learn and experiment with freetype API:
https://github.com/Helbrass/openjdk-fontfix/tree/master/demo/freetype

And this small app renders fonts identical to Qt4, and I wasn't able to modify it to render similar to Qt5 no matter what I changed.

I'm pretty sure that's freetype rendering and not Qt because I've intercepted and printed slot->bitmap.buffer image right after FT_Render_Glyph invocation. Please see the hex output below.

What I've tried so far:

1. FT_Load_Glyph, arguments are the same between Qt4 and Qt5 and test app.
2. FT_Set_Transform, copied arguments from Qt5 to test app.
3. FT_Library_SetLcdFilter, everyone is using FT_LCD_FILTER_DEFAULT, but I've tried all of them, others are really different and that screenshot is definitely default.
4. FT_Render_Glyph, not much to try there, LCD rendering has to be used.

I'm out of ideas, if anyone can give me some ideas or suggestions what can I do with freetype to repliate the Qt5 rendering - please tell me. I've been trying to ask the same question on Qt devel mailing lists, but no one was able to answer me.


===== Qt4, letter 'T' image buffer in hex:

0  7 2a 79 c7 eb f2 f2 f3 f8 ff ff ff ff f7 f3 f2 f2 e8 bb 63 1e  4  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  b 3c 9e e4 d9 85 2e  7  0  0  0  0  0  0  0  0  0


===== Qt5, letter 'T' image buffer in hex:

0  6 28 74 c4 ea f2 f2 f3 f8 ff ff ff ff f7 f3 f2 f2 e8 bd 67 20  4  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  a 39 99 e1 db 8b 31  8  0  0  0  0  0  0  0  0  0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]