View | Details | Raw Unified | Return to bug 42577
Collapse All | Expand All

(-)src/java/org/apache/fop/render/java2d/Java2DGraphicsState.java (-2 / +2 lines)
Lines 126-132 Link Here
126
     * @param size the font size
126
     * @param size the font size
127
     * @return true if the new Font changes the current Font
127
     * @return true if the new Font changes the current Font
128
     */
128
     */
129
    public boolean updateFont(String name, int size) {
129
    public boolean updateFont(String name, int size, float width) {
130
130
131
        FontMetricsMapper mapper = (FontMetricsMapper)fontInfo.getMetricsFor(name);
131
        FontMetricsMapper mapper = (FontMetricsMapper)fontInfo.getMetricsFor(name);
132
        boolean updateName = (!mapper.getFontName().equals(
132
        boolean updateName = (!mapper.getFontName().equals(
Lines 136-142 Link Here
136
        if (updateName || updateSize) {
136
        if (updateName || updateSize) {
137
            // the font name and/or the font size have changed
137
            // the font name and/or the font size have changed
138
            java.awt.Font font = mapper.getFont(size);
138
            java.awt.Font font = mapper.getFont(size);
139
139
            font = font.deriveFont(AffineTransform.getScaleInstance(width, 1.0));
140
            currentGraphics.setFont(font);
140
            currentGraphics.setFont(font);
141
            return true;
141
            return true;
142
        } else {
142
        } else {
(-)src/java/org/apache/fop/render/java2d/Java2DRenderer.java (-1 / +1 lines)
Lines 702-708 Link Here
702
        int saveIP = currentIPPosition;
702
        int saveIP = currentIPPosition;
703
703
704
        Font font = getFontFromArea(text);
704
        Font font = getFontFromArea(text);
705
        state.updateFont(font.getFontName(), font.getFontSize());
705
        state.updateFont(font.getFontName(), font.getFontSize(), font.getFontStretch());
706
        saveGraphicsState();
706
        saveGraphicsState();
707
        AffineTransform at = new AffineTransform();
707
        AffineTransform at = new AffineTransform();
708
        at.translate(rx / 1000f, bl / 1000f);
708
        at.translate(rx / 1000f, bl / 1000f);

Return to bug 42577