Re: Font rendering issue on macOS - cut off characters

2020-05-26 Thread John Neffenger

On 5/25/20 11:47 AM, Philip Race wrote:

Mmm .. it can't be the same bug even if the effect is similar.
We don't use freetype on macOS, that's for Linux.


Right. I meant the same visible bug (severe color fringes).


Can you check your display's settings ?


I'm using a Dell UltraSharp U2715H 27-inch monitor (2560 × 1440 px at 
109 ppi) on a Mac mini. The monitor's on-screen display shows "Input 
Color Format: RGB".


In any case, so far I've seen these color fringes only in JavaFX 
applications on my Mac.



Isn't everyone seeing it just when they move to catalina ?


The color fringes may have shown up when macOS switched to grayscale 
anti-aliasing in macOS 10.14 Mojave. [1]


Does anyone have two Macs available for testing on both 10.13 High 
Sierra (with subpixel rendering) and 10.15 Catalina (without)?


You might also want to check what color profile is set in System 
settings -> Display -> Color.


That shows DELL U2715H as my active display profile.

John

[1] See the short section on "Font antialiasing refinements" at 28:03 in 
this video from Apple WWDC 2018:

https://developer.apple.com/videos/play/wwdc2018/209/?time=1683


Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread Scott Palmer
> Can anyone say if they definitely see it on a built-in retina display too ?

Yes. It is present on the built-in Retina display on my mid-2015 MacBook Pro 
running Catalina 10.15.5 beta. 

I looked quickly using Java 8.

Scott


> On May 25, 2020, at 2:48 PM, Philip Race  wrote:
> 
> Mmm .. it can't be the same bug even if the effect is similar.
> We don't use freetype on macOS, that's for Linux.
> 
> Can you check your display's settings ?
> 
> https://spin.atomicobject.com/2018/08/24/macbook-pro-external-monitor-display-problem/
> 
> I have a Dell U2412M and it has a menu similar to what he sees and macOS for 
> me defaults to RGB,
> and selecting YPbYr results in a LOT more problems than text because I don't 
> think macOS is
> changing the signal when I do - I am connected via displayport too FWIW but 
> have an old mac (2015)
> and an old OS (10.13.6),
> 
> BTW I found the incident (bug report) and I see it is submitted as an FX 
> regression
> in 14.0.1 when I haven't seen any reason to suggest this is the case.
> Isn't everyone seeing it just when they move to catalina ?
> 
> Can anyone say if they definitely see it on a built-in retina display too ?
> 
> You might also want to check what color profile is set in System settings -> 
> Display -> Color.
> 
> -phil.
> 
> 
>> On 5/25/20, 9:44 AM, John Neffenger wrote:
>>> On 5/24/20 4:27 PM, Rob Nikander wrote:
>>> You can see the shaved “o” characters there, but I’m just talking about the 
>>> colors now. Is that normal?
>> 
>> No. I think it's a bug.
>> 
>> See my comment dated May 20, 2020, on the old GitHub issue that reported the 
>> same bug on Linux in 2018 and was fixed for JavaFX 12.
>> 
>> Yes, it does look as if macOS now has the same problem ...
>> https://github.com/javafxports/openjdk-jfx/issues/229#issuecomment-631797333 
>> 
>> Dirk Lemmermann opened a new bug report, but I don't know the JDK Bug System 
>> number yet. I would like see whether I can come up with a fix, but I can't 
>> say when I'll get to it.
>> 
>> John


Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread John Neffenger

On 5/25/20 1:34 PM, Philip Race wrote:

Hmm. Some of the glyphs are grey scale.


I see that, too. Notice the first "A" in "Animation" is anti-aliased in 
grayscale, yet the other letters use subpixel rendering and result in 
severe color fringes:


https://github.com/javafxports/openjdk-jfx/issues/229#issuecomment-631797333

Also note that the letters seem too close together on macOS compared to 
Windows and Linux.


Unfortunately, I have only macOS 10.15 Catalina now, so I can't see how 
this renders on 10.13 High Sierra before Apple removed subpixel 
rendering for 10.14 Mojave.


John


Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread Philip Race

I completely forgot we had that report.
I think it describes all the same things discussed here.

So it is a catalina issue, not a regression, and it
is retina & non-retina, but the various consequences
are more apparent on non-retina, and only on non-retina
are we seeing the cut-off glyphs.

Hmm. Some of the glyphs are grey scale. I wonder
if all of the glyphs are grey scale but in LCD format and something
unintended is happening during rendering with sub-pixel
positioning ? I think we could inadvertently introduce what
is being seen here if we shifted a greyscale 3x oversampled image.
Or maybe something changed in the way macOS is providing subpixel 
positions, which varies according to font size.

We actually cache glyphs rendered at sub-pixel positions so the
final rendering step likely isn't where the (main) problem is
introduced.

-phil.

On 5/25/20, 12:31 PM, proje...@saring.de wrote:

Sounds like the same bug I've already reported to the OpenJFX project: 
https://bugs.openjdk.java.net/browse/JDK-8236689
It occurred for me the first time after updating to macOS 10.15 / Catalina and 
only on non-retina displays.

Unfortunately there was no progress on this bug yet.

Bye, Stefan


Font rendering issue on macOS - cut off characters

2020-05-25 Thread projects
Sounds like the same bug I've already reported to the OpenJFX project: 
https://bugs.openjdk.java.net/browse/JDK-8236689 

It occurred for me the first time after updating to macOS 10.15 / Catalina and 
only on non-retina displays.

Unfortunately there was no progress on this bug yet.

Bye, Stefan

Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread Philip Race

Mmm .. it can't be the same bug even if the effect is similar.
We don't use freetype on macOS, that's for Linux.

Can you check your display's settings ?

https://spin.atomicobject.com/2018/08/24/macbook-pro-external-monitor-display-problem/

I have a Dell U2412M and it has a menu similar to what he sees and macOS 
for me defaults to RGB,
and selecting YPbYr results in a LOT more problems than text because I 
don't think macOS is
changing the signal when I do - I am connected via displayport too FWIW 
but have an old mac (2015)

and an old OS (10.13.6),

BTW I found the incident (bug report) and I see it is submitted as an FX 
regression

in 14.0.1 when I haven't seen any reason to suggest this is the case.
Isn't everyone seeing it just when they move to catalina ?

Can anyone say if they definitely see it on a built-in retina display too ?

You might also want to check what color profile is set in System 
settings -> Display -> Color.


-phil.


On 5/25/20, 9:44 AM, John Neffenger wrote:

On 5/24/20 4:27 PM, Rob Nikander wrote:
You can see the shaved “o” characters there, but I’m just talking 
about the colors now. Is that normal?


No. I think it's a bug.

See my comment dated May 20, 2020, on the old GitHub issue that 
reported the same bug on Linux in 2018 and was fixed for JavaFX 12.


Yes, it does look as if macOS now has the same problem ...
https://github.com/javafxports/openjdk-jfx/issues/229#issuecomment-631797333 



Dirk Lemmermann opened a new bug report, but I don't know the JDK Bug 
System number yet. I would like see whether I can come up with a fix, 
but I can't say when I'll get to it.


John


Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread Rob Nikander
Thanks. Maybe I should I file another bug report for the shaved off “o” 
characters?

Rob

> On May 25, 2020, at 11:44 AM, John Neffenger  wrote:
> 
> On 5/24/20 4:27 PM, Rob Nikander wrote:
>> You can see the shaved “o” characters there, but I’m just talking about the 
>> colors now. Is that normal?
> 
> No. I think it's a bug.
> 
> See my comment dated May 20, 2020, on the old GitHub issue that reported the 
> same bug on Linux in 2018 and was fixed for JavaFX 12.
> 
> Yes, it does look as if macOS now has the same problem ...
> https://github.com/javafxports/openjdk-jfx/issues/229#issuecomment-631797333
> 
> Dirk Lemmermann opened a new bug report, but I don't know the JDK Bug System 
> number yet. I would like see whether I can come up with a fix, but I can't 
> say when I'll get to it.
> 
> John



Re: Font rendering issue on macOS - cut off characters

2020-05-25 Thread John Neffenger

On 5/24/20 4:27 PM, Rob Nikander wrote:

You can see the shaved “o” characters there, but I’m just talking about the 
colors now. Is that normal?


No. I think it's a bug.

See my comment dated May 20, 2020, on the old GitHub issue that reported 
the same bug on Linux in 2018 and was fixed for JavaFX 12.


Yes, it does look as if macOS now has the same problem ...
https://github.com/javafxports/openjdk-jfx/issues/229#issuecomment-631797333

Dirk Lemmermann opened a new bug report, but I don't know the JDK Bug 
System number yet. I would like see whether I can come up with a fix, 
but I can't say when I'll get to it.


John


Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Phil Race
PS the spacing is very uneven. That does not look right.

-Phil.

> On May 24, 2020, at 5:16 PM, Phil Race  wrote:
> 
> That looks normal.
> 
> -Phil.
> 
>> On May 24, 2020, at 4:27 PM, Rob Nikander  wrote:
>> 
>> 
>> 
>>> On May 24, 2020, at 5:46 PM, Philip Race  wrote:
>>> 
>>> That's likely LCD sub-pixel text. Its normal to see it if you squint. Not 
>>> new.
>> 
>> I’m doubting that this is normal, but let me try to share a few screenshots 
>> so we can be sure. (All pasted into one PNG for easy comparison):
>> 
>> https://drive.google.com/file/d/1pHtehqm8AP0H_dkV3NdczRdqNSA5gq2o/view?usp=sharing
>> 
>> (I hope that if you view those on a retina display, you will still see the 
>> blockier appearance of my non-retina laptop screen. )
>> 
>> You can see the shaved “o” characters there, but I’m just talking about the 
>> colors now. Is that normal? To me the JavaFX text looks significantly worse 
>> than the native app text [1]. In the native app, I don’t see any color, even 
>> looking real close. The JavaFX seems like it went overboard on something. 
>> 
>> Rob
>> 
>> [1] It’s a screenshot from Pages, but they all look the same.
>> 
>>> macOS has been moving away from it but people with non-retina displays have 
>>> lamented its passing.
>>> 
>>> https://osxdaily.com/2018/09/26/fix-blurry-thin-fonts-text-macos-mojave/
>>> 
>>> FX still requests LCD tho'. Although it is not clear how long macOS will 
>>> continue to provide it.
>> 


Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Phil Race
That looks normal.

-Phil.

> On May 24, 2020, at 4:27 PM, Rob Nikander  wrote:
> 
> 
> 
>> On May 24, 2020, at 5:46 PM, Philip Race  wrote:
>> 
>> That's likely LCD sub-pixel text. Its normal to see it if you squint. Not 
>> new.
> 
> I’m doubting that this is normal, but let me try to share a few screenshots 
> so we can be sure. (All pasted into one PNG for easy comparison):
> 
> https://drive.google.com/file/d/1pHtehqm8AP0H_dkV3NdczRdqNSA5gq2o/view?usp=sharing
> 
> (I hope that if you view those on a retina display, you will still see the 
> blockier appearance of my non-retina laptop screen. )
> 
> You can see the shaved “o” characters there, but I’m just talking about the 
> colors now. Is that normal? To me the JavaFX text looks significantly worse 
> than the native app text [1]. In the native app, I don’t see any color, even 
> looking real close. The JavaFX seems like it went overboard on something. 
> 
> Rob
> 
> [1] It’s a screenshot from Pages, but they all look the same.
> 
>> macOS has been moving away from it but people with non-retina displays have 
>> lamented its passing.
>> 
>> https://osxdaily.com/2018/09/26/fix-blurry-thin-fonts-text-macos-mojave/
>> 
>> FX still requests LCD tho'. Although it is not clear how long macOS will 
>> continue to provide it.
> 


Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Rob Nikander



> On May 24, 2020, at 5:46 PM, Philip Race  wrote:
> 
> That's likely LCD sub-pixel text. Its normal to see it if you squint. Not new.

I’m doubting that this is normal, but let me try to share a few screenshots so 
we can be sure. (All pasted into one PNG for easy comparison):

https://drive.google.com/file/d/1pHtehqm8AP0H_dkV3NdczRdqNSA5gq2o/view?usp=sharing
 


(I hope that if you view those on a retina display, you will still see the 
blockier appearance of my non-retina laptop screen. )

You can see the shaved “o” characters there, but I’m just talking about the 
colors now. Is that normal? To me the JavaFX text looks significantly worse 
than the native app text [1]. In the native app, I don’t see any color, even 
looking real close. The JavaFX seems like it went overboard on something. 

Rob

[1] It’s a screenshot from Pages, but they all look the same.

> macOS has been moving away from it but people with non-retina displays have 
> lamented its passing.
> 
> https://osxdaily.com/2018/09/26/fix-blurry-thin-fonts-text-macos-mojave/ 
> 
> 
> FX still requests LCD tho'. Although it is not clear how long macOS will 
> continue to provide it.



Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Philip Race




On 5/24/20, 3:25 PM, Rob Nikander wrote:



On May 24, 2020, at 4:47 PM, Philip Race  wrote:

Should I understand 10.15.4 is the only version of macOS you've tried ?
Not some earlier version of Catalina for example ?

Yes, it’s all I’ve tried.


As to the cause ? I can only speculate. Rounding error in the bitmap size ?
Being over-written by the next glyph (d) - possibly due to some rounding issue 
again ?

If you display just "ao" does it all render ?
That might point to being over-written.

Yes, the “d” appears to be overwriting it. I put the following in a Label: "o 
od o od o od, o od o od o od”. The isolated “o”s are fine, but 4 of 6 of the “o”s 
next to the “d”s are shaved off.

Does JavaFX have its own text rendering engine? It’s not deferring to CoreText 
on macOS?


core text generates all glyph image and all information about it.
But FX uses its own OpenGL code to render the provided glyphs.



The text render seems to have other problems compared to native apps. There is 
a barely-visible color in anti-aliased pixels. It’s so faint I can barely see 
it, but it gives me an unpleasant feeling,


That's likely LCD sub-pixel text. Its normal to see it if you squint. 
Not new.
macOS has been moving away from it but people with non-retina displays 
have lamented its passing.


https://osxdaily.com/2018/09/26/fix-blurry-thin-fonts-text-macos-mojave/

FX still requests LCD tho'. Although it is not clear how long macOS will 
continue to provide it.


-phil.


  like my eyes are having trouble focusing. The macOS has a utility program 
called Digital Color Meter, which lets you see zoomed pixels of the screen. 
Using that, I can see clearly see that while native black on white text is 
black with anti-aliased pixels appearing some shade of gray, as you’d expect; 
the JavaFX black-on-white text has non gray colors in the anti-aliased pixels.

I thought high res screens still used anti-aliasing for text. (?) I wonder if 
this is a fainter problem on retina screens as well. I have no way of checking 
at the moment.

Rob



Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Rob Nikander



> On May 24, 2020, at 4:47 PM, Philip Race  wrote:
> 
> Should I understand 10.15.4 is the only version of macOS you've tried ?
> Not some earlier version of Catalina for example ?

Yes, it’s all I’ve tried. 

> As to the cause ? I can only speculate. Rounding error in the bitmap size ?
> Being over-written by the next glyph (d) - possibly due to some rounding 
> issue again ?
> 
> If you display just "ao" does it all render ?
> That might point to being over-written.

Yes, the “d” appears to be overwriting it. I put the following in a Label: "o 
od o od o od, o od o od o od”. The isolated “o”s are fine, but 4 of 6 of the 
“o”s next to the “d”s are shaved off. 

Does JavaFX have its own text rendering engine? It’s not deferring to CoreText 
on macOS? 

The text render seems to have other problems compared to native apps. There is 
a barely-visible color in anti-aliased pixels. It’s so faint I can barely see 
it, but it gives me an unpleasant feeling, like my eyes are having trouble 
focusing. The macOS has a utility program called Digital Color Meter, which 
lets you see zoomed pixels of the screen. Using that, I can see clearly see 
that while native black on white text is black with anti-aliased pixels 
appearing some shade of gray, as you’d expect; the JavaFX black-on-white text 
has non gray colors in the anti-aliased pixels. 

I thought high res screens still used anti-aliasing for text. (?) I wonder if 
this is a fainter problem on retina screens as well. I have no way of checking 
at the moment.

Rob



Re: Font rendering issue on macOS - cut off characters

2020-05-24 Thread Philip Race

Should I understand 10.15.4 is the only version of macOS you've tried ?
Not some earlier version of Catalina for example ?

Folks *mostly* use retina so it is possible that if it is somewhat 
recently introduced it is specific to non-retina.


As to the cause ? I can only speculate. Rounding error in the bitmap size ?
Being over-written by the next glyph (d) - possibly due to some rounding 
issue again ?


If you display just "ao" does it all render ?
That might point to being over-written.

-phil.

On 5/24/20, 12:28 PM, Rob Nikander wrote:

Hello all,

I just started experimenting with JavaFX and I notice a font rendering problem 
on macOS Catalina 10.15.4, an older (2012) MacBook Pro that does not have a 
“retina” display. As an example, if I create a `Label` with the default font 
and the text “aod”, then the “o” character looks like a “c”. The right side of 
the character is shaved off. Anyone know what is causing this and how to fix it?

Rob


Font rendering issue on macOS - cut off characters

2020-05-24 Thread Rob Nikander
Hello all,

I just started experimenting with JavaFX and I notice a font rendering problem 
on macOS Catalina 10.15.4, an older (2012) MacBook Pro that does not have a 
“retina” display. As an example, if I create a `Label` with the default font 
and the text “aod”, then the “o” character looks like a “c”. The right side of 
the character is shaved off. Anyone know what is causing this and how to fix it?

Rob