On Wed, Oct 21, 2009 at 10:01:55AM +0200, Tobias Nygren wrote: > On Wed, 21 Oct 2009 08:09:25 +0200 > Geert Hendrickx <ghen%telenet.be@localhost> wrote: > > > On Tue, Oct 20, 2009 at 05:35:47PM -0400, matthew sporleder wrote: > > > Java should have a fontdir set and by default tends to look at x font > > > server or in some standard locations like /usr/share/fonts/font > > > (something like that). You are probably just seeing the six default awt > > > fonts. Check out java_home/jre/lib for more font stuff in java. > > > > > > Pkgsrc could create a new font config file to look in pkgdirs, but I > > > think the binary format is proprietary or something. > > > > > > Interestingly, the 1.5/1.6 JDK's ship their own fonts under jre/lib/fonts/ > > (Lucida* fonts) while openjdk7 doesn't. It has a fontconfig.properties.src > > file which is configured with DejaVu instead, and refers to absolute font > > paths (for Fedora Core 6 according to a comment in the file). Changing the > > paths there doesn't help, I guess the binary fontconfig.bfc must somehow be > > regenerated from it. > > Indeed, the ugly looking fonts are a known problem. You can probably > remove the .bfc file and put a .properties there instead, but I'm not > sure. > > If you "make extract" in openjdk7, then some clues may be found in: > ${WRKDIR}/icedtea-175529fae103/patches/icedtea-fonts.patch It's an update > to the font configuration from FC6 to FC9 according to the comment. I > guess we need something similar. We're using bsd.fontconfig.properties which is apparantly (mostly) just a copy of linux.fontconfig.Fedora.properties. The attached patch fixes it, ok to commit? I'm not sure whether we should explicitly depend on the used fonts though. I've added a dependency on DejaVu (covers a lot of scripts, including Latin) and a commented one on ja-sazanami-ttf (Japanese) and baekmuk-ttf (Korean). The Chinese fonts are not in pkgsrc and I have no idea which could replace them. :-) Geert -- Geert Hendrickx -=- ghen%telenet.be@localhost -=- PGP: 0xC4BB9E9F This e-mail was composed using 100% recycled spam messages!
Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/lang/openjdk7/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- Makefile 18 Oct 2009 12:30:54 -0000 1.4 +++ Makefile 21 Oct 2009 09:33:43 -0000 @@ -35,6 +35,10 @@ MAKE_ENV+= PKGSRC_UNZIP=${PREFIX}/bin/unzip MAKE_ENV+= PKGSRC_UNZIPSFX=${PREFIX}/bin/unzipsfv +DEPENDS+= dejavu-ttf-[0-9]*:../../fonts/dejavu-ttf +#DEPENDS+= ja-sazanami-ttf-[0-9]*:../../fonts/ja-sazanami-ttf +#DEPENDS+= baekmuk-ttf-[0-9]*:../../fonts/baekmuk-ttf + NO_CONFIGURE= yes USE_LANGUAGES= c c++ USE_TOOLS+= gmake pax @@ -78,6 +82,12 @@ jdk/make/sun/xawt/Makefile SUBST_SED.add-rpaths= -e 's|-L$$(OPENWIN_LIB)|-L$$(OPENWIN_LIB) -Wl,-R$$(OPENWIN_LIB)|g' +SUBST_CLASSES+= fontpaths +SUBST_STAGE.fontpaths= pre-build +SUBST_MESSAGE.fontpaths= fixing font paths +SUBST_FILES.fontpaths= jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties +SUBST_SED.fontpaths= -e 's|%%PREFIX%%|${PREFIX}|' + PLIST_VARS+= i386 .if ${MACHINE_ARCH} == "i386" PLIST.i386= yes Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/lang/openjdk7/distinfo,v retrieving revision 1.2 diff -u -r1.2 distinfo --- distinfo 18 Oct 2009 10:21:01 -0000 1.2 +++ distinfo 21 Oct 2009 09:33:43 -0000 @@ -72,3 +72,4 @@ SHA1 (patch-bk) = 66bccfdf42fcc6f6995f3f18fc2515d55cab46c6 SHA1 (patch-bl) = a3b3bd6007c83664538baf401447fd0df9f4143b SHA1 (patch-bm) = 40c83ad219f529c3ca130547560681ab57b44bf8 +SHA1 (patch-bn) = 571d98951cc2a53dd1512e7f7d4495381e1c4004 Index: patches/patch-bn =================================================================== RCS file: patches/patch-bn diff -N patches/patch-bn --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-bn 21 Oct 2009 09:33:43 -0000 @@ -0,0 +1,47 @@ +$NetBSD$ + +--- jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties.orig 2009-10-21 11:09:00.000000000 +0200 ++++ jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties +@@ -166,24 +166,24 @@ sequence.fallback=chinese-big5,chinese-g + + # Font File Names + +-filename.DejaVu_LGC_Sans=/usr/share/fonts/dejavu-lgc/DejaVuLGCSans.ttf +-filename.DejaVu_LGC_Sans_Bold=/usr/share/fonts/dejavu-lgc/DejaVuLGCSans-Bold.ttf +-filename.DejaVu_LGC_Sans_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSans-Oblique.ttf +-filename.DejaVu_LGC_Sans_Bold_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSans-BoldOblique.ttf ++filename.DejaVu_LGC_Sans=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSans.ttf ++filename.DejaVu_LGC_Sans_Bold=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSans-Bold.ttf ++filename.DejaVu_LGC_Sans_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSans-Oblique.ttf ++filename.DejaVu_LGC_Sans_Bold_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSans-BoldOblique.ttf + +-filename.DejaVu_LGC_Sans_Mono=/usr/share/fonts/dejavu-lgc/DejaVuLGCSansMono.ttf +-filename.DejaVu_LGC_Sans_Mono_Bold=/usr/share/fonts/dejavu-lgc/DejaVuLGCSansMono-Bold.ttf +-filename.DejaVu_LGC_Sans_Mono_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSansMono-Oblique.ttf +-filename.DejaVu_LGC_Sans_Mono_Bold_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSansMono-BoldOblique.ttf ++filename.DejaVu_LGC_Sans_Mono=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSansMono.ttf ++filename.DejaVu_LGC_Sans_Mono_Bold=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSansMono-Bold.ttf ++filename.DejaVu_LGC_Sans_Mono_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSansMono-Oblique.ttf ++filename.DejaVu_LGC_Sans_Mono_Bold_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSansMono-BoldOblique.ttf + +-filename.DejaVu_LGC_Serif=/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif.ttf +-filename.DejaVu_LGC_Serif_Bold=/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif-Bold.ttf +-filename.DejaVu_LGC_Serif_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif-Oblique.ttf +-filename.DejaVu_LGC_Serif_Bold_Oblique=/usr/share/fonts/dejavu-lgc/DejaVuLGCSerif-BoldOblique.ttf ++filename.DejaVu_LGC_Serif=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSerif.ttf ++filename.DejaVu_LGC_Serif_Bold=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSerif-Bold.ttf ++filename.DejaVu_LGC_Serif_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSerif-Italic.ttf ++filename.DejaVu_LGC_Serif_Bold_Oblique=%%PREFIX%%/lib/X11/fonts/TTF/DejaVuSerif-BoldItalic.ttf + +-filename.Sazanami_Gothic=/usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf +-filename.Sazanami_Mincho=/usr/share/fonts/japanese/TrueType/sazanami-mincho.ttf +-filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/chinese/TrueType/uming.ttf +-filename.AR_PL_ZenKai_Uni=/usr/share/fonts/chinese/TrueType/ukai.ttf +-filename.Baekmuk_Gulim=/usr/share/fonts/korean/TrueType/gulim.ttf +-filename.Baekmuk_Batang=/usr/share/fonts/korean/TrueType/batang.ttf ++filename.Sazanami_Gothic=%%PREFIX%%/lib/X11/fonts/TTF/sazanami-gothic.ttf ++filename.Sazanami_Mincho=%%PREFIX%%/lib/X11/fonts/TTF/sazanami-mincho.ttf ++filename.AR_PL_ShanHeiSun_Uni=%%PREFIX%%/lib/X11/fonts/TTF/uming.ttf ++filename.AR_PL_ZenKai_Uni=%%PREFIX%%/lib/X11/fonts/TTF/ukai.ttf ++filename.Baekmuk_Gulim=%%PREFIX%%/lib/X11/fonts/TTF/gulim.ttf ++filename.Baekmuk_Batang=%%PREFIX%%/lib/X11/fonts/TTF/batang.ttf
Attachment:
pgptIutXorivi.pgp
Description: PGP signature