Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8230137

Incorrect list of available fonts for IBM Plex Mono family

XMLWordPrintable

    • x86
    • os_x

      ADDITIONAL SYSTEM INFORMATION :
      MacOS Mojave 10.14.6
      java version "1.8.0_221"
      Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      The GraphicsEnvironment.getLocalGraphicsEnvironment () method GetAvailableFontFamilyNames () returns an incorrect font list relative to what is installed on the system.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      0) Install fonts IBM Plex Mono from https://github.com/IBM/plex/releases
      1) Run NetBeans 8.2 or newer
      2) File/Preferences/Fonts & Colors
      3) Click "Font [...]"
      4) Navigate to IBM Plex Mono

      or

      compile & run attached code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      In Linux this looks like https://www.dropbox.com/s/g4nd0itkygfr8yk/Java-8u212-Fonts-Linux.png?dl=0
      ACTUAL -
      In macOS this looks like https://www.dropbox.com/s/hcpcyzmff783a2d/Zrzut%20ekranu%202019-08-12%20o%2017.28.33.png?dl=0

      ---------- BEGIN SOURCE ----------
      import java.awt.GraphicsEnvironment;

      public class IBMPlexMonoFontsList
      {
          public static void main(String[] args)
          {
              String fonts[] =
                  GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
              for (String font : fonts)
                  if (font.startsWith("IBM Plex Mono"))
                      System.out.println(font);
          }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Change fonts names.

      FREQUENCY : always


        1. IBMPlexMonoFontsList.java
          0.4 kB
        2. mac-result.png
          mac-result.png
          258 kB
        3. windows.png
          windows.png
          107 kB

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: