[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 8269806: Emoji rendering on Linux [v4]
From:       Nikita Gubarkov <duke () openjdk ! org>
Date:       2022-06-25 1:16:43
Message-ID: 9J2uqNgaQjlG3n98vm__aFcASjJi6uATbjjSHxI7dwA=.ba191d67-740f-4afd-a654-03f471e23bb3 () github ! com
[Download RAW message or body]

On Sat, 25 Jun 2022 01:11:59 GMT, Nikita Gubarkov <duke@openjdk.org> wrote:

> > It was implemented in JetBrains Runtime a year ago and was ported & refactored \
> > for this PR It includes:
> > - Bitmap glyph loading via Freetype
> > - Manual scaling & transformation of bitmap glyphs with nearest-neighbor or \
> >                 bilinear-mipmap style algorithms depending on the text \
> >                 antialiasing hint
> > - Storing BGRA glyphs in glyph cache & rendering them as plain images, as \
> >                 currently used XRender text drawing functions doesn't support \
> >                 colored glyphs
> > - Small fixes in related code like null-checks which could cause NPE & comment \
> > typos
> 
> Nikita Gubarkov has updated the pull request incrementally with two additional \
> commits since the last revision: 
> - 8269806: Fix rendering of colored glyphs on big font sizes
> 
> When using OutlineTextRenderer, fallback to GlyphListPipe for glyphs which doesn't \
>                 have outlines.
> - 8269806: Fix glyph advance rounding with FM=OFF

src/java.desktop/share/classes/sun/java2d/pipe/OutlineTextRenderer.java line 75:

> 73:     public void drawString(SunGraphics2D g2d, String str, double x, double y) {
> 74: 
> 75:         StandardGlyphVector sgv = new StandardGlyphVector(g2d.getFont(), str, \
> g2d.getFontRenderContext());

I started using `GlyphVector` instead of `TextLayout` because it gives more \
consistent look for animated text. For example, earlier text which has ligatures \
rendered with `drawString` was drawn with ligatures on `OutlineTextRenderer` and \
without on `GlyphListPipe`, which caused artifacts when text size crosses 100 \
threshold.

-------------

PR: https://git.openjdk.org/jdk/pull/4798


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic