Class FontUtils


  • public class FontUtils
    extends Object
    • Method Detail

      • computeProperFont

        public static Font computeProperFont​(Font font,
                                             float size,
                                             int dpi)
        Computes a new Font based on the given size and dpi
        Parameters:
        font - Font original font
        size - of the target font
        dpi - used to compute a new font size
        Returns:
        proper Font
      • computeSize

        public static Dimension computeSize​(Font font,
                                            String text,
                                            float margin)