I don’t see how hinting issues can cause this degree of character misplacement. 
This looks more like, say, a glyph cache bug.

I had no problem reproducing this with the software pipeline. When I force the 
GPU I get much better results (prism.forceGPU=true). In both cases the text is 
a little on the fuzzy side but the es2 pipeline is placing the glyphs correctly.

> On Aug 4, 2024, at 9:09 PM, quizynox <quizy...@gmail.com> wrote:
> 
> Hello,
> 
> Thanks for the answer. I've found a couple of very long but very informative 
> threads that have given me some pointers.
> 
> Poor quality font rendering
> https://mail.openjdk.org/pipermail/openjfx-dev/2013-August/009958.html
> 
> The crisp fonts saga
> https://mail.openjdk.org/pipermail/openjfx-dev/2023-December/044234.html
> 
> In my case there were two problems:
> 
> - I had SceneAntialiasing enabled, which seems to prevent 
> -fx-smoothing-type=lcd from working
> - I forgot that -fx-smoothing-type is only enabled for .text nodes, but not 
> for all Text nodes by default
> 
> I also assumed that Linux fontconfig settings would have some effect on 
> JavaFX font rendering, but judging from tests this isn't the case. Perhaps 
> the only thing that matters is freetype compilation flags. I've found that 
> Fedora enabled ClearType font rendering some time ago 
> (https://www.phoronix.com/news/Fedora-ClearType-Subpixel-Font).
> 
> As for -fx-smooth-type=gray, with some fonts such as Open Sans, Liberation 
> Sans or Montserrat it may look quite close to acceptable.
> 
> вс, 4 авг. 2024 г. в 01:41, Philip Race <philip.r...@oracle.com 
> <mailto:philip.r...@oracle.com>>:
>> There's not many knobs available. Hinting is not enabled - and that's 
>> commonly the case on modern plartforms.
>> LCD is your best option for readibility of static text, which is why it 
>> is the default for UI Controls,
>> It should reduce the pixel grid fitting uneveness you highlight but 
>> doesn't eliminate it.
>> Note : this presumes that the freetype on your system enables LCD .. if 
>> it doesn't there's nothing FX can do about that.
>> 
>> -phil.
>> 
>> 
>> On 8/2/24 10:43 AM, quizy...@gmail.com <mailto:quizy...@gmail.com> wrote:
>> > Hello,
>> >
>> > Sorry for asking here, but I seem to have tried everything I could 
>> > find on SO/Reddit/JBS etc. Could someone please share what font 
>> > settings I should be using to get decent font hinting on Linux? Please 
>> > see the screenshot.
>> >
>> > https://drive.google.com/file/d/1gXYXzbcq4cHmZpza20yQJHfs0pMbgiZa/view
>> >
>> > I'm not very picky, but the font I see is just not suitable for 
>> > presenting app to customers. I've tried enabling and disabling hinting 
>> > and autohinting, using different hinting styles, changing the font 
>> > smoothing type and prism.lcdtext etc. Unfortunately no matter what I 
>> > do, the font hinting is always bad.
>> >
>> > Fedora, KDE, all latest versions.
>> >
>> 

Reply via email to