From 59a7fdeb4ed36f0014ba1fdcc0ec144c04aaa2d5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 21 Mar 2023 09:33:06 +0100 Subject: Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use its default. GraphUI: Always use default. Graph RegionRenderer, its RenderState as well as GraphUI's Scene don't need to have knowledge of Vertex.Factory, which is only used within OutlineShape and its 'inner geom workings'. --- .../jogamp/graph/font/typecast/TypecastFont.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/font') diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index 12128f5ad..5720b9a17 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -27,6 +27,13 @@ */ package jogamp.graph.font.typecast; +import com.jogamp.common.util.IntObjectHashMap; +import com.jogamp.graph.curve.OutlineShape; +import com.jogamp.graph.font.Font; +import com.jogamp.graph.font.FontFactory; +import com.jogamp.graph.geom.plane.AffineTransform; +import com.jogamp.opengl.math.geom.AABBox; + import jogamp.graph.font.typecast.ot.OTFontCollection; import jogamp.graph.font.typecast.ot.TTFont; import jogamp.graph.font.typecast.ot.table.CmapFormat; @@ -42,18 +49,8 @@ import jogamp.graph.font.typecast.ot.table.KernTable; import jogamp.graph.font.typecast.ot.table.KerningPair; import jogamp.graph.font.typecast.ot.table.PostTable; -import com.jogamp.common.util.IntObjectHashMap; -import com.jogamp.graph.curve.OutlineShape; -import com.jogamp.graph.font.Font; -import com.jogamp.graph.font.FontFactory; -import com.jogamp.graph.geom.SVertex; -import com.jogamp.graph.geom.Vertex; -import com.jogamp.graph.geom.plane.AffineTransform; -import com.jogamp.opengl.math.geom.AABBox; - class TypecastFont implements Font { static final boolean DEBUG = false; - private static final Vertex.Factory vertexFactory = SVertex.factory(); // private final OTFontCollection fontset; /* pp */ final TTFont font; @@ -207,7 +204,7 @@ class TypecastFont implements Font { glyph_advance = glyph.getAdvanceWidth(); glyph_leftsidebearings = glyph.getLeftSideBearing(); glyph_bbox = glyph.getBBox(); - shape = TypecastRenderer.buildShape(metrics.getUnitsPerEM(), glyph, vertexFactory); + shape = TypecastRenderer.buildShape(metrics.getUnitsPerEM(), glyph, OutlineShape.getDefaultVertexFactory()); } else { final int glyph_height = metrics.getAscentFU() - metrics.getDescentFU(); glyph_advance = getAdvanceWidthFU(glyph_id); -- cgit v1.2.3