[OpenJDK 2D-Dev] RFR: 8193017: Import freetype sources into OpenJDK source tree

Erik Joelsson erik.joelsson at oracle.com
Fri Mar 9 22:26:37 UTC 2018

Build changes look good.


On 2018-03-09 14:10, Phil Race wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8193017
> Webrev: http://cr.openjdk.java.net/~prr/8193017/index.html
> This fix is will make building openjdk somewhat easier as it removes
> the dependence on an OpenJDK developer on Windows or Mac going
> off and downloading and building freetype source themselves .. or
> using XQuartz on Mac etc.
> It also means it will be somewhat easier for updating official OpenJDK
> builds to use a more modern freetype. The pre-compiled binary is a pain
> inside Oracle too.
> On Linux and Solaris platforms the build will still default to using
> the system installed freetype library. However this can easily be
> over-ridden by adding  a configure parameter : --with-freetype=bundled
> The other valid option being "system" which, is of however never not 
> valid
> on Windows  or Mac. So --with-freetype include is no longer a path.
> The auto-discovery of the location of system library and headers has
> worked for me on Solaris and OEL/RHEL as well as Ubuntu 17.10
> But just in case it doesn't you can also still use
> --with-freetype-include and --with-freetype-lib
> which must both be specified and imply --with-freetype=system
> The docs have been updated to remove discussion of the obsoleted 
> requirements
> Sharp eyes will also notice that it now makes Freetype the preferred 
> rasteriser
> over the closed source T2K, even for Oracle JDK builds :
> http://cr.openjdk.java.net/~prr/8193017/src/java.desktop/share/classes/sun/font/FontScaler.java.sdiff.html 
> Since freetype != t2k there *will* be some very minor rasterization 
> differences.
> Such cases are likely not a bug, but a feature :-)
> Since we previously and now mostly used GDI for LCD text on Windows and
> also generally defer to CoreText on Mac, the importance of the 
> differences
> may not be great.
> But if you see any really bad rendering (I haven't) let me know.
> make/devkit/createMacosxDevkit6.sh is an empty diff  .. I was
> proposing to remove the devkit references to freetype but it was 
> suggested
> to leave that alone for now.
> 99% of the change is simply importing the freetype 2.9 files "as is"
> The UPDATING.txt file provides some background on the import process.
> I have built this every-which-way and tested it too .. it is of course 
> possible
> there's a problem I've missed so try it out yourself if you can.
> -phil.

More information about the 2d-dev mailing list