This is an automated email from the ASF dual-hosted git repository.
jsorel pushed a commit to branch feat/fontgis
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/feat/fontgis by this push:
new b8b606d18b fix fontgis applied on Labeled nodes
b8b606d18b is described below
commit b8b606d18bb94e6d934ed40a96393ca863f784e6
Author: jsorel <[email protected]>
AuthorDate: Thu Mar 14 12:15:41 2024 +0100
fix fontgis applied on Labeled nodes
---
.../org.apache.sis.gui/main/org/apache/sis/gui/internal/FontGIS.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/FontGIS.java
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/FontGIS.java
index b8126ef5c0..8df83af086 100644
---
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/FontGIS.java
+++
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/FontGIS.java
@@ -128,10 +128,7 @@ public final class FontGIS extends Static {
static void setGlyph(final Labeled glyph, final char code, String
fallback, final double scale) {
Font font = FONT;
if (font != null) {
- if (scale != 1) {
- font = Font.font(font.getName(), font.getSize() * scale);
- }
- glyph.setFont(font);
+ glyph.setStyle("-fx-font-family:'" + font.getFamily()+ "';
-fx-font-size:" + Double.toString( font.getSize() * scale) + "pt");
fallback = new String(new char[] {code});
}
glyph.setText(fallback);