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

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8255387: Japanese characters were printed upside down on AIX [v2]
From:       Phil Race <prr () openjdk ! java ! net>
Date:       2020-11-30 23:30:02
Message-ID: UzqOILuPm2SBYwbYpxfpLzCoFxGBbizDsBG8-DanfEs=.77781c0e-0b70-4c73-91a8-40c6bd136b82 () github ! com
[Download RAW message or body]

On Fri, 20 Nov 2020 08:37:24 GMT, Toshio Nakamura <tnakamura@openjdk.org> wrote:

> > Hi,
> > 
> > Could you review this fix? Under some special conditions, non-English characters \
> > were printed upside down. 
> > At printing with raster image, the image was generated from bottom to top. So, \
> > each characters should also be drawn as vertical mirrored. However, freetype \
> > doesn't support to transform it if the font is using embedded bitmap and \
> > non-English. As the result, these Japanese characters were printed as upside \
> > down. 
> > In this case, freetype should be prevented to use embedded bitmap.
> 
> Toshio Nakamura has updated the pull request incrementally with two additional \
> commits since the last revision: 
> - fix space
> - Changed test location and name

Changes requested by prr (Reviewer).

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

test/jdk/java/awt/print/PrinterJob/PrintTranslateTest.java line 41:

> 39: 
> 40: public class PrintTranslateTest{
> 41:     static String target = "\u3042";

Add a space before {

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 ?

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 ?

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

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


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

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