[OpenJDK 2D-Dev] RFR: 8252199: Reimplement support of Type 1 fonts without MappedByteBuffer

Phil Race prr at openjdk.java.net
Fri Sep 18 20:30:37 UTC 2020


I  changed it to read the file into a ByteBuffer to avoid the problem that we can't control when NIO free's the mmaped
buffer. This is a problem for leaking tmp Type1 font files when using createFont and I thought maybe we could just
change that case, but Type 1 fonts are getting very rare. Neither Mac nor Windows ship them and Mac at least does not
support them at all, and current Linuxes seem to be almost all TTF and OTF fonts. Also T1 fonts are small, so any
minimal peformance benefit is not worth it. There isn't a specific regression test. I verified this on Ubuntu 20.04
which has at least a (very) few Type 1 fonts.

-------------

Commit messages:
 - 8252199: Reimplement support of Type 1 fonts without MappedByteBuffer

Changes: https://git.openjdk.java.net/jdk/pull/258/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=258&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8252199
  Stats: 13 lines in 1 file changed: 1 ins; 1 del; 11 mod
  Patch: https://git.openjdk.java.net/jdk/pull/258.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/258/head:pull/258

PR: https://git.openjdk.java.net/jdk/pull/258


More information about the 2d-dev mailing list