<div><div style="line-height: 21px;">Hi Dalibor,</div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;">Actually this time I download OpenJDK source code and build it myself, but I still met this issue. I wonder why font files in jre/lib/fonts folder impact openjre.</div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;">Here is a brief of this problem, I try to decribe it clearly.</div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;">I build OpenJDK, and copy j2re-image to my folder such as /home/rong/jre, and use this jre to run my java applicaton. In further study I have found following codes, fm will have wrong value as long as jre/lib/fonts has font files (some ttf files).</div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;"><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">   </span>        BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">       </span>        Graphics2D g2 = image.createGraphics();</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">      </span>        FontMetrics fm = g2.getFontMetrics();</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">But if I moved these font files into /usr/share/fonts folder, the problems goes away. I'm not sure why these font files impact open jre run time.</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">I don't think this problem is related to centos.</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">BTW, I have installed freetype and fontconfig package.</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div></div><div style="line-height: 21px;">Regards,</div><div style="line-height: 21px;">Rong</div></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "dalibor topic";<dalibor.topic@oracle.com>;</div><div><b>Date: </b> Fri, May 20, 2016 08:33 PM</div><div><b>To: </b> "awt-dev"<awt-dev@openjdk.java.net>; <wbr></div><div></div><div><b>Subject: </b> Re: <AWT Dev> An issue of OpenJRE</div></div><div><br></div>On 20.05.2016 10:45, 31731705 wrote:<br>><br>> Can someboday tell me the differences<br><br>If you have encountered problems with binaries provided by CentOS, <br>you'll need to contact CentOS for support.<br><br>cheers,<br>dalibor topic<br>-- <br><http://www.oracle.com> Dalibor Topic | Principal Product Manager<br>Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961<br><tel:+491737185961><br><br>ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg<br><br>ORACLE Deutschland B.V. & Co. KG<br>Hauptverwaltung: Riesstr. 25, D-80992 München<br>Registergericht: Amtsgericht München, HRA 95603<br><br>Komplementärin: ORACLE Deutschland Verwaltung B.V.<br>Hertogswetering 163/167, 3543 AS Utrecht, Niederlande<br>Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<br>Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher<br><br><http://www.oracle.com/commitment> Oracle is committed to developing<br>practices and products that help protect the environment</div>