Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2020-05-11 03:42:27 -0400
committerNiraj Modi2020-05-11 03:42:27 -0400
commit8b33522511068827c2bf4399522b66906bcec86c (patch)
treef25062c45d33c5a580356a72cbaf29aa7e5afb00 /examples
parent048a223027eed68acf675ecdf91af2a736603ddf (diff)
downloadeclipse.platform.swt-8b33522511068827c2bf4399522b66906bcec86c.tar.gz
eclipse.platform.swt-8b33522511068827c2bf4399522b66906bcec86c.tar.xz
eclipse.platform.swt-8b33522511068827c2bf4399522b66906bcec86c.zip
Bug 562165 part3 - [Win32] Text editor should support ligatures on
Windows - Updated Snippet377 Change-Id: I0fadced3b5c69d8a0a338219c8bb3be571bc9cd1 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.snippets/previews/Snippet377.pngbin12756 -> 17310 bytes
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet377.java11
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/org.eclipse.swt.snippets/previews/Snippet377.png b/examples/org.eclipse.swt.snippets/previews/Snippet377.png
index 1cf5a763de..bd36db7038 100644
--- a/examples/org.eclipse.swt.snippets/previews/Snippet377.png
+++ b/examples/org.eclipse.swt.snippets/previews/Snippet377.png
Binary files differ
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet377.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet377.java
index 146a72b7c2..e4b2b6d26a 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet377.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet377.java
@@ -14,7 +14,8 @@
package org.eclipse.swt.snippets;
/*
- * Ligatures support with 'Fira Code' font(https://github.com/tonsky/FiraCode/tree/master/distr/ttf)
+ * Ligatures support added in StyledText with 'Fira Code' font:
+ * https://github.com/tonsky/FiraCode/tree/master/distr/ttf
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
@@ -37,7 +38,8 @@ public class Snippet377 {
StyledText styledText = new StyledText(shell, SWT.BORDER);
styledText.setFont(new Font(display, "Fira Code", 9, SWT.NORMAL));
styledText.setText(
- "Ligatures support with 'Fira Code' font(https://github.com/tonsky/FiraCode/tree/master/distr/ttf): \n");
+ "Ligatures support added in StyledText with 'Fira Code' font: \n");
+ styledText.append("(https://github.com/tonsky/FiraCode/tree/master/distr/ttf) \n");
styledText.append(" == != <= >= |= || \n");
styledText.append("c:\\ぷろぐらむ\\program \n");
styledText.append("c:\\\u3077\u308d\u3050\u3089\u3080\\program \n");
@@ -46,10 +48,11 @@ public class Snippet377 {
Label label2= new Label(shell, SWT.NONE);
label2.setText("Text:");
- Text text = new Text(shell, SWT.BORDER);
+ Text text = new Text(shell, SWT.BORDER | SWT.MULTI);
text.setFont(new Font(display, "Fira Code", 9, SWT.NORMAL));
text.setText(
- "Ligatures support with 'Fira Code' font(https://github.com/tonsky/FiraCode/tree/master/distr/ttf): \n");
+ "Ligatures support(from native) with 'Fira Code' font: \n");
+ text.append("(https://github.com/tonsky/FiraCode/tree/master/distr/ttf) \n");
text.append(" == != <= >= |= || \n");
text.append("c:\\ぷろぐらむ\\program \n");
text.append("c:\\\u3077\u308d\u3050\u3089\u3080\\program \n");

Back to the top