Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

8207932 : Wrong rendering of variation sequences #126

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nakajima-akira
Copy link
Contributor

This is separated from
http://mail.openjdk.java.net/pipermail/openjfx-dev/2018-June/022005.html
and modified to simple patch for Win(VISTA or later) and MacOS(10.6 or later).

I checked on Windows7 and Windows10.
But I could not check on VISTA and MacOSX because of no having these OS.

Especially, I take care about MacOS code version.
I have no idea that following code is correct or not.

MAC_10_6_OR_LATER = MAC && versionNumberGreaterThanOrEqualTo(10.6f);

@eugener eugener added the enhancement New feature or request label Jul 6, 2018
@kevinrushforth
Copy link
Collaborator

kevinrushforth commented Jul 6, 2018

As mentioned in PR #125 we will need a signed OCA from you before we can consider this.

Also, you will need to file a new bug in JBS, since you have referenced a closed bug for another component (client-libs/2d) and we need a unique bug ID.

Finally, you have included a commit from another PR in addition to the one you did for this bug. At some point (before we start an actual review of this issue) you will need to remove it.

As a meta comment about the patch itself, there is no need for the platform check, since the current minimum platform on which we will run is Windows 7 SP1 and macOS 10.10, respectively.

@kevinrushforth kevinrushforth changed the title Review Request JDK-8187100 [JavaFX] To make display Variation Selectors(SVS/IVS) on Win(VISTA-) and MacOS(10.6-) [WIP] JDK-8187100 [JavaFX] To make display Variation Selectors(SVS/IVS) on Win(VISTA-) and MacOS(10.6-) Jul 19, 2018
@kevinrushforth kevinrushforth added WIP Work In Progress bug Something isn't working and removed enhancement New feature or request labels Jul 19, 2018
@kevinrushforth
Copy link
Collaborator

@nakajima-akira Please file a new issue in JBS, via bugreport.java.com, to track this when you are ready for the review to proceed (along with removing this commit).

@nakajima-akira
Copy link
Contributor Author

I just now reported to bugreport.java.com.
Maybe 2-3days later Bug ID will be published.
I removed old commit and pushed new commit.

@nakajima-akira
Copy link
Contributor Author

SWING was fixed by using harfbuzz. (harfbuzz supports VS)
https://bugs.openjdk.java.net/browse/JDK-8187100

But JavaFX is using OS native pango library on Linux.
 (pango does not supports VS, and maybe pango never supports)

It is better to implement HBGlyphLayout
and prioritize to use harfbuzz over pango.

  • modules/javafx.graphics/src/main/java/com/sun/javafx/font/freetype/HBGlyphLayout.java

But it's big changes.
I can not do it.

I already made patch to process VS within JavaFX.
http://mail.openjdk.java.net/pipermail/openjfx-dev/2018-June/022005.html
changes

  • javafx.graphics/src/main/java/com/sun/javafx/font/CMap.java
  • javafx.graphics/src/main/java/com/sun/javafx/font/CharToGlyphMapper.java
  • javafx.graphics/src/main/java/com/sun/javafx/font/CompositeGlyphMapper.java
  • javafx.graphics/src/main/java/com/sun/javafx/font/OpenTypeGlyphMapper.java

Is it possible to apply above patch for Linux? (I will modify above patch for Linux)

@nakajima-akira nakajima-akira changed the title [WIP] JDK-8187100 [JavaFX] To make display Variation Selectors(SVS/IVS) on Win(VISTA-) and MacOS(10.6-) JDK-8207932 : Wrong rendering of variation sequences Jul 20, 2018
@kevinrushforth
Copy link
Collaborator

Filed in JBS as JDK-8207932

@kevinrushforth
Copy link
Collaborator

kevinrushforth commented Jul 20, 2018

It is better to implement HBGlyphLayout and prioritize to use harfbuzz over pango.

As you say, that would be a large project, and out of scope for the near term.

Is it possible to apply above patch for Linux? (I will modify above patch for Linux)

Yes, you should fix this on Linux as well, if possible.

@kevinrushforth kevinrushforth added enhancement New feature or request and removed WIP Work In Progress bug Something isn't working labels Jul 20, 2018
@kevinrushforth kevinrushforth self-requested a review July 20, 2018 18:47
@kevinrushforth
Copy link
Collaborator

Assigned to @prrace in JBS. He will need to review this proposed enhancement.

@nakajima-akira
Copy link
Contributor Author

nakajima-akira commented Aug 6, 2018

I pushed patch for Linux.
rendering variation sequences (Linux)
805207a

Outline of patch for Linux is as follows.

  1. CMap.java
  • implement Format14
  • generate instance of CMap14 at first request of displaying VS
  • CMap14 reads partial table from the font

There are not many opportunities to display VS, but VS fonts are large (over 10MB).
Conventional CMap(Format 0 to 12) reads all tables at CMap instance generation.
For saving memory and speed up

  • Instance of CMap14 is generated when first display request of VS.
  • CMap14 reads partial of table.
    (For example, if request is VS17, read only VS17 table from the font)
  1. OpenTypeGlyphMapper.java
    If hiding Format14 inside CMap.java, I was worried that it will be difficult to deal with new formats coming out in the future (perhaps like Format16).
    In anyway, since it is necessary to write the code for VS in OpenTypeGlyphMapper side,
    I modified to controll cmap and cmap14 in OpenTypeGlyphMapper.

  2. CharToGlyphMapper.java
    I delegated the judgment of surrogate pair to java.lang.Character.
    From the basis that IVS is part of Surrogate Pair, I modified charsToGlyphs().

  3. CompositeGlyphMapper.java
    HashMap for VS has been added and implemented of get/put.

@kevinrushforth
Copy link
Collaborator

I pushed patch for Linux.
rendering variation sequences (Linux)
805207a

The above commit is not referenced by this PR. It looks like you pushed it to a different branch than the one which this PR references. We cannot review it in its current state.

@nakajima-akira
Copy link
Contributor Author

The above commit is not referenced by this PR. It looks like you pushed it to a different branch than the > one which this PR references. We cannot review it in its current state.

Sorry.
I pushed to different branch, since I don't know whether it is OK to mix two different patches (for Win/Mac and for Linux).
Now I pushed Linux patch to this branch.
Would this be right?

@kevinrushforth
Copy link
Collaborator

Since this is all part of the same enhancement request, we would want to review your proposed changes for the three supported desktop platforms at the same time. In any case, it will be a while before we have time to look at this enhancement request.

@kevinrushforth
Copy link
Collaborator

Targeted to openjfx13, but @prrace will need to evaluate whether we want to implement it.

@kevinrushforth kevinrushforth changed the title JDK-8207932 : Wrong rendering of variation sequences 8207932 : Wrong rendering of variation sequences Oct 1, 2019
@kevinrushforth
Copy link
Collaborator

kevinrushforth commented Oct 1, 2019

As announced in this message, the official jfx repository is moving from hg.openjdk.java.net/openjfx/jfx-dev/rt to github.com/openjdk/jfx.

This sandbox repository is being retired on 1-Oct-2019. You will need to migrate your pull request to the openjdk/jfx repo in order for this review to continue. Here are instructions for migrating your pull request. The updated CONTRIBUTING.md doc has additional information on how to proceed.

Once you have done this, it would be helpful to add a comment with a pointer to the new PR.


The new openjdk/jfx repo will be open for pull requests on Wednesday, 2-Oct-2019. I will send email to the openjfx-dev mailing list announcing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants