我在Ubuntu中编译了OpenJDK,并在我们的嵌入式系统(Flavor of linux)中删除了JRE包。 OpenJDK没有可再发行的字体。我在jre / lib / fonts目录中删除了dejavu字体。
如果我将Lucida字体(与Sun / Oracle JRE一起分发)复制到jre / lib / fonts,我的应用程序可以正常工作。
请告诉我在openjdk中使用Dejavu字体的步骤,
答案 0 :(得分:4)
检查/etc/java-6-openjdk/fontconfig.properties
- 它应该为OpenJDK指定字体。
您没有说明嵌入式系统上的Linux风格,但如果它有一个软件包管理系统,请尝试通过它安装DeJaVu。
作为参考,我的fontconfig.properties如下所示:
#
# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Version
# Uses Ubuntu 8.04 (hardy), Debian 6.0 (Squeeze) (and more recent releases)
# fonts and file paths.
version=1
# Component Font Mappings
# Chinese fonts
allfonts.umingcn=AR PL UMing CN
#allfonts.umingcn.motif=AR PL UMing CN
allfonts.uminghk=AR PL UMing HK
#allfonts.uminghk.motif=AR PL UMing HK
allfonts.umingtw=AR PL UMing TW
#allfonts.umingtw.motif=AR PL UMing TW
allfonts.wqy-microhei=WenQuanYi Micro Hei
allfonts.wqy-zenhei=WenQuanYi Zen Hei
#allfonts.wqy-zenhei.motif=WenQuanYi Zen Hei
allfonts.shanheisun=AR PL ShanHeiSun Uni
#allfonts.shanheisun.motif=AR PL ShanHeiSun Uni
# Indic scripts
allfonts.bengali=Lohit Bengali
allfonts.gujarati=Lohit Gujarati
allfonts.hindi=Lohit Hindi
#allfonts.malayalam=Lohit Malayalam
allfonts.oriya=Lohit Oriya
allfonts.punjabi=Lohit Punjabi
allfonts.tamil=Lohit Tamil
allfonts.telugu=Lohit Telugu
allfonts.sinhala=LKLUG
serif.plain.latin-1=DejaVu Serif
#serif.plain.latin-1.motif=LuxiSerif-Regular
serif.plain.japanese-kochi=Kochi Mincho
serif.plain.japanese-sazanami=Sazanami Mincho
serif.plain.japanese-vlgothic=Sazanami Mincho
serif.plain.korean-baekmuk=Baekmuk Batang
#serif.plain.korean-baekmuk.motif=Baekmuk Batang
serif.plain.korean-un=UnBatang
#serif.plain.korean-un.motif=UnBatang
serif.bold.latin-1=DejaVu Serif Bold
#serif.bold.latin-1.motif=LuxiSerif-Bold
serif.bold.japanese-kochi=Kochi Mincho
serif.bold.japanese-sazanami=Sazanami Mincho
serif.bold.japanese-vlgothic=Sazanami Mincho
serif.bold.korean-baekmuk=Baekmuk Batang
#serif.bold.korean-baekmuk.motif=Baekmuk Batang
serif.bold.korean-un=UnBatang Bold
#serif.bold.korean-un.motif=UnBatang Bold
serif.italic.latin-1=DejaVu Serif Oblique
#serif.italic.latin-1.motif=LuxiSerif-Oblique
serif.italic.japanese-kochi=Kochi Mincho
serif.italic.japanese-sazanami=Sazanami Mincho
serif.italic.japanese-vlgothic=Sazanami Mincho
serif.italic.korean-baekmuk=Baekmuk Batang
#serif.italic.korean-baekmuk.motif=Baekmuk Batang
serif.italic.korean-un=UnBatang
#serif.italic.korean-un.motif=UnBatang
serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
#serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique
serif.bolditalic.japanese-kochi=Kochi Mincho
serif.bolditalic.japanese-sazanami=Sazanami Mincho
serif.bolditalic.japanese-vlgothic=Sazanami Mincho
serif.bolditalic.korean-baekmuk=Baekmuk Batang
#serif.bolditalic.korean-baekmuk.motif=Baekmuk Batang
serif.bolditalic.korean-un=UnBatang Bold
#serif.bolditalic.korean-un.motif=UnBatang Bold
sansserif.plain.latin-1=DejaVu Sans
#sansserif.plain.latin-1.motif=LuxiSans-Regular
sansserif.plain.japanese-kochi=Kochi Gothic
sansserif.plain.japanese-sazanami=Sazanami Gothic
sansserif.plain.japanese-vlgothic=VL PGothic
sansserif.plain.korean-baekmuk=Baekmuk Gulim
#sansserif.plain.korean-baekmuk.motif=Baekmuk Gulim
sansserif.plain.korean-un=UnDotum
#sansserif.plain.korean-un.motif=UnDotum
sansserif.bold.latin-1=DejaVu Sans Bold
#sansserif.bold.latin-1.motif=LuxiSans-Bold
sansserif.bold.japanese-kochi=Kochi Gothic
sansserif.bold.japanese-sazanami=Sazanami Gothic
sansserif.bold.japanese-vlgothic=VL PGothic
sansserif.bold.korean-baekmuk=Baekmuk Gulim
#sansserif.bold.korean-baekmuk.motif=Baekmuk Gulim
sansserif.bold.korean-un=UnDotum Bold
#sansserif.bold.korean-un.motif=UnDotum Bold
sansserif.italic.latin-1=DejaVu Sans Oblique
#sansserif.italic.latin-1.motif=LuxiSans-Oblique
sansserif.italic.japanese-kochi=Kochi Gothic
sansserif.italic.japanese-sazanami=Sazanami Gothic
sansserif.italic.japanese-vlgothic=VL PGothic
sansserif.italic.korean-baekmuk=Baekmuk Gulim
#sansserif.italic.korean-baekmuk.motif=Baekmuk Gulim
sansserif.italic.korean-un=UnDotum
#sansserif.italic.korean-un.motif=UnDotum
sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
#sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique
sansserif.bolditalic.japanese-kochi=Kochi Gothic
sansserif.bolditalic.japanese-sazanami=Sazanami Gothic
sansserif.bolditalic.japanese-vlgothic=VL PGothic
sansserif.bolditalic.korean-baekmuk=Baekmuk Gulim
#sansserif.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
sansserif.bolditalic.korean-un=UnDotum Bold
#sansserif.bolditalic.korean-un.motif=UnDotum Bold
monospaced.plain.latin-1=DejaVu Sans Mono
#monospaced.plain.latin-1.motif=LuxiMono-Regular
monospaced.plain.japanese-kochi=Kochi Gothic
monospaced.plain.japanese-sazanami=Sazanami Gothic
monospaced.plain.japanese-vlgothic=VL Gothic
monospaced.plain.korean-baekmuk=Baekmuk Gulim
#monospaced.plain.korean-baekmuk.motif=Baekmuk Gulim
monospaced.plain.korean-un=UnDotum
#monospaced.plain.korean-un.motif=UnDotum
monospaced.bold.latin-1=DejaVu Sans Mono Bold
#monospaced.bold.latin-1.motif=LuxiMono-Bold
monospaced.bold.japanese-kochi=Kochi Gothic
monospaced.bold.japanese-sazanami=Sazanami Gothic
monospaced.bold.japanese-vlgothic=VL Gothic
monospaced.bold.korean-baekmuk=Baekmuk Gulim
#monospaced.bold.korean-baekmuk.motif=Baekmuk Gulim
monospaced.bold.korean-un=UnDotum Bold
#monospaced.bold.korean-un.motif=UnDotum Bold
monospaced.italic.latin-1=DejaVu Sans Mono Oblique
#monospaced.italic.latin-1.motif=LuxiMono-Oblique
monospaced.italic.japanese-kochi=Kochi Gothic
monospaced.italic.japanese-sazanami=Sazanami Gothic
monospaced.italic.japanese-vlgothic=VL Gothic
monospaced.italic.korean-baekmuk=Baekmuk Gulim
#monospaced.italic.korean-baekmuk.motif=Baekmuk Gulim
monospaced.italic.korean-un=UnDotum
#monospaced.italic.korean-un.motif=UnDotum
monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
#monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique
monospaced.bolditalic.japanese-kochi=Kochi Gothic
monospaced.bolditalic.japanese-sazanami=Sazanami Gothic
monospaced.bolditalic.japanese-vlgothic=VL Gothic
monospaced.bolditalic.korean-baekmuk=Baekmuk Gulim
#monospaced.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
monospaced.bolditalic.korean-un=UnDotum Bold
#monospaced.bolditalic.korean-un.motif=UnDotum Bold
dialog.plain.latin-1=DejaVu Sans
#dialog.plain.latin-1.motif=LuxiSans-Regular
dialog.plain.japanese-kochi=Kochi Gothic
dialog.plain.japanese-sazanami=Sazanami Gothic
dialog.plain.japanese-vlgothic=VL PGothic
dialog.plain.korean-baekmuk=Baekmuk Gulim
#dialog.plain.korean-baekmuk.motif=Baekmuk Gulim
dialog.plain.korean-un=UnDotum
#dialog.plain.korean-un.motif=UnDotum
dialog.bold.latin-1=DejaVu Sans Bold
#dialog.bold.latin-1.motif=LuxiSans-Bold
dialog.bold.japanese-kochi=Kochi Gothic
dialog.bold.japanese-sazanami=Sazanami Gothic
dialog.bold.japanese-vlgothic=VL PGothic
dialog.bold.korean-baekmuk=Baekmuk Gulim
#dialog.bold.korean-baekmuk.motif=Baekmuk Gulim
dialog.bold.korean-un=UnDotum Bold
#dialog.bold.korean-un.motif=UnDotum Bold
dialog.italic.latin-1=DejaVu Sans Oblique
#dialog.italic.latin-1.motif=LuxiSans-Oblique
dialog.italic.japanese-kochi=Kochi Gothic
dialog.italic.japanese-sazanami=Sazanami Gothic
dialog.italic.japanese-vlgothic=VL PGothic
dialog.italic.korean-baekmuk=Baekmuk Gulim
#dialog.italic.korean-baekmuk.motif=Baekmuk Gulim
dialog.italic.korean-un=UnDotum
#dialog.italic.korean-un.motif=UnDotum
dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
#dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique
dialog.bolditalic.japanese-kochi=Kochi Gothic
dialog.bolditalic.japanese-sazanami=Sazanami Gothic
dialog.bolditalic.japanese-vlgothic=VL PGothic
dialog.bolditalic.korean-baekmuk=Baekmuk Gulim
#dialog.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
dialog.bolditalic.korean-un=UnDotum Bold
#dialog.bolditalic.korean-un.motif=UnDotum Bold
dialoginput.plain.latin-1=DejaVu Sans Mono
#dialoginput.plain.latin-1.motif=LuxiMono-Regular
dialoginput.plain.japanese-kochi=Kochi Gothic
dialoginput.plain.japanese-sazanami=Sazanami Gothic
dialoginput.plain.japanese-vlgothic=VL Gothic
dialoginput.plain.korean-baekmuk=Baekmuk Gulim
#dialoginput.plain.korean-baekmuk.motif=Baekmuk Gulim
dialoginput.plain.korean-un=UnDotum
#dialoginput.plain.korean-un.motif=UnDotum
dialoginput.bold.latin-1=DejaVu Sans Mono Bold
#dialoginput.bold.latin-1.motif=LuxiMono-Bold
dialoginput.bold.japanese-kochi=Kochi Gothic
dialoginput.bold.japanese-sazanami=Sazanami Gothic
dialoginput.bold.japanese-vlgothic=VL Gothic
dialoginput.bold.korean-baekmuk=Baekmuk Gulim
#dialoginput.bold.korean-baekmuk.motif=Baekmuk Gulim
dialoginput.bold.korean-un=UnDotum Bold
#dialoginput.bold.korean-un.motif=UnDotum Bold
dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
#dialoginput.italic.latin-1.motif=LuxiMono-Oblique
dialoginput.italic.japanese-kochi=Kochi Gothic
dialoginput.italic.japanese-sazanami=Sazanami Gothic
dialoginput.italic.japanese-vlgothic=VL Gothic
dialoginput.italic.korean-baekmuk=Baekmuk Gulim
#dialoginput.italic.korean-baekmuk.motif=Baekmuk Gulim
dialoginput.italic.korean-un=UnDotum
#dialoginput.italic.korean-un.motif=UnDotum
dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
#dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique
dialoginput.bolditalic.japanese-kochi=Kochi Gothic
dialoginput.bolditalic.japanese-sazanami=Sazanami Gothic
dialoginput.bolditalic.japanese-vlgothic=VL Gothic
dialoginput.bolditalic.korean-baekmuk=Baekmuk Gulim
#dialoginput.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
dialoginput.bolditalic.korean-un=UnDotum Bold
#dialoginput.bolditalic.korean-un.motif=UnDotum Bold
# Search Sequences
sequence.allfonts=latin-1
sequence.allfonts.GB18030=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi
sequence.allfonts.EUC-KR=latin-1,korean-un,korean-baekmuk
sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei
sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei
#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
# Exclusion Ranges
exclusion.japanese-kochi=0390-03d6,2200-22ef,2701-27be
exclusion.japanese-sazanami=0390-03d6,2200-22ef,2701-27be
exclusion.japanese-vlgothic=0390-03d6,2200-22ef,2701-27be
# Font File Names
filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
filename.DejaVu_Sans_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
filename.DejaVu_Sans_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
filename.DejaVu_Sans_Mono=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
filename.DejaVu_Serif=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
filename.DejaVu_Serif_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf
filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf
filename.AR_PL_UMing_CN=/usr/share/fonts/truetype/arphic/uming.ttc
filename.AR_PL_UMing_HK=/usr/share/fonts/truetype/arphic/uming.ttc
filename.AR_PL_UMing_TW=/usr/share/fonts/truetype/arphic/uming.ttc
filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttc
filename.WenQuanYi_Micro_Hei=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc
filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc
filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf
filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf
filename.Baekmuk_Gulim=/usr/share/fonts/truetype/baekmuk/gulim.ttf
filename.UnDotum=/usr/share/fonts/truetype/unfonts/UnDotum.ttf
filename.UnDotum_Bold=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf
filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
filename.Sazanami_Mincho=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf
filename.VL_Gothic=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
filename.VL_PGothic=/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf
filename.Lohit_Bengali=/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf
filename.Lohit_Gujarati=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_gu.ttf
filename.Lohit_Hindi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf
filename.Lohit_Kannda=/usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf
#filename.Lohit_Malayalam=/usr/share/fonts/lohit-malayalam/lohit_ml.ttf
filename.Lohit_Oriya=/usr/share/fonts/truetype/ttf-oriya-fonts/lohit_or.ttf
filename.Lohit_Punjabi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf
filename.Lohit_Tamil=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf
filename.Lohit_Telugu=/usr/share/fonts/truetype/ttf-telugu-fonts/lohit_te.ttf
filename.LKLUG=/usr/share/fonts/truetype/ttf-sinhala-lklug/lklug.ttf
filename.LuxiSans-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisr.ttf
filename.LuxiSans-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisb.ttf
filename.LuxiSans-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisri.ttf
filename.LuxiSans-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisbi.ttf
filename.LuxiMono-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximr.ttf
filename.LuxiMono-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf
filename.LuxiMono-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximri.ttf
filename.LuxiMono-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximbi.ttf
filename.LuxiSerif-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirr.ttf
filename.LuxiSerif-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirb.ttf
filename.LuxiSerif-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirri.ttf
filename.LuxiSerif-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirbi.ttf
# AWT X11 font paths
awtfontpath.latin-1=/usr/share/fonts/X11/Type1
awtfontpath.umingcn=/usr/share/fonts/truetype/arphic
awtfontpath.uminghk=/usr/share/fonts/truetype/arphic
awtfontpath.umingtw=/usr/share/fonts/truetype/arphic
awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic
awtfontpath.wqy-microhei=/usr/share/fonts/truetype/wqy
awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy
awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic
awtfontpath.korean-baekmuk=/usr/share/fonts/truetype/baekmuk
awtfontpath.korean-un=/usr/share/fonts/truetype/unfonts