RFR: 8191758: Match WebKit's font weight rendering with JavaFX
Bhawesh Choudhary
github.com+4208131+bhaweshkc at openjdk.java.net
Tue Apr 21 18:08:09 UTC 2020
On Fri, 17 Apr 2020 18:06:06 GMT, Phil Race <prr at openjdk.org> wrote:
>> Can you add a unit test to go along with this fix?
>
> Per the opentype spec, 700 is bold. 600 is semi-bold
> https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass
>
> CSS agrees : https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
>
> So are you saying webkit has been using bold at a lower weight than these specs suggest ?
> I see the logic all comes from Source/WebCore/platform/graphics/FontSelectionAlgorithm.h
>
> I suppose the existing code thinks that if we have reached what that file calls the bold threshold of 600 then we
> should use bold. It isn't necessarily "wrong" but I think I agree that it is more important to be consistent with the
> rest of Java FX ... which I believe is the point of this change ?
@prrace
yes, webkit is set to use 600 weight where javafx consider 700 weight for it to be consider bold.
https://docs.oracle.com/javafx/2/api/javafx/scene/text/FontWeight.html
-------------
PR: https://git.openjdk.java.net/jfx/pull/180
More information about the openjfx-dev
mailing list