x19.html revision ca08ab68
1a6844aabSmrg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd"> 22c393a42Smrg<HTML 32c393a42Smrg><HEAD 42c393a42Smrg><TITLE 52c393a42Smrg>FUNCTIONAL OVERVIEW</TITLE 62c393a42Smrg><META 72c393a42SmrgNAME="GENERATOR" 82c393a42SmrgCONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK 92c393a42SmrgREL="HOME" 10a6844aabSmrgHREF="t1.html"><LINK 112c393a42SmrgREL="PREVIOUS" 12a6844aabSmrgHREF="t1.html"><LINK 132c393a42SmrgREL="NEXT" 142c393a42SmrgTITLE="Datatypes" 152c393a42SmrgHREF="x31.html"></HEAD 162c393a42Smrg><BODY 172c393a42SmrgCLASS="SECT1" 182c393a42SmrgBGCOLOR="#FFFFFF" 192c393a42SmrgTEXT="#000000" 202c393a42SmrgLINK="#0000FF" 212c393a42SmrgVLINK="#840084" 222c393a42SmrgALINK="#0000FF" 232c393a42Smrg><DIV 242c393a42SmrgCLASS="NAVHEADER" 252c393a42Smrg><TABLE 262c393a42SmrgSUMMARY="Header navigation table" 272c393a42SmrgWIDTH="100%" 282c393a42SmrgBORDER="0" 292c393a42SmrgCELLPADDING="0" 302c393a42SmrgCELLSPACING="0" 312c393a42Smrg><TR 322c393a42Smrg><TH 332c393a42SmrgCOLSPAN="3" 342c393a42SmrgALIGN="center" 352c393a42Smrg></TH 362c393a42Smrg></TR 372c393a42Smrg><TR 382c393a42Smrg><TD 392c393a42SmrgWIDTH="10%" 402c393a42SmrgALIGN="left" 412c393a42SmrgVALIGN="bottom" 422c393a42Smrg><A 43a6844aabSmrgHREF="t1.html" 442c393a42SmrgACCESSKEY="P" 45a6844aabSmrg><<< Previous</A 462c393a42Smrg></TD 472c393a42Smrg><TD 482c393a42SmrgWIDTH="80%" 492c393a42SmrgALIGN="center" 502c393a42SmrgVALIGN="bottom" 512c393a42Smrg></TD 522c393a42Smrg><TD 532c393a42SmrgWIDTH="10%" 542c393a42SmrgALIGN="right" 552c393a42SmrgVALIGN="bottom" 562c393a42Smrg><A 572c393a42SmrgHREF="x31.html" 582c393a42SmrgACCESSKEY="N" 59a6844aabSmrg>Next >>></A 602c393a42Smrg></TD 612c393a42Smrg></TR 622c393a42Smrg></TABLE 632c393a42Smrg><HR 642c393a42SmrgALIGN="LEFT" 652c393a42SmrgWIDTH="100%"></DIV 662c393a42Smrg><DIV 672c393a42SmrgCLASS="SECT1" 682c393a42Smrg><H1 692c393a42SmrgCLASS="SECT1" 702c393a42Smrg><A 712c393a42SmrgNAME="AEN19" 72a6844aabSmrg>FUNCTIONAL OVERVIEW</A 732c393a42Smrg></H1 742c393a42Smrg><P 752c393a42Smrg>Fontconfig contains two essential modules, the configuration module which 762c393a42Smrgbuilds an internal configuration from XML files and the matching module 772c393a42Smrgwhich accepts font patterns and returns the nearest matching font. 782c393a42Smrg </P 792c393a42Smrg><DIV 802c393a42SmrgCLASS="SECT2" 812c393a42Smrg><H2 822c393a42SmrgCLASS="SECT2" 832c393a42Smrg><A 842c393a42SmrgNAME="AEN22" 85a6844aabSmrg>FONT CONFIGURATION</A 862c393a42Smrg></H2 872c393a42Smrg><P 882c393a42Smrg>The configuration module consists of the FcConfig datatype, libexpat and 89ca08ab68SmrgFcConfigParse which walks over an XML tree and amends a configuration with 902c393a42Smrgdata found within. From an external perspective, configuration of the 912c393a42Smrglibrary consists of generating a valid XML tree and feeding that to 922c393a42SmrgFcConfigParse. The only other mechanism provided to applications for 932c393a42Smrgchanging the running configuration is to add fonts and directories to the 942c393a42Smrglist of application-provided font files. 952c393a42Smrg </P 962c393a42Smrg><P 972c393a42Smrg>The intent is to make font configurations relatively static, and shared by 982c393a42Smrgas many applications as possible. It is hoped that this will lead to more 992c393a42Smrgstable font selection when passing names from one application to another. 1002c393a42SmrgXML was chosen as a configuration file format because it provides a format 1012c393a42Smrgwhich is easy for external agents to edit while retaining the correct 1022c393a42Smrgstructure and syntax. 1032c393a42Smrg </P 1042c393a42Smrg><P 1052c393a42Smrg>Font configuration is separate from font matching; applications needing to 1062c393a42Smrgdo their own matching can access the available fonts from the library and 1072c393a42Smrgperform private matching. The intent is to permit applications to pick and 1082c393a42Smrgchoose appropriate functionality from the library instead of forcing them to 1092c393a42Smrgchoose between this library and a private configuration mechanism. The hope 1102c393a42Smrgis that this will ensure that configuration of fonts for all applications 1112c393a42Smrgcan be centralized in one place. Centralizing font configuration will 1122c393a42Smrgsimplify and regularize font installation and customization. 1132c393a42Smrg </P 1142c393a42Smrg></DIV 1152c393a42Smrg><DIV 1162c393a42SmrgCLASS="SECT2" 1172c393a42Smrg><H2 1182c393a42SmrgCLASS="SECT2" 1192c393a42Smrg><A 1202c393a42SmrgNAME="AEN27" 121a6844aabSmrg>FONT PROPERTIES</A 1222c393a42Smrg></H2 1232c393a42Smrg><P 1242c393a42Smrg>While font patterns may contain essentially any properties, there are some 1252c393a42Smrgwell known properties with associated types. Fontconfig uses some of these 1262c393a42Smrgproperties for font matching and font completion. Others are provided as a 127ca08ab68Smrgconvenience for the application's rendering mechanism. 1282c393a42Smrg </P 129a6844aabSmrg><TABLE 130a6844aabSmrgBORDER="0" 131a6844aabSmrgBGCOLOR="#E0E0E0" 132a6844aabSmrgWIDTH="100%" 133a6844aabSmrg><TR 134a6844aabSmrg><TD 1352c393a42Smrg><PRE 1362c393a42SmrgCLASS="PROGRAMLISTING" 1372c393a42Smrg> Property Definitions 1382c393a42Smrg 139ca08ab68Smrg Property C Preprocessor Symbol Type Description 1402c393a42Smrg ---------------------------------------------------- 141ca08ab68Smrg family FC_FAMILY String Font family names 142ca08ab68Smrg familylang FC_FAMILYLANG String Language corresponding to 143ca08ab68Smrg each family name 144ca08ab68Smrg style FC_STYLE String Font style. Overrides weight 145ca08ab68Smrg and slant 146ca08ab68Smrg stylelang FC_STYLELANG String Language corresponding to 147ca08ab68Smrg each style name 148ca08ab68Smrg fullname FC_FULLNAME String Font face full name where 149ca08ab68Smrg different from family and 150ca08ab68Smrg family + style 151ca08ab68Smrg fullnamelang FC_FULLNAMELANG String Language corresponding to 152ca08ab68Smrg each fullname 153ca08ab68Smrg slant FC_SLANT Int Italic, oblique or roman 154ca08ab68Smrg weight FC_WEIGHT Int Light, medium, demibold, 155ca08ab68Smrg bold or black 156ca08ab68Smrg size FC_SIZE Double Point size 157ca08ab68Smrg width FC_WIDTH Int Condensed, normal or expanded 158ca08ab68Smrg aspect FC_ASPECT Double Stretches glyphs horizontally 159ca08ab68Smrg before hinting 160ca08ab68Smrg pixelsize FC_PIXEL_SIZE Double Pixel size 161ca08ab68Smrg spacing FC_SPACING Int Proportional, dual-width, 162ca08ab68Smrg monospace or charcell 163ca08ab68Smrg foundry FC_FOUNDRY String Font foundry name 164ca08ab68Smrg antialias FC_ANTIALIAS Bool Whether glyphs can be 165ca08ab68Smrg antialiased 166ca08ab68Smrg hinting FC_HINTING Bool Whether the rasterizer should 167ca08ab68Smrg use hinting 168ca08ab68Smrg hintstyle FC_HINT_STYLE Int Automatic hinting style 169ca08ab68Smrg verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 170ca08ab68Smrg autohint FC_AUTOHINT Bool Use autohinter instead of 171ca08ab68Smrg normal hinter 172ca08ab68Smrg globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) 173ca08ab68Smrg file FC_FILE String The filename holding the font 174ca08ab68Smrg index FC_INDEX Int The index of the font within 175ca08ab68Smrg the file 176ca08ab68Smrg ftface FC_FT_FACE FT_Face Use the specified FreeType 177ca08ab68Smrg face object 178ca08ab68Smrg rasterizer FC_RASTERIZER String Which rasterizer is in use 179ca08ab68Smrg outline FC_OUTLINE Bool Whether the glyphs are outlines 180ca08ab68Smrg scalable FC_SCALABLE Bool Whether glyphs can be scaled 181ca08ab68Smrg scale FC_SCALE Double Scale factor for point->pixel 182ca08ab68Smrg conversions 183ca08ab68Smrg dpi FC_DPI Double Target dots per inch 184ca08ab68Smrg rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 185ca08ab68Smrg vbgr, none - subpixel geometry 186ca08ab68Smrg lcdfilter FC_LCD_FILTER Int Type of LCD filter 187ca08ab68Smrg minspace FC_MINSPACE Bool Eliminate leading from line 188ca08ab68Smrg spacing 189ca08ab68Smrg charset FC_CHARSET CharSet Unicode chars encoded by 190ca08ab68Smrg the font 191ca08ab68Smrg lang FC_LANG LangSet Set of RFC-3066-style 192ca08ab68Smrg languages this font supports 193ca08ab68Smrg fontversion FC_FONTVERSION Int Version number of the font 194ca08ab68Smrg capability FC_CAPABILITY String List of layout capabilities in 195ca08ab68Smrg the font 196ca08ab68Smrg embolden FC_EMBOLDEN Bool Rasterizer should 197ca08ab68Smrg synthetically embolden the font 198ca08ab68Smrg namelang FC_NAMELANG String Language name to be used for the 199ca08ab68Smrg default value of familylang, 200ca08ab68Smrg stylelang and fullnamelang 2012c393a42Smrg </PRE 202a6844aabSmrg></TD 203a6844aabSmrg></TR 204a6844aabSmrg></TABLE 2052c393a42Smrg></DIV 2062c393a42Smrg></DIV 2072c393a42Smrg><DIV 2082c393a42SmrgCLASS="NAVFOOTER" 2092c393a42Smrg><HR 2102c393a42SmrgALIGN="LEFT" 2112c393a42SmrgWIDTH="100%"><TABLE 2122c393a42SmrgSUMMARY="Footer navigation table" 2132c393a42SmrgWIDTH="100%" 2142c393a42SmrgBORDER="0" 2152c393a42SmrgCELLPADDING="0" 2162c393a42SmrgCELLSPACING="0" 2172c393a42Smrg><TR 2182c393a42Smrg><TD 2192c393a42SmrgWIDTH="33%" 2202c393a42SmrgALIGN="left" 2212c393a42SmrgVALIGN="top" 2222c393a42Smrg><A 223a6844aabSmrgHREF="t1.html" 2242c393a42SmrgACCESSKEY="P" 225a6844aabSmrg><<< Previous</A 2262c393a42Smrg></TD 2272c393a42Smrg><TD 2282c393a42SmrgWIDTH="34%" 2292c393a42SmrgALIGN="center" 2302c393a42SmrgVALIGN="top" 2312c393a42Smrg><A 232a6844aabSmrgHREF="t1.html" 2332c393a42SmrgACCESSKEY="H" 2342c393a42Smrg>Home</A 2352c393a42Smrg></TD 2362c393a42Smrg><TD 2372c393a42SmrgWIDTH="33%" 2382c393a42SmrgALIGN="right" 2392c393a42SmrgVALIGN="top" 2402c393a42Smrg><A 2412c393a42SmrgHREF="x31.html" 2422c393a42SmrgACCESSKEY="N" 243a6844aabSmrg>Next >>></A 2442c393a42Smrg></TD 2452c393a42Smrg></TR 2462c393a42Smrg><TR 2472c393a42Smrg><TD 2482c393a42SmrgWIDTH="33%" 2492c393a42SmrgALIGN="left" 2502c393a42SmrgVALIGN="top" 2512c393a42Smrg></TD 2522c393a42Smrg><TD 2532c393a42SmrgWIDTH="34%" 2542c393a42SmrgALIGN="center" 2552c393a42SmrgVALIGN="top" 2562c393a42Smrg> </TD 2572c393a42Smrg><TD 2582c393a42SmrgWIDTH="33%" 2592c393a42SmrgALIGN="right" 2602c393a42SmrgVALIGN="top" 2612c393a42Smrg>Datatypes</TD 2622c393a42Smrg></TR 2632c393a42Smrg></TABLE 2642c393a42Smrg></DIV 2652c393a42Smrg></BODY 2662c393a42Smrg></HTML 2672c393a42Smrg>