x19.html revision 2c393a42
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> 2<HTML 3><HEAD 4><TITLE 5>FUNCTIONAL OVERVIEW</TITLE 6><META 7NAME="GENERATOR" 8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK 9REL="HOME" 10HREF="index.html"><LINK 11REL="PREVIOUS" 12HREF="index.html"><LINK 13REL="NEXT" 14TITLE="Datatypes" 15HREF="x31.html"></HEAD 16><BODY 17CLASS="SECT1" 18BGCOLOR="#FFFFFF" 19TEXT="#000000" 20LINK="#0000FF" 21VLINK="#840084" 22ALINK="#0000FF" 23><DIV 24CLASS="NAVHEADER" 25><TABLE 26SUMMARY="Header navigation table" 27WIDTH="100%" 28BORDER="0" 29CELLPADDING="0" 30CELLSPACING="0" 31><TR 32><TH 33COLSPAN="3" 34ALIGN="center" 35></TH 36></TR 37><TR 38><TD 39WIDTH="10%" 40ALIGN="left" 41VALIGN="bottom" 42><A 43HREF="index.html" 44ACCESSKEY="P" 45>Prev</A 46></TD 47><TD 48WIDTH="80%" 49ALIGN="center" 50VALIGN="bottom" 51></TD 52><TD 53WIDTH="10%" 54ALIGN="right" 55VALIGN="bottom" 56><A 57HREF="x31.html" 58ACCESSKEY="N" 59>Next</A 60></TD 61></TR 62></TABLE 63><HR 64ALIGN="LEFT" 65WIDTH="100%"></DIV 66><DIV 67CLASS="SECT1" 68><H1 69CLASS="SECT1" 70><A 71NAME="AEN19" 72>2. FUNCTIONAL OVERVIEW</A 73></H1 74><P 75>Fontconfig contains two essential modules, the configuration module which 76builds an internal configuration from XML files and the matching module 77which accepts font patterns and returns the nearest matching font. 78 </P 79><DIV 80CLASS="SECT2" 81><H2 82CLASS="SECT2" 83><A 84NAME="AEN22" 85>2.1. FONT CONFIGURATION</A 86></H2 87><P 88>The configuration module consists of the FcConfig datatype, libexpat and 89FcConfigParse which walks over an XML tree and ammends a configuration with 90data found within. From an external perspective, configuration of the 91library consists of generating a valid XML tree and feeding that to 92FcConfigParse. The only other mechanism provided to applications for 93changing the running configuration is to add fonts and directories to the 94list of application-provided font files. 95 </P 96><P 97>The intent is to make font configurations relatively static, and shared by 98as many applications as possible. It is hoped that this will lead to more 99stable font selection when passing names from one application to another. 100XML was chosen as a configuration file format because it provides a format 101which is easy for external agents to edit while retaining the correct 102structure and syntax. 103 </P 104><P 105>Font configuration is separate from font matching; applications needing to 106do their own matching can access the available fonts from the library and 107perform private matching. The intent is to permit applications to pick and 108choose appropriate functionality from the library instead of forcing them to 109choose between this library and a private configuration mechanism. The hope 110is that this will ensure that configuration of fonts for all applications 111can be centralized in one place. Centralizing font configuration will 112simplify and regularize font installation and customization. 113 </P 114></DIV 115><DIV 116CLASS="SECT2" 117><H2 118CLASS="SECT2" 119><A 120NAME="AEN27" 121>2.2. FONT PROPERTIES</A 122></H2 123><P 124>While font patterns may contain essentially any properties, there are some 125well known properties with associated types. Fontconfig uses some of these 126properties for font matching and font completion. Others are provided as a 127convenience for the applications rendering mechanism. 128 </P 129><PRE 130CLASS="PROGRAMLISTING" 131> Property Definitions 132 133 Property CPP Symbol Type Description 134 ---------------------------------------------------- 135 family FC_FAMILY String Font family names 136 familylang FC_FAMILYLANG String Language cooresponding to 137 each family name 138 style FC_STYLE String Font style. Overrides weight 139 and slant 140 stylelang FC_STYLELANG String Language cooresponding to 141 each style name 142 fullname FC_FULLNAME String Font face full name where 143 different from family and 144 family + style 145 fullnamelang FC_FULLNAMELANG String Language cooresponding to 146 each fullname 147 slant FC_SLANT Int Italic, oblique or roman 148 weight FC_WEIGHT Int Light, medium, demibold, 149 bold or black 150 size FC_SIZE Double Point size 151 width FC_WIDTH Int Condensed, normal or expanded 152 aspect FC_ASPECT Double Stretches glyphs horizontally 153 before hinting 154 pixelsize FC_PIXEL_SIZE Double Pixel size 155 spacing FC_SPACING Int Proportional, dual-width, 156 monospace or charcell 157 foundry FC_FOUNDRY String Font foundry name 158 antialias FC_ANTIALIAS Bool Whether glyphs can be 159 antialiased 160 hinting FC_HINTING Bool Whether the rasterizer should 161 use hinting 162 hintstyle FC_HINT_STYLE Int Automatic hinting style 163 verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 164 autohint FC_AUTOHINT Bool Use autohinter instead of 165 normal hinter 166 globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data 167 file FC_FILE String The filename holding the font 168 index FC_INDEX Int The index of the font within 169 the file 170 ftface FC_FT_FACE FT_Face Use the specified FreeType 171 face object 172 rasterizer FC_RASTERIZER String Which rasterizer is in use 173 outline FC_OUTLINE Bool Whether the glyphs are outlines 174 scalable FC_SCALABLE Bool Whether glyphs can be scaled 175 scale FC_SCALE Double Scale factor for point->pixel 176 conversions 177 dpi FC_DPI Double Target dots per inch 178 rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 179 vbgr, none - subpixel geometry 180 lcdfilter FC_LCD_FILTER Int Type of LCD filter 181 minspace FC_MINSPACE Bool Eliminate leading from line 182 spacing 183 charset FC_CHARSET CharSet Unicode chars encoded by 184 the font 185 lang FC_LANG LangSet Set of RFC-3066-style 186 languages this font supports 187 fontversion FC_FONTVERSION Int Version number of the font 188 capability FC_CAPABILITY String List of layout capabilities in 189 the font 190 embolden FC_EMBOLDEN Bool Rasterizer should 191 synthetically embolden the font 192 </PRE 193></DIV 194></DIV 195><DIV 196CLASS="NAVFOOTER" 197><HR 198ALIGN="LEFT" 199WIDTH="100%"><TABLE 200SUMMARY="Footer navigation table" 201WIDTH="100%" 202BORDER="0" 203CELLPADDING="0" 204CELLSPACING="0" 205><TR 206><TD 207WIDTH="33%" 208ALIGN="left" 209VALIGN="top" 210><A 211HREF="index.html" 212ACCESSKEY="P" 213>Prev</A 214></TD 215><TD 216WIDTH="34%" 217ALIGN="center" 218VALIGN="top" 219><A 220HREF="index.html" 221ACCESSKEY="H" 222>Home</A 223></TD 224><TD 225WIDTH="33%" 226ALIGN="right" 227VALIGN="top" 228><A 229HREF="x31.html" 230ACCESSKEY="N" 231>Next</A 232></TD 233></TR 234><TR 235><TD 236WIDTH="33%" 237ALIGN="left" 238VALIGN="top" 239></TD 240><TD 241WIDTH="34%" 242ALIGN="center" 243VALIGN="top" 244> </TD 245><TD 246WIDTH="33%" 247ALIGN="right" 248VALIGN="top" 249>Datatypes</TD 250></TR 251></TABLE 252></DIV 253></BODY 254></HTML 255>