<div dir="auto">Hi Mark,</div><div dir="auto"><br></div><div dir="auto">maybe you should start a new thread with your proposed API and a quick summary of the problems that it solves.</div><div dir="auto"><br></div><div dir="auto">OpenJFX is a community effort after all, so let’s see whether we can get your proposal accepted.</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Mark Raynsford <<a href="mailto:org.openjdk@io7m.com">org.openjdk@io7m.com</a>> schrieb am Fr. 15. Dez. 2023 um 23:21:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On Fri, 2023-12-15 at 13:40 -0800, Philip Race wrote:<br>
> I already gave a brief explanation of why FX text rendering is what<br>
> it is.<br>
> I will expand on it a bit but a number of the salient points have <br>
> already been made by others.<br>
> It is unlikely we will make anything other than carefully considered <br>
> tweaks, so this is by way of explanation.<br>
<br>
I'm actually not even asking to change the defaults. The dictated-from-<br>
above defaults are the problem. I am inevitably going to fork JavaFX<br>
and maintain a patched version even if the changes won't be accepted<br>
upstream. These are the changes I intend to make:<br>
<br>
1. Add an -fx-font-bitmaps CSS attribute that, by default, will be<br>
set to false. Setting this value to true will cause bitmap<br>
information to be loaded if present, and ignored otherwise.<br>
<br>
2. Add an -fx-font-hinting CSS attribute that, by default, will be<br>
set to false. Setting this value to true will enable hinting<br>
using whatever is the default (in other words, not setting<br>
FT_LOAD_NO_HINTING).<br>
<br>
3. Add an extra value to -fx-font-smoothing: none. Setting this<br>
will use FT_LOAD_TARGET_MONO and disable effectively disable <br>
antialiasing. This is important for my users for small-text <br>
console components.<br>
<br>
I'm just tired of my applications looking like optical migraines when<br>
everyone else on the planet (including the UI library in the JDK<br>
itself) manages to look better, regardless of the apparent technical<br>
consequences for frankly niche cases.<br>
<br>
> Some people absolutely insist that being true to the design is what <br>
> is most important<br>
> A high contrast is the most important to someone else.<br>
> No jaggies is important to another person.<br>
> Hinting is essential to some people in some cases. To other people it<br>
> is anathema. etc, etc.<br>
<br>
And by disallowing developers to change the behaviour in any way,<br>
you're deciding this for them. You're effectively pleasing the smallest<br>
set of people possible.<br>
<br>
> And then on top of that hinting is not even designed to be used in<br>
> such rotated cases.<br>
<br>
So we must all pay for ugly text because someone somewhere wants to<br>
spin text around, and we don't get to opt-out.<br>
<br>
> And as the Amble case points out, you are dependent on the quality of<br>
> the hinting which is very expensive. Poor hinting is worse than none.<br>
<br>
So JavaFX, which has no idea which fonts I'm bundling, is clearly more<br>
qualified than I am to decide whether I want hinting or not.<br>
<br>
> And animations using text - not common in Swing, but central to FX -<br>
> are very jerky if you use hinting.<br>
<br>
It's almost as if there's some kind of design flaw, and a ton of work<br>
to maintain a feature that I've yet to see anyone actually say that<br>
they care about. Take a look at any modern 3D rendering engine with UI<br>
support, and you won't see these issues, and they not only perform<br>
scaling and rotation but frequently perspective projection onto 3D<br>
surfaces.<br>
<br>
> And "bitmaps" in a font are extremely rare.<br>
<br>
Maybe in the fonts you use. "Extremely rare" is entirely subjective;<br>
there's an entire field of programmer fonts that use carefully tuned<br>
bitmaps to stay sharp. Guess we're just not allowed to use those<br>
either, because JavaFX says so.<br>
<br>
> LCD text also doesn't work well with rotations because the 3X <br>
> resolution you get is only in one orientation.<br>
<br>
On that we agree. I have no interest in LCD text on any platform.<br>
<br>
Guess I'll get working on the fork.<br>
<br>
-- <br>
Mark Raynsford | <a href="https://www.io7m.com" rel="noreferrer" target="_blank">https://www.io7m.com</a><br>
<br>
</blockquote></div></div>