x19.html revision 2c393a42
12c393a42Smrg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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"
102c393a42SmrgHREF="index.html"><LINK
112c393a42SmrgREL="PREVIOUS"
122c393a42SmrgHREF="index.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
432c393a42SmrgHREF="index.html"
442c393a42SmrgACCESSKEY="P"
452c393a42Smrg>Prev</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"
592c393a42Smrg>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"
722c393a42Smrg>2. 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"
852c393a42Smrg>2.1. FONT CONFIGURATION</A
862c393a42Smrg></H2
872c393a42Smrg><P
882c393a42Smrg>The configuration module consists of the FcConfig datatype, libexpat and
892c393a42SmrgFcConfigParse which walks over an XML tree and ammends 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"
1212c393a42Smrg>2.2. 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
1272c393a42Smrgconvenience for the applications rendering mechanism.
1282c393a42Smrg    </P
1292c393a42Smrg><PRE
1302c393a42SmrgCLASS="PROGRAMLISTING"
1312c393a42Smrg>                 Property Definitions
1322c393a42Smrg
1332c393a42Smrg    Property       CPP Symbol           Type    Description
1342c393a42Smrg    ----------------------------------------------------
1352c393a42Smrg    family         FC_FAMILY            String  Font family names
1362c393a42Smrg    familylang     FC_FAMILYLANG        String  Language cooresponding to
1372c393a42Smrg                                                each family name
1382c393a42Smrg    style          FC_STYLE             String  Font style. Overrides weight
1392c393a42Smrg                                                and slant
1402c393a42Smrg    stylelang      FC_STYLELANG         String  Language cooresponding to
1412c393a42Smrg                                                each style name
1422c393a42Smrg    fullname       FC_FULLNAME          String  Font face full name where
1432c393a42Smrg                                                different from family and
1442c393a42Smrg                                                family + style
1452c393a42Smrg    fullnamelang   FC_FULLNAMELANG      String  Language cooresponding to
1462c393a42Smrg                                                each fullname
1472c393a42Smrg    slant          FC_SLANT             Int     Italic, oblique or roman
1482c393a42Smrg    weight         FC_WEIGHT            Int     Light, medium, demibold,
1492c393a42Smrg                                                bold or black
1502c393a42Smrg    size           FC_SIZE              Double  Point size
1512c393a42Smrg    width          FC_WIDTH             Int     Condensed, normal or expanded
1522c393a42Smrg    aspect         FC_ASPECT            Double  Stretches glyphs horizontally
1532c393a42Smrg                                                before hinting
1542c393a42Smrg    pixelsize      FC_PIXEL_SIZE        Double  Pixel size
1552c393a42Smrg    spacing        FC_SPACING           Int     Proportional, dual-width,
1562c393a42Smrg                                                monospace or charcell
1572c393a42Smrg    foundry        FC_FOUNDRY           String  Font foundry name
1582c393a42Smrg    antialias      FC_ANTIALIAS         Bool    Whether glyphs can be
1592c393a42Smrg                                                antialiased
1602c393a42Smrg    hinting        FC_HINTING           Bool    Whether the rasterizer should
1612c393a42Smrg                                                use hinting
1622c393a42Smrg    hintstyle      FC_HINT_STYLE        Int     Automatic hinting style
1632c393a42Smrg    verticallayout FC_VERTICAL_LAYOUT   Bool    Use vertical layout
1642c393a42Smrg    autohint       FC_AUTOHINT          Bool    Use autohinter instead of
1652c393a42Smrg                                                normal hinter
1662c393a42Smrg    globaladvance  FC_GLOBAL_ADVANCE    Bool    Use font global advance data
1672c393a42Smrg    file           FC_FILE              String  The filename holding the font
1682c393a42Smrg    index          FC_INDEX             Int     The index of the font within
1692c393a42Smrg                                                the file
1702c393a42Smrg    ftface         FC_FT_FACE           FT_Face Use the specified FreeType
1712c393a42Smrg                                                face object
1722c393a42Smrg    rasterizer     FC_RASTERIZER        String  Which rasterizer is in use
1732c393a42Smrg    outline        FC_OUTLINE           Bool    Whether the glyphs are outlines
1742c393a42Smrg    scalable       FC_SCALABLE          Bool    Whether glyphs can be scaled
1752c393a42Smrg    scale          FC_SCALE             Double  Scale factor for point-&#62;pixel
1762c393a42Smrg                                                conversions
1772c393a42Smrg    dpi            FC_DPI               Double  Target dots per inch
1782c393a42Smrg    rgba           FC_RGBA              Int     unknown, rgb, bgr, vrgb,
1792c393a42Smrg                                                vbgr, none - subpixel geometry
1802c393a42Smrg    lcdfilter      FC_LCD_FILTER        Int     Type of LCD filter
1812c393a42Smrg    minspace       FC_MINSPACE          Bool    Eliminate leading from line
1822c393a42Smrg                                                spacing
1832c393a42Smrg    charset        FC_CHARSET           CharSet Unicode chars encoded by
1842c393a42Smrg                                                the font
1852c393a42Smrg    lang           FC_LANG              LangSet Set of RFC-3066-style
1862c393a42Smrg                                                languages this font supports
1872c393a42Smrg    fontversion    FC_FONTVERSION       Int     Version number of the font
1882c393a42Smrg    capability     FC_CAPABILITY        String  List of layout capabilities in
1892c393a42Smrg                                                the font
1902c393a42Smrg    embolden       FC_EMBOLDEN          Bool    Rasterizer should
1912c393a42Smrg                                                synthetically embolden the font
1922c393a42Smrg    </PRE
1932c393a42Smrg></DIV
1942c393a42Smrg></DIV
1952c393a42Smrg><DIV
1962c393a42SmrgCLASS="NAVFOOTER"
1972c393a42Smrg><HR
1982c393a42SmrgALIGN="LEFT"
1992c393a42SmrgWIDTH="100%"><TABLE
2002c393a42SmrgSUMMARY="Footer navigation table"
2012c393a42SmrgWIDTH="100%"
2022c393a42SmrgBORDER="0"
2032c393a42SmrgCELLPADDING="0"
2042c393a42SmrgCELLSPACING="0"
2052c393a42Smrg><TR
2062c393a42Smrg><TD
2072c393a42SmrgWIDTH="33%"
2082c393a42SmrgALIGN="left"
2092c393a42SmrgVALIGN="top"
2102c393a42Smrg><A
2112c393a42SmrgHREF="index.html"
2122c393a42SmrgACCESSKEY="P"
2132c393a42Smrg>Prev</A
2142c393a42Smrg></TD
2152c393a42Smrg><TD
2162c393a42SmrgWIDTH="34%"
2172c393a42SmrgALIGN="center"
2182c393a42SmrgVALIGN="top"
2192c393a42Smrg><A
2202c393a42SmrgHREF="index.html"
2212c393a42SmrgACCESSKEY="H"
2222c393a42Smrg>Home</A
2232c393a42Smrg></TD
2242c393a42Smrg><TD
2252c393a42SmrgWIDTH="33%"
2262c393a42SmrgALIGN="right"
2272c393a42SmrgVALIGN="top"
2282c393a42Smrg><A
2292c393a42SmrgHREF="x31.html"
2302c393a42SmrgACCESSKEY="N"
2312c393a42Smrg>Next</A
2322c393a42Smrg></TD
2332c393a42Smrg></TR
2342c393a42Smrg><TR
2352c393a42Smrg><TD
2362c393a42SmrgWIDTH="33%"
2372c393a42SmrgALIGN="left"
2382c393a42SmrgVALIGN="top"
2392c393a42Smrg></TD
2402c393a42Smrg><TD
2412c393a42SmrgWIDTH="34%"
2422c393a42SmrgALIGN="center"
2432c393a42SmrgVALIGN="top"
2442c393a42Smrg>&nbsp;</TD
2452c393a42Smrg><TD
2462c393a42SmrgWIDTH="33%"
2472c393a42SmrgALIGN="right"
2482c393a42SmrgVALIGN="top"
2492c393a42Smrg>Datatypes</TD
2502c393a42Smrg></TR
2512c393a42Smrg></TABLE
2522c393a42Smrg></DIV
2532c393a42Smrg></BODY
2542c393a42Smrg></HTML
2552c393a42Smrg>