ilovelinux2003 发表于 2004-12-21 17:36:17

我觉得最好先不用xft, AA 美化中文。XTT是目前最好的

虽然xft和fontconfig提供了较简单的方法解决字体的显示和配置,但对于CJK的显示却没有明显的优势,直到现在还只能使用xxx的patch来实现中文的斜体和粗体。而且比起xtt在CJK的优化,xft对中文只能说是美好的未来。

所以目前的做法,最好还是用XTT实现中文的美化。等到xft和fontconfig真正将xtt对CJK的优化体现出来,我们才能享受到她带来的好处。

对我来说这似乎不是非常困难的工作,可为什么进展如此不令人满意呢?

FC3的freetype因该已经包含了XTT的code,现在只需要配置xorg.conf和font.dir/.scale就行了。关于这方面有很多的资料参考。

gunkingg 发表于 2004-12-22 17:45:50

我觉得我现在用的freetype与xtt比较根本就没有差别阿。。。
完全一样阿。

cnhnln 发表于 2004-12-22 21:51:30

freetype没中文粗体

gunkingg 发表于 2004-12-23 08:47:41

不上这个版我还真没发现问题。。。
结果我果然一直都没有注意我没有粗体。。
刚刚用SimHei做了个粗体。。看起来还不错阿。。。。
哈哈~~~

gunkingg 发表于 2004-12-23 09:50:13

可是好像出现了一个问题

有没有发现。。在Mozilla firefox里面显示的粗体,是真的SimSun的粗体。
但是在konqueror里面的粗体是SimHei摹拟的。。
这个问题是怎么产生的。。。
怎么让KDE也用SimSun的粗体呢?

gunkingg 发表于 2004-12-23 10:21:58

ok,显示正常了,
原来用

<match target="font">
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="antialias" mode="assign">
      <bool>false</bool>
    </edit>
</match>
<match target="font">
          <!-- check to see if the pattern requested > "medium" -->
      <test target="pattern" name="weight" compare="more">
            <const>medium</const>
      </test>
      <!-- pretend the font is bold now -->
      <edit name="weight" mode="assign">
             <const>bold</const>
      </edit>
</match>

<!--
<match target="pattern">
      <test name="family">
                <string>SimSun</string>
      </test>
      <test name="weight" compare="more_eq">
               <const>bold</const>
      </test>
      <edit name="family" mode="assign">
               <string>SimHei</string>
      </edit>
   </match>
-->
就是把后半部分干掉就可以了,xtt支持bold的说。不用代替哈,现在有点清楚了。

cnhnln 发表于 2004-12-23 23:20:26

xtt据说速度还快过freetype,你有感觉吗?

gunkingg 发表于 2004-12-24 00:10:33

没有特别的感觉。。。
感觉上跑一个单独的字体服务器比起内部的函数调用开销还是要好很多。

不过字体渲染效果是一样的。。 我自己试了试用freetype+ hinting(bytecode interpreter,就是有个版权开关打开),写了代码,结果输出的文字效果是一样的
,非常漂亮。

我download & 看了看xtt,他的bold,italic实现也是很简单的运算出来的。
用什么make_up_bold.... italic... 代码也很少,干吗不直接加在freetype里面呢。
真是搞不懂。

cnhnln 发表于 2004-12-24 00:44:40

单独的字体服务器怎么可能快过X内部的模块?就像X怎么可能快过集成在内核中的GUI一样

gunkingg 发表于 2004-12-24 10:34:01

不过我确实没有感觉出速度上的差异。。。可能只有写程序测试。。

说的是 ft_get_very_lazy_bbox ?

ilovelinux2003 发表于 2004-12-24 18:04:48

在新的freetype中已经包含了xtt, 请参看最新的xorg.

cnhnln 发表于 2004-12-25 00:11:22

在新的freetype中已经包含了xtt, 请参看最新的xorg.
哪一版的?

ilovelinux2003 发表于 2004-12-27 10:05:52

Release Notes for X11R6.8.1

                            The X.Org Foundation
                        The XFree86 Project, Inc.

                              17 September 2004

                                  Abstract

...

The XTT font module and FreeType1 have been retired because FreeType2
   subsumes their functionality

...

cnhnln 发表于 2004-12-27 13:13:38

咋用阿?还是xorg.conf加xtt模块?那freetype还要不要了?

hantsy 发表于 2005-1-7 10:14:29

如果是99年这么说还差不多,
xtt是一种老掉牙的技术,早就不更新了,依赖x核心,xtt本身也不能实现粗体,粗体,需要手工修改font.dir,只有白痴才愿意去查这些晦涩难懂的字符,一个个手工去修改,实现这些比xft+config的方式麻烦,而且效率低下,中文消耗内存更厉害。。。
从2002年起,gnome,kde都转向支持最新的xft+fontconfig
页: [1] 2
查看完整版本: 我觉得最好先不用xft, AA 美化中文。XTT是目前最好的