Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/java.desktop/macosx/classes/sun/lwawt/macosx/CTextPipe.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -97,8 +97,14 @@ private Font getSlotFont(Font font, int slot) {
if (f2d instanceof CFont) {
CompositeFont cf = ((CFont)f2d).getCompositeFont2D();
PhysicalFont pf = cf.getSlotFont(slot);
Font f = new Font(pf.getFontName(null),
font.getStyle(), font.getSize());
String name = pf.getFontName(null);
Font f = new Font(name, font.getStyle(), font.getSize());
if (font.isTransformed()) {
f = f.deriveFont(font.getTransform());
}
if (font.hasLayoutAttributes()) {
f = f.deriveFont(font.getAttributes());
}
return f;
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintTextTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*
* @test
* @bug 6425068 7156751 7157659 8029204 8132890 8148334 8344637
* @bug 6425068 7156751 7157659 8029204 8132890 8148334 8344637 8368702
* @key printer
* @summary Confirm that text prints where we expect to the length we expect.
* @library /java/awt/regtesthelpers
Expand Down