From 920e529516bb264f04138ed1caca80d4925e3773 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 28 Aug 2023 22:57:53 +0200 Subject: Graph Font + Glyph: More robust detetection and API definition of non-contour/whitespace Glyphs (detect and allow to skip 'em) We also drop shapes for both, but for id 0 (unknown). --- src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java index b8edb74e2..4904f4d42 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Label.java @@ -193,12 +193,11 @@ public class Label extends GraphShape { private final Font.GlyphVisitor glyphVisitor = new Font.GlyphVisitor() { @Override public void visit(final char symbol, final Glyph glyph, final AffineTransform t) { - if( glyph.isWhiteSpace() ) { - return; + if( !glyph.isNonContour() ) { + final OutlineShape shape = glyph.getShape(); + shape.setSharpness(oshapeSharpness); + region.addOutlineShape(shape, t, rgbaColor); } - final OutlineShape shape = glyph.getShape(); - shape.setSharpness(oshapeSharpness); - region.addOutlineShape(shape, t, rgbaColor); } }; -- cgit v1.2.3