Www o Newloveyou t Www osearchfsearchg0search Newloveyou 286316284 %C9%AB%D6%D0%C9%AB%C2%DB%CC%B3+windows+live0search Html

[edit]

Xft

Xft Ҳһ library, ʹ Fontconfig match Ҫ֮, Q ԓή@Щ֡Xft rQҪҪʹ core protocol XRender ֡XRender XFree86 4.x extension, J@Ǟ˱ X һ hack, ^Á anti-aliased ֣Ŀǰ ʹV^ anti-aliased text ֻʹ͵ĕrã LucֵĕrҪʹ core lib. Core library x-truetype freetype backendȻҲǿԮֻ֣^ľͲ anti-aliased Чˡ

Еr XRender ʹÕr͸^W·һf X server X apps, Xft Ҳʹ core lib ֡óʽ؞@Щ}ģ_ YӍ[ء\Ŀġ

[edit]

Freetype

Freetype (em>) һܰĮֺʽ죬XFree86 4.3 Ⱥ 2.1.2. Freetype ṩ Xft ήֵYӍ̎ anti-aliasing hinting. freetype ĸ׃Ӱ푵 Xft ֣ Fontconfig ĸ׃Ӱ푵 Xft ȥxց

[edit]

fonts.conf

@evľµ Fontconfig c Xft2 Of Xft1.0 ~/.xftconfig Ͳˡ

b fontconfig, NԓѽһAOOnԵ /etc/fonts/ (һЩ Linux distributions) /usr/X11R6/etc/fonts (һЩ BSD flavors) ҿ fonts.conf @n

fonts.conf Ǻε xml ʽ etc/ e fonts.conf system-wide Oһ㲻hֱӸԸ local.conf ԼĿ ~/.fonts.conf . P fonts.conf ĸNZ manpage e^ѽú ԔM@eֻἰ^ҪһЩݣdȤ߿ man fonts-conf. еO <fontconfig> c </fontconfig> ֮gп԰S tags, Ԕ tags ԅ fonts.dtd manpage.

<dir> eһ·fontconfig Լfޒȥ@·e^ͣ: <dir>/foo/bar/myfonts</dir>

<include> ԰OnMĸʽһӵġ

Ҫ element ԓ <match> ˡmatch ҪЃɷN÷, һN pattern match, һN font match. ǰߕе match ᘌĸĕõе͵xʽϡʲNҪ͵Č? @ӿᘌe͸V Fontconfig ԓȥ̎@ЩͣǸV renderer ԓȥ@Щ͡@eһЩõԵбPеČ ՈǢ manpage

Hinting Áѻ@ʾķΞĻޣ͵ĿsҪ иĿ, 箔һlλڃɂظgr, ԓȡ߅ĸ߀߅ ĸ? @Ŀƛ]ãͳF͵r]ЌRС Ť˵r Hinting ~YӍ, V renderer ԓ̎@Щ IJݣʹСֵĕr܉ÿҲ Hinting ǷdzMrM ĹTrueType ͺܶ࣬ Hinting Ͳࡣ׾ӵ Hinting ͕׌׃úy

΢@}freetype autohint ĹܣԄӞ] hint hinting Ĺ TrueType hinting Ќģ ȫɵʹã autohint Ͳ@ơautohint Ȼo hint һӺã^ٱț] hint ҪЩԒmˣSP}s () Ŀǰ freetype autohint ߀ò齨 hinting yȣʹӢ֣ԭͺܸߣȽ hinting ; ֮ˡԳ˱ԹΞĻϺyǛ] hinting, ʹ autohinter ɵһЩЧ

Anti-alias njĻԔĴСLuȻٿsҪĴСδ MһĸûAacԭ X ֧Ԯ logic \㲻ʹãԲ XRender extension _Ŀġһ Anti-alias ֮⣬Xft ߀֧Ԯ ˞ LCD OӋ subpixel rendering.

ʲN subpixel rendering? ÷ŴRȥ LCD, lFһεLСؘɵġ@ ͨǼtG{}dz hinting, Sr, distribution freetype bytecode hinting _ʹ̓Ȳ bytecode hinting freetype AO]д_ʹ freetype e^ autohinter, ЕrЧ eЕrsM⡣ hinting MrM󲿷ֵOӋ hinting ĕrֻᘌcֵ@ʾ hinting Ĺ@ʾ҂ @ʾС anti-aliasing ԒͨDzOӋѻĹȵ; hinting ĕrС anti-aliasing ͕@÷dzyŤ˻ DһFP@ freetype ˺ܶŬ autohinter Ҳ׌ʽ Լ hinting 㷨 hinting ǂֵܼĆ}Mac OS X anti-aliasing ;Ͷʹ hinting. fontconfig ׌҂{}ص pattern match: Ҫʹ pattern match, ֻҪµ pattern, ͕е:

<match target="pattern">
...
</match>

gŵĿһB test, ȻһB edit. test ÷:

<test qual="any|all|first|not_first"
name=""
compare="eq|not_eq|less|less_eq|more|more_eq|contains|not_contains">
ֵ
</test>

any ָf, ֻҪ͵ԓ list ֮һзҪ test ֵ, test ͕all ԒҪ list ֮еĶϣfirst Ҫһϣ not_first Ҫ˵һзϵġֻͨõ any, AOҲ any. name eľǰČ, name="family". compare DZ^ėl, eq , less С, Դơ <test> סǂֵҪÁ^ֵ : int, double, string, matrix, bool ȵȡһ test ėl, ͕Mе edit AΣ݋ϗl test lČ:

<edit name=""
mode="assign|assign_replace|prepend|append|prepend_first|append_last">
ֵ
</edit>

ע fontconfig , (property) һ list, ༴һԿ Sֵ assign f match ֵȡ, assign_replace fԓ list ֵȡֵָ, prepend tDz list б match ǂֵ ǰ^, Դơ

fonts.conf eһ:

  <match target="pattern">
<test name="prefer_outline">
<bool>true</bool>
</test>
<test name="family">
<string>Times</string>
</test>
<edit name="family" mode="prepend" binding="same">
<string>Times New Roman</string>
</edit>
</match>

@ pattern match f, prefer_outline ֵ true ĕr, family ֽ Times, NͰ family list ǰ Times New Roman@ԭ, Times c, ϣSóʽָ Times @ʾr, Ҫc@ʾ, Ҫ Times New Roman @ TrueType @ʾ, @ӿ԰ Times New Roman ăș Times ǰ档 Family matching һN match ÷ pattern matching  ֻᘌe͵Č޸ģ÷:

<match target="font">
...
</match>

eӣ׌AO܉_ anti-aliasing, hinting Kʹ subpixel rendering, Ҿ͌:

  <match target="font">
<edit name="antialias"><bool>true</bool></edit>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
<edit name="hinting"><bool>true</bool></edit>
</match>

ҿX Luxi Mono @ijЩr, subpixel ̫ÿ, Ҿ͌:

  <match target="font">
<test name="family"><string>Luxi Mono</string></test>
<edit name="rgba"><const>none</const></edit>
</match>
[edit]

FAQ

Q. кܶ ttf, ҪNb?

ǰf^, ȫG ~/.fonts/ e^ȥɡ symbolic link ҲԡG֮һ fc-list гѰbͿЛ]e档

Q. b, ҵijʽ (rxvt, aterm, gtk1.x) sʹ

@Щʽʹ X core fonts, ʹ fontconfig Ҳ]֧Ԯ Xft, ͛]k@ӵı^߀ǿ͸^yķʽb@Щ͡µ gtk2, Gnome2, mlterm, Mozilla (Firebird), Qt3.x ֧Ԯ fontconfig

Q. Ҫʹ¼wԆ᣿

, mingliu.ttc G ~/.fonts ˡ

Q. Ҫ Windows Сǘӵ¼wkأʲNһЩС¼wĹPأ