<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="zh-cn">
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312-80">
<TITLE>字体</TITLE>
<link rel="stylesheet" href="style/default.css" type="text/css">
<link rel="prev" href="colors.html">
<link rel="next" href="text.html">
<link rel="contents" href="cover.html#minitoc">
<link rel="CSS-properties" href="propidx.html" title="properties">
<link rel="index" href="indexlist.html" title="index">
</HEAD>
<BODY>
<div class="navbar" align="center">
<p><a href="colors.html">上一篇</a>
<a href="text.html">下一篇</a>
<a href="cover.html#minitoc">目录</a>
<a href="propidx.html">属性</a>
<a href="indexlist.html">索引</a>
</div>
<hr class="navbar">
<H1 align="center">15 字体</H1>
<div class="subtoc">
<p> <strong>目录</strong>
<ul class="toc">
<li class="tocline2"><a href="fonts.html#q1" class="tocxref">15.1 简介</a>
<li class="tocline2"><a href="fonts.html#font-specification" class="tocxref">15.2 字体说明</a>
<ul class="toc">
<li class="tocline3"><a href="fonts.html#font-properties" class="tocxref">15.2.1 字体说明的属性</a>
<li class="tocline3"><a href="fonts.html#font-family-prop" class="tocxref">15.2.2 字体家族:<span class="propinst-font-family">'font-family'</span>属性</a>
<li class="tocline3"><a href="fonts.html#font-styling" class="tocxref">15.2.3 字体样式:<span class="propinst-font-style">'font-style'</span>,<span class="propinst-font-variant">'font-variant'</span>,<span class="propinst-font-weight">'font-weight'</span>及<span class="propinst-font-stretch">'font-stretch'</span>属性</a>
<li class="tocline3"><a href="fonts.html#font-size-props" class="tocxref">15.2.4 字体尺寸:<span class="propinst-font-size">'font-size'</span>及<span class="propinst-font-size-adjust">'font-size-adjust'</span>属性</a>
<li class="tocline3"><a href="fonts.html#font-shorthand" class="tocxref">15.2.5 缩写的字体属性:<span class="propinst-font">'font'</span>属性</a>
<li class="tocline3"><a href="fonts.html#generic-font-families" class="tocxref">15.2.6 通用字体家族</a>
<ul class="toc">
<li class="tocline4"><a href="fonts.html#serif-def" class="tocxref"> <span class="index-def" title="serif, definition of"><dfn>serif</dfn></span></a>
<li class="tocline4"><a href="fonts.html#sans-serif-def" class="tocxref"> <span class="index-def" title="sans-serif, definition of"> <dfn>sans-serif</dfn></span></a>
<li class="tocline4"><a href="fonts.html#cursive-def" class="tocxref"> <span class="index-def" title="cursive, definition of"> <dfn>cursive</dfn></span></a>
<li class="tocline4"><a href="fonts.html#fantasy-def" class="tocxref"> <span class="index-def" title="fantasy, definition of"> <dfn>fantasy</dfn></span></a>
<li class="tocline4"><a href="fonts.html#monospace-def" class="tocxref"> <span class="index-def" title="monospace, definition of"> <dfn>monospace</dfn></span></a>
</ul>
</ul>
<li class="tocline2"><a href="fonts.html#font-selection" class="tocxref">15.3 字体选择</a>
<ul class="toc">
<li class="tocline3"><a href="fonts.html#font-descriptions" class="tocxref">15.3.1 <span class="index-inst" title="font description">字体描述</span>及@font-face</a>
<li class="tocline3"><a href="fonts.html#select" class="tocxref">15.3.2 选择字体的描述子:<span class="descinst-font-family">'font-family'</span>,<span class="descinst-font-style">'font-style'</span>,<span class="descinst-font-variant">'font-variant'</span>,<span class="descinst-font-weight">'font-weight'</span>,<span class="descinst-font-stretch">'font-stretch'</span>及<span class="descinst-font-size">'font-size'</span></a>
<li class="tocline3"><a href="fonts.html#dataqual" class="tocxref">15.3.3 字体数据限制的描述子:<span class="descinst-unicode-range">'unicode-range'</span></a>
<li class="tocline3"><a href="fonts.html#unitsperem" class="tocxref">15.3.4 数值描述子:<span class="descinst-units-per-em">'units-per-em'</span></a>
<li class="tocline3"><a href="fonts.html#referencing" class="tocxref">15.3.5 参考描述子:<span class="descinst-src">'src'</span></a>
<li class="tocline3"><a href="fonts.html#matching" class="tocxref">15.3.6 匹配描述子:<span class="descinst-panose-1">'panose-1'</span>,<span class="descinst-stemv">'stemv'</span>,<span class="descinst-stemh">'stemh'</span>,<span class="descinst-slope">'slope'</span>,<span class="descinst-cap-height">'cap-height'</span>,<span class="descinst-x-height">'x-height'</span>,<span class="descinst-ascent">'ascent'</span>及<span class="descinst-descent">'descent'</span></a>
<li class="tocline3"><a href="fonts.html#synthesizing" class="tocxref">15.3.7 综合描述子:<span class="descinst-widths">'widths'</span>,<span class="descinst-bbox">'bbox'</span>及<span class="descinst-definition-src">'definition-src'</span></a>
<li class="tocline3"><a href="fonts.html#alignment" class="tocxref">15.3.8 对齐描述子:<span class="descinst-baseline">'baseline'</span>,<span class="descinst-centerline">'centerline'</span>,<span class="descinst-mathline">'mathline'</span>及<span class="descinst-topline">'topline'</span></a>
<li class="tocline3"><a href="fonts.html#q23" class="tocxref">15.3.9 示例</a>
</ul>
<li class="tocline2"><a href="fonts.html#font-descriptors" class="tocxref">15.4 字体的特性</a>
<ul class="toc">
<li class="tocline3"><a href="fonts.html#universal" class="tocxref">15.4.1 字体特性简介</a>
<li class="tocline3"><a href="fonts.html#aname" class="tocxref">15.4.2 字体的全名</a>
<li class="tocline3"><a href="fonts.html#emsq" class="tocxref">15.4.3 以全身长方块来协调单位</a>
<li class="tocline3"><a href="fonts.html#cline" class="tocxref">15.4.4 中心基准线</a>
<li class="tocline3"><a href="fonts.html#encoding" class="tocxref">15.4.5 字体编码</a>
<li class="tocline3"><a href="fonts.html#family" class="tocxref">15.4.6 字体家族名</a>
<li class="tocline3"><a href="fonts.html#lrwidth" class="tocxref">15.4.7 字型宽度</a>
<li class="tocline3"><a href="fonts.html#stemh" class="tocxref">15.4.8 水平主字母宽度</a>
<li class="tocline3"><a href="fonts.html#cap" class="tocxref">15.4.9 大写字型的高度</a>
<li class="tocline3"><a href="fonts.html#xht" class="tocxref">15.4.10 小写字型的高度</a>
<li class="tocline3"><a href="fonts.html#bline" class="tocxref">15.4.11 下基准线</a>
<li class="tocline3"><a href="fonts.html#mline" class="tocxref">15.4.12 数学基准线</a>
<li class="tocline3"><a href="fonts.html#bbox" class="tocxref">15.4.13 最大边界控制框</a>
<li class="tocline3"><a href="fonts.html#ascent" class="tocxref">15.4.14 最大的非提升字符的高度</a>
<li class="tocline3"><a href="fonts.html#descent" class="tocxref">15.4.15 最大的非提升字符的深度</a>
<li class="tocline3"><a href="fonts.html#pan1" class="tocxref">15.4.16 Panose-1中的数字</a>
<li class="tocline3"><a href="fonts.html#ucode" class="tocxref">15.4.17 ISO 10646的字符范围</a>
<li class="tocline3"><a href="fonts.html#tline" class="tocxref">15.4.18 顶基准线</a>
<li class="tocline3"><a href="fonts.html#stemv" class="tocxref">15.4.19 垂直主字母宽度</a>
<li class="tocline3"><a href="fonts.html#slope" class="tocxref">15.4.20 垂直笔划角度</a>
</ul>
<li class="tocline2"><a href="fonts.html#algorithm" class="tocxref">15.5 字体匹配算法</a>
<ul class="toc">
<li class="tocline3"><a href="fonts.html#q46" class="tocxref">15.5.1 字体重量值到字体名的映射</a>
<li class="tocline3"><a href="fonts.html#q47" class="tocxref">15.5.2 字体匹配示例</a>
</ul>
</ul>
</div>
<h2><a name="q1">15.1 简介</a></h2>
<p> 一旦文档的文本要可见地显示,<a name="x0"><span class="index-inst" title="characte