gef-classic
gef-classic copied to clipboard
Use DrawableTextUtilities for Label and TextFlow figures
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.
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.