mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8368702: [macosx] Printing text with composite fonts loses font transform
Reviewed-by: psadhukhan, prr
This commit is contained in:
parent
692edc4879
commit
431dcf84e9
@ -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
|
||||
@ -97,8 +97,14 @@ public class CTextPipe implements TextPipe {
|
||||
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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user