private static TextLayout createTextLayout()

in src/main/java/com/intellij/util/ui/UIUtilities.java [767:779]


    private static TextLayout createTextLayout(JComponent c, String s,
                                               Font f, FontRenderContext frc) {
        Object shaper = (c == null ?
                null : c.getClientProperty(TextAttribute.NUMERIC_SHAPING));
        if (shaper == null) {
            return new TextLayout(s, f, frc);
        } else {
            Map<TextAttribute, Object> a = new HashMap<TextAttribute, Object>();
            a.put(TextAttribute.FONT, f);
            a.put(TextAttribute.NUMERIC_SHAPING, shaper);
            return new TextLayout(s, a, frc);
        }
    }