[TTFM] [C&P Notes] Generic font families in fontconfig
self-trapped
exciton.bbs@bbs.sayya.org
21 Jun 2002 05:36:40 GMT
from http://www.xfree86.org/~keithp/talks/guadec2002/html/
o Fontconfig is a library designed to provide a common system
that can serve to ease application development and provide
users with the ability to confidently install new fonts with
the expectation that they will be used by most applications.
o The library is designed to solve a specific set of tasks:
Font Location, Font Identification, Font Customization
o The central feature of the library is the configuration
mechanism, font configuration files are in XML format.
(fonts.conf file).
o Applications present patterns to Fontconfig to request a
matching font.
o By convention, the names serif, sans-serif and monospace are
bound by the configuration to the user's preferred fonts in
that style.
from http://www.w3.org/TR/REC%2DCSS2/fonts.html#generic-font-families
15.2.6 Generic font families
Generic font families are a fallback mechanism, a means of preserving
some of the style sheet author's intent in the worst case when none of
the specified fonts can be selected. For optimum typographic control,
particular named fonts should be used in style sheets.
serif
Glyphs of serif fonts, as the term is used in CSS, have finishing
strokes, flared or tapering ends, or have actual serifed endings
(including slab serifs). Serif fonts are typically
proportionately-spaced. They often display a greater variation between
thick and thin strokes than fonts from the 'sans-serif' generic font
family. CSS uses the term 'serif' to apply to a font for any script,
although other names may be more familiar for particular scripts, such
as Mincho (Japanese), Sung or Song (Chinese), Totum or Kodig (Korean).
Any font that is so described may be used to represent the generic
'serif' family.
Examples of fonts that fit this description include:
Latin fonts Times New Roman, Bodoni, Garamond, Minion Web...
Japanese fonts Ryumin Light-KL, Kyokasho ICA, Futo Min A101
sans-serif
Glyphs in sans-serif fonts, as the term is used in CSS, have stroke
endings that are plain -- without any flaring, cross stroke, or other
ornamentation. Sans-serif fonts are typically proportionately-spaced.
They often have little variation between thick and thin strokes,
compared to fonts from the 'serif' family. CSS uses the term
'sans-serif' to apply to a font for any script, although other names
may be more familiar for particular scripts, such as Gothic
(Japanese), Kai (Chinese), or Pathang (Korean). Any font that is so
described may be used to represent the generic 'sans-serif' family.
Examples of fonts that fit this description include:
Latin fonts MS Trebuchet, ITC Avant Garde Gothic, MS Arial, Helvetica
monospace
The sole criterion of a monospace font is that all glyphs have the
same fixed width. (This can make some scripts, such as Arabic, look
most peculiar.) The effect is similar to a manual typewriter, and is
often used to set samples of computer code.
Examples of fonts which fit this description include:
Latin fonts Courier, MS Courier New, Prestige, Everson Mono
Japanese fonts Osaka Monospaced
from default fonts.conf
<!--
Serif faces
-->
<alias>
<family>Times</family>
<family>Times New Roman</family>
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Kochi Mincho</family>
<family>AR PL SungtiL GB</family>
<family>Baekmuk Batang</family>
<default><family>serif</family></default>
</alias>
<!--
Sans-serif faces
-->
<alias>
<family>Helvetica</family>
<family>Arial</family>
<family>Verdana</family>
<family>Nimbus Sans L</family>
<family>Luxi Sans</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>Baekmuk Dotum</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Monospace faces
-->
<alias>
<family>Courier</family>
<family>Courier New</family>
<family>Andale Mono</family>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<default><family>monospace</family></default>
</alias>
<!--
If the font still has no generic name, add sans-serif
-->
<match target="pattern">
<test qual="all" name="family" compare="not_eq">
<string>sans-serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>sans-serif</string>
</edit>
</match>
--
Yuan-Chung Cheng <yccheng@mit.edu>
.. because it can "dig" itself an attractive potential well by
polarizing and displacing the atoms surrounding it ...
--
[1;32m¡° Origin: [33mºÓ¸Û Linux ¸ê°T¯¸ [37m<bbs.sayya.org> [m
[1;31m¡» From: [36mlm24601.mit.edu[m