[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] a confusing problem when using FT_Library_SetLcdFilterWeights()
Re: [ft] a confusing problem when using FT_Library_SetLcdFilterWeights();
Sun, 29 Apr 2018 00:55:12 -0500
On Fri, Apr 27, 2018 at 8:41 AM, 哈尔滨工程大学 朱国梁 <address@hidden> wrote:
> Dear freetype,
> I am a chinese programmer. I want to output text on OpenGLES with
> freetype(C++). What's more, I want to use that class (C++) in our
> production.It' s handle frequency spectrum analyzer. But now I an confused
> about a problem. I set the subpixel choice before building lib and my display
> is LCD display.
> Firstly, I write a small demo in our WindowCE7.0 platform and it works
> correctly. I use the LCD filter like this.
> FT_Library_SetLcdFilter(library, FT_LCD_FILTER_LIGHT);
> unsignerd char weight = 0x55;
> FT_Library_SetLcdFilterWeights(library, &weight);
> The result is picture1.
> However, When I add the Class to our spectrum analyzer, it seems not
> working correctly. The result is picture2. It seem like more darker than
> picture1. When I set the weight = 0x00, the text dispeared. But When I set
> backgroud to other color, I can see the very dark font.So I think it is just
> more darker than weight = 0x55. The result is picture3. But when I remove the
> sentence FT_Library_SetLcdFilterWeights(library, weight), I can get whiter
> font. The result is picture4.So Maybe there is something wrong about the
> FT_Library_SetLcdFilterWeights. The picture4 is less clear than the picture1,
> So I still want to use the FT_Library_SetLcdFilterWeights.
> Could you give me some suggestion?
I forget if I mentioned this in your last post, but all of the
pictures seem readable. With picture 1 and picture 2 the main
difference is that it looks like antialiasing is enabled. Why do you
not like picture 4? The text in the center looks most like the text at
Can you post the results of:
1) Disabling antialiasing;
2) Disabling greyscale output, and using 1bit output; and
3) disabling antialiasing and greyscale output?
I suspect #2 will give the crispest glyphs, but I may be wrong. The
glyphs in your 2nd picture look thin because the antialiasing
algorithm seems to thin the glyphs described in the font (the outsides
are greyscale, and dim). If you threshold the pixels in that glyph
towards 255 I suspect they will look how you expect.
E.g. take all pixels > 10 intensity and make them 255 intensity. But,
doing #2 may do this completely inside FreeType's engine.
I'm not sure how much design input you have with your company, but
consider suggesting that you make devices that have no screen
themselves, but have high speed interfaces, preferably Ethernet or
fiber, to a PC. See https://www.picotech.com/products/oscilloscope for
On Sat, Apr 28, 2018 at 11:49 PM, Werner LEMBERG <address@hidden> wrote:
>> I am a chinese programmer. I want to output text on OpenGLES with
>> freetype(C++). What's more, I want to use that class (C++) in our
>> production. It's handle frequency spectrum analyzer. But now I an
>> confused about a problem. I set the subpixel choice before building
>> lib and my display is LCD display.
>> Firstly, I write a small demo in our WindowCE7.0 platform and it
>> works correctly. I use the LCD filter like this.
>> FT_Library_SetLcdFilter(library, FT_LCD_FILTER_LIGHT);
>> unsigned char weight = 0x55;
>> FT_Library_SetLcdFilterWeights(library, &weight);
>> The result is picture1.
> Unfortunately, such hand-held camera snapshots are not very helpful in
> analyzing your problem. Can't you simply press the `PrtScr' button to
> get real screen snapshots that you can further process to get PNG
He mentioned the problem manifests on a spectrum analyzer. He may not
have a good way to obtain a screenshot. I suggest he get one.
However, part of the issue looks to be the screen he is using on the
spectrum analyzer. Deeper blacks and smaller pixel size would help.
This may not be cost effective for the analyzer or easy to source,
which is why I made the recommendation above. Oddly in picture 1 the
screen looks fine.
>> However, when I add the Class to our spectrum analyzer, it seems not
>> working correctly. The result is picture2. It seem like more
>> darker than picture1. [...]
> I doubt that such an issue happens on your WindowCE platform only.
> Please compile your program on standard Windows, say, and check
> whether you have the same issues – and maybe this enables you to get
> real screendumps...
> I also suggest that you play around with the `ftview' demo program
> (which allows full control over LCD weights), also checking its source
Some antialiasing options seem to thin the glyphs, making them faint.
I think this is what the OP does not like. Can you comment on this?
I have seen his problem before and may have mentioned it. He should
turn off antialiasing and, ideally, be using bitmapped fonts. Windows
itself uses bitmapped fonts. Many technically aware Linux users used
bitmapped fonts. It looks better at small sizes, especially on
1366x768 screens and screens with similar DPI.