gef-classic icon indicating copy to clipboard operation
gef-classic copied to clipboard

Use DrawableTextUtilities for Label and TextFlow figures

Open ptziegler opened this issue 2 months ago • 1 comments

This adds a new getTextUtilities() method to the IFigure interface. The method is overriden by the RootFigure and returns an object of type DrawableTextUtilities, which is created for the canvas hooked to the LWS.

When using this method, users are guaranteed that the font sizes returned calculated by this instance match the zoom level of the monitor they are painted on.

ptziegler avatar Oct 10 '25 12:10 ptziegler

I also just noticed that the fix for https://github.com/eclipse-gef/gef-classic/pull/816 is not applied to the DrawableFigureUtilities. Even if the GC is disposed together with the canvas, you may still have a resource leak if you constantly update the font on the same canvas.

ptziegler avatar Oct 14 '25 18:10 ptziegler