[OpenJDK 2D-Dev] RFR: 8255387: Japanese characters were printed upside down on AIX [v3]

Toshio Nakamura tnakamura at openjdk.java.net
Tue Dec 1 09:00:00 UTC 2020


On Thu, 19 Nov 2020 18:40:55 GMT, Phil Race <prr at openjdk.org> wrote:

>> Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Checking horizontal mirror case
>
> test/jdk/java/awt/print/PrinterJob/PrintTranslateTest.java line 27:
> 
>> 25:  * @test PrintTranslateTest
>> 26:  * @bug 8255387
>> 27:  * @summary Vertial mirrored characters should be drawn correctly
> 
> Vertial -> Vertical

sorry, changed the summary description.

> test/jdk/java/awt/print/PrinterJob/PrintTranslateTest.java line 41:
> 
>> 39: 
>> 40: public class PrintTranslateTest{
>> 41:     static String target = "\u3042";
> 
> Add a space before {

fixed

> test/jdk/java/awt/print/PrinterJob/PrintTranslateTest.java line 47:
> 
>> 45:     static BufferedImage drawNormal(Font font) {
>> 46:         BufferedImage image = new BufferedImage(SIZE, SIZE,
>> 47:                                       BufferedImage.TYPE_BYTE_BINARY);
> 
> I suppose you chose BYTE_BINARY so that AA glyphs have to rendered as mono making the comparison easier ?

yes

> src/java.desktop/share/native/libfontmanager/freetypeScaler.c line 533:
> 
>> 531:         !context->doBold && !context->doItalize &&
>> 532:         (context->transform.yx == 0) && (context->transform.xy == 0) &&
>> 533:         (context->transform.yy > 0))
> 
> So what about xx ? Mirroring horizontally ?

Thank you for the advice. Updated the patch and test to cover horizontal mirror case.

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

PR: https://git.openjdk.java.net/jdk/pull/1218


More information about the 2d-dev mailing list