<AWT Dev> RFR: 8269806: Emoji rendering on Linux
Phil Race
prr at openjdk.java.net
Sun Aug 22 23:38:23 UTC 2021
On Thu, 15 Jul 2021 17:29:01 GMT, Nikita Gubarkov <github.com+9004656+YaaZ at 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
I'm in the early stages but
1) It doesn't build on the OL6.4 "official" build environment (note SFAIK the latest info
is still here : https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms)
Maybe there'll be an update for JDK 18 but it hasn't happened yet
src/java.desktop/share/native/libfontmanager/freetypeScaler.c:1193:24: error: 'FT_LOAD_COLOR' undeclared (first use in this function)
renderFlags |= FT_LOAD_COLOR;
^~~~~~~~~~~~~
src/java.desktop/share/native/libfontmanager/freetypeScaler.c:1193:24: note: each undeclared identifier is reported only once for each function it appears in
src/java.desktop/share/native/libfontmanager/freetypeScaler.c:1259:50: error: 'FT_PIXEL_MODE_BGRA' undeclared (first use in this function); did you mean 'FT_PIXEL_MODE_GRAY'?
} else if (ftglyph->bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) {
^~~~~~~~~~~~~~~~~~
FT_PIXEL_MODE_GRAY
At the very least this means you will need to include defines for these if they aren't defined and make sure
that symbols that may be similarly from a later freetype than available on older linuxes are loaded dynamically
and the support skipped where it doesn't exist.
2) I see Xrender code changes but am wondering what happens with the X11 and OpenGL pipelines ?
Errors of some code ? Silently behaves like this new code doesn't exist ?
OK I can partially answer that one - garbage rendering with X11 on Ubuntu 20.04
Looks like you are supplying the BRGA glyphs but no loops to handle it.
This needs to be implemented for X11 and OpenGL
-------------
PR: https://git.openjdk.java.net/jdk/pull/4798
More information about the awt-dev
mailing list