LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 930|回复: 8

谁update了fontconfig 2.3.2?

[复制链接]
发表于 2005-6-3 19:54:56 | 显示全部楼层 |阅读模式
发现升级以后, 以前glc自带的local.font不能正常工作,部分程序的中文字体显示英文会占用2格,下面的话在原来的local.conf里面是本来就有的,郁闷啊,谁指导fontconfig版本升级后,到底改了啥?

<match target="font" >
                <test compare="more_eq" name="spacing" >
                        <const>dual</const>
                </test>
                <edit mode="assign" name="globaladvance" >
                        <bool>false</bool>
                </edit>
        </match>
发表于 2005-6-3 21:37:18 | 显示全部楼层
俺碰到的问题更奇怪呢,字体都选不对了,regular的给选成bold的。

建议在.fonts.conf里面改吧。

<match target="font" >
  <test compare="contains" target="pattern" name="lang" >
   <string>zh-tw</string>
   <string>zh-cn</string>
   <string>ja</string>
   <string>ko</string>
  </test>
  <edit name="spacing" >
   <const>proportional</const>
  </edit>
  <edit name="globaladvance" >
   <bool>false</bool>
  </edit>
</match>
回复 支持 反对

使用道具 举报

发表于 2005-6-3 23:44:44 | 显示全部楼层
升级后在/etc/fonts/多了个conf.d目录,据说是将local.conf拆分为多个小的配置文件,至于英文字体间距的问题,在local.conf里加入
<match target="font">
                <edit name="spacing">
                        <const>proportional</const>
                </edit>
                <edit name="globaladvance">
                        <bool>false</bool>
                </edit>
</match>

我已经搞定了,good luck,呵呵
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-3 23:55:32 | 显示全部楼层
多谢两位了,我自己也在debian的一个wiki上找到这个。但有个问题还是存在,就是我如果用gbk的local,fc-match出来默认就是第一个带中文的,试过用全en_US的local就用英文的,这个一搞,中文字体就老是跑到表的前面去了,奇怪,难道这是fontconfig的新功能?我只好猥琐地在serif,sans和monospace前面强行加上Bitstream相关的东西。英文是可以了,但数字标点什么的,如果后面不和英文连用,他就会又跳回Simsun显示出来,巨丑无比,很郁闷。再加上据说firefly最近忙着OO,没时间搞fontconfig2.3粗体的补丁,sigh,感觉真是很郁闷。
回复 支持 反对

使用道具 举报

发表于 2005-6-4 08:50:39 | 显示全部楼层
以前glc里的补丁还能用,给个ebuild你先凑合着,只是我这里opera有些问题还没找到原因。
  1. # Copyright 1999-2005 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/fontconfig-2.3.2.ebuild,v 1.1 2005/05/28 22:43:11 foser Exp $

  4. inherit eutils

  5. DESCRIPTION="A library for configuring and customizing font access"
  6. HOMEPAGE="http://fontconfig.org/"
  7. SRC_URI="http://fontconfig.org/release/${P}.tar.gz"

  8. LICENSE="fontconfig"
  9. SLOT="1.0"
  10. KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390 ~ppc-macos"
  11. IUSE="glc"

  12. DEPEND=">=media-libs/freetype-2.1.4
  13.         >=dev-libs/expat-1.95.3"

  14. src_unpack() {

  15.         unpack ${A}
  16.         cd ${S}

  17.         local PPREFIX="${FILESDIR}/patch/${PN}"

  18.         # Add our local fontpaths (duh dont forget!)
  19.         epatch ${PPREFIX}-2.2-local_fontdir-r1.patch

  20.         # Some patches from Redhat
  21.         # epatch ${PPREFIX}-2.1-slighthint.patch
  22.         # Add our local fontpaths (duh dont forget!)
  23.         # epatch ${PPREFIX}-2.2-local_fontdir-r1.patch
  24.         # Blacklist some fonts that break fontconfig
  25.         # epatch ${PPREFIX}-2.2-blacklist.patch
  26.         # Remove the subpixel test from local.conf (#12757)
  27.         #epatch ${PPREFIX}-2.2-remove_subpixel_test.patch
  28.        
  29.         if use glc ; then
  30.                 #Some patches from akitto
  31.                 epatch ${PPREFIX}-2.2.1-AppleRoman-DynaFont.patch
  32.                 #epatch ${PPREFIX}-2.2.1-Bold-conf.patch
  33.                 #Some patches from firefly
  34.                 #epatch ${PPREFIX}-2.2.1-fclang-miss_1_percent-20030617.patch
  35.                 #epatch ${PPREFIX}-2.2.1-include_CJK_charmaps-20030626.patch
  36.                 #epatch ${PPREFIX}-2.2.92-add_extra_option-20031207.patch
  37.                 #epatch ${PPREFIX}-2.2.3-default_config-glc.patch
  38.                 #epatch ${PPREFIX}-2.2.3-multifamily.patch
  39.                 epatch ${FILESDIR}/patch/2.2.3/fontconfig-2.2.3-alllang-20041114.patch
  40.                 #epatch ${FILESDIR}/patch/2.2.3/fontconfig-2.2.3-defaultconfig_glc.patch
  41.                 epatch ${FILESDIR}/patch/2.2.3/fontconfig-2.2.3-fakestyle-20041117.patch
  42.                 epatch ${FILESDIR}/patch/2.2.3/fontconfig-2.2.3-include_CJK_charmaps-20041114.patch
  43.                 #epatch ${FILESDIR}/patch/2.2.3/fontconfig-2.2.3-multifamily-20041117.patch
  44.         fi

  45.         epunt_cxx #74077

  46. }

  47. src_compile() {

  48.         [ "${ARCH}" == "alpha" -a "${CC}" == "ccc" ] && \
  49.                 die "Dont compile fontconfig with ccc, it doesnt work very well"

  50.         # disable docs only disables docs generation (!)
  51.         econf --disable-docs \
  52.                 --with-docdir=/usr/share/doc/${PF} \
  53.                 --x-includes=/usr/X11R6/include \
  54.                 --x-libraries=/usr/X11R6/lib \
  55.                 --with-default-fonts=/usr/share/fonts || die

  56.         # this triggers sandbox, we do this ourselves
  57.         sed -i "s:fc-cache/fc-cache -f -v:sleep 0:" Makefile

  58.         emake -j1 || die

  59. }

  60. src_install() {

  61.         make DESTDIR=${D} install || die

  62.         insinto /etc/fonts
  63.         doins ${S}/fonts.conf
  64.         newins ${S}/fonts.conf fonts.conf.new

  65.         cd ${S}

  66.         newman fc-cache/fc-cache.man fc-cache.1
  67.         newman fc-list/fc-list.man fc-list.1
  68.         newman src/fontconfig.man fontconfig.3
  69.         dodoc AUTHORS ChangeLog NEWS README

  70. }

  71. pkg_postinst() {

  72.         # Changes should be made to /etc/fonts/local.conf, and as we had
  73.         # too much problems with broken fonts.conf, we force update it ...
  74.         # <azarah@gentoo.org> (11 Dec 2002)
  75.         ewarn "Please make fontconfig related changes to /etc/fonts/local.conf,"
  76.         ewarn "and NOT to /etc/fonts/fonts.conf, as it will be replaced!"
  77.         mv -f ${ROOT}/etc/fonts/fonts.conf.new ${ROOT}/etc/fonts/fonts.conf
  78.         rm -f ${ROOT}/etc/fonts/._cfg????_fonts.conf

  79.         if [ "${ROOT}" = "/" ]
  80.         then
  81.                 echo
  82.                 einfo "Creating font cache..."
  83.                 /usr/bin/fc-cache -f
  84.         fi

  85. }
复制代码
回复 支持 反对

使用道具 举报

发表于 2005-6-4 12:06:38 | 显示全部楼层
我现在的问题比较奇怪, 在kedit中选择字体的时候, 可以使用任何字体的粗体,粗斜体。
但是在kcontrol和kword中,有很多字体只有regular和italic。
kde 3.4.1

不知道是kde改变了,还是QT改变了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-4 14:28:21 | 显示全部楼层
感谢大家,我终于搞定了,原来是自己写的.fonts.conf关联sans的事后,不慎用了sans而非原名sans-serif,现在终于爽了,粗体那个东西,说实话,我就从来没用过,呵呵,所以打不打这个补丁对我还真是无所谓
回复 支持 反对

使用道具 举报

发表于 2005-6-4 17:47:58 | 显示全部楼层
粗体不需要打补丁了

用 CVS 版的 FreeType 就行
回复 支持 反对

使用道具 举报

发表于 2005-6-4 22:40:12 | 显示全部楼层
花花你的粗体宽度问题是怎么解决的?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表