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

Unable to customize psfonts.properties to use custom fonts and encodings

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • None
    • client-libs
    • 2d
    • generic
    • generic

      SYNOPSIS
      --------
      Unable to customize psfonts.properties to use custom fonts and encodings

      OPERATING SYSTEMS
      -----------------
      All (tested on Japanese Linux)

      FULL JDK VERSIONS
      -----------------
      All

      PROBLEM DESCRIPTION
      -------------------
      Default psfont.properties.ja has the entries for following encodings.

          latin1
          x11jis0208

      With the existing design, the user is allowed to add entries to customize postscript fonts for encodings that exist in default fontconfig.properties in search sequence only.

      For example, on a Japanese Linux environment it is impossible to add the postscript font "Hei-seiMin-W3-90ms-RKSJ-H" with the current design.

      The current design is to encode the string using the list of encoders mapped to the encoding specified by the search sequence in fontconfig.properties. The mapping of encoding to encoder object is facilitated by a hard coded hashmap ('encoderMap') in Mfont-Configuration. After getting the list of encodings that can encode the given string, JDK checks for a postscript font specified for that encoding. Which means, encodings used in fontconfig.properties should match those used in postscript. If none are found, font vector data for the given string is written to ps file, which increases the size dramatically.

      The existing design has limitations because it depends on fontconfig.properties and hardcoded hashmap. The existing design should be altered to use only psfont.properties file to customize post-script fonts.


      REPRODUCTION INSTRUCTIONS
      -------------------------
      Compile and run the attached testcase on Japanese Linux with the attached psfont.properties.ja.

      You will observe that some strings like test_katakana e.t.c will have their font vector data written to out.ps file.

      TESTCASE
      --------
      See attachment.

      SUGGESTED FIX
      ------------------------
      See comments.

            prr Philip Race
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: