-
Bug
-
Resolution: Fixed
-
P3
-
11, 12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8247384 | 13.0.4 | Philip Race | P3 | Resolved | Fixed | b05 |
JDK-8243094 | 11.0.8-oracle | Philip Race | P3 | Resolved | Fixed | b04 |
JDK-8244108 | 11.0.8 | Philip Race | P3 | Resolved | Fixed | b02 |
A DESCRIPTION OF THE PROBLEM :
Output is different on Java 11.0.1 vs 10.0.1
import java.awt.Color;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.font.GlyphVector;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
public class DrawText {
public static void main(String arg[]) throws IOException, FontFormatException {
BufferedImage bufferedImage = new BufferedImage(800, 600, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics2D = (Graphics2D) bufferedImage.getGraphics();
graphics2D.setBackground(Color.white);
graphics2D.setPaint(Color.white);
graphics2D.fillRect(0, 0, 800, 600);
graphics2D.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
graphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_PURE);
graphics2D.scale(1 / 1000f, 1 / 1000f);
graphics2D.setColor(Color.BLACK);
Font f = Font.createFont(Font.TRUETYPE_FONT,
new FileInputStream("cambria.ttc"));
f = f.deriveFont(12000f);
graphics2D.setFont(f);
GlyphVector gv = graphics2D.getFont().createGlyphVector(graphics2D.getFontRenderContext(), "test");
graphics2D.drawGlyphVector(gv, 0, 10530);
ImageIO.write(bufferedImage, "tif", new File("image.tif"));
}
}
REGRESSION : Last worked in version 10.0.1
FREQUENCY : always
Output is different on Java 11.0.1 vs 10.0.1
import java.awt.Color;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.font.GlyphVector;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
public class DrawText {
public static void main(String arg[]) throws IOException, FontFormatException {
BufferedImage bufferedImage = new BufferedImage(800, 600, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics2D = (Graphics2D) bufferedImage.getGraphics();
graphics2D.setBackground(Color.white);
graphics2D.setPaint(Color.white);
graphics2D.fillRect(0, 0, 800, 600);
graphics2D.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
graphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_PURE);
graphics2D.scale(1 / 1000f, 1 / 1000f);
graphics2D.setColor(Color.BLACK);
Font f = Font.createFont(Font.TRUETYPE_FONT,
new FileInputStream("cambria.ttc"));
f = f.deriveFont(12000f);
graphics2D.setFont(f);
GlyphVector gv = graphics2D.getFont().createGlyphVector(graphics2D.getFontRenderContext(), "test");
graphics2D.drawGlyphVector(gv, 0, 10530);
ImageIO.write(bufferedImage, "tif", new File("image.tif"));
}
}
REGRESSION : Last worked in version 10.0.1
FREQUENCY : always
- backported by
-
JDK-8243094 freetype path does not disable TrueType hinting with AA+FM hints
-
- Resolved
-
-
JDK-8244108 freetype path does not disable TrueType hinting with AA+FM hints
-
- Resolved
-
-
JDK-8247384 freetype path does not disable TrueType hinting with AA+FM hints
-
- Resolved
-
- relates to
-
JDK-8336865 VALUE_FRACTIONALMETRICS_ON + VALUE_TEXT_ANTIALIAS_GASP disables font hinting
-
- Open
-
-
JDK-8242285 Font rendering regression after 8214481
-
- Closed
-