[OpenJDK 2D-Dev] [9] request for review: 8078382: Wrong glyph is displayed for a derived font

Andrew Brygin andrew.brygin at oracle.com
Wed Jul 15 11:12:49 UTC 2015


  could you please review a fix for 8078382?

bug: https://bugs.openjdk.java.net/browse/JDK-8078382
webrev: http://cr.openjdk.java.net/~bae/8078382/9/webrev.00/

  The problem is caused by following peculiarity of the Code New
  Roman font: this font provides plain, italic and bold variants.
  In bold and italic variants of the font, different glyphs
  correspond to the apostrophe character (0039):
bold: 0039 -> 0x250 (592)
italic: 0039 -> 0x256 (598)

  So, we translate character to glyphs using italic variant
  of the font, and then request glyph images from GDI.
  However, GDI uses the bold variant of the font in order
  to compose glyph images for artificial bold-italic variant,
  and we have got a glyph image for ® instead of apostrophe.

  Suggested fix is to select bold variant (if possible) as a
  base for artificial bold-italic.

  There is no regression test because it requires a specific font
  to be installed on a test system. The font can be found here:

Please take a look.


More information about the 2d-dev mailing list