This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To make display Variation Selectors on Win and MacOS
- Loading branch information
1 parent
324585f
commit cbed71d
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/system/src/test/java/test/javafx/scene/text/Test_VS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import javafx.application.Application; | ||
import static javafx.application.Application.launch; | ||
import javafx.scene.Group; | ||
import javafx.scene.Scene; | ||
import javafx.scene.paint.Color; | ||
import javafx.scene.text.Font; | ||
import javafx.scene.text.Text; | ||
import javafx.scene.control.TextArea; | ||
import javafx.scene.text.TextFlow; | ||
import javafx.stage.Stage; | ||
|
||
public class Test_VS extends Application { | ||
@Override | ||
public void start(Stage stage) throws Exception { | ||
final String fontName = "ipamjm.ttf"; | ||
// download from https://mojikiban.ipa.go.jp/1300.html | ||
// place in $(user.home)/fonts/ | ||
|
||
Font ourFont = Font.loadFont("file://"+System.getProperty("user.home")+"/fonts/"+fontName.toString(), 48); | ||
TextFlow textFlow = new TextFlow(); | ||
|
||
final String str = "\u795E+VS1 --> \u795E\uFE00\n" // U+795E,U+FE00 SVS | ||
+ "\u795E+VS20 --> \u795E\uDB40\uDD03\n" // U+795E,U+E0103 IVS | ||
+ "\uD87A\uDF79+VS17 --> \uD87A\uDF79\uDB40\uDD01\n"; // U+2EB79(Surrogate Pair),U+E0101 IVS | ||
TextArea text = new TextArea(str); | ||
text.setFont(ourFont); | ||
|
||
Group group = new Group(text); | ||
Scene scene = new Scene(group, 400, 200, Color.WHITE); | ||
stage.setScene(scene); | ||
stage.show(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.