fontconfig-devel.txt revision 6fc018e4
16fc018e4Smrg Fontconfig Developers Reference, Version 2.11.0 22c393a42Smrg 3ca08ab68Smrg Copyright © 2002 Keith Packard 42c393a42Smrg 5ca08ab68Smrg Permission to use, copy, modify, distribute, and sell this software and 6ca08ab68Smrg its documentation for any purpose is hereby granted without fee, provided 7ca08ab68Smrg that the above copyright notice appear in all copies and that both that 8ca08ab68Smrg copyright notice and this permission notice appear in supporting 9ca08ab68Smrg documentation, and that the name of the author(s) not be used in 10ca08ab68Smrg advertising or publicity pertaining to distribution of the software 11ca08ab68Smrg without specific, written prior permission. The authors make no 12ca08ab68Smrg representations about the suitability of this software for any purpose. It 13ca08ab68Smrg is provided "as is" without express or implied warranty. 142c393a42Smrg 15ca08ab68Smrg THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16ca08ab68Smrg INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 17ca08ab68Smrg EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 18ca08ab68Smrg CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 19ca08ab68Smrg USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 20ca08ab68Smrg OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 21ca08ab68Smrg PERFORMANCE OF THIS SOFTWARE. 222c393a42Smrg 23ca08ab68Smrg ------------------------------------------------------- 242c393a42Smrg 25ca08ab68Smrg Table of Contents 26ca08ab68Smrg 27ca08ab68Smrg [1]DESCRIPTION 28ca08ab68Smrg 29ca08ab68Smrg [2]FUNCTIONAL OVERVIEW 30ca08ab68Smrg 31ca08ab68Smrg [3]Datatypes 32ca08ab68Smrg 33ca08ab68Smrg [4]FUNCTIONS 342c393a42Smrg 35a6844aabSmrgDESCRIPTION 362c393a42Smrg 37ca08ab68Smrg Fontconfig is a library designed to provide system-wide font 38ca08ab68Smrg configuration, customization and application access. 392c393a42Smrg 40ca08ab68Smrg -------------------------------------------------------------------------- 412c393a42Smrg 42a6844aabSmrgFUNCTIONAL OVERVIEW 43a6844aabSmrg 44ca08ab68Smrg Fontconfig contains two essential modules, the configuration module which 45ca08ab68Smrg builds an internal configuration from XML files and the matching module 46ca08ab68Smrg which accepts font patterns and returns the nearest matching font. 47a6844aabSmrg 48ca08ab68Smrg -------------------------------------------------------------------------- 49a6844aabSmrg 50ca08ab68Smrg FONT CONFIGURATION 51a6844aabSmrg 52ca08ab68Smrg The configuration module consists of the FcConfig datatype, libexpat and 53ca08ab68Smrg FcConfigParse which walks over an XML tree and amends a configuration with 54ca08ab68Smrg data found within. From an external perspective, configuration of the 55ca08ab68Smrg library consists of generating a valid XML tree and feeding that to 56ca08ab68Smrg FcConfigParse. The only other mechanism provided to applications for 57ca08ab68Smrg changing the running configuration is to add fonts and directories to the 58ca08ab68Smrg list of application-provided font files. 59a6844aabSmrg 60ca08ab68Smrg The intent is to make font configurations relatively static, and shared by 61ca08ab68Smrg as many applications as possible. It is hoped that this will lead to more 62ca08ab68Smrg stable font selection when passing names from one application to another. 63ca08ab68Smrg XML was chosen as a configuration file format because it provides a format 64ca08ab68Smrg which is easy for external agents to edit while retaining the correct 65ca08ab68Smrg structure and syntax. 66a6844aabSmrg 67ca08ab68Smrg Font configuration is separate from font matching; applications needing to 68ca08ab68Smrg do their own matching can access the available fonts from the library and 69ca08ab68Smrg perform private matching. The intent is to permit applications to pick and 70ca08ab68Smrg choose appropriate functionality from the library instead of forcing them 71ca08ab68Smrg to choose between this library and a private configuration mechanism. The 72ca08ab68Smrg hope is that this will ensure that configuration of fonts for all 73ca08ab68Smrg applications can be centralized in one place. Centralizing font 74ca08ab68Smrg configuration will simplify and regularize font installation and 75ca08ab68Smrg customization. 76a6844aabSmrg 77ca08ab68Smrg -------------------------------------------------------------------------- 78a6844aabSmrg 79ca08ab68Smrg FONT PROPERTIES 80a6844aabSmrg 81ca08ab68Smrg While font patterns may contain essentially any properties, there are some 82ca08ab68Smrg well known properties with associated types. Fontconfig uses some of these 83ca08ab68Smrg properties for font matching and font completion. Others are provided as a 84ca08ab68Smrg convenience for the application's rendering mechanism. 852c393a42Smrg 862c393a42Smrg Property Definitions 872c393a42Smrg 88ca08ab68Smrg Property C Preprocessor Symbol Type Description 892c393a42Smrg ---------------------------------------------------- 90ca08ab68Smrg family FC_FAMILY String Font family names 91ca08ab68Smrg familylang FC_FAMILYLANG String Language corresponding to 92ca08ab68Smrg each family name 93ca08ab68Smrg style FC_STYLE String Font style. Overrides weight 94ca08ab68Smrg and slant 95ca08ab68Smrg stylelang FC_STYLELANG String Language corresponding to 96ca08ab68Smrg each style name 97ca08ab68Smrg fullname FC_FULLNAME String Font face full name where 98ca08ab68Smrg different from family and 99ca08ab68Smrg family + style 100ca08ab68Smrg fullnamelang FC_FULLNAMELANG String Language corresponding to 101ca08ab68Smrg each fullname 102ca08ab68Smrg slant FC_SLANT Int Italic, oblique or roman 103ca08ab68Smrg weight FC_WEIGHT Int Light, medium, demibold, 104ca08ab68Smrg bold or black 105ca08ab68Smrg size FC_SIZE Double Point size 106ca08ab68Smrg width FC_WIDTH Int Condensed, normal or expanded 107ca08ab68Smrg aspect FC_ASPECT Double Stretches glyphs horizontally 108ca08ab68Smrg before hinting 109ca08ab68Smrg pixelsize FC_PIXEL_SIZE Double Pixel size 110ca08ab68Smrg spacing FC_SPACING Int Proportional, dual-width, 111ca08ab68Smrg monospace or charcell 112ca08ab68Smrg foundry FC_FOUNDRY String Font foundry name 113ca08ab68Smrg antialias FC_ANTIALIAS Bool Whether glyphs can be 114ca08ab68Smrg antialiased 115ca08ab68Smrg hinting FC_HINTING Bool Whether the rasterizer should 116ca08ab68Smrg use hinting 117ca08ab68Smrg hintstyle FC_HINT_STYLE Int Automatic hinting style 118ca08ab68Smrg verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 119ca08ab68Smrg autohint FC_AUTOHINT Bool Use autohinter instead of 120ca08ab68Smrg normal hinter 121ca08ab68Smrg globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) 122ca08ab68Smrg file FC_FILE String The filename holding the font 123ca08ab68Smrg index FC_INDEX Int The index of the font within 124ca08ab68Smrg the file 125ca08ab68Smrg ftface FC_FT_FACE FT_Face Use the specified FreeType 126ca08ab68Smrg face object 1276fc018e4Smrg rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated) 128ca08ab68Smrg outline FC_OUTLINE Bool Whether the glyphs are outlines 129ca08ab68Smrg scalable FC_SCALABLE Bool Whether glyphs can be scaled 130ca08ab68Smrg scale FC_SCALE Double Scale factor for point->pixel 131ca08ab68Smrg conversions 132ca08ab68Smrg dpi FC_DPI Double Target dots per inch 133ca08ab68Smrg rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 134ca08ab68Smrg vbgr, none - subpixel geometry 135ca08ab68Smrg lcdfilter FC_LCD_FILTER Int Type of LCD filter 136ca08ab68Smrg minspace FC_MINSPACE Bool Eliminate leading from line 137ca08ab68Smrg spacing 138ca08ab68Smrg charset FC_CHARSET CharSet Unicode chars encoded by 139ca08ab68Smrg the font 140ca08ab68Smrg lang FC_LANG LangSet Set of RFC-3066-style 141ca08ab68Smrg languages this font supports 142ca08ab68Smrg fontversion FC_FONTVERSION Int Version number of the font 143ca08ab68Smrg capability FC_CAPABILITY String List of layout capabilities in 144ca08ab68Smrg the font 145ca08ab68Smrg embolden FC_EMBOLDEN Bool Rasterizer should 146ca08ab68Smrg synthetically embolden the font 147c9710b42Smrg fontfeatures FC_FONT_FEATURES String List of extra feature tags in 148c9710b42Smrg OpenType to be enabled 149ca08ab68Smrg namelang FC_NAMELANG String Language name to be used for the 150ca08ab68Smrg default value of familylang, 151ca08ab68Smrg stylelang and fullnamelang 152c9710b42Smrg prgname FC_PRGNAME String Name of the running program 1536fc018e4Smrg hash FC_HASH String SHA256 hash value of the font data 1546fc018e4Smrg with "sha256:" prefix. 1556fc018e4Smrg postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript 156ca08ab68Smrg 157ca08ab68Smrg 158ca08ab68Smrg -------------------------------------------------------------------------- 159a6844aabSmrg 160a6844aabSmrgDatatypes 1612c393a42Smrg 162ca08ab68Smrg Fontconfig uses abstract data types to hide internal implementation 163ca08ab68Smrg details for most data structures. A few structures are exposed where 164ca08ab68Smrg appropriate. 1652c393a42Smrg 166ca08ab68Smrg -------------------------------------------------------------------------- 1672c393a42Smrg 168ca08ab68Smrg FcChar8, FcChar16, FcChar32, FcBool 1692c393a42Smrg 170ca08ab68Smrg These are primitive data types; the FcChar* types hold precisely the 171ca08ab68Smrg number of bits stated (if supported by the C implementation). FcBool holds 172ca08ab68Smrg one of two C preprocessor symbols: FcFalse or FcTrue. 1732c393a42Smrg 174ca08ab68Smrg -------------------------------------------------------------------------- 175a6844aabSmrg 176ca08ab68Smrg FcMatrix 177a6844aabSmrg 178ca08ab68Smrg An FcMatrix holds an affine transformation, usually used to reshape 179ca08ab68Smrg glyphs. A small set of matrix operations are provided to manipulate these. 1802c393a42Smrg 181ca08ab68Smrg typedef struct _FcMatrix { 182ca08ab68Smrg double xx, xy, yx, yy; 183ca08ab68Smrg } FcMatrix; 1842c393a42Smrg 1852c393a42Smrg 186ca08ab68Smrg -------------------------------------------------------------------------- 187a6844aabSmrg 188ca08ab68Smrg FcCharSet 189a6844aabSmrg 190ca08ab68Smrg An FcCharSet is an abstract type that holds the set of encoded Unicode 191ca08ab68Smrg chars in a font. Operations to build and compare these sets are provided. 192a6844aabSmrg 193ca08ab68Smrg -------------------------------------------------------------------------- 194a6844aabSmrg 195ca08ab68Smrg FcLangSet 1962c393a42Smrg 197ca08ab68Smrg An FcLangSet is an abstract type that holds the set of languages supported 198ca08ab68Smrg by a font. Operations to build and compare these sets are provided. These 199ca08ab68Smrg are computed for a font based on orthographic information built into the 200ca08ab68Smrg fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 201ca08ab68Smrg languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If 202ca08ab68Smrg you have orthographic information for any of these languages, please 203ca08ab68Smrg submit them. 2042c393a42Smrg 205ca08ab68Smrg -------------------------------------------------------------------------- 2062c393a42Smrg 207ca08ab68Smrg FcLangResult 2082c393a42Smrg 209ca08ab68Smrg An FcLangResult is an enumeration used to return the results of comparing 210ca08ab68Smrg two language strings or FcLangSet objects. FcLangEqual means the objects 211ca08ab68Smrg match language and territory. FcLangDifferentTerritory means the objects 212ca08ab68Smrg match in language but differ in territory. FcLangDifferentLang means the 213ca08ab68Smrg objects differ in language. 2142c393a42Smrg 215ca08ab68Smrg -------------------------------------------------------------------------- 2162c393a42Smrg 217ca08ab68Smrg FcType 2182c393a42Smrg 219ca08ab68Smrg Tags the kind of data stored in an FcValue. 220a6844aabSmrg 221ca08ab68Smrg -------------------------------------------------------------------------- 222a6844aabSmrg 223ca08ab68Smrg FcValue 224a6844aabSmrg 225ca08ab68Smrg An FcValue object holds a single value with one of a number of different 226ca08ab68Smrg types. The 'type' tag indicates which member is valid. 2272c393a42Smrg 228ca08ab68Smrg typedef struct _FcValue { 229ca08ab68Smrg FcType type; 230ca08ab68Smrg union { 231ca08ab68Smrg const FcChar8 *s; 232ca08ab68Smrg int i; 233ca08ab68Smrg FcBool b; 234ca08ab68Smrg double d; 235ca08ab68Smrg const FcMatrix *m; 236ca08ab68Smrg const FcCharSet *c; 237ca08ab68Smrg void *f; 238ca08ab68Smrg const FcLangSet *l; 239ca08ab68Smrg } u; 240ca08ab68Smrg } FcValue; 2412c393a42Smrg 242a6844aabSmrg 243ca08ab68Smrg FcValue Members 2442c393a42Smrg 245ca08ab68Smrg Type Union member Datatype 246ca08ab68Smrg -------------------------------- 247ca08ab68Smrg FcTypeVoid (none) (none) 248ca08ab68Smrg FcTypeInteger i int 249ca08ab68Smrg FcTypeDouble d double 250ca08ab68Smrg FcTypeString s FcChar8 * 251ca08ab68Smrg FcTypeBool b b 252ca08ab68Smrg FcTypeMatrix m FcMatrix * 253ca08ab68Smrg FcTypeCharSet c FcCharSet * 254ca08ab68Smrg FcTypeFTFace f void * (FT_Face) 255ca08ab68Smrg FcTypeLangSet l FcLangSet * 2562c393a42Smrg 2572c393a42Smrg 258ca08ab68Smrg -------------------------------------------------------------------------- 259a6844aabSmrg 260ca08ab68Smrg FcPattern 2612c393a42Smrg 262ca08ab68Smrg holds a set of names with associated value lists; each name refers to a 263ca08ab68Smrg property of a font. FcPatterns are used as inputs to the matching code as 264ca08ab68Smrg well as holding information about specific fonts. Each property can hold 265ca08ab68Smrg one or more values; conventionally all of the same type, although the 266ca08ab68Smrg interface doesn't demand that. 267a6844aabSmrg 268ca08ab68Smrg -------------------------------------------------------------------------- 269a6844aabSmrg 270ca08ab68Smrg FcFontSet 2712c393a42Smrg 272ca08ab68Smrg typedef struct _FcFontSet { 273ca08ab68Smrg int nfont; 274ca08ab68Smrg int sfont; 275ca08ab68Smrg FcPattern **fonts; 276ca08ab68Smrg } FcFontSet; 2772c393a42Smrg 2782c393a42Smrg 279ca08ab68Smrg An FcFontSet contains a list of FcPatterns. Internally fontconfig uses 280ca08ab68Smrg this data structure to hold sets of fonts. Externally, fontconfig returns 281ca08ab68Smrg the results of listing fonts in this format. 'nfont' holds the number of 282ca08ab68Smrg patterns in the 'fonts' array; 'sfont' is used to indicate the size of 283ca08ab68Smrg that array. 284a6844aabSmrg 285ca08ab68Smrg -------------------------------------------------------------------------- 2862c393a42Smrg 287ca08ab68Smrg FcStrSet, FcStrList 2882c393a42Smrg 289ca08ab68Smrg FcStrSet holds a list of strings that can be appended to and enumerated. 290ca08ab68Smrg Its unique characteristic is that the enumeration works even while strings 291ca08ab68Smrg are appended during enumeration. FcStrList is used during enumeration to 292ca08ab68Smrg safely and correctly walk the list of strings even while that list is 293ca08ab68Smrg edited in the middle of enumeration. 294a6844aabSmrg 295ca08ab68Smrg -------------------------------------------------------------------------- 296a6844aabSmrg 297ca08ab68Smrg FcObjectSet 2982c393a42Smrg 299ca08ab68Smrg typedef struct _FcObjectSet { 300ca08ab68Smrg int nobject; 301ca08ab68Smrg int sobject; 302ca08ab68Smrg const char **objects; 303ca08ab68Smrg } FcObjectSet; 3042c393a42Smrg 3052c393a42Smrg 306ca08ab68Smrg holds a set of names and is used to specify which fields from fonts are 307ca08ab68Smrg placed in the the list of returned patterns when listing fonts. 308a6844aabSmrg 309ca08ab68Smrg -------------------------------------------------------------------------- 310a6844aabSmrg 311ca08ab68Smrg FcObjectType 3122c393a42Smrg 313ca08ab68Smrg typedef struct _FcObjectType { 314ca08ab68Smrg const char *object; 315ca08ab68Smrg FcType type; 316ca08ab68Smrg } FcObjectType; 3172c393a42Smrg 3182c393a42Smrg 319ca08ab68Smrg marks the type of a pattern element generated when parsing font names. 320ca08ab68Smrg Applications can add new object types so that font names may contain the 321ca08ab68Smrg new elements. 322a6844aabSmrg 323ca08ab68Smrg -------------------------------------------------------------------------- 324a6844aabSmrg 325ca08ab68Smrg FcConstant 3262c393a42Smrg 327ca08ab68Smrg typedef struct _FcConstant { 328ca08ab68Smrg const FcChar8 *name; 329ca08ab68Smrg const char *object; 330ca08ab68Smrg int value; 331ca08ab68Smrg } FcConstant; 3322c393a42Smrg 3332c393a42Smrg 334ca08ab68Smrg Provides for symbolic constants for new pattern elements. When 'name' is 335ca08ab68Smrg seen in a font name, an 'object' element is created with value 'value'. 336a6844aabSmrg 337ca08ab68Smrg -------------------------------------------------------------------------- 338a6844aabSmrg 339ca08ab68Smrg FcBlanks 340a6844aabSmrg 341ca08ab68Smrg holds a list of Unicode chars which are expected to be blank; unexpectedly 342ca08ab68Smrg blank chars are assumed to be invalid and are elided from the charset 343ca08ab68Smrg associated with the font. 3442c393a42Smrg 345ca08ab68Smrg -------------------------------------------------------------------------- 3462c393a42Smrg 347ca08ab68Smrg FcFileCache 3482c393a42Smrg 349ca08ab68Smrg holds the per-user cache information for use while loading the font 350ca08ab68Smrg database. This is built automatically for the current configuration when 351ca08ab68Smrg that is loaded. Applications must always pass '0' when one is requested. 3522c393a42Smrg 353ca08ab68Smrg -------------------------------------------------------------------------- 3542c393a42Smrg 355ca08ab68Smrg FcConfig 3562c393a42Smrg 357ca08ab68Smrg holds a complete configuration of the library; there is one default 358ca08ab68Smrg configuration, other can be constructed from XML data structures. All 359ca08ab68Smrg public entry points that need global data can take an optional FcConfig* 360ca08ab68Smrg argument; passing 0 uses the default configuration. FcConfig objects hold 361ca08ab68Smrg two sets of fonts, the first contains those specified by the 362ca08ab68Smrg configuration, the second set holds those added by the application at 363ca08ab68Smrg run-time. Interfaces that need to reference a particular set use one of 364ca08ab68Smrg the FcSetName enumerated values. 3652c393a42Smrg 366ca08ab68Smrg -------------------------------------------------------------------------- 3672c393a42Smrg 368ca08ab68Smrg FcSetName 369a6844aabSmrg 370ca08ab68Smrg Specifies one of the two sets of fonts available in a configuration; 371ca08ab68Smrg FcSetSystem for those fonts specified in the configuration and 372ca08ab68Smrg FcSetApplication which holds fonts provided by the application. 373a6844aabSmrg 374ca08ab68Smrg -------------------------------------------------------------------------- 375a6844aabSmrg 376ca08ab68Smrg FcResult 377a6844aabSmrg 378ca08ab68Smrg Used as a return type for functions manipulating FcPattern objects. 3792c393a42Smrg 380ca08ab68Smrg FcResult Values 381ca08ab68Smrg Result Code Meaning 382ca08ab68Smrg ----------------------------------------------------------- 383ca08ab68Smrg FcResultMatch Object exists with the specified ID 384ca08ab68Smrg FcResultNoMatch Object doesn't exist at all 385ca08ab68Smrg FcResultTypeMismatch Object exists, but the type doesn't match 386ca08ab68Smrg FcResultNoId Object exists, but has fewer values 387ca08ab68Smrg than specified 388ca08ab68Smrg FcResultOutOfMemory malloc failed 3892c393a42Smrg 3902c393a42Smrg 391ca08ab68Smrg -------------------------------------------------------------------------- 392a6844aabSmrg 393ca08ab68Smrg FcAtomic 394a6844aabSmrg 395ca08ab68Smrg Used for locking access to configuration files. Provides a safe way to 396ca08ab68Smrg update configuration files. 3972c393a42Smrg 398ca08ab68Smrg -------------------------------------------------------------------------- 3992c393a42Smrg 400ca08ab68Smrg FcCache 4012c393a42Smrg 402ca08ab68Smrg Holds information about the fonts contained in a single directory. Normal 403ca08ab68Smrg applications need not worry about this as caches for font access are 404ca08ab68Smrg automatically managed by the library. Applications dealing with cache 405ca08ab68Smrg management may want to use some of these objects in their work, however 406ca08ab68Smrg the included 'fc-cache' program generally suffices for all of that. 4072c393a42Smrg 408ca08ab68Smrg -------------------------------------------------------------------------- 4092c393a42Smrg 410a6844aabSmrgFUNCTIONS 4112c393a42Smrg 412ca08ab68Smrg These are grouped by functionality, often using the main data type being 413ca08ab68Smrg manipulated. 414ca08ab68Smrg 415ca08ab68Smrg -------------------------------------------------------------------------- 4162c393a42Smrg 417ca08ab68Smrg Initialization 418a6844aabSmrg 419ca08ab68Smrg Table of Contents 420a6844aabSmrg 421ca08ab68Smrg [5]FcInitLoadConfig -- load configuration 422a6844aabSmrg 423ca08ab68Smrg [6]FcInitLoadConfigAndFonts -- load configuration and font data 4242c393a42Smrg 425ca08ab68Smrg [7]FcInit -- initialize fontconfig library 426ca08ab68Smrg 427ca08ab68Smrg [8]FcFini -- finalize fontconfig library 428ca08ab68Smrg 429ca08ab68Smrg [9]FcGetVersion -- library version number 430ca08ab68Smrg 431ca08ab68Smrg [10]FcInitReinitialize -- re-initialize library 432ca08ab68Smrg 433ca08ab68Smrg [11]FcInitBringUptoDate -- reload configuration files if needed 434ca08ab68Smrg 435ca08ab68Smrg These functions provide some control over how the library is initialized. 436ca08ab68Smrg 437ca08ab68Smrg FcInitLoadConfig 4382c393a42Smrg 4392c393a42SmrgName 4402c393a42Smrg 441ca08ab68Smrg FcInitLoadConfig -- load configuration 4422c393a42Smrg 4432c393a42SmrgSynopsis 4442c393a42Smrg 445c9710b42Smrg #include <fontconfig/fontconfig.h> 4462c393a42Smrg 447a6844aabSmrg 448ca08ab68Smrg FcConfig * FcInitLoadConfig(void); 4492c393a42Smrg 4502c393a42SmrgDescription 4512c393a42Smrg 452ca08ab68Smrg Loads the default configuration file and returns the resulting 453ca08ab68Smrg configuration. Does not load any font information. 4542c393a42Smrg 4552c393a42SmrgVersion 4562c393a42Smrg 4576fc018e4Smrg Fontconfig version 2.11.0 4582c393a42Smrg 459ca08ab68Smrg FcInitLoadConfigAndFonts 4602c393a42Smrg 4612c393a42SmrgName 4622c393a42Smrg 463ca08ab68Smrg FcInitLoadConfigAndFonts -- load configuration and font data 4642c393a42Smrg 4652c393a42SmrgSynopsis 4662c393a42Smrg 467c9710b42Smrg #include <fontconfig/fontconfig.h> 4682c393a42Smrg 469a6844aabSmrg 470ca08ab68Smrg FcConfig * FcInitLoadConfigAndFonts(void); 4712c393a42Smrg 4722c393a42SmrgDescription 4732c393a42Smrg 474ca08ab68Smrg Loads the default configuration file and builds information about the 475ca08ab68Smrg available fonts. Returns the resulting configuration. 4762c393a42Smrg 4772c393a42SmrgVersion 4782c393a42Smrg 4796fc018e4Smrg Fontconfig version 2.11.0 4802c393a42Smrg 481ca08ab68Smrg FcInit 4822c393a42Smrg 4832c393a42SmrgName 4842c393a42Smrg 485ca08ab68Smrg FcInit -- initialize fontconfig library 4862c393a42Smrg 4872c393a42SmrgSynopsis 4882c393a42Smrg 489c9710b42Smrg #include <fontconfig/fontconfig.h> 4902c393a42Smrg 491a6844aabSmrg 492ca08ab68Smrg FcBool FcInit(void); 4932c393a42Smrg 4942c393a42SmrgDescription 4952c393a42Smrg 496ca08ab68Smrg Loads the default configuration file and the fonts referenced therein and 497ca08ab68Smrg sets the default configuration to that result. Returns whether this 498ca08ab68Smrg process succeeded or not. If the default configuration has already been 499ca08ab68Smrg loaded, this routine does nothing and returns FcTrue. 5002c393a42Smrg 5012c393a42SmrgVersion 5022c393a42Smrg 5036fc018e4Smrg Fontconfig version 2.11.0 5042c393a42Smrg 505ca08ab68Smrg FcFini 5062c393a42Smrg 5072c393a42SmrgName 5082c393a42Smrg 509ca08ab68Smrg FcFini -- finalize fontconfig library 5102c393a42Smrg 5112c393a42SmrgSynopsis 5122c393a42Smrg 513c9710b42Smrg #include <fontconfig/fontconfig.h> 5142c393a42Smrg 515a6844aabSmrg 516ca08ab68Smrg void FcFini(void); 5172c393a42Smrg 5182c393a42SmrgDescription 5192c393a42Smrg 520ca08ab68Smrg Frees all data structures allocated by previous calls to fontconfig 521ca08ab68Smrg functions. Fontconfig returns to an uninitialized state, requiring a new 522ca08ab68Smrg call to one of the FcInit functions before any other fontconfig function 523ca08ab68Smrg may be called. 5242c393a42Smrg 5252c393a42SmrgVersion 5262c393a42Smrg 5276fc018e4Smrg Fontconfig version 2.11.0 5282c393a42Smrg 529ca08ab68Smrg FcGetVersion 5302c393a42Smrg 5312c393a42SmrgName 5322c393a42Smrg 533ca08ab68Smrg FcGetVersion -- library version number 5342c393a42Smrg 5352c393a42SmrgSynopsis 5362c393a42Smrg 537c9710b42Smrg #include <fontconfig/fontconfig.h> 5382c393a42Smrg 539a6844aabSmrg 540ca08ab68Smrg int FcGetVersion(void); 5412c393a42Smrg 5422c393a42SmrgDescription 5432c393a42Smrg 544ca08ab68Smrg Returns the version number of the library. 5452c393a42Smrg 5462c393a42SmrgVersion 5472c393a42Smrg 5486fc018e4Smrg Fontconfig version 2.11.0 5492c393a42Smrg 550ca08ab68Smrg FcInitReinitialize 5512c393a42Smrg 5522c393a42SmrgName 5532c393a42Smrg 554ca08ab68Smrg FcInitReinitialize -- re-initialize library 5552c393a42Smrg 5562c393a42SmrgSynopsis 5572c393a42Smrg 558c9710b42Smrg #include <fontconfig/fontconfig.h> 5592c393a42Smrg 560a6844aabSmrg 561ca08ab68Smrg FcBool FcInitReinitialize(void); 5622c393a42Smrg 5632c393a42SmrgDescription 5642c393a42Smrg 565ca08ab68Smrg Forces the default configuration file to be reloaded and resets the 566ca08ab68Smrg default configuration. Returns FcFalse if the configuration cannot be 567ca08ab68Smrg reloaded (due to configuration file errors, allocation failures or other 568ca08ab68Smrg issues) and leaves the existing configuration unchanged. Otherwise returns 569ca08ab68Smrg FcTrue. 5702c393a42Smrg 5712c393a42SmrgVersion 5722c393a42Smrg 5736fc018e4Smrg Fontconfig version 2.11.0 5742c393a42Smrg 575ca08ab68Smrg FcInitBringUptoDate 5762c393a42Smrg 5772c393a42SmrgName 5782c393a42Smrg 579ca08ab68Smrg FcInitBringUptoDate -- reload configuration files if needed 5802c393a42Smrg 5812c393a42SmrgSynopsis 5822c393a42Smrg 583c9710b42Smrg #include <fontconfig/fontconfig.h> 5842c393a42Smrg 585a6844aabSmrg 586ca08ab68Smrg FcBool FcInitBringUptoDate(void); 5872c393a42Smrg 5882c393a42SmrgDescription 5892c393a42Smrg 590ca08ab68Smrg Checks the rescan interval in the default configuration, checking the 591ca08ab68Smrg configuration if the interval has passed and reloading the configuration 592ca08ab68Smrg if when any changes are detected. Returns FcFalse if the configuration 593ca08ab68Smrg cannot be reloaded (see FcInitReinitialize). Otherwise returns FcTrue. 5942c393a42Smrg 5952c393a42SmrgVersion 5962c393a42Smrg 5976fc018e4Smrg Fontconfig version 2.11.0 598ca08ab68Smrg 599ca08ab68Smrg -------------------------------------------------------------------------- 600ca08ab68Smrg 601ca08ab68Smrg FcPattern 602ca08ab68Smrg 603ca08ab68Smrg Table of Contents 604ca08ab68Smrg 605ca08ab68Smrg [12]FcPatternCreate -- Create a pattern 606ca08ab68Smrg 607ca08ab68Smrg [13]FcPatternDuplicate -- Copy a pattern 608ca08ab68Smrg 609ca08ab68Smrg [14]FcPatternReference -- Increment pattern reference count 610ca08ab68Smrg 611ca08ab68Smrg [15]FcPatternDestroy -- Destroy a pattern 612ca08ab68Smrg 613ca08ab68Smrg [16]FcPatternEqual -- Compare patterns 614ca08ab68Smrg 615ca08ab68Smrg [17]FcPatternEqualSubset -- Compare portions of patterns 616ca08ab68Smrg 617ca08ab68Smrg [18]FcPatternFilter -- Filter the objects of pattern 618ca08ab68Smrg 619ca08ab68Smrg [19]FcPatternHash -- Compute a pattern hash value 620ca08ab68Smrg 621ca08ab68Smrg [20]FcPatternAdd -- Add a value to a pattern 622ca08ab68Smrg 623ca08ab68Smrg [21]FcPatternAddWeak -- Add a value to a pattern with weak binding 624ca08ab68Smrg 625ca08ab68Smrg [22]FcPatternAdd-Type -- Add a typed value to a pattern 626ca08ab68Smrg 627ca08ab68Smrg [23]FcPatternGet -- Return a value from a pattern 628ca08ab68Smrg 629ca08ab68Smrg [24]FcPatternGet-Type -- Return a typed value from a pattern 630ca08ab68Smrg 631ca08ab68Smrg [25]FcPatternBuild -- Create patterns from arguments 632ca08ab68Smrg 633ca08ab68Smrg [26]FcPatternDel -- Delete a property from a pattern 634ca08ab68Smrg 635ca08ab68Smrg [27]FcPatternRemove -- Remove one object of the specified type from the 636ca08ab68Smrg pattern 637ca08ab68Smrg 638ca08ab68Smrg [28]FcPatternPrint -- Print a pattern for debugging 639ca08ab68Smrg 640ca08ab68Smrg [29]FcDefaultSubstitute -- Perform default substitutions in a pattern 6412c393a42Smrg 642ca08ab68Smrg [30]FcNameParse -- Parse a pattern string 6432c393a42Smrg 644ca08ab68Smrg [31]FcNameUnparse -- Convert a pattern back into a string that can be 645ca08ab68Smrg parsed 6462c393a42Smrg 647ca08ab68Smrg [32]FcPatternFormat -- Format a pattern into a string according to a 648ca08ab68Smrg format specifier 6492c393a42Smrg 650ca08ab68Smrg An FcPattern is an opaque type that holds both patterns to match against 651ca08ab68Smrg the available fonts, as well as the information about each font. 6522c393a42Smrg 653ca08ab68Smrg FcPatternCreate 6542c393a42Smrg 6552c393a42SmrgName 6562c393a42Smrg 657ca08ab68Smrg FcPatternCreate -- Create a pattern 6582c393a42Smrg 6592c393a42SmrgSynopsis 6602c393a42Smrg 661c9710b42Smrg #include <fontconfig/fontconfig.h> 6622c393a42Smrg 663a6844aabSmrg 664ca08ab68Smrg FcPattern * FcPatternCreate(void); 6652c393a42Smrg 6662c393a42SmrgDescription 6672c393a42Smrg 668ca08ab68Smrg Creates a pattern with no properties; used to build patterns from scratch. 6692c393a42Smrg 6702c393a42SmrgVersion 6712c393a42Smrg 6726fc018e4Smrg Fontconfig version 2.11.0 6732c393a42Smrg 674ca08ab68Smrg FcPatternDuplicate 6752c393a42Smrg 6762c393a42SmrgName 6772c393a42Smrg 678ca08ab68Smrg FcPatternDuplicate -- Copy a pattern 6792c393a42Smrg 6802c393a42SmrgSynopsis 6812c393a42Smrg 682c9710b42Smrg #include <fontconfig/fontconfig.h> 6832c393a42Smrg 684a6844aabSmrg 685ca08ab68Smrg FcPattern * FcPatternDuplicate(const FcPattern *p); 6862c393a42Smrg 6872c393a42SmrgDescription 6882c393a42Smrg 689ca08ab68Smrg Copy a pattern, returning a new pattern that matches p. Each pattern may 690ca08ab68Smrg be modified without affecting the other. 6912c393a42Smrg 6922c393a42SmrgVersion 6932c393a42Smrg 6946fc018e4Smrg Fontconfig version 2.11.0 6952c393a42Smrg 696ca08ab68Smrg FcPatternReference 6972c393a42Smrg 6982c393a42SmrgName 6992c393a42Smrg 700ca08ab68Smrg FcPatternReference -- Increment pattern reference count 7012c393a42Smrg 7022c393a42SmrgSynopsis 7032c393a42Smrg 704c9710b42Smrg #include <fontconfig/fontconfig.h> 7052c393a42Smrg 706a6844aabSmrg 707ca08ab68Smrg void FcPatternReference(FcPattern *p); 7082c393a42Smrg 7092c393a42SmrgDescription 7102c393a42Smrg 711ca08ab68Smrg Add another reference to p. Patterns are freed only when the reference 712ca08ab68Smrg count reaches zero. 7132c393a42Smrg 7142c393a42SmrgVersion 7152c393a42Smrg 7166fc018e4Smrg Fontconfig version 2.11.0 7172c393a42Smrg 718ca08ab68Smrg FcPatternDestroy 7192c393a42Smrg 7202c393a42SmrgName 7212c393a42Smrg 722ca08ab68Smrg FcPatternDestroy -- Destroy a pattern 7232c393a42Smrg 7242c393a42SmrgSynopsis 7252c393a42Smrg 726c9710b42Smrg #include <fontconfig/fontconfig.h> 7272c393a42Smrg 728a6844aabSmrg 729ca08ab68Smrg void FcPatternDestroy(FcPattern *p); 7302c393a42Smrg 7312c393a42SmrgDescription 7322c393a42Smrg 733ca08ab68Smrg Decrement the pattern reference count. If all references are gone, 734ca08ab68Smrg destroys the pattern, in the process destroying all related values. 7352c393a42Smrg 7362c393a42SmrgVersion 7372c393a42Smrg 7386fc018e4Smrg Fontconfig version 2.11.0 7392c393a42Smrg 740ca08ab68Smrg FcPatternEqual 7412c393a42Smrg 7422c393a42SmrgName 7432c393a42Smrg 744ca08ab68Smrg FcPatternEqual -- Compare patterns 7452c393a42Smrg 7462c393a42SmrgSynopsis 7472c393a42Smrg 748c9710b42Smrg #include <fontconfig/fontconfig.h> 7492c393a42Smrg 750a6844aabSmrg 751ca08ab68Smrg FcBool FcPatternEqual(const FcPattern *pa, const FcPattern *pb); 7522c393a42Smrg 7532c393a42SmrgDescription 7542c393a42Smrg 755ca08ab68Smrg Returns whether pa and pb are exactly alike. 7562c393a42Smrg 7572c393a42SmrgVersion 7582c393a42Smrg 7596fc018e4Smrg Fontconfig version 2.11.0 7602c393a42Smrg 761ca08ab68Smrg FcPatternEqualSubset 7622c393a42Smrg 7632c393a42SmrgName 7642c393a42Smrg 765ca08ab68Smrg FcPatternEqualSubset -- Compare portions of patterns 7662c393a42Smrg 7672c393a42SmrgSynopsis 7682c393a42Smrg 769c9710b42Smrg #include <fontconfig/fontconfig.h> 7702c393a42Smrg 771a6844aabSmrg 772ca08ab68Smrg FcBool FcPatternEqualSubset(const FcPattern *pa, const FcPattern *pb, 773ca08ab68Smrg const FcObjectSet *os); 7742c393a42Smrg 7752c393a42SmrgDescription 7762c393a42Smrg 777ca08ab68Smrg Returns whether pa and pb have exactly the same values for all of the 778ca08ab68Smrg objects in os. 7792c393a42Smrg 7802c393a42SmrgVersion 7812c393a42Smrg 7826fc018e4Smrg Fontconfig version 2.11.0 783a6844aabSmrg 784ca08ab68Smrg FcPatternFilter 785a6844aabSmrg 786a6844aabSmrgName 787a6844aabSmrg 788ca08ab68Smrg FcPatternFilter -- Filter the objects of pattern 789a6844aabSmrg 790a6844aabSmrgSynopsis 791a6844aabSmrg 792c9710b42Smrg #include <fontconfig/fontconfig.h> 793a6844aabSmrg 794a6844aabSmrg 795ca08ab68Smrg FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet *); 796a6844aabSmrg 797a6844aabSmrgDescription 798a6844aabSmrg 799ca08ab68Smrg Returns a new pattern that only has those objects from p that are in os. 800ca08ab68Smrg If os is NULL, a duplicate of p is returned. 801a6844aabSmrg 802a6844aabSmrgVersion 803a6844aabSmrg 8046fc018e4Smrg Fontconfig version 2.11.0 8052c393a42Smrg 806ca08ab68Smrg FcPatternHash 8072c393a42Smrg 8082c393a42SmrgName 8092c393a42Smrg 810ca08ab68Smrg FcPatternHash -- Compute a pattern hash value 8112c393a42Smrg 8122c393a42SmrgSynopsis 8132c393a42Smrg 814c9710b42Smrg #include <fontconfig/fontconfig.h> 8152c393a42Smrg 816a6844aabSmrg 817ca08ab68Smrg FcChar32 FcPatternHash(const FcPattern *p); 8182c393a42Smrg 8192c393a42SmrgDescription 8202c393a42Smrg 821ca08ab68Smrg Returns a 32-bit number which is the same for any two patterns which are 822ca08ab68Smrg equal. 8232c393a42Smrg 8242c393a42SmrgVersion 8252c393a42Smrg 8266fc018e4Smrg Fontconfig version 2.11.0 8272c393a42Smrg 828ca08ab68Smrg FcPatternAdd 8292c393a42Smrg 8302c393a42SmrgName 8312c393a42Smrg 832ca08ab68Smrg FcPatternAdd -- Add a value to a pattern 8332c393a42Smrg 8342c393a42SmrgSynopsis 8352c393a42Smrg 836c9710b42Smrg #include <fontconfig/fontconfig.h> 8372c393a42Smrg 838a6844aabSmrg 839ca08ab68Smrg FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue value, 840ca08ab68Smrg FcBool append); 8412c393a42Smrg 8422c393a42SmrgDescription 8432c393a42Smrg 844ca08ab68Smrg Adds a single value to the list of values associated with the property 845ca08ab68Smrg named `object. If `append is FcTrue, the value is added at the end of any 846ca08ab68Smrg existing list, otherwise it is inserted at the beginning. `value' is saved 847ca08ab68Smrg (with FcValueSave) when inserted into the pattern so that the library 848ca08ab68Smrg retains no reference to any application-supplied data structure. 8492c393a42Smrg 8502c393a42SmrgVersion 8512c393a42Smrg 8526fc018e4Smrg Fontconfig version 2.11.0 8532c393a42Smrg 854ca08ab68Smrg FcPatternAddWeak 8552c393a42Smrg 8562c393a42SmrgName 8572c393a42Smrg 858ca08ab68Smrg FcPatternAddWeak -- Add a value to a pattern with weak binding 8592c393a42Smrg 8602c393a42SmrgSynopsis 8612c393a42Smrg 862c9710b42Smrg #include <fontconfig/fontconfig.h> 8632c393a42Smrg 864a6844aabSmrg 865ca08ab68Smrg FcBool FcPatternAddWeak(FcPattern *p, const char *object, FcValue value, 866ca08ab68Smrg FcBool append); 8672c393a42Smrg 8682c393a42SmrgDescription 8692c393a42Smrg 870ca08ab68Smrg FcPatternAddWeak is essentially the same as FcPatternAdd except that any 871ca08ab68Smrg values added to the list have binding weak instead of strong. 8722c393a42Smrg 8732c393a42SmrgVersion 8742c393a42Smrg 8756fc018e4Smrg Fontconfig version 2.11.0 8762c393a42Smrg 877ca08ab68Smrg FcPatternAdd-Type 8782c393a42Smrg 8792c393a42SmrgName 8802c393a42Smrg 881ca08ab68Smrg FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString, 882ca08ab68Smrg FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool, 883ca08ab68Smrg FcPatternAddFTFace, FcPatternAddLangSet -- Add a typed value to a pattern 8842c393a42Smrg 8852c393a42SmrgSynopsis 8862c393a42Smrg 887c9710b42Smrg #include <fontconfig/fontconfig.h> 8882c393a42Smrg 8892c393a42Smrg 890ca08ab68Smrg FcBool FcPatternAddInteger(FcPattern *p, const char *object, int i); 891a6844aabSmrg 892ca08ab68Smrg FcBool FcPatternAddDouble(FcPattern *p, const char *object, double d); 8932c393a42Smrg 894ca08ab68Smrg FcBool FcPatternAddString(FcPattern *p, const char *object, const FcChar8 895ca08ab68Smrg *s); 8962c393a42Smrg 897ca08ab68Smrg FcBool FcPatternAddMatrix(FcPattern *p, const char *object, const FcMatrix 898ca08ab68Smrg *m); 8992c393a42Smrg 900ca08ab68Smrg FcBool FcPatternAddCharSet(FcPattern *p, const char *object, const 901ca08ab68Smrg FcCharSet *c); 9022c393a42Smrg 903ca08ab68Smrg FcBool FcPatternAddBool(FcPattern *p, const char *object, FcBool b); 9042c393a42Smrg 905ca08ab68Smrg FcBool FcPatternAddFTFace(FcPattern *p, const char *object, const 906ca08ab68Smrg FT_Facef); 9072c393a42Smrg 908ca08ab68Smrg FcBool FcPatternAddLangSet(FcPattern *p, const char *object, const 909ca08ab68Smrg FcLangSet *l); 9102c393a42Smrg 9112c393a42SmrgDescription 9122c393a42Smrg 913ca08ab68Smrg These are all convenience functions that insert objects of the specified 914ca08ab68Smrg type into the pattern. Use these in preference to FcPatternAdd as they 915ca08ab68Smrg will provide compile-time typechecking. These all append values to any 916ca08ab68Smrg existing list of values. 9172c393a42Smrg 9182c393a42SmrgVersion 9192c393a42Smrg 9206fc018e4Smrg Fontconfig version 2.11.0 9212c393a42Smrg 922ca08ab68Smrg FcPatternGet 9232c393a42Smrg 9242c393a42SmrgName 9252c393a42Smrg 926ca08ab68Smrg FcPatternGet -- Return a value from a pattern 9272c393a42Smrg 9282c393a42SmrgSynopsis 9292c393a42Smrg 930c9710b42Smrg #include <fontconfig/fontconfig.h> 9312c393a42Smrg 932a6844aabSmrg 933ca08ab68Smrg FcResult FcPatternGet(FcPattern *p, const char *object, int id, FcValue 934ca08ab68Smrg *v); 9352c393a42Smrg 9362c393a42SmrgDescription 9372c393a42Smrg 938ca08ab68Smrg Returns in v the id'th value associated with the property object. The 939ca08ab68Smrg value returned is not a copy, but rather refers to the data stored within 940ca08ab68Smrg the pattern directly. Applications must not free this value. 9412c393a42Smrg 9422c393a42SmrgVersion 9432c393a42Smrg 9446fc018e4Smrg Fontconfig version 2.11.0 9452c393a42Smrg 946ca08ab68Smrg FcPatternGet-Type 9472c393a42Smrg 9482c393a42SmrgName 9492c393a42Smrg 950ca08ab68Smrg FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString, 951ca08ab68Smrg FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool, 952ca08ab68Smrg FcPatternGetFTFace, FcPatternGetLangSet -- Return a typed value from a 953ca08ab68Smrg pattern 9542c393a42Smrg 9552c393a42SmrgSynopsis 9562c393a42Smrg 957c9710b42Smrg #include <fontconfig/fontconfig.h> 9582c393a42Smrg 9592c393a42Smrg 960ca08ab68Smrg FcResult FcPatternGetInteger(FcPattern *p, const char *object, int n, int 961ca08ab68Smrg *i); 962a6844aabSmrg 963ca08ab68Smrg FcResult FcPatternGetDouble(FcPattern *p, const char *object, int n, 964ca08ab68Smrg double *d); 9652c393a42Smrg 966ca08ab68Smrg FcResult FcPatternGetString(FcPattern *p, const char *object, int n, 967ca08ab68Smrg FcChar8 **s); 9682c393a42Smrg 969ca08ab68Smrg FcResult FcPatternGetMatrix(FcPattern *p, const char *object, int n, 970ca08ab68Smrg FcMatrix **s); 9712c393a42Smrg 972ca08ab68Smrg FcResult FcPatternGetCharSet(FcPattern *p, const char *object, int n, 973ca08ab68Smrg FcCharSet **c); 9742c393a42Smrg 975ca08ab68Smrg FcResult FcPatternGetBool(FcPattern *p, const char *object, int n, FcBool 976ca08ab68Smrg *b); 9772c393a42Smrg 978ca08ab68Smrg FcResult FcPatternGetFTFace(FcPattern *p, const char *object, int n); 9792c393a42Smrg 980ca08ab68Smrg FcResult FcPatternGetLangSet(FcPattern *p, const char *object, FT_Face 981ca08ab68Smrg *f); 9822c393a42Smrg 9832c393a42SmrgDescription 9842c393a42Smrg 985ca08ab68Smrg These are convenience functions that call FcPatternGet and verify that the 986ca08ab68Smrg returned data is of the expected type. They return FcResultTypeMismatch if 987ca08ab68Smrg this is not the case. Note that these (like FcPatternGet) do not make a 988ca08ab68Smrg copy of any data structure referenced by the return value. Use these in 989ca08ab68Smrg preference to FcPatternGet to provide compile-time typechecking. 9902c393a42Smrg 9912c393a42SmrgVersion 9922c393a42Smrg 9936fc018e4Smrg Fontconfig version 2.11.0 9942c393a42Smrg 995ca08ab68Smrg FcPatternBuild 9962c393a42Smrg 9972c393a42SmrgName 9982c393a42Smrg 999ca08ab68Smrg FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create patterns 1000ca08ab68Smrg from arguments 10012c393a42Smrg 10022c393a42SmrgSynopsis 10032c393a42Smrg 1004c9710b42Smrg #include <fontconfig/fontconfig.h> 10052c393a42Smrg 10062c393a42Smrg 1007ca08ab68Smrg FcPattern * FcPatternBuild(FcPattern *pattern, ...); 10082c393a42Smrg 1009ca08ab68Smrg FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va); 1010a6844aabSmrg 1011ca08ab68Smrg void FcPatternVapBuild(FcPattern *result, FcPattern *pattern, va_list va); 10122c393a42Smrg 10132c393a42SmrgDescription 10142c393a42Smrg 1015ca08ab68Smrg Builds a pattern using a list of objects, types and values. Each value to 1016ca08ab68Smrg be entered in the pattern is specified with three arguments: 1017a6844aabSmrg 1018ca08ab68Smrg 1. Object name, a string describing the property to be added. 1019a6844aabSmrg 1020ca08ab68Smrg 2. Object type, one of the FcType enumerated values 10212c393a42Smrg 1022ca08ab68Smrg 3. Value, not an FcValue, but the raw type as passed to any of the 1023ca08ab68Smrg FcPatternAdd<type> functions. Must match the type of the second 1024ca08ab68Smrg argument. 10252c393a42Smrg 1026ca08ab68Smrg The argument list is terminated by a null object name, no object type nor 1027ca08ab68Smrg value need be passed for this. The values are added to `pattern', if 1028ca08ab68Smrg `pattern' is null, a new pattern is created. In either case, the pattern 1029ca08ab68Smrg is returned. Example 10302c393a42Smrg 1031ca08ab68Smrg pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0); 1032a6844aabSmrg 1033ca08ab68Smrg FcPatternVaBuild is used when the arguments are already in the form of a 1034ca08ab68Smrg varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild 1035ca08ab68Smrg which returns its result directly in the result variable. 10362c393a42Smrg 10372c393a42SmrgVersion 10382c393a42Smrg 10396fc018e4Smrg Fontconfig version 2.11.0 10402c393a42Smrg 1041ca08ab68Smrg FcPatternDel 10422c393a42Smrg 10432c393a42SmrgName 10442c393a42Smrg 1045ca08ab68Smrg FcPatternDel -- Delete a property from a pattern 10462c393a42Smrg 10472c393a42SmrgSynopsis 10482c393a42Smrg 1049c9710b42Smrg #include <fontconfig/fontconfig.h> 10502c393a42Smrg 1051a6844aabSmrg 1052ca08ab68Smrg FcBool FcPatternDel(FcPattern *p, const char *object); 10532c393a42Smrg 10542c393a42SmrgDescription 10552c393a42Smrg 1056ca08ab68Smrg Deletes all values associated with the property `object', returning 1057ca08ab68Smrg whether the property existed or not. 10582c393a42Smrg 10592c393a42SmrgVersion 10602c393a42Smrg 10616fc018e4Smrg Fontconfig version 2.11.0 10622c393a42Smrg 1063ca08ab68Smrg FcPatternRemove 10642c393a42Smrg 10652c393a42SmrgName 10662c393a42Smrg 1067ca08ab68Smrg FcPatternRemove -- Remove one object of the specified type from the 1068ca08ab68Smrg pattern 10692c393a42Smrg 10702c393a42SmrgSynopsis 10712c393a42Smrg 1072c9710b42Smrg #include <fontconfig/fontconfig.h> 10732c393a42Smrg 1074a6844aabSmrg 1075ca08ab68Smrg FcBool FcPatternRemove(FcPattern *p, const char *object, int id); 10762c393a42Smrg 10772c393a42SmrgDescription 10782c393a42Smrg 1079ca08ab68Smrg Removes the value associated with the property `object' at position `id', 1080ca08ab68Smrg returning whether the property existed and had a value at that position or 1081ca08ab68Smrg not. 10822c393a42Smrg 10832c393a42SmrgVersion 10842c393a42Smrg 10856fc018e4Smrg Fontconfig version 2.11.0 10862c393a42Smrg 1087ca08ab68Smrg FcPatternPrint 10882c393a42Smrg 10892c393a42SmrgName 10902c393a42Smrg 1091ca08ab68Smrg FcPatternPrint -- Print a pattern for debugging 10922c393a42Smrg 10932c393a42SmrgSynopsis 10942c393a42Smrg 1095c9710b42Smrg #include <fontconfig/fontconfig.h> 10962c393a42Smrg 1097a6844aabSmrg 1098ca08ab68Smrg void FcPatternPrint(const FcPattern *p); 10992c393a42Smrg 11002c393a42SmrgDescription 11012c393a42Smrg 1102ca08ab68Smrg Prints an easily readable version of the pattern to stdout. There is no 1103ca08ab68Smrg provision for reparsing data in this format, it's just for diagnostics and 1104ca08ab68Smrg debugging. 11052c393a42Smrg 11062c393a42SmrgVersion 11072c393a42Smrg 11086fc018e4Smrg Fontconfig version 2.11.0 11092c393a42Smrg 1110ca08ab68Smrg FcDefaultSubstitute 11112c393a42Smrg 11122c393a42SmrgName 11132c393a42Smrg 1114ca08ab68Smrg FcDefaultSubstitute -- Perform default substitutions in a pattern 11152c393a42Smrg 11162c393a42SmrgSynopsis 11172c393a42Smrg 1118c9710b42Smrg #include <fontconfig/fontconfig.h> 11192c393a42Smrg 1120a6844aabSmrg 1121ca08ab68Smrg void FcDefaultSubstitute(FcPattern *pattern); 11222c393a42Smrg 11232c393a42SmrgDescription 11242c393a42Smrg 1125ca08ab68Smrg Supplies default values for underspecified font patterns: 1126a6844aabSmrg 1127ca08ab68Smrg * Patterns without a specified style or weight are set to Medium 11282c393a42Smrg 1129ca08ab68Smrg * Patterns without a specified style or slant are set to Roman 1130a6844aabSmrg 1131ca08ab68Smrg * Patterns without a specified pixel size are given one computed from 1132ca08ab68Smrg any specified point size (default 12), dpi (default 75) and scale 1133ca08ab68Smrg (default 1). 11342c393a42Smrg 11352c393a42SmrgVersion 11362c393a42Smrg 11376fc018e4Smrg Fontconfig version 2.11.0 11382c393a42Smrg 1139ca08ab68Smrg FcNameParse 11402c393a42Smrg 11412c393a42SmrgName 11422c393a42Smrg 1143ca08ab68Smrg FcNameParse -- Parse a pattern string 11442c393a42Smrg 11452c393a42SmrgSynopsis 11462c393a42Smrg 1147c9710b42Smrg #include <fontconfig/fontconfig.h> 11482c393a42Smrg 1149a6844aabSmrg 1150ca08ab68Smrg FcPattern * FcNameParse(const FcChar8 *name); 11512c393a42Smrg 11522c393a42SmrgDescription 11532c393a42Smrg 1154ca08ab68Smrg Converts name from the standard text format described above into a 1155ca08ab68Smrg pattern. 11562c393a42Smrg 11572c393a42SmrgVersion 11582c393a42Smrg 11596fc018e4Smrg Fontconfig version 2.11.0 11602c393a42Smrg 1161ca08ab68Smrg FcNameUnparse 11622c393a42Smrg 11632c393a42SmrgName 11642c393a42Smrg 1165ca08ab68Smrg FcNameUnparse -- Convert a pattern back into a string that can be parsed 11662c393a42Smrg 11672c393a42SmrgSynopsis 11682c393a42Smrg 1169c9710b42Smrg #include <fontconfig/fontconfig.h> 11702c393a42Smrg 1171a6844aabSmrg 1172ca08ab68Smrg FcChar8 * FcNameUnparse(FcPattern *pat); 11732c393a42Smrg 11742c393a42SmrgDescription 11752c393a42Smrg 1176ca08ab68Smrg Converts the given pattern into the standard text format described above. 1177ca08ab68Smrg The return value is not static, but instead refers to newly allocated 1178ca08ab68Smrg memory which should be freed by the caller using free(). 1179a6844aabSmrg 1180a6844aabSmrgVersion 1181a6844aabSmrg 11826fc018e4Smrg Fontconfig version 2.11.0 1183a6844aabSmrg 1184ca08ab68Smrg FcPatternFormat 1185a6844aabSmrg 1186a6844aabSmrgName 1187a6844aabSmrg 1188ca08ab68Smrg FcPatternFormat -- Format a pattern into a string according to a format 1189ca08ab68Smrg specifier 1190a6844aabSmrg 1191a6844aabSmrgSynopsis 1192a6844aabSmrg 1193c9710b42Smrg #include <fontconfig/fontconfig.h> 1194a6844aabSmrg 1195a6844aabSmrg 1196ca08ab68Smrg FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8 *format); 1197a6844aabSmrg 1198a6844aabSmrgDescription 1199a6844aabSmrg 1200ca08ab68Smrg Converts given pattern pat into text described by the format specifier 1201ca08ab68Smrg format. The return value refers to newly allocated memory which should be 1202ca08ab68Smrg freed by the caller using free(), or NULL if format is invalid. 1203a6844aabSmrg 1204ca08ab68Smrg The format is loosely modeled after printf-style format string. The 1205ca08ab68Smrg format string is composed of zero or more directives: ordinary characters 1206ca08ab68Smrg (not "%"), which are copied unchanged to the output stream; and tags which 1207ca08ab68Smrg are interpreted to construct text from the pattern in a variety of ways 1208ca08ab68Smrg (explained below). Special characters can be escaped using backslash. 1209ca08ab68Smrg C-string style special characters like \n and \r are also supported (this 1210ca08ab68Smrg is useful when the format string is not a C string literal). It is 1211ca08ab68Smrg advisable to always escape curly braces that are meant to be copied to the 1212ca08ab68Smrg output as ordinary characters. 1213a6844aabSmrg 1214ca08ab68Smrg Each tag is introduced by the character "%", followed by an optional 1215ca08ab68Smrg minimum field width, followed by tag contents in curly braces ({}). If the 1216ca08ab68Smrg minimum field width value is provided the tag will be expanded and the 1217ca08ab68Smrg result padded to achieve the minimum width. If the minimum field width is 1218ca08ab68Smrg positive, the padding will right-align the text. Negative field width will 1219ca08ab68Smrg left-align. The rest of this section describes various supported tag 1220ca08ab68Smrg contents and their expansion. 1221a6844aabSmrg 1222ca08ab68Smrg A simple tag is one where the content is an identifier. When simple tags 1223ca08ab68Smrg are expanded, the named identifier will be looked up in pattern and the 1224ca08ab68Smrg resulting list of values returned, joined together using comma. For 1225ca08ab68Smrg example, to print the family name and style of the pattern, use the format 1226ca08ab68Smrg "%{family} %{style}\n". To extend the family column to forty characters 1227ca08ab68Smrg use "%-40{family}%{style}\n". 1228a6844aabSmrg 1229ca08ab68Smrg Simple tags expand to list of all values for an element. To only choose 1230ca08ab68Smrg one of the values, one can index using the syntax "%{elt[idx]}". For 1231ca08ab68Smrg example, to get the first family name only, use "%{family[0]}". 1232a6844aabSmrg 1233ca08ab68Smrg If a simple tag ends with "=" and the element is found in the pattern, 1234ca08ab68Smrg the name of the element followed by "=" will be output before the list of 1235ca08ab68Smrg values. For example, "%{weight=}" may expand to the string "weight=80". Or 1236ca08ab68Smrg to the empty string if pattern does not have weight set. 1237a6844aabSmrg 1238ca08ab68Smrg If a simple tag starts with ":" and the element is found in the pattern, 1239ca08ab68Smrg ":" will be printed first. For example, combining this with the =, the 1240ca08ab68Smrg format "%{:weight=}" may expand to ":weight=80" or to the empty string if 1241ca08ab68Smrg pattern does not have weight set. 1242a6844aabSmrg 1243ca08ab68Smrg If a simple tag contains the string ":-", the rest of the the tag 1244ca08ab68Smrg contents will be used as a default string. The default string is output if 1245ca08ab68Smrg the element is not found in the pattern. For example, the format 1246ca08ab68Smrg "%{:weight=:-123}" may expand to ":weight=80" or to the string 1247ca08ab68Smrg ":weight=123" if pattern does not have weight set. 1248a6844aabSmrg 1249ca08ab68Smrg A count tag is one that starts with the character "#" followed by an 1250ca08ab68Smrg element name, and expands to the number of values for the element in the 1251ca08ab68Smrg pattern. For example, "%{#family}" expands to the number of family names 1252ca08ab68Smrg pattern has set, which may be zero. 1253a6844aabSmrg 1254ca08ab68Smrg A sub-expression tag is one that expands a sub-expression. The tag 1255ca08ab68Smrg contents are the sub-expression to expand placed inside another set of 1256ca08ab68Smrg curly braces. Sub-expression tags are useful for aligning an entire 1257ca08ab68Smrg sub-expression, or to apply converters (explained later) to the entire 1258ca08ab68Smrg sub-expression output. For example, the format "%40{{%{family} %{style}}}" 1259ca08ab68Smrg expands the sub-expression to construct the family name followed by the 1260ca08ab68Smrg style, then takes the entire string and pads it on the left to be at least 1261ca08ab68Smrg forty characters. 1262a6844aabSmrg 1263ca08ab68Smrg A filter-out tag is one starting with the character "-" followed by a 1264ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1265ca08ab68Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1266ca08ab68Smrg pattern that has the listed elements removed from it. For example, the 1267ca08ab68Smrg format "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with pattern 1268ca08ab68Smrg sans the size and pixelsize elements. 1269a6844aabSmrg 1270ca08ab68Smrg A filter-in tag is one starting with the character "+" followed by a 1271ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1272ca08ab68Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1273ca08ab68Smrg pattern that only has the listed elements from the surrounding pattern. 1274ca08ab68Smrg For example, the format "%{+family,familylang{sub-expr}}" will expand 1275ca08ab68Smrg "sub-expr" with a sub-pattern consisting only the family and family lang 1276ca08ab68Smrg elements of pattern. 1277a6844aabSmrg 1278ca08ab68Smrg A conditional tag is one starting with the character "?" followed by a 1279ca08ab68Smrg comma-separated list of element conditions, followed by two sub-expression 1280ca08ab68Smrg enclosed in curly braces. An element condition can be an element name, in 1281ca08ab68Smrg which case it tests whether the element is defined in pattern, or the 1282ca08ab68Smrg character "!" followed by an element name, in which case the test is 1283ca08ab68Smrg negated. The conditional passes if all the element conditions pass. The 1284ca08ab68Smrg tag expands the first sub-expression if the conditional passes, and 1285ca08ab68Smrg expands the second sub-expression otherwise. For example, the format 1286ca08ab68Smrg "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if pattern has 1287ca08ab68Smrg size and dpi elements but no pixelsize element, and to "fail" otherwise. 1288a6844aabSmrg 1289ca08ab68Smrg An enumerate tag is one starting with the string "[]" followed by a 1290ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1291ca08ab68Smrg enclosed in curly braces. The list of values for the named elements are 1292ca08ab68Smrg walked in parallel and the sub-expression expanded each time with a 1293ca08ab68Smrg pattern just having a single value for those elements, starting from the 1294ca08ab68Smrg first value and continuing as long as any of those elements has a value. 1295ca08ab68Smrg For example, the format "%{[]family,familylang{%{family} 1296ca08ab68Smrg (%{familylang})\n}}" will expand the pattern "%{family} (%{familylang})\n" 1297ca08ab68Smrg with a pattern having only the first value of the family and familylang 1298ca08ab68Smrg elements, then expands it with the second values, then the third, etc. 1299a6844aabSmrg 1300ca08ab68Smrg As a special case, if an enumerate tag has only one element, and that 1301ca08ab68Smrg element has only one value in the pattern, and that value is of type 1302ca08ab68Smrg FcLangSet, the individual languages in the language set are enumerated. 1303a6844aabSmrg 1304ca08ab68Smrg A builtin tag is one starting with the character "=" followed by a 1305ca08ab68Smrg builtin name. The following builtins are defined: 1306a6844aabSmrg 1307ca08ab68Smrg unparse 1308a6844aabSmrg 1309ca08ab68Smrg Expands to the result of calling FcNameUnparse() on the pattern. 1310a6844aabSmrg 1311ca08ab68Smrg fcmatch 1312a6844aabSmrg 1313ca08ab68Smrg Expands to the output of the default output format of the fc-match 1314ca08ab68Smrg command on the pattern, without the final newline. 1315a6844aabSmrg 1316ca08ab68Smrg fclist 1317a6844aabSmrg 1318ca08ab68Smrg Expands to the output of the default output format of the fc-list 1319ca08ab68Smrg command on the pattern, without the final newline. 1320a6844aabSmrg 1321ca08ab68Smrg fccat 1322a6844aabSmrg 1323ca08ab68Smrg Expands to the output of the default output format of the fc-cat 1324ca08ab68Smrg command on the pattern, without the final newline. 1325a6844aabSmrg 1326ca08ab68Smrg pkgkit 1327a6844aabSmrg 1328ca08ab68Smrg Expands to the list of PackageKit font() tags for the pattern. 1329ca08ab68Smrg Currently this includes tags for each family name, and each 1330ca08ab68Smrg language from the pattern, enumerated and sanitized into a set of 1331ca08ab68Smrg tags terminated by newline. Package management systems can use 1332ca08ab68Smrg these tags to tag their packages accordingly. 1333a6844aabSmrg 1334ca08ab68Smrg For example, the format "%{+family,style{%{=unparse}}}\n" will expand to 1335ca08ab68Smrg an unparsed name containing only the family and style element values from 1336ca08ab68Smrg pattern. 1337a6844aabSmrg 1338ca08ab68Smrg The contents of any tag can be followed by a set of zero or more 1339ca08ab68Smrg converters. A converter is specified by the character "|" followed by the 1340ca08ab68Smrg converter name and arguments. The following converters are defined: 1341a6844aabSmrg 1342ca08ab68Smrg basename 1343a6844aabSmrg 1344ca08ab68Smrg Replaces text with the results of calling FcStrBasename() on it. 1345a6844aabSmrg 1346ca08ab68Smrg dirname 1347a6844aabSmrg 1348ca08ab68Smrg Replaces text with the results of calling FcStrDirname() on it. 1349a6844aabSmrg 1350ca08ab68Smrg downcase 1351a6844aabSmrg 1352ca08ab68Smrg Replaces text with the results of calling FcStrDowncase() on it. 1353a6844aabSmrg 1354ca08ab68Smrg shescape 1355a6844aabSmrg 1356ca08ab68Smrg Escapes text for one level of shell expansion. (Escapes 1357ca08ab68Smrg single-quotes, also encloses text in single-quotes.) 1358a6844aabSmrg 1359ca08ab68Smrg cescape 1360a6844aabSmrg 1361ca08ab68Smrg Escapes text such that it can be used as part of a C string 1362ca08ab68Smrg literal. (Escapes backslash and double-quotes.) 1363a6844aabSmrg 1364ca08ab68Smrg xmlescape 1365a6844aabSmrg 1366ca08ab68Smrg Escapes text such that it can be used in XML and HTML. (Escapes 1367ca08ab68Smrg less-than, greater-than, and ampersand.) 1368a6844aabSmrg 1369ca08ab68Smrg delete(chars) 1370a6844aabSmrg 1371ca08ab68Smrg Deletes all occurrences of each of the characters in chars from 1372ca08ab68Smrg the text. FIXME: This converter is not UTF-8 aware yet. 1373a6844aabSmrg 1374ca08ab68Smrg escape(chars) 1375a6844aabSmrg 1376ca08ab68Smrg Escapes all occurrences of each of the characters in chars by 1377ca08ab68Smrg prepending it by the first character in chars. FIXME: This 1378ca08ab68Smrg converter is not UTF-8 aware yet. 1379a6844aabSmrg 1380ca08ab68Smrg translate(from,to) 1381ca08ab68Smrg 1382ca08ab68Smrg Translates all occurrences of each of the characters in from by 1383ca08ab68Smrg replacing them with their corresponding character in to. If to has 1384ca08ab68Smrg fewer characters than from, it will be extended by repeating its 1385ca08ab68Smrg last character. FIXME: This converter is not UTF-8 aware yet. 1386ca08ab68Smrg 1387ca08ab68Smrg For example, the format "%{family|downcase|delete( )}\n" will expand to 1388ca08ab68Smrg the values of the family element in pattern, lower-cased and with spaces 1389ca08ab68Smrg removed. 13902c393a42Smrg 13912c393a42SmrgVersion 13922c393a42Smrg 13936fc018e4Smrg Fontconfig version 2.11.0 1394ca08ab68Smrg 1395ca08ab68Smrg -------------------------------------------------------------------------- 1396ca08ab68Smrg 1397ca08ab68Smrg FcFontSet 1398ca08ab68Smrg 1399ca08ab68Smrg Table of Contents 1400ca08ab68Smrg 1401ca08ab68Smrg [33]FcFontSetCreate -- Create a font set 1402ca08ab68Smrg 1403ca08ab68Smrg [34]FcFontSetDestroy -- Destroy a font set 1404ca08ab68Smrg 1405ca08ab68Smrg [35]FcFontSetAdd -- Add to a font set 1406ca08ab68Smrg 1407ca08ab68Smrg [36]FcFontSetList -- List fonts from a set of font sets 1408a6844aabSmrg 1409ca08ab68Smrg [37]FcFontSetMatch -- Return the best font from a set of font sets 14102c393a42Smrg 1411ca08ab68Smrg [38]FcFontSetPrint -- Print a set of patterns to stdout 14122c393a42Smrg 1413ca08ab68Smrg [39]FcFontSetSort -- Add to a font set 14142c393a42Smrg 1415ca08ab68Smrg [40]FcFontSetSortDestroy -- DEPRECATED destroy a font set 14162c393a42Smrg 1417ca08ab68Smrg An FcFontSet simply holds a list of patterns; these are used to return the 1418ca08ab68Smrg results of listing available fonts. 1419ca08ab68Smrg 1420ca08ab68Smrg FcFontSetCreate 14212c393a42Smrg 14222c393a42SmrgName 14232c393a42Smrg 1424ca08ab68Smrg FcFontSetCreate -- Create a font set 14252c393a42Smrg 14262c393a42SmrgSynopsis 14272c393a42Smrg 1428c9710b42Smrg #include <fontconfig/fontconfig.h> 14292c393a42Smrg 1430a6844aabSmrg 1431ca08ab68Smrg FcFontSet * FcFontSetCreate(void); 14322c393a42Smrg 14332c393a42SmrgDescription 14342c393a42Smrg 1435ca08ab68Smrg Creates an empty font set. 14362c393a42Smrg 14372c393a42SmrgVersion 14382c393a42Smrg 14396fc018e4Smrg Fontconfig version 2.11.0 14402c393a42Smrg 1441ca08ab68Smrg FcFontSetDestroy 14422c393a42Smrg 14432c393a42SmrgName 14442c393a42Smrg 1445ca08ab68Smrg FcFontSetDestroy -- Destroy a font set 14462c393a42Smrg 14472c393a42SmrgSynopsis 14482c393a42Smrg 1449c9710b42Smrg #include <fontconfig/fontconfig.h> 14502c393a42Smrg 1451a6844aabSmrg 1452ca08ab68Smrg void FcFontSetDestroy(FcFontSet *s); 14532c393a42Smrg 14542c393a42SmrgDescription 14552c393a42Smrg 1456ca08ab68Smrg Destroys a font set. Note that this destroys any referenced patterns as 1457ca08ab68Smrg well. 14582c393a42Smrg 14592c393a42SmrgVersion 14602c393a42Smrg 14616fc018e4Smrg Fontconfig version 2.11.0 14622c393a42Smrg 1463ca08ab68Smrg FcFontSetAdd 14642c393a42Smrg 14652c393a42SmrgName 14662c393a42Smrg 1467ca08ab68Smrg FcFontSetAdd -- Add to a font set 14682c393a42Smrg 14692c393a42SmrgSynopsis 14702c393a42Smrg 1471c9710b42Smrg #include <fontconfig/fontconfig.h> 14722c393a42Smrg 1473a6844aabSmrg 1474ca08ab68Smrg FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font); 14752c393a42Smrg 14762c393a42SmrgDescription 14772c393a42Smrg 1478ca08ab68Smrg Adds a pattern to a font set. Note that the pattern is not copied before 1479ca08ab68Smrg being inserted into the set. Returns FcFalse if the pattern cannot be 1480ca08ab68Smrg inserted into the set (due to allocation failure). Otherwise returns 1481ca08ab68Smrg FcTrue. 14822c393a42Smrg 14832c393a42SmrgVersion 14842c393a42Smrg 14856fc018e4Smrg Fontconfig version 2.11.0 14862c393a42Smrg 1487ca08ab68Smrg FcFontSetList 14882c393a42Smrg 14892c393a42SmrgName 14902c393a42Smrg 1491ca08ab68Smrg FcFontSetList -- List fonts from a set of font sets 14922c393a42Smrg 14932c393a42SmrgSynopsis 14942c393a42Smrg 1495c9710b42Smrg #include <fontconfig/fontconfig.h> 14962c393a42Smrg 1497a6844aabSmrg 1498ca08ab68Smrg FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets, intnsets, 1499ca08ab68Smrg FcPattern *pattern, FcObjectSet *object_set); 15002c393a42Smrg 15012c393a42SmrgDescription 15022c393a42Smrg 1503ca08ab68Smrg Selects fonts matching pattern from sets, creates patterns from those 1504ca08ab68Smrg fonts containing only the objects in object_set and returns the set of 1505ca08ab68Smrg unique such patterns. If config is NULL, the default configuration is 1506ca08ab68Smrg checked to be up to date, and used. 15072c393a42Smrg 15082c393a42SmrgVersion 15092c393a42Smrg 15106fc018e4Smrg Fontconfig version 2.11.0 15112c393a42Smrg 1512ca08ab68Smrg FcFontSetMatch 15132c393a42Smrg 15142c393a42SmrgName 15152c393a42Smrg 1516ca08ab68Smrg FcFontSetMatch -- Return the best font from a set of font sets 15172c393a42Smrg 15182c393a42SmrgSynopsis 15192c393a42Smrg 1520c9710b42Smrg #include <fontconfig/fontconfig.h> 15212c393a42Smrg 1522a6844aabSmrg 1523ca08ab68Smrg FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets, intnsets, 1524ca08ab68Smrg FcPattern *pattern, FcResult *result); 15252c393a42Smrg 15262c393a42SmrgDescription 15272c393a42Smrg 1528ca08ab68Smrg Finds the font in sets most closely matching pattern and returns the 1529ca08ab68Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 1530ca08ab68Smrg function should be called only after FcConfigSubstitute and 1531ca08ab68Smrg FcDefaultSubstitute have been called for pattern; otherwise the results 1532ca08ab68Smrg will not be correct. If config is NULL, the current configuration is used. 1533ca08ab68Smrg Returns NULL if an error occurs during this process. 15342c393a42Smrg 15352c393a42SmrgVersion 15362c393a42Smrg 15376fc018e4Smrg Fontconfig version 2.11.0 15382c393a42Smrg 1539ca08ab68Smrg FcFontSetPrint 15402c393a42Smrg 15412c393a42SmrgName 15422c393a42Smrg 1543ca08ab68Smrg FcFontSetPrint -- Print a set of patterns to stdout 15442c393a42Smrg 15452c393a42SmrgSynopsis 15462c393a42Smrg 1547c9710b42Smrg #include <fontconfig/fontconfig.h> 15482c393a42Smrg 1549a6844aabSmrg 1550ca08ab68Smrg void FcFontSetPrint(FcFontSet *set); 15512c393a42Smrg 15522c393a42SmrgDescription 15532c393a42Smrg 1554ca08ab68Smrg This function is useful for diagnosing font related issues, printing the 1555ca08ab68Smrg complete contents of every pattern in set. The format of the output is 1556ca08ab68Smrg designed to be of help to users and developers, and may change at any 1557ca08ab68Smrg time. 15582c393a42Smrg 15592c393a42SmrgVersion 15602c393a42Smrg 15616fc018e4Smrg Fontconfig version 2.11.0 15622c393a42Smrg 1563ca08ab68Smrg FcFontSetSort 15642c393a42Smrg 15652c393a42SmrgName 15662c393a42Smrg 1567ca08ab68Smrg FcFontSetSort -- Add to a font set 15682c393a42Smrg 15692c393a42SmrgSynopsis 15702c393a42Smrg 1571c9710b42Smrg #include <fontconfig/fontconfig.h> 15722c393a42Smrg 1573a6844aabSmrg 1574ca08ab68Smrg FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets, FcPattern 1575ca08ab68Smrg *pattern, FcBool trim, FcCharSet **csp, FcResult *result); 15762c393a42Smrg 15772c393a42SmrgDescription 15782c393a42Smrg 1579ca08ab68Smrg Returns the list of fonts from sets sorted by closeness to pattern. If 1580ca08ab68Smrg trim is FcTrue, elements in the list which don't include Unicode coverage 1581ca08ab68Smrg not provided by earlier elements in the list are elided. The union of 1582ca08ab68Smrg Unicode coverage of all of the fonts is returned in csp, if csp is not 1583ca08ab68Smrg NULL. This function should be called only after FcConfigSubstitute and 1584ca08ab68Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 1585ca08ab68Smrg be correct. 15862c393a42Smrg 1587ca08ab68Smrg The returned FcFontSet references FcPattern structures which may be shared 1588ca08ab68Smrg by the return value from multiple FcFontSort calls, applications cannot 1589ca08ab68Smrg modify these patterns. Instead, they should be passed, along with pattern 1590ca08ab68Smrg to FcFontRenderPrepare which combines them into a complete pattern. 15912c393a42Smrg 1592ca08ab68Smrg The FcFontSet returned by FcFontSetSort is destroyed by calling 1593ca08ab68Smrg FcFontSetDestroy. 15942c393a42Smrg 15952c393a42SmrgVersion 15962c393a42Smrg 15976fc018e4Smrg Fontconfig version 2.11.0 15982c393a42Smrg 1599ca08ab68Smrg FcFontSetSortDestroy 16002c393a42Smrg 16012c393a42SmrgName 16022c393a42Smrg 1603ca08ab68Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font set 16042c393a42Smrg 16052c393a42SmrgSynopsis 16062c393a42Smrg 1607c9710b42Smrg #include <fontconfig/fontconfig.h> 16082c393a42Smrg 1609a6844aabSmrg 1610ca08ab68Smrg FcFontSetSortDestroy(FcFontSet *set); 16112c393a42Smrg 16122c393a42SmrgDescription 16132c393a42Smrg 1614ca08ab68Smrg This function is DEPRECATED. FcFontSetSortDestroy destroys set by calling 1615ca08ab68Smrg FcFontSetDestroy. Applications should use FcFontSetDestroy directly 1616ca08ab68Smrg instead. 16172c393a42Smrg 16182c393a42SmrgVersion 16192c393a42Smrg 16206fc018e4Smrg Fontconfig version 2.11.0 1621ca08ab68Smrg 1622ca08ab68Smrg -------------------------------------------------------------------------- 1623ca08ab68Smrg 1624ca08ab68Smrg FcObjectSet 1625ca08ab68Smrg 1626ca08ab68Smrg Table of Contents 1627ca08ab68Smrg 1628ca08ab68Smrg [41]FcObjectSetCreate -- Create an object set 1629a6844aabSmrg 1630ca08ab68Smrg [42]FcObjectSetAdd -- Add to an object set 16312c393a42Smrg 1632ca08ab68Smrg [43]FcObjectSetDestroy -- Destroy an object set 16332c393a42Smrg 1634ca08ab68Smrg [44]FcObjectSetBuild -- Build object set from args 16352c393a42Smrg 1636ca08ab68Smrg An FcObjectSet holds a list of pattern property names; it is used to 1637ca08ab68Smrg indicate which properties are to be returned in the patterns from 1638ca08ab68Smrg FcFontList. 16392c393a42Smrg 1640ca08ab68Smrg FcObjectSetCreate 16412c393a42Smrg 16422c393a42SmrgName 16432c393a42Smrg 1644ca08ab68Smrg FcObjectSetCreate -- Create an object set 16452c393a42Smrg 16462c393a42SmrgSynopsis 16472c393a42Smrg 1648c9710b42Smrg #include <fontconfig/fontconfig.h> 16492c393a42Smrg 1650a6844aabSmrg 1651ca08ab68Smrg FcObjectSet * FcObjectSetCreate(void); 16522c393a42Smrg 16532c393a42SmrgDescription 16542c393a42Smrg 1655ca08ab68Smrg Creates an empty set. 16562c393a42Smrg 16572c393a42SmrgVersion 16582c393a42Smrg 16596fc018e4Smrg Fontconfig version 2.11.0 16602c393a42Smrg 1661ca08ab68Smrg FcObjectSetAdd 16622c393a42Smrg 16632c393a42SmrgName 16642c393a42Smrg 1665ca08ab68Smrg FcObjectSetAdd -- Add to an object set 16662c393a42Smrg 16672c393a42SmrgSynopsis 16682c393a42Smrg 1669c9710b42Smrg #include <fontconfig/fontconfig.h> 16702c393a42Smrg 1671a6844aabSmrg 1672ca08ab68Smrg FcBool FcObjectSetAdd(FcObjectSet *os, const char *object); 16732c393a42Smrg 16742c393a42SmrgDescription 16752c393a42Smrg 1676ca08ab68Smrg Adds a property name to the set. Returns FcFalse if the property name 1677ca08ab68Smrg cannot be inserted into the set (due to allocation failure). Otherwise 1678ca08ab68Smrg returns FcTrue. 16792c393a42Smrg 16802c393a42SmrgVersion 16812c393a42Smrg 16826fc018e4Smrg Fontconfig version 2.11.0 16832c393a42Smrg 1684ca08ab68Smrg FcObjectSetDestroy 16852c393a42Smrg 16862c393a42SmrgName 16872c393a42Smrg 1688ca08ab68Smrg FcObjectSetDestroy -- Destroy an object set 16892c393a42Smrg 16902c393a42SmrgSynopsis 16912c393a42Smrg 1692c9710b42Smrg #include <fontconfig/fontconfig.h> 16932c393a42Smrg 1694a6844aabSmrg 1695ca08ab68Smrg void FcObjectSetDestroy(FcObjectSet *os); 16962c393a42Smrg 16972c393a42SmrgDescription 16982c393a42Smrg 1699ca08ab68Smrg Destroys an object set. 17002c393a42Smrg 17012c393a42SmrgVersion 17022c393a42Smrg 17036fc018e4Smrg Fontconfig version 2.11.0 17042c393a42Smrg 1705ca08ab68Smrg FcObjectSetBuild 17062c393a42Smrg 17072c393a42SmrgName 17082c393a42Smrg 1709ca08ab68Smrg FcObjectSetBuild, FcObjectSetVaBuild, FcObjectSetVapBuild -- Build object 1710ca08ab68Smrg set from args 17112c393a42Smrg 17122c393a42SmrgSynopsis 17132c393a42Smrg 1714c9710b42Smrg #include <fontconfig/fontconfig.h> 17152c393a42Smrg 17162c393a42Smrg 1717ca08ab68Smrg FcObjectSet * FcObjectSetBuild(const char *first, ...); 17182c393a42Smrg 1719ca08ab68Smrg FcObjectSet * FcObjectSetVaBuild(const char *first, va_list va); 1720a6844aabSmrg 1721ca08ab68Smrg void FcObjectSetVapBuild(FcObjectSet *result, const char *first, va_list 1722ca08ab68Smrg va); 17232c393a42Smrg 17242c393a42SmrgDescription 17252c393a42Smrg 1726ca08ab68Smrg These build an object set from a null-terminated list of property names. 1727ca08ab68Smrg FcObjectSetVapBuild is a macro version of FcObjectSetVaBuild which returns 1728ca08ab68Smrg the result in the result variable directly. 17292c393a42Smrg 17302c393a42SmrgVersion 17312c393a42Smrg 17326fc018e4Smrg Fontconfig version 2.11.0 1733ca08ab68Smrg 1734ca08ab68Smrg -------------------------------------------------------------------------- 1735ca08ab68Smrg 1736ca08ab68Smrg FreeType specific functions 1737ca08ab68Smrg 1738ca08ab68Smrg Table of Contents 1739ca08ab68Smrg 1740ca08ab68Smrg [45]FcFreeTypeCharIndex -- map Unicode to glyph id 17412c393a42Smrg 1742ca08ab68Smrg [46]FcFreeTypeCharSet -- compute Unicode coverage 17432c393a42Smrg 1744ca08ab68Smrg [47]FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing 1745ca08ab68Smrg type 17462c393a42Smrg 1747ca08ab68Smrg [48]FcFreeTypeQuery -- compute pattern from font file (and index) 17482c393a42Smrg 1749ca08ab68Smrg [49]FcFreeTypeQueryFace -- compute pattern from FT_Face 17502c393a42Smrg 1751ca08ab68Smrg While the fontconfig library doesn't insist that FreeType be used as the 1752ca08ab68Smrg rasterization mechanism for fonts, it does provide some convenience 1753ca08ab68Smrg functions. 1754ca08ab68Smrg 1755ca08ab68Smrg FcFreeTypeCharIndex 17562c393a42Smrg 17572c393a42SmrgName 17582c393a42Smrg 1759ca08ab68Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 17602c393a42Smrg 17612c393a42SmrgSynopsis 17622c393a42Smrg 1763ca08ab68Smrg #include <fontconfig.h> 1764ca08ab68Smrg #include <fcfreetype.h> 17652c393a42Smrg 1766a6844aabSmrg 1767ca08ab68Smrg FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4); 17682c393a42Smrg 17692c393a42SmrgDescription 17702c393a42Smrg 1771ca08ab68Smrg Maps a Unicode char to a glyph index. This function uses information from 1772ca08ab68Smrg several possible underlying encoding tables to work around broken fonts. 1773ca08ab68Smrg As a result, this function isn't designed to be used in performance 1774ca08ab68Smrg sensitive areas; results from this function are intended to be cached by 1775ca08ab68Smrg higher level functions. 17762c393a42Smrg 17772c393a42SmrgVersion 17782c393a42Smrg 17796fc018e4Smrg Fontconfig version 2.11.0 17802c393a42Smrg 1781ca08ab68Smrg FcFreeTypeCharSet 17822c393a42Smrg 17832c393a42SmrgName 17842c393a42Smrg 1785ca08ab68Smrg FcFreeTypeCharSet -- compute Unicode coverage 17862c393a42Smrg 17872c393a42SmrgSynopsis 17882c393a42Smrg 1789ca08ab68Smrg #include <fontconfig.h> 1790ca08ab68Smrg #include <fcfreetype.h> 17912c393a42Smrg 1792a6844aabSmrg 1793ca08ab68Smrg FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks); 17942c393a42Smrg 17952c393a42SmrgDescription 17962c393a42Smrg 1797ca08ab68Smrg Scans a FreeType face and returns the set of encoded Unicode chars. This 1798ca08ab68Smrg scans several encoding tables to build as complete a list as possible. If 1799ca08ab68Smrg 'blanks' is not 0, the glyphs in the font are examined and any blank 1800ca08ab68Smrg glyphs not in 'blanks' are not placed in the returned FcCharSet. 18012c393a42Smrg 18022c393a42SmrgVersion 18032c393a42Smrg 18046fc018e4Smrg Fontconfig version 2.11.0 18052c393a42Smrg 1806ca08ab68Smrg FcFreeTypeCharSetAndSpacing 18072c393a42Smrg 18082c393a42SmrgName 18092c393a42Smrg 1810ca08ab68Smrg FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing type 18112c393a42Smrg 18122c393a42SmrgSynopsis 18132c393a42Smrg 1814ca08ab68Smrg #include <fontconfig.h> 1815ca08ab68Smrg #include <fcfreetype.h> 18162c393a42Smrg 1817a6844aabSmrg 1818ca08ab68Smrg FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks *blanks, 1819ca08ab68Smrg int *spacing); 18202c393a42Smrg 18212c393a42SmrgDescription 18222c393a42Smrg 1823ca08ab68Smrg Scans a FreeType face and returns the set of encoded Unicode chars. This 1824ca08ab68Smrg scans several encoding tables to build as complete a list as possible. If 1825ca08ab68Smrg 'blanks' is not 0, the glyphs in the font are examined and any blank 1826ca08ab68Smrg glyphs not in 'blanks' are not placed in the returned FcCharSet. spacing 1827ca08ab68Smrg receives the computed spacing type of the font, one of FC_MONO for a font 1828ca08ab68Smrg where all glyphs have the same width, FC_DUAL, where the font has glyphs 1829ca08ab68Smrg in precisely two widths, one twice as wide as the other, or 1830ca08ab68Smrg FC_PROPORTIONAL where the font has glyphs of many widths. 18312c393a42Smrg 18322c393a42SmrgVersion 18332c393a42Smrg 18346fc018e4Smrg Fontconfig version 2.11.0 18352c393a42Smrg 1836ca08ab68Smrg FcFreeTypeQuery 18372c393a42Smrg 18382c393a42SmrgName 18392c393a42Smrg 1840ca08ab68Smrg FcFreeTypeQuery -- compute pattern from font file (and index) 18412c393a42Smrg 18422c393a42SmrgSynopsis 18432c393a42Smrg 1844ca08ab68Smrg #include <fontconfig.h> 1845ca08ab68Smrg #include <fcfreetype.h> 18462c393a42Smrg 1847a6844aabSmrg 1848ca08ab68Smrg FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id, FcBlanks *blanks, 1849ca08ab68Smrg int *count); 18502c393a42Smrg 18512c393a42SmrgDescription 18522c393a42Smrg 1853ca08ab68Smrg Constructs a pattern representing the 'id'th font in 'file'. The number of 1854ca08ab68Smrg fonts in 'file' is returned in 'count'. 18552c393a42Smrg 18562c393a42SmrgVersion 18572c393a42Smrg 18586fc018e4Smrg Fontconfig version 2.11.0 18592c393a42Smrg 1860ca08ab68Smrg FcFreeTypeQueryFace 18612c393a42Smrg 18622c393a42SmrgName 18632c393a42Smrg 1864ca08ab68Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 18652c393a42Smrg 18662c393a42SmrgSynopsis 18672c393a42Smrg 1868ca08ab68Smrg #include <fontconfig.h> 1869ca08ab68Smrg #include <fcfreetype.h> 18702c393a42Smrg 1871a6844aabSmrg 1872ca08ab68Smrg FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file, 1873ca08ab68Smrg int id, FcBlanks *blanks); 18742c393a42Smrg 18752c393a42SmrgDescription 18762c393a42Smrg 1877ca08ab68Smrg Constructs a pattern representing 'face'. 'file' and 'id' are used solely 1878ca08ab68Smrg as data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY). 18792c393a42Smrg 18802c393a42SmrgVersion 18812c393a42Smrg 18826fc018e4Smrg Fontconfig version 2.11.0 1883ca08ab68Smrg 1884ca08ab68Smrg -------------------------------------------------------------------------- 1885ca08ab68Smrg 1886ca08ab68Smrg FcValue 1887ca08ab68Smrg 1888ca08ab68Smrg Table of Contents 1889ca08ab68Smrg 1890ca08ab68Smrg [50]FcValueDestroy -- Free a value 1891a6844aabSmrg 1892ca08ab68Smrg [51]FcValueSave -- Copy a value 18932c393a42Smrg 1894ca08ab68Smrg [52]FcValuePrint -- Print a value to stdout 18952c393a42Smrg 1896ca08ab68Smrg [53]FcValueEqual -- Test two values for equality 18972c393a42Smrg 1898ca08ab68Smrg FcValue is a structure containing a type tag and a union of all possible 1899ca08ab68Smrg datatypes. The tag is an enum of type FcType and is intended to provide a 1900ca08ab68Smrg measure of run-time typechecking, although that depends on careful 1901ca08ab68Smrg programming. 19022c393a42Smrg 1903ca08ab68Smrg FcValueDestroy 19042c393a42Smrg 19052c393a42SmrgName 19062c393a42Smrg 1907ca08ab68Smrg FcValueDestroy -- Free a value 19082c393a42Smrg 19092c393a42SmrgSynopsis 19102c393a42Smrg 1911c9710b42Smrg #include <fontconfig/fontconfig.h> 19122c393a42Smrg 1913a6844aabSmrg 1914ca08ab68Smrg void FcValueDestroy(FcValue v); 19152c393a42Smrg 19162c393a42SmrgDescription 19172c393a42Smrg 1918ca08ab68Smrg Frees any memory referenced by v. Values of type FcTypeString, 1919ca08ab68Smrg FcTypeMatrix and FcTypeCharSet reference memory, the other types do not. 19202c393a42Smrg 19212c393a42SmrgVersion 19222c393a42Smrg 19236fc018e4Smrg Fontconfig version 2.11.0 19242c393a42Smrg 1925ca08ab68Smrg FcValueSave 19262c393a42Smrg 19272c393a42SmrgName 19282c393a42Smrg 1929ca08ab68Smrg FcValueSave -- Copy a value 19302c393a42Smrg 19312c393a42SmrgSynopsis 19322c393a42Smrg 1933c9710b42Smrg #include <fontconfig/fontconfig.h> 19342c393a42Smrg 1935a6844aabSmrg 1936ca08ab68Smrg FcValue FcValueSave(FcValue v); 19372c393a42Smrg 19382c393a42SmrgDescription 19392c393a42Smrg 1940ca08ab68Smrg Returns a copy of v duplicating any object referenced by it so that v may 1941ca08ab68Smrg be safely destroyed without harming the new value. 19422c393a42Smrg 19432c393a42SmrgVersion 19442c393a42Smrg 19456fc018e4Smrg Fontconfig version 2.11.0 19462c393a42Smrg 1947ca08ab68Smrg FcValuePrint 19482c393a42Smrg 19492c393a42SmrgName 19502c393a42Smrg 1951ca08ab68Smrg FcValuePrint -- Print a value to stdout 19522c393a42Smrg 19532c393a42SmrgSynopsis 19542c393a42Smrg 1955c9710b42Smrg #include <fontconfig/fontconfig.h> 19562c393a42Smrg 1957a6844aabSmrg 1958ca08ab68Smrg void FcValuePrint(FcValue v); 19592c393a42Smrg 19602c393a42SmrgDescription 19612c393a42Smrg 1962ca08ab68Smrg Prints a human-readable representation of v to stdout. The format should 1963ca08ab68Smrg not be considered part of the library specification as it may change in 1964ca08ab68Smrg the future. 19652c393a42Smrg 19662c393a42SmrgVersion 19672c393a42Smrg 19686fc018e4Smrg Fontconfig version 2.11.0 19692c393a42Smrg 1970ca08ab68Smrg FcValueEqual 19712c393a42Smrg 19722c393a42SmrgName 19732c393a42Smrg 1974ca08ab68Smrg FcValueEqual -- Test two values for equality 19752c393a42Smrg 19762c393a42SmrgSynopsis 19772c393a42Smrg 1978c9710b42Smrg #include <fontconfig/fontconfig.h> 19792c393a42Smrg 1980a6844aabSmrg 1981ca08ab68Smrg FcBool FcValueEqual(FcValue v_a, FcValue v_b); 19822c393a42Smrg 19832c393a42SmrgDescription 19842c393a42Smrg 1985ca08ab68Smrg Compares two values. Integers and Doubles are compared as numbers; 1986ca08ab68Smrg otherwise the two values have to be the same type to be considered equal. 1987ca08ab68Smrg Strings are compared ignoring case. 19882c393a42Smrg 19892c393a42SmrgVersion 19902c393a42Smrg 19916fc018e4Smrg Fontconfig version 2.11.0 1992ca08ab68Smrg 1993ca08ab68Smrg -------------------------------------------------------------------------- 1994ca08ab68Smrg 1995ca08ab68Smrg FcCharSet 1996ca08ab68Smrg 1997ca08ab68Smrg Table of Contents 1998ca08ab68Smrg 1999ca08ab68Smrg [54]FcCharSetCreate -- Create an empty character set 2000ca08ab68Smrg 2001ca08ab68Smrg [55]FcCharSetDestroy -- Destroy a character set 2002ca08ab68Smrg 2003ca08ab68Smrg [56]FcCharSetAddChar -- Add a character to a charset 2004ca08ab68Smrg 2005ca08ab68Smrg [57]FcCharSetDelChar -- Add a character to a charset 2006ca08ab68Smrg 2007ca08ab68Smrg [58]FcCharSetCopy -- Copy a charset 2008ca08ab68Smrg 2009ca08ab68Smrg [59]FcCharSetEqual -- Compare two charsets 2010ca08ab68Smrg 2011ca08ab68Smrg [60]FcCharSetIntersect -- Intersect charsets 2012ca08ab68Smrg 2013ca08ab68Smrg [61]FcCharSetUnion -- Add charsets 2014ca08ab68Smrg 2015ca08ab68Smrg [62]FcCharSetSubtract -- Subtract charsets 2016ca08ab68Smrg 2017ca08ab68Smrg [63]FcCharSetMerge -- Merge charsets 20182c393a42Smrg 2019ca08ab68Smrg [64]FcCharSetHasChar -- Check a charset for a char 20202c393a42Smrg 2021ca08ab68Smrg [65]FcCharSetCount -- Count entries in a charset 20222c393a42Smrg 2023ca08ab68Smrg [66]FcCharSetIntersectCount -- Intersect and count charsets 20242c393a42Smrg 2025ca08ab68Smrg [67]FcCharSetSubtractCount -- Subtract and count charsets 20262c393a42Smrg 2027ca08ab68Smrg [68]FcCharSetIsSubset -- Test for charset inclusion 2028ca08ab68Smrg 2029ca08ab68Smrg [69]FcCharSetFirstPage -- Start enumerating charset contents 2030ca08ab68Smrg 2031ca08ab68Smrg [70]FcCharSetNextPage -- Continue enumerating charset contents 2032ca08ab68Smrg 2033ca08ab68Smrg [71]FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 2034ca08ab68Smrg 2035ca08ab68Smrg [72]FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 2036ca08ab68Smrg 2037ca08ab68Smrg An FcCharSet is a boolean array indicating a set of Unicode chars. Those 2038ca08ab68Smrg associated with a font are marked constant and cannot be edited. 2039ca08ab68Smrg FcCharSets may be reference counted internally to reduce memory 2040ca08ab68Smrg consumption; this may be visible to applications as the result of 2041ca08ab68Smrg FcCharSetCopy may return it's argument, and that CharSet may remain 2042ca08ab68Smrg unmodifiable. 2043ca08ab68Smrg 2044ca08ab68Smrg FcCharSetCreate 2045ca08ab68Smrg 2046ca08ab68SmrgName 2047ca08ab68Smrg 2048ca08ab68Smrg FcCharSetCreate -- Create an empty character set 2049ca08ab68Smrg 2050ca08ab68SmrgSynopsis 2051ca08ab68Smrg 2052c9710b42Smrg #include <fontconfig/fontconfig.h> 2053ca08ab68Smrg 2054ca08ab68Smrg 2055ca08ab68Smrg FcCharSet * FcCharSetCreate(void); 2056ca08ab68Smrg 2057ca08ab68SmrgDescription 2058ca08ab68Smrg 2059ca08ab68Smrg FcCharSetCreate allocates and initializes a new empty character set 2060ca08ab68Smrg object. 2061ca08ab68Smrg 2062ca08ab68SmrgVersion 2063ca08ab68Smrg 20646fc018e4Smrg Fontconfig version 2.11.0 2065ca08ab68Smrg 2066ca08ab68Smrg FcCharSetDestroy 20672c393a42Smrg 20682c393a42SmrgName 20692c393a42Smrg 2070ca08ab68Smrg FcCharSetDestroy -- Destroy a character set 20712c393a42Smrg 20722c393a42SmrgSynopsis 20732c393a42Smrg 2074c9710b42Smrg #include <fontconfig/fontconfig.h> 20752c393a42Smrg 2076a6844aabSmrg 2077ca08ab68Smrg void FcCharSetDestroy(FcCharSet *fcs); 20782c393a42Smrg 20792c393a42SmrgDescription 20802c393a42Smrg 2081ca08ab68Smrg FcCharSetDestroy decrements the reference count fcs. If the reference 2082ca08ab68Smrg count becomes zero, all memory referenced is freed. 20832c393a42Smrg 20842c393a42SmrgVersion 20852c393a42Smrg 20866fc018e4Smrg Fontconfig version 2.11.0 20872c393a42Smrg 2088ca08ab68Smrg FcCharSetAddChar 20892c393a42Smrg 20902c393a42SmrgName 20912c393a42Smrg 2092ca08ab68Smrg FcCharSetAddChar -- Add a character to a charset 20932c393a42Smrg 20942c393a42SmrgSynopsis 20952c393a42Smrg 2096c9710b42Smrg #include <fontconfig/fontconfig.h> 20972c393a42Smrg 2098a6844aabSmrg 2099ca08ab68Smrg FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4); 21002c393a42Smrg 21012c393a42SmrgDescription 21022c393a42Smrg 2103ca08ab68Smrg FcCharSetAddChar adds a single Unicode char to the set, returning FcFalse 2104ca08ab68Smrg on failure, either as a result of a constant set or from running out of 2105ca08ab68Smrg memory. 21062c393a42Smrg 21072c393a42SmrgVersion 21082c393a42Smrg 21096fc018e4Smrg Fontconfig version 2.11.0 21102c393a42Smrg 2111ca08ab68Smrg FcCharSetDelChar 21122c393a42Smrg 21132c393a42SmrgName 21142c393a42Smrg 2115ca08ab68Smrg FcCharSetDelChar -- Add a character to a charset 21162c393a42Smrg 21172c393a42SmrgSynopsis 21182c393a42Smrg 2119c9710b42Smrg #include <fontconfig/fontconfig.h> 21202c393a42Smrg 2121a6844aabSmrg 2122ca08ab68Smrg FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4); 21232c393a42Smrg 21242c393a42SmrgDescription 21252c393a42Smrg 2126ca08ab68Smrg FcCharSetDelChar deletes a single Unicode char from the set, returning 2127ca08ab68Smrg FcFalse on failure, either as a result of a constant set or from running 2128ca08ab68Smrg out of memory. 21292c393a42Smrg 21302c393a42SmrgVersion 21312c393a42Smrg 21326fc018e4Smrg Fontconfig version 2.11.0 21332c393a42Smrg 2134ca08ab68Smrg FcCharSetCopy 21352c393a42Smrg 21362c393a42SmrgName 21372c393a42Smrg 2138ca08ab68Smrg FcCharSetCopy -- Copy a charset 21392c393a42Smrg 21402c393a42SmrgSynopsis 21412c393a42Smrg 2142c9710b42Smrg #include <fontconfig/fontconfig.h> 21432c393a42Smrg 2144a6844aabSmrg 2145ca08ab68Smrg FcCharSet * FcCharSetCopy(FcCharSet *src); 21462c393a42Smrg 21472c393a42SmrgDescription 21482c393a42Smrg 2149ca08ab68Smrg Makes a copy of src; note that this may not actually do anything more than 2150ca08ab68Smrg increment the reference count on src. 21512c393a42Smrg 21522c393a42SmrgVersion 21532c393a42Smrg 21546fc018e4Smrg Fontconfig version 2.11.0 21552c393a42Smrg 2156ca08ab68Smrg FcCharSetEqual 21572c393a42Smrg 21582c393a42SmrgName 21592c393a42Smrg 2160ca08ab68Smrg FcCharSetEqual -- Compare two charsets 21612c393a42Smrg 21622c393a42SmrgSynopsis 21632c393a42Smrg 2164c9710b42Smrg #include <fontconfig/fontconfig.h> 21652c393a42Smrg 2166a6844aabSmrg 2167ca08ab68Smrg FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b); 21682c393a42Smrg 21692c393a42SmrgDescription 21702c393a42Smrg 2171ca08ab68Smrg Returns whether a and b contain the same set of Unicode chars. 21722c393a42Smrg 21732c393a42SmrgVersion 21742c393a42Smrg 21756fc018e4Smrg Fontconfig version 2.11.0 21762c393a42Smrg 2177ca08ab68Smrg FcCharSetIntersect 21782c393a42Smrg 21792c393a42SmrgName 21802c393a42Smrg 2181ca08ab68Smrg FcCharSetIntersect -- Intersect charsets 21822c393a42Smrg 21832c393a42SmrgSynopsis 21842c393a42Smrg 2185c9710b42Smrg #include <fontconfig/fontconfig.h> 21862c393a42Smrg 2187a6844aabSmrg 2188ca08ab68Smrg FcCharSet * FcCharSetIntersect(const FcCharSet *a, const FcCharSet *b); 21892c393a42Smrg 21902c393a42SmrgDescription 21912c393a42Smrg 2192ca08ab68Smrg Returns a set including only those chars found in both a and b. 21932c393a42Smrg 21942c393a42SmrgVersion 21952c393a42Smrg 21966fc018e4Smrg Fontconfig version 2.11.0 21972c393a42Smrg 2198ca08ab68Smrg FcCharSetUnion 21992c393a42Smrg 22002c393a42SmrgName 22012c393a42Smrg 2202ca08ab68Smrg FcCharSetUnion -- Add charsets 22032c393a42Smrg 22042c393a42SmrgSynopsis 22052c393a42Smrg 2206c9710b42Smrg #include <fontconfig/fontconfig.h> 22072c393a42Smrg 2208a6844aabSmrg 2209ca08ab68Smrg FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet *b); 22102c393a42Smrg 22112c393a42SmrgDescription 22122c393a42Smrg 2213ca08ab68Smrg Returns a set including only those chars found in either a or b. 22142c393a42Smrg 22152c393a42SmrgVersion 22162c393a42Smrg 22176fc018e4Smrg Fontconfig version 2.11.0 22182c393a42Smrg 2219ca08ab68Smrg FcCharSetSubtract 22202c393a42Smrg 22212c393a42SmrgName 22222c393a42Smrg 2223ca08ab68Smrg FcCharSetSubtract -- Subtract charsets 22242c393a42Smrg 22252c393a42SmrgSynopsis 22262c393a42Smrg 2227c9710b42Smrg #include <fontconfig/fontconfig.h> 22282c393a42Smrg 2229a6844aabSmrg 2230ca08ab68Smrg FcCharSet * FcCharSetSubtract(const FcCharSet *a, const FcCharSet *b); 22312c393a42Smrg 22322c393a42SmrgDescription 22332c393a42Smrg 2234ca08ab68Smrg Returns a set including only those chars found in a but not b. 22352c393a42Smrg 22362c393a42SmrgVersion 22372c393a42Smrg 22386fc018e4Smrg Fontconfig version 2.11.0 2239a6844aabSmrg 2240ca08ab68Smrg FcCharSetMerge 2241a6844aabSmrg 2242a6844aabSmrgName 2243a6844aabSmrg 2244ca08ab68Smrg FcCharSetMerge -- Merge charsets 2245a6844aabSmrg 2246a6844aabSmrgSynopsis 2247a6844aabSmrg 2248c9710b42Smrg #include <fontconfig/fontconfig.h> 2249a6844aabSmrg 2250a6844aabSmrg 2251ca08ab68Smrg FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool *changed); 2252a6844aabSmrg 2253a6844aabSmrgDescription 2254a6844aabSmrg 2255ca08ab68Smrg Adds all chars in b to a. In other words, this is an in-place version of 2256ca08ab68Smrg FcCharSetUnion. If changed is not NULL, then it returns whether any new 2257ca08ab68Smrg chars from b were added to a. Returns FcFalse on failure, either when a is 2258ca08ab68Smrg a constant set or from running out of memory. 2259a6844aabSmrg 2260a6844aabSmrgVersion 2261a6844aabSmrg 22626fc018e4Smrg Fontconfig version 2.11.0 22632c393a42Smrg 2264ca08ab68Smrg FcCharSetHasChar 22652c393a42Smrg 22662c393a42SmrgName 22672c393a42Smrg 2268ca08ab68Smrg FcCharSetHasChar -- Check a charset for a char 22692c393a42Smrg 22702c393a42SmrgSynopsis 22712c393a42Smrg 2272c9710b42Smrg #include <fontconfig/fontconfig.h> 22732c393a42Smrg 2274a6844aabSmrg 2275ca08ab68Smrg FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4); 22762c393a42Smrg 22772c393a42SmrgDescription 22782c393a42Smrg 2279ca08ab68Smrg Returns whether fcs contains the char ucs4. 22802c393a42Smrg 22812c393a42SmrgVersion 22822c393a42Smrg 22836fc018e4Smrg Fontconfig version 2.11.0 22842c393a42Smrg 2285ca08ab68Smrg FcCharSetCount 22862c393a42Smrg 22872c393a42SmrgName 22882c393a42Smrg 2289ca08ab68Smrg FcCharSetCount -- Count entries in a charset 22902c393a42Smrg 22912c393a42SmrgSynopsis 22922c393a42Smrg 2293c9710b42Smrg #include <fontconfig/fontconfig.h> 22942c393a42Smrg 2295a6844aabSmrg 2296ca08ab68Smrg FcChar32 FcCharSetCount(const FcCharSet *a); 22972c393a42Smrg 22982c393a42SmrgDescription 22992c393a42Smrg 2300ca08ab68Smrg Returns the total number of Unicode chars in a. 23012c393a42Smrg 23022c393a42SmrgVersion 23032c393a42Smrg 23046fc018e4Smrg Fontconfig version 2.11.0 23052c393a42Smrg 2306ca08ab68Smrg FcCharSetIntersectCount 23072c393a42Smrg 23082c393a42SmrgName 23092c393a42Smrg 2310ca08ab68Smrg FcCharSetIntersectCount -- Intersect and count charsets 23112c393a42Smrg 23122c393a42SmrgSynopsis 23132c393a42Smrg 2314c9710b42Smrg #include <fontconfig/fontconfig.h> 23152c393a42Smrg 2316a6844aabSmrg 2317ca08ab68Smrg FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const FcCharSet *b); 23182c393a42Smrg 23192c393a42SmrgDescription 23202c393a42Smrg 2321ca08ab68Smrg Returns the number of chars that are in both a and b. 23222c393a42Smrg 23232c393a42SmrgVersion 23242c393a42Smrg 23256fc018e4Smrg Fontconfig version 2.11.0 23262c393a42Smrg 2327ca08ab68Smrg FcCharSetSubtractCount 23282c393a42Smrg 23292c393a42SmrgName 23302c393a42Smrg 2331ca08ab68Smrg FcCharSetSubtractCount -- Subtract and count charsets 23322c393a42Smrg 23332c393a42SmrgSynopsis 23342c393a42Smrg 2335c9710b42Smrg #include <fontconfig/fontconfig.h> 23362c393a42Smrg 2337a6844aabSmrg 2338ca08ab68Smrg FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const FcCharSet *b); 23392c393a42Smrg 23402c393a42SmrgDescription 23412c393a42Smrg 2342ca08ab68Smrg Returns the number of chars that are in a but not in b. 23432c393a42Smrg 23442c393a42SmrgVersion 23452c393a42Smrg 23466fc018e4Smrg Fontconfig version 2.11.0 23472c393a42Smrg 2348ca08ab68Smrg FcCharSetIsSubset 23492c393a42Smrg 23502c393a42SmrgName 23512c393a42Smrg 2352ca08ab68Smrg FcCharSetIsSubset -- Test for charset inclusion 23532c393a42Smrg 23542c393a42SmrgSynopsis 23552c393a42Smrg 2356c9710b42Smrg #include <fontconfig/fontconfig.h> 23572c393a42Smrg 2358a6844aabSmrg 2359ca08ab68Smrg FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet *b); 23602c393a42Smrg 23612c393a42SmrgDescription 23622c393a42Smrg 2363ca08ab68Smrg Returns whether a is a subset of b. 23642c393a42Smrg 23652c393a42SmrgVersion 23662c393a42Smrg 23676fc018e4Smrg Fontconfig version 2.11.0 23682c393a42Smrg 2369ca08ab68Smrg FcCharSetFirstPage 23702c393a42Smrg 23712c393a42SmrgName 23722c393a42Smrg 2373ca08ab68Smrg FcCharSetFirstPage -- Start enumerating charset contents 23742c393a42Smrg 23752c393a42SmrgSynopsis 23762c393a42Smrg 2377c9710b42Smrg #include <fontconfig/fontconfig.h> 23782c393a42Smrg 2379a6844aabSmrg 2380ca08ab68Smrg FcChar32 FcCharSetFirstPage(const FcCharSet *a, 2381ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 23822c393a42Smrg 23832c393a42SmrgDescription 23842c393a42Smrg 23856fc018e4Smrg Builds an array of bits in map marking the first page of Unicode coverage 23866fc018e4Smrg of a. *next is set to contains the base code point for the next page in a. 23876fc018e4Smrg Returns the base code point for the page, or FC_CHARSET_DONE if a contains 23886fc018e4Smrg no pages. As an example, if FcCharSetFirstPage returns 0x300 and fills map 23896fc018e4Smrg with 23906fc018e4Smrg 23916fc018e4Smrg0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003 23926fc018e4Smrg 23936fc018e4Smrg Then the page contains code points 0x300 through 0x33f (the first 64 code 23946fc018e4Smrg points on the page) because map[0] and map[1] both have all their bits 23956fc018e4Smrg set. It also contains code points 0x343 (0x300 + 32*2 + (4-1)) and 0x35e 23966fc018e4Smrg (0x300 + 32*2 + (31-1)) because map[2] has the 4th and 31st bits set. The 23976fc018e4Smrg code points represented by map[3] and later are left as an excercise for 23986fc018e4Smrg the reader ;). 23992c393a42Smrg 24002c393a42SmrgVersion 24012c393a42Smrg 24026fc018e4Smrg Fontconfig version 2.11.0 24032c393a42Smrg 2404ca08ab68Smrg FcCharSetNextPage 24052c393a42Smrg 24062c393a42SmrgName 24072c393a42Smrg 2408ca08ab68Smrg FcCharSetNextPage -- Continue enumerating charset contents 24092c393a42Smrg 24102c393a42SmrgSynopsis 24112c393a42Smrg 2412c9710b42Smrg #include <fontconfig/fontconfig.h> 24132c393a42Smrg 2414a6844aabSmrg 2415ca08ab68Smrg FcChar32 FcCharSetNextPage(const FcCharSet *a, 2416ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 24172c393a42Smrg 24182c393a42SmrgDescription 24192c393a42Smrg 24206fc018e4Smrg Builds an array of bits in map marking the Unicode coverage of a for page 24216fc018e4Smrg containing *next (see the FcCharSetFirstPage description for details). 24226fc018e4Smrg *next is set to contains the base code point for the next page in a. 24236fc018e4Smrg Returns the base of code point for the page, or FC_CHARSET_DONE if a does 24246fc018e4Smrg not contain *next. 24252c393a42Smrg 24262c393a42SmrgVersion 24272c393a42Smrg 24286fc018e4Smrg Fontconfig version 2.11.0 24292c393a42Smrg 2430ca08ab68Smrg FcCharSetCoverage 24312c393a42Smrg 24322c393a42SmrgName 24332c393a42Smrg 2434ca08ab68Smrg FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 24352c393a42Smrg 24362c393a42SmrgSynopsis 24372c393a42Smrg 2438c9710b42Smrg #include <fontconfig/fontconfig.h> 24392c393a42Smrg 2440a6844aabSmrg 2441ca08ab68Smrg FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page, 2442ca08ab68Smrg FcChar32[8]result); 24432c393a42Smrg 24442c393a42SmrgDescription 24452c393a42Smrg 2446ca08ab68Smrg DEPRECATED This function returns a bitmask in result which indicates which 2447ca08ab68Smrg code points in page are included in a. FcCharSetCoverage returns the next 2448ca08ab68Smrg page in the charset which has any coverage. 24492c393a42Smrg 24502c393a42SmrgVersion 24512c393a42Smrg 24526fc018e4Smrg Fontconfig version 2.11.0 24532c393a42Smrg 2454ca08ab68Smrg FcCharSetNew 24552c393a42Smrg 24562c393a42SmrgName 24572c393a42Smrg 2458ca08ab68Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 24592c393a42Smrg 24602c393a42SmrgSynopsis 24612c393a42Smrg 2462c9710b42Smrg #include <fontconfig/fontconfig.h> 24632c393a42Smrg 2464a6844aabSmrg 2465ca08ab68Smrg FcCharSet * FcCharSetNew(void); 24662c393a42Smrg 24672c393a42SmrgDescription 24682c393a42Smrg 2469ca08ab68Smrg FcCharSetNew is a DEPRECATED alias for FcCharSetCreate. 24702c393a42Smrg 24712c393a42SmrgVersion 24722c393a42Smrg 24736fc018e4Smrg Fontconfig version 2.11.0 2474ca08ab68Smrg 2475ca08ab68Smrg -------------------------------------------------------------------------- 2476ca08ab68Smrg 2477ca08ab68Smrg FcLangSet 2478ca08ab68Smrg 2479ca08ab68Smrg Table of Contents 2480ca08ab68Smrg 2481ca08ab68Smrg [73]FcLangSetCreate -- create a langset object 2482ca08ab68Smrg 2483ca08ab68Smrg [74]FcLangSetDestroy -- destroy a langset object 2484ca08ab68Smrg 2485ca08ab68Smrg [75]FcLangSetCopy -- copy a langset object 2486ca08ab68Smrg 2487ca08ab68Smrg [76]FcLangSetAdd -- add a language to a langset 2488ca08ab68Smrg 2489ca08ab68Smrg [77]FcLangSetDel -- delete a language from a langset 2490ca08ab68Smrg 2491ca08ab68Smrg [78]FcLangSetUnion -- Add langsets 2492ca08ab68Smrg 2493ca08ab68Smrg [79]FcLangSetSubtract -- Subtract langsets 2494ca08ab68Smrg 2495ca08ab68Smrg [80]FcLangSetCompare -- compare language sets 2496ca08ab68Smrg 2497ca08ab68Smrg [81]FcLangSetContains -- check langset subset relation 2498ca08ab68Smrg 2499ca08ab68Smrg [82]FcLangSetEqual -- test for matching langsets 2500ca08ab68Smrg 2501ca08ab68Smrg [83]FcLangSetHash -- return a hash value for a langset 2502ca08ab68Smrg 2503ca08ab68Smrg [84]FcLangSetHasLang -- test langset for language support 2504ca08ab68Smrg 2505ca08ab68Smrg [85]FcGetDefaultLangs -- Get the default languages list 2506ca08ab68Smrg 2507ca08ab68Smrg [86]FcGetLangs -- Get list of languages 2508ca08ab68Smrg 2509c9710b42Smrg [87]FcLangNormalize -- Normalize the language string 2510c9710b42Smrg 2511c9710b42Smrg [88]FcLangGetCharSet -- Get character map for a language 2512ca08ab68Smrg 2513ca08ab68Smrg An FcLangSet is a set of language names (each of which include language 2514ca08ab68Smrg and an optional territory). They are used when selecting fonts to indicate 2515ca08ab68Smrg which languages the fonts need to support. Each font is marked, using 2516ca08ab68Smrg language orthography information built into fontconfig, with the set of 2517ca08ab68Smrg supported languages. 2518ca08ab68Smrg 2519ca08ab68Smrg FcLangSetCreate 2520ca08ab68Smrg 2521ca08ab68SmrgName 2522ca08ab68Smrg 2523ca08ab68Smrg FcLangSetCreate -- create a langset object 2524ca08ab68Smrg 2525ca08ab68SmrgSynopsis 2526ca08ab68Smrg 2527c9710b42Smrg #include <fontconfig/fontconfig.h> 2528ca08ab68Smrg 2529ca08ab68Smrg 2530ca08ab68Smrg FcLangSet * FcLangSetCreate(void); 2531ca08ab68Smrg 2532ca08ab68SmrgDescription 2533ca08ab68Smrg 2534ca08ab68Smrg FcLangSetCreate creates a new FcLangSet object. 2535ca08ab68Smrg 2536ca08ab68SmrgVersion 2537ca08ab68Smrg 25386fc018e4Smrg Fontconfig version 2.11.0 2539ca08ab68Smrg 2540ca08ab68Smrg FcLangSetDestroy 2541ca08ab68Smrg 2542ca08ab68SmrgName 2543ca08ab68Smrg 2544ca08ab68Smrg FcLangSetDestroy -- destroy a langset object 2545ca08ab68Smrg 2546ca08ab68SmrgSynopsis 2547ca08ab68Smrg 2548c9710b42Smrg #include <fontconfig/fontconfig.h> 2549ca08ab68Smrg 2550ca08ab68Smrg 2551ca08ab68Smrg void FcLangSetDestroy(FcLangSet *ls); 2552ca08ab68Smrg 2553ca08ab68SmrgDescription 2554ca08ab68Smrg 2555ca08ab68Smrg FcLangSetDestroy destroys a FcLangSet object, freeing all memory 2556ca08ab68Smrg associated with it. 2557ca08ab68Smrg 2558ca08ab68SmrgVersion 2559ca08ab68Smrg 25606fc018e4Smrg Fontconfig version 2.11.0 2561ca08ab68Smrg 2562ca08ab68Smrg FcLangSetCopy 2563a6844aabSmrg 2564ca08ab68SmrgName 2565ca08ab68Smrg 2566ca08ab68Smrg FcLangSetCopy -- copy a langset object 2567ca08ab68Smrg 2568ca08ab68SmrgSynopsis 2569ca08ab68Smrg 2570c9710b42Smrg #include <fontconfig/fontconfig.h> 2571ca08ab68Smrg 2572ca08ab68Smrg 2573ca08ab68Smrg FcLangSet * FcLangSetCopy(const FcLangSet *ls); 2574ca08ab68Smrg 2575ca08ab68SmrgDescription 25762c393a42Smrg 2577ca08ab68Smrg FcLangSetCopy creates a new FcLangSet object and populates it with the 2578ca08ab68Smrg contents of ls. 25792c393a42Smrg 2580ca08ab68SmrgVersion 25812c393a42Smrg 25826fc018e4Smrg Fontconfig version 2.11.0 25832c393a42Smrg 2584ca08ab68Smrg FcLangSetAdd 25852c393a42Smrg 25862c393a42SmrgName 25872c393a42Smrg 2588ca08ab68Smrg FcLangSetAdd -- add a language to a langset 25892c393a42Smrg 25902c393a42SmrgSynopsis 25912c393a42Smrg 2592c9710b42Smrg #include <fontconfig/fontconfig.h> 25932c393a42Smrg 2594a6844aabSmrg 2595ca08ab68Smrg FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang); 25962c393a42Smrg 25972c393a42SmrgDescription 25982c393a42Smrg 2599ca08ab68Smrg lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or 2600ca08ab68Smrg three letter language from ISO 639 and Tt is a territory from ISO 3166. 26012c393a42Smrg 26022c393a42SmrgVersion 26032c393a42Smrg 26046fc018e4Smrg Fontconfig version 2.11.0 26052c393a42Smrg 2606ca08ab68Smrg FcLangSetDel 26072c393a42Smrg 26082c393a42SmrgName 26092c393a42Smrg 2610ca08ab68Smrg FcLangSetDel -- delete a language from a langset 26112c393a42Smrg 26122c393a42SmrgSynopsis 26132c393a42Smrg 2614c9710b42Smrg #include <fontconfig/fontconfig.h> 26152c393a42Smrg 2616a6844aabSmrg 2617ca08ab68Smrg FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang); 26182c393a42Smrg 26192c393a42SmrgDescription 26202c393a42Smrg 2621ca08ab68Smrg lang is removed from ls. lang should be of the form Ll-Tt where Ll is a 2622ca08ab68Smrg two or three letter language from ISO 639 and Tt is a territory from ISO 2623ca08ab68Smrg 3166. 26242c393a42Smrg 26252c393a42SmrgVersion 26262c393a42Smrg 26276fc018e4Smrg Fontconfig version 2.11.0 26282c393a42Smrg 2629ca08ab68Smrg FcLangSetUnion 26302c393a42Smrg 26312c393a42SmrgName 26322c393a42Smrg 2633ca08ab68Smrg FcLangSetUnion -- Add langsets 26342c393a42Smrg 26352c393a42SmrgSynopsis 26362c393a42Smrg 2637c9710b42Smrg #include <fontconfig/fontconfig.h> 26382c393a42Smrg 2639a6844aabSmrg 2640ca08ab68Smrg FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const FcLangSet *ls_b); 26412c393a42Smrg 26422c393a42SmrgDescription 26432c393a42Smrg 2644ca08ab68Smrg Returns a set including only those languages found in either ls_a or ls_b. 26452c393a42Smrg 26462c393a42SmrgVersion 26472c393a42Smrg 26486fc018e4Smrg Fontconfig version 2.11.0 26492c393a42Smrg 2650ca08ab68Smrg FcLangSetSubtract 26512c393a42Smrg 26522c393a42SmrgName 26532c393a42Smrg 2654ca08ab68Smrg FcLangSetSubtract -- Subtract langsets 26552c393a42Smrg 26562c393a42SmrgSynopsis 26572c393a42Smrg 2658c9710b42Smrg #include <fontconfig/fontconfig.h> 26592c393a42Smrg 2660a6844aabSmrg 2661ca08ab68Smrg FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const FcLangSet 2662ca08ab68Smrg *ls_b); 26632c393a42Smrg 26642c393a42SmrgDescription 26652c393a42Smrg 2666ca08ab68Smrg Returns a set including only those languages found in ls_a but not in 2667ca08ab68Smrg ls_b. 26682c393a42Smrg 26692c393a42SmrgVersion 26702c393a42Smrg 26716fc018e4Smrg Fontconfig version 2.11.0 26722c393a42Smrg 2673ca08ab68Smrg FcLangSetCompare 26742c393a42Smrg 26752c393a42SmrgName 26762c393a42Smrg 2677ca08ab68Smrg FcLangSetCompare -- compare language sets 26782c393a42Smrg 26792c393a42SmrgSynopsis 26802c393a42Smrg 2681c9710b42Smrg #include <fontconfig/fontconfig.h> 26822c393a42Smrg 2683a6844aabSmrg 2684ca08ab68Smrg FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const FcLangSet 2685ca08ab68Smrg *ls_b); 26862c393a42Smrg 26872c393a42SmrgDescription 26882c393a42Smrg 2689ca08ab68Smrg FcLangSetCompare compares language coverage for ls_a and ls_b. If they 2690ca08ab68Smrg share any language and territory pair, this function returns FcLangEqual. 2691ca08ab68Smrg If they share a language but differ in which territory that language is 2692ca08ab68Smrg for, this function returns FcLangDifferentTerritory. If they share no 2693ca08ab68Smrg languages in common, this function returns FcLangDifferentLang. 26942c393a42Smrg 26952c393a42SmrgVersion 26962c393a42Smrg 26976fc018e4Smrg Fontconfig version 2.11.0 26982c393a42Smrg 2699ca08ab68Smrg FcLangSetContains 27002c393a42Smrg 27012c393a42SmrgName 27022c393a42Smrg 2703ca08ab68Smrg FcLangSetContains -- check langset subset relation 27042c393a42Smrg 27052c393a42SmrgSynopsis 27062c393a42Smrg 2707c9710b42Smrg #include <fontconfig/fontconfig.h> 27082c393a42Smrg 2709a6844aabSmrg 2710ca08ab68Smrg FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet *ls_b); 27112c393a42Smrg 27122c393a42SmrgDescription 27132c393a42Smrg 2714ca08ab68Smrg FcLangSetContains returns FcTrue if ls_a contains every language in ls_b. 2715ca08ab68Smrg ls_a will 'contain' a language from ls_b if ls_a has exactly the language, 2716ca08ab68Smrg or either the language or ls_a has no territory. 27172c393a42Smrg 27182c393a42SmrgVersion 27192c393a42Smrg 27206fc018e4Smrg Fontconfig version 2.11.0 27212c393a42Smrg 2722ca08ab68Smrg FcLangSetEqual 27232c393a42Smrg 27242c393a42SmrgName 27252c393a42Smrg 2726ca08ab68Smrg FcLangSetEqual -- test for matching langsets 27272c393a42Smrg 27282c393a42SmrgSynopsis 27292c393a42Smrg 2730c9710b42Smrg #include <fontconfig/fontconfig.h> 27312c393a42Smrg 2732a6844aabSmrg 2733ca08ab68Smrg FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet *ls_b); 27342c393a42Smrg 27352c393a42SmrgDescription 27362c393a42Smrg 2737ca08ab68Smrg Returns FcTrue if and only if ls_a supports precisely the same language 2738ca08ab68Smrg and territory combinations as ls_b. 27392c393a42Smrg 27402c393a42SmrgVersion 27412c393a42Smrg 27426fc018e4Smrg Fontconfig version 2.11.0 27432c393a42Smrg 2744ca08ab68Smrg FcLangSetHash 27452c393a42Smrg 27462c393a42SmrgName 27472c393a42Smrg 2748ca08ab68Smrg FcLangSetHash -- return a hash value for a langset 27492c393a42Smrg 27502c393a42SmrgSynopsis 27512c393a42Smrg 2752c9710b42Smrg #include <fontconfig/fontconfig.h> 27532c393a42Smrg 2754a6844aabSmrg 2755ca08ab68Smrg FcChar32 FcLangSetHash(const FcLangSet *ls); 27562c393a42Smrg 27572c393a42SmrgDescription 27582c393a42Smrg 2759ca08ab68Smrg This function returns a value which depends solely on the languages 2760ca08ab68Smrg supported by ls. Any language which equals ls will have the same result 2761ca08ab68Smrg from FcLangSetHash. However, two langsets with the same hash value may not 2762ca08ab68Smrg be equal. 27632c393a42Smrg 27642c393a42SmrgVersion 27652c393a42Smrg 27666fc018e4Smrg Fontconfig version 2.11.0 27672c393a42Smrg 2768ca08ab68Smrg FcLangSetHasLang 27692c393a42Smrg 27702c393a42SmrgName 27712c393a42Smrg 2772ca08ab68Smrg FcLangSetHasLang -- test langset for language support 2773a6844aabSmrg 2774a6844aabSmrgSynopsis 2775a6844aabSmrg 2776c9710b42Smrg #include <fontconfig/fontconfig.h> 2777a6844aabSmrg 2778a6844aabSmrg 2779ca08ab68Smrg FcLangResult FcLangSetHasLang(const FcLangSet *ls, const FcChar8 *lang); 2780a6844aabSmrg 2781a6844aabSmrgDescription 2782a6844aabSmrg 2783ca08ab68Smrg FcLangSetHasLang checks whether ls supports lang. If ls has a matching 2784ca08ab68Smrg language and territory pair, this function returns FcLangEqual. If ls has 2785ca08ab68Smrg a matching language but differs in which territory that language is for, 2786ca08ab68Smrg this function returns FcLangDifferentTerritory. If ls has no matching 2787ca08ab68Smrg language, this function returns FcLangDifferentLang. 2788a6844aabSmrg 2789a6844aabSmrgVersion 2790a6844aabSmrg 27916fc018e4Smrg Fontconfig version 2.11.0 2792a6844aabSmrg 2793ca08ab68Smrg FcGetDefaultLangs 2794a6844aabSmrg 2795a6844aabSmrgName 2796a6844aabSmrg 2797ca08ab68Smrg FcGetDefaultLangs -- Get the default languages list 27982c393a42Smrg 27992c393a42SmrgSynopsis 28002c393a42Smrg 2801c9710b42Smrg #include <fontconfig/fontconfig.h> 28022c393a42Smrg 2803a6844aabSmrg 2804ca08ab68Smrg FcStrSet * FcGetDefaultLangs(voidls); 28052c393a42Smrg 28062c393a42SmrgDescription 28072c393a42Smrg 2808ca08ab68Smrg Returns a string set of the default languages according to the environment 2809ca08ab68Smrg variables on the system. This function looks for them in order of FC_LANG, 2810ca08ab68Smrg LC_ALL, LC_CTYPE and LANG then. If there are no valid values in those 2811ca08ab68Smrg environment variables, "en" will be set as fallback. 28122c393a42Smrg 28132c393a42SmrgVersion 28142c393a42Smrg 28156fc018e4Smrg Fontconfig version 2.11.0 28162c393a42Smrg 2817ca08ab68Smrg FcGetLangs 28182c393a42Smrg 28192c393a42SmrgName 28202c393a42Smrg 2821ca08ab68Smrg FcGetLangs -- Get list of languages 28222c393a42Smrg 28232c393a42SmrgSynopsis 28242c393a42Smrg 2825c9710b42Smrg #include <fontconfig/fontconfig.h> 28262c393a42Smrg 2827a6844aabSmrg 2828ca08ab68Smrg FcStrSet * FcGetLangs(void); 28292c393a42Smrg 28302c393a42SmrgDescription 28312c393a42Smrg 2832ca08ab68Smrg Returns a string set of all known languages. 28332c393a42Smrg 28342c393a42SmrgVersion 28352c393a42Smrg 28366fc018e4Smrg Fontconfig version 2.11.0 2837c9710b42Smrg 2838c9710b42Smrg FcLangNormalize 2839c9710b42Smrg 2840c9710b42SmrgName 2841c9710b42Smrg 2842c9710b42Smrg FcLangNormalize -- Normalize the language string 2843c9710b42Smrg 2844c9710b42SmrgSynopsis 2845c9710b42Smrg 2846c9710b42Smrg #include <fontconfig/fontconfig.h> 2847c9710b42Smrg 2848c9710b42Smrg 2849c9710b42Smrg FcChar8 * FcLangNormalize(const FcChar8 *lang); 2850c9710b42Smrg 2851c9710b42SmrgDescription 2852c9710b42Smrg 2853c9710b42Smrg Returns a string to make lang suitable on fontconfig. 2854c9710b42Smrg 2855c9710b42SmrgVersion 2856c9710b42Smrg 28576fc018e4Smrg Fontconfig version 2.11.0 28582c393a42Smrg 2859ca08ab68Smrg FcLangGetCharSet 28602c393a42Smrg 28612c393a42SmrgName 28622c393a42Smrg 2863ca08ab68Smrg FcLangGetCharSet -- Get character map for a language 28642c393a42Smrg 28652c393a42SmrgSynopsis 28662c393a42Smrg 2867c9710b42Smrg #include <fontconfig/fontconfig.h> 28682c393a42Smrg 2869a6844aabSmrg 2870ca08ab68Smrg const FcCharSet * FcLangGetCharSet(const FcChar8 *lang); 28712c393a42Smrg 28722c393a42SmrgDescription 28732c393a42Smrg 2874ca08ab68Smrg Returns the FcCharMap for a language. 28752c393a42Smrg 28762c393a42SmrgVersion 28772c393a42Smrg 28786fc018e4Smrg Fontconfig version 2.11.0 2879ca08ab68Smrg 2880ca08ab68Smrg -------------------------------------------------------------------------- 2881ca08ab68Smrg 2882ca08ab68Smrg FcMatrix 2883ca08ab68Smrg 2884ca08ab68Smrg Table of Contents 2885ca08ab68Smrg 2886c9710b42Smrg [89]FcMatrixInit -- initialize an FcMatrix structure 2887a6844aabSmrg 2888c9710b42Smrg [90]FcMatrixCopy -- Copy a matrix 28892c393a42Smrg 2890c9710b42Smrg [91]FcMatrixEqual -- Compare two matrices 28912c393a42Smrg 2892c9710b42Smrg [92]FcMatrixMultiply -- Multiply matrices 28932c393a42Smrg 2894c9710b42Smrg [93]FcMatrixRotate -- Rotate a matrix 28952c393a42Smrg 2896c9710b42Smrg [94]FcMatrixScale -- Scale a matrix 2897ca08ab68Smrg 2898c9710b42Smrg [95]FcMatrixShear -- Shear a matrix 2899ca08ab68Smrg 2900ca08ab68Smrg FcMatrix structures hold an affine transformation in matrix form. 2901ca08ab68Smrg 2902ca08ab68Smrg FcMatrixInit 29032c393a42Smrg 29042c393a42SmrgName 29052c393a42Smrg 2906ca08ab68Smrg FcMatrixInit -- initialize an FcMatrix structure 29072c393a42Smrg 29082c393a42SmrgSynopsis 29092c393a42Smrg 2910c9710b42Smrg #include <fontconfig/fontconfig.h> 29112c393a42Smrg 2912a6844aabSmrg 2913ca08ab68Smrg void FcMatrixInit(FcMatrix *matrix); 29142c393a42Smrg 29152c393a42SmrgDescription 29162c393a42Smrg 2917ca08ab68Smrg FcMatrixInit initializes matrix to the identity matrix. 29182c393a42Smrg 29192c393a42SmrgVersion 29202c393a42Smrg 29216fc018e4Smrg Fontconfig version 2.11.0 29222c393a42Smrg 2923ca08ab68Smrg FcMatrixCopy 29242c393a42Smrg 29252c393a42SmrgName 29262c393a42Smrg 2927ca08ab68Smrg FcMatrixCopy -- Copy a matrix 29282c393a42Smrg 29292c393a42SmrgSynopsis 29302c393a42Smrg 2931c9710b42Smrg #include <fontconfig/fontconfig.h> 29322c393a42Smrg 2933a6844aabSmrg 2934ca08ab68Smrg void FcMatrixCopy(const FcMatrix *matrix); 29352c393a42Smrg 29362c393a42SmrgDescription 29372c393a42Smrg 2938ca08ab68Smrg FcMatrixCopy allocates a new FcMatrix and copies mat into it. 29392c393a42Smrg 29402c393a42SmrgVersion 29412c393a42Smrg 29426fc018e4Smrg Fontconfig version 2.11.0 29432c393a42Smrg 2944ca08ab68Smrg FcMatrixEqual 29452c393a42Smrg 29462c393a42SmrgName 29472c393a42Smrg 2948ca08ab68Smrg FcMatrixEqual -- Compare two matrices 29492c393a42Smrg 29502c393a42SmrgSynopsis 29512c393a42Smrg 2952c9710b42Smrg #include <fontconfig/fontconfig.h> 29532c393a42Smrg 2954a6844aabSmrg 2955ca08ab68Smrg void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix *matrix2); 29562c393a42Smrg 29572c393a42SmrgDescription 29582c393a42Smrg 2959ca08ab68Smrg FcMatrixEqual compares matrix1 and matrix2 returning FcTrue when they are 2960ca08ab68Smrg equal and FcFalse when they are not. 29612c393a42Smrg 29622c393a42SmrgVersion 29632c393a42Smrg 29646fc018e4Smrg Fontconfig version 2.11.0 29652c393a42Smrg 2966ca08ab68Smrg FcMatrixMultiply 29672c393a42Smrg 29682c393a42SmrgName 29692c393a42Smrg 2970ca08ab68Smrg FcMatrixMultiply -- Multiply matrices 29712c393a42Smrg 29722c393a42SmrgSynopsis 29732c393a42Smrg 2974c9710b42Smrg #include <fontconfig/fontconfig.h> 29752c393a42Smrg 2976a6844aabSmrg 2977ca08ab68Smrg void FcMatrixMultiply(FcMatrix *result, const FcMatrix *matrix1, const 2978ca08ab68Smrg FcMatrix *matrix2); 29792c393a42Smrg 29802c393a42SmrgDescription 29812c393a42Smrg 2982ca08ab68Smrg FcMatrixMultiply multiplies matrix1 and matrix2 storing the result in 2983ca08ab68Smrg result. 29842c393a42Smrg 29852c393a42SmrgVersion 29862c393a42Smrg 29876fc018e4Smrg Fontconfig version 2.11.0 29882c393a42Smrg 2989ca08ab68Smrg FcMatrixRotate 29902c393a42Smrg 29912c393a42SmrgName 29922c393a42Smrg 2993ca08ab68Smrg FcMatrixRotate -- Rotate a matrix 29942c393a42Smrg 29952c393a42SmrgSynopsis 29962c393a42Smrg 2997c9710b42Smrg #include <fontconfig/fontconfig.h> 29982c393a42Smrg 2999a6844aabSmrg 3000ca08ab68Smrg void FcMatrixRotate(FcMatrix *matrix, double cos, double sin); 30012c393a42Smrg 30022c393a42SmrgDescription 30032c393a42Smrg 3004ca08ab68Smrg FcMatrixRotate rotates matrix by the angle who's sine is sin and cosine is 3005ca08ab68Smrg cos. This is done by multiplying by the matrix: 3006a6844aabSmrg 3007ca08ab68Smrg cos -sin 3008ca08ab68Smrg sin cos 30092c393a42Smrg 30102c393a42SmrgVersion 30112c393a42Smrg 30126fc018e4Smrg Fontconfig version 2.11.0 30132c393a42Smrg 3014ca08ab68Smrg FcMatrixScale 30152c393a42Smrg 30162c393a42SmrgName 30172c393a42Smrg 3018ca08ab68Smrg FcMatrixScale -- Scale a matrix 30192c393a42Smrg 30202c393a42SmrgSynopsis 30212c393a42Smrg 3022c9710b42Smrg #include <fontconfig/fontconfig.h> 30232c393a42Smrg 3024a6844aabSmrg 3025ca08ab68Smrg void FcMatrixScale(FcMatrix *matrix, double sx, double dy); 30262c393a42Smrg 30272c393a42SmrgDescription 30282c393a42Smrg 3029ca08ab68Smrg FcMatrixScale multiplies matrix x values by sx and y values by dy. This is 3030ca08ab68Smrg done by multiplying by the matrix: 3031a6844aabSmrg 3032ca08ab68Smrg sx 0 3033ca08ab68Smrg 0 dy 30342c393a42Smrg 30352c393a42SmrgVersion 30362c393a42Smrg 30376fc018e4Smrg Fontconfig version 2.11.0 30382c393a42Smrg 3039ca08ab68Smrg FcMatrixShear 30402c393a42Smrg 30412c393a42SmrgName 30422c393a42Smrg 3043ca08ab68Smrg FcMatrixShear -- Shear a matrix 30442c393a42Smrg 30452c393a42SmrgSynopsis 30462c393a42Smrg 3047c9710b42Smrg #include <fontconfig/fontconfig.h> 30482c393a42Smrg 3049a6844aabSmrg 3050ca08ab68Smrg void FcMatrixShear(FcMatrix *matrix, double sh, double sv); 30512c393a42Smrg 30522c393a42SmrgDescription 30532c393a42Smrg 3054ca08ab68Smrg FcMatrixShare shears matrix horizontally by sh and vertically by sv. This 3055ca08ab68Smrg is done by multiplying by the matrix: 3056a6844aabSmrg 3057ca08ab68Smrg 1 sh 3058ca08ab68Smrg sv 1 30592c393a42Smrg 30602c393a42SmrgVersion 30612c393a42Smrg 30626fc018e4Smrg Fontconfig version 2.11.0 3063ca08ab68Smrg 3064ca08ab68Smrg -------------------------------------------------------------------------- 3065ca08ab68Smrg 3066ca08ab68Smrg FcConfig 3067ca08ab68Smrg 3068ca08ab68Smrg Table of Contents 3069ca08ab68Smrg 3070c9710b42Smrg [96]FcConfigCreate -- Create a configuration 3071ca08ab68Smrg 3072c9710b42Smrg [97]FcConfigReference -- Increment config reference count 3073ca08ab68Smrg 3074c9710b42Smrg [98]FcConfigDestroy -- Destroy a configuration 3075ca08ab68Smrg 3076c9710b42Smrg [99]FcConfigSetCurrent -- Set configuration as default 3077ca08ab68Smrg 3078c9710b42Smrg [100]FcConfigGetCurrent -- Return current configuration 3079ca08ab68Smrg 3080c9710b42Smrg [101]FcConfigUptoDate -- Check timestamps on config files 3081ca08ab68Smrg 3082c9710b42Smrg [102]FcConfigHome -- return the current home directory. 3083ca08ab68Smrg 3084c9710b42Smrg [103]FcConfigEnableHome -- controls use of the home directory. 3085ca08ab68Smrg 3086c9710b42Smrg [104]FcConfigBuildFonts -- Build font database 3087ca08ab68Smrg 3088c9710b42Smrg [105]FcConfigGetConfigDirs -- Get config directories 3089ca08ab68Smrg 3090c9710b42Smrg [106]FcConfigGetFontDirs -- Get font directories 3091ca08ab68Smrg 3092c9710b42Smrg [107]FcConfigGetConfigFiles -- Get config files 3093ca08ab68Smrg 3094c9710b42Smrg [108]FcConfigGetCache -- DEPRECATED used to return per-user cache filename 3095ca08ab68Smrg 3096c9710b42Smrg [109]FcConfigGetCacheDirs -- return the list of directories searched for 3097ca08ab68Smrg cache files 3098ca08ab68Smrg 3099c9710b42Smrg [110]FcConfigGetFonts -- Get config font set 3100ca08ab68Smrg 3101c9710b42Smrg [111]FcConfigGetBlanks -- Get config blanks 3102a6844aabSmrg 3103c9710b42Smrg [112]FcConfigGetRescanInterval -- Get config rescan interval 3104a6844aabSmrg 3105c9710b42Smrg [113]FcConfigSetRescanInterval -- Set config rescan interval 3106a6844aabSmrg 3107c9710b42Smrg [114]FcConfigAppFontAddFile -- Add font file to font database 3108a6844aabSmrg 3109c9710b42Smrg [115]FcConfigAppFontAddDir -- Add fonts from directory to font database 31102c393a42Smrg 3111c9710b42Smrg [116]FcConfigAppFontClear -- Remove all app fonts from font database 3112ca08ab68Smrg 3113c9710b42Smrg [117]FcConfigSubstituteWithPat -- Execute substitutions 3114ca08ab68Smrg 3115c9710b42Smrg [118]FcConfigSubstitute -- Execute substitutions 3116ca08ab68Smrg 3117c9710b42Smrg [119]FcFontMatch -- Return best font 3118ca08ab68Smrg 3119c9710b42Smrg [120]FcFontSort -- Return list of matching fonts 3120ca08ab68Smrg 3121c9710b42Smrg [121]FcFontRenderPrepare -- Prepare pattern for loading font file 3122ca08ab68Smrg 3123c9710b42Smrg [122]FcFontList -- List fonts 3124ca08ab68Smrg 3125c9710b42Smrg [123]FcConfigFilename -- Find a config file 3126ca08ab68Smrg 3127c9710b42Smrg [124]FcConfigParseAndLoad -- load a configuration file 3128c9710b42Smrg 3129c9710b42Smrg [125]FcConfigGetSysRoot -- Obtain the system root directory 3130c9710b42Smrg 3131c9710b42Smrg [126]FcConfigSetSysRoot -- Set the system root directory 3132ca08ab68Smrg 3133ca08ab68Smrg An FcConfig object holds the internal representation of a configuration. 3134ca08ab68Smrg There is a default configuration which applications may use by passing 0 3135ca08ab68Smrg to any function using the data within an FcConfig. 3136ca08ab68Smrg 3137ca08ab68Smrg FcConfigCreate 31382c393a42Smrg 31392c393a42SmrgName 31402c393a42Smrg 3141ca08ab68Smrg FcConfigCreate -- Create a configuration 31422c393a42Smrg 31432c393a42SmrgSynopsis 31442c393a42Smrg 3145c9710b42Smrg #include <fontconfig/fontconfig.h> 31462c393a42Smrg 3147a6844aabSmrg 3148ca08ab68Smrg FcConfig * FcConfigCreate(void); 31492c393a42Smrg 31502c393a42SmrgDescription 31512c393a42Smrg 3152ca08ab68Smrg Creates an empty configuration. 31532c393a42Smrg 31542c393a42SmrgVersion 31552c393a42Smrg 31566fc018e4Smrg Fontconfig version 2.11.0 3157a6844aabSmrg 3158ca08ab68Smrg FcConfigReference 3159a6844aabSmrg 3160a6844aabSmrgName 3161a6844aabSmrg 3162ca08ab68Smrg FcConfigReference -- Increment config reference count 3163a6844aabSmrg 3164a6844aabSmrgSynopsis 3165a6844aabSmrg 3166c9710b42Smrg #include <fontconfig/fontconfig.h> 3167a6844aabSmrg 3168a6844aabSmrg 3169ca08ab68Smrg FcConfig * FcConfigReference(FcConfig *config); 3170a6844aabSmrg 3171a6844aabSmrgDescription 3172a6844aabSmrg 3173ca08ab68Smrg Add another reference to config. Configs are freed only when the reference 3174ca08ab68Smrg count reaches zero. If config is NULL, the current configuration is used. 3175ca08ab68Smrg In that case this function will be similar to FcConfigGetCurrent() except 3176ca08ab68Smrg that it increments the reference count before returning and the user is 3177ca08ab68Smrg responsible for destroying the configuration when not needed anymore. 3178a6844aabSmrg 3179a6844aabSmrgVersion 3180a6844aabSmrg 31816fc018e4Smrg Fontconfig version 2.11.0 31822c393a42Smrg 3183ca08ab68Smrg FcConfigDestroy 31842c393a42Smrg 31852c393a42SmrgName 31862c393a42Smrg 3187ca08ab68Smrg FcConfigDestroy -- Destroy a configuration 31882c393a42Smrg 31892c393a42SmrgSynopsis 31902c393a42Smrg 3191c9710b42Smrg #include <fontconfig/fontconfig.h> 31922c393a42Smrg 3193a6844aabSmrg 3194ca08ab68Smrg void FcConfigDestroy(FcConfig *config); 31952c393a42Smrg 31962c393a42SmrgDescription 31972c393a42Smrg 3198ca08ab68Smrg Decrements the config reference count. If all references are gone, 3199ca08ab68Smrg destroys the configuration and any data associated with it. Note that 3200ca08ab68Smrg calling this function with the return from FcConfigGetCurrent will cause a 3201ca08ab68Smrg new configuration to be created for use as current configuration. 32022c393a42Smrg 32032c393a42SmrgVersion 32042c393a42Smrg 32056fc018e4Smrg Fontconfig version 2.11.0 32062c393a42Smrg 3207ca08ab68Smrg FcConfigSetCurrent 32082c393a42Smrg 32092c393a42SmrgName 32102c393a42Smrg 3211ca08ab68Smrg FcConfigSetCurrent -- Set configuration as default 32122c393a42Smrg 32132c393a42SmrgSynopsis 32142c393a42Smrg 3215c9710b42Smrg #include <fontconfig/fontconfig.h> 32162c393a42Smrg 3217a6844aabSmrg 3218ca08ab68Smrg FcBool FcConfigSetCurrent(FcConfig *config); 32192c393a42Smrg 32202c393a42SmrgDescription 32212c393a42Smrg 3222ca08ab68Smrg Sets the current default configuration to config. Implicitly calls 3223ca08ab68Smrg FcConfigBuildFonts if necessary, returning FcFalse if that call fails. 32242c393a42Smrg 32252c393a42SmrgVersion 32262c393a42Smrg 32276fc018e4Smrg Fontconfig version 2.11.0 32282c393a42Smrg 3229ca08ab68Smrg FcConfigGetCurrent 32302c393a42Smrg 32312c393a42SmrgName 32322c393a42Smrg 3233ca08ab68Smrg FcConfigGetCurrent -- Return current configuration 32342c393a42Smrg 32352c393a42SmrgSynopsis 32362c393a42Smrg 3237c9710b42Smrg #include <fontconfig/fontconfig.h> 32382c393a42Smrg 3239a6844aabSmrg 3240ca08ab68Smrg FcConfig * FcConfigGetCurrent(void); 32412c393a42Smrg 32422c393a42SmrgDescription 32432c393a42Smrg 3244ca08ab68Smrg Returns the current default configuration. 32452c393a42Smrg 32462c393a42SmrgVersion 32472c393a42Smrg 32486fc018e4Smrg Fontconfig version 2.11.0 32492c393a42Smrg 3250ca08ab68Smrg FcConfigUptoDate 32512c393a42Smrg 32522c393a42SmrgName 32532c393a42Smrg 3254ca08ab68Smrg FcConfigUptoDate -- Check timestamps on config files 32552c393a42Smrg 32562c393a42SmrgSynopsis 32572c393a42Smrg 3258c9710b42Smrg #include <fontconfig/fontconfig.h> 32592c393a42Smrg 3260a6844aabSmrg 3261ca08ab68Smrg FcBool FcConfigUptoDate(FcConfig *config); 32622c393a42Smrg 32632c393a42SmrgDescription 32642c393a42Smrg 3265ca08ab68Smrg Checks all of the files related to config and returns whether any of them 3266ca08ab68Smrg has been modified since the configuration was created. If config is NULL, 3267ca08ab68Smrg the current configuration is used. 32682c393a42Smrg 32692c393a42SmrgVersion 32702c393a42Smrg 32716fc018e4Smrg Fontconfig version 2.11.0 32722c393a42Smrg 3273ca08ab68Smrg FcConfigHome 32742c393a42Smrg 32752c393a42SmrgName 32762c393a42Smrg 3277ca08ab68Smrg FcConfigHome -- return the current home directory. 32782c393a42Smrg 32792c393a42SmrgSynopsis 32802c393a42Smrg 3281c9710b42Smrg #include <fontconfig/fontconfig.h> 32822c393a42Smrg 3283a6844aabSmrg 3284ca08ab68Smrg FcChar8 * FcConfigHome(void); 32852c393a42Smrg 32862c393a42SmrgDescription 32872c393a42Smrg 3288ca08ab68Smrg Return the current user's home directory, if it is available, and if using 3289ca08ab68Smrg it is enabled, and NULL otherwise. See also FcConfigEnableHome). 32902c393a42Smrg 32912c393a42SmrgVersion 32922c393a42Smrg 32936fc018e4Smrg Fontconfig version 2.11.0 32942c393a42Smrg 3295ca08ab68Smrg FcConfigEnableHome 32962c393a42Smrg 32972c393a42SmrgName 32982c393a42Smrg 3299ca08ab68Smrg FcConfigEnableHome -- controls use of the home directory. 33002c393a42Smrg 33012c393a42SmrgSynopsis 33022c393a42Smrg 3303c9710b42Smrg #include <fontconfig/fontconfig.h> 33042c393a42Smrg 3305a6844aabSmrg 3306ca08ab68Smrg FcBool FcConfigEnableHome(FcBool enable); 33072c393a42Smrg 33082c393a42SmrgDescription 33092c393a42Smrg 3310ca08ab68Smrg If enable is FcTrue, then Fontconfig will use various files which are 3311ca08ab68Smrg specified relative to the user's home directory (using the ~ notation in 3312ca08ab68Smrg the configuration). When enable is FcFalse, then all use of the home 3313ca08ab68Smrg directory in these contexts will be disabled. The previous setting of the 3314ca08ab68Smrg value is returned. 33152c393a42Smrg 33162c393a42SmrgVersion 33172c393a42Smrg 33186fc018e4Smrg Fontconfig version 2.11.0 33192c393a42Smrg 3320ca08ab68Smrg FcConfigBuildFonts 33212c393a42Smrg 33222c393a42SmrgName 33232c393a42Smrg 3324ca08ab68Smrg FcConfigBuildFonts -- Build font database 33252c393a42Smrg 33262c393a42SmrgSynopsis 33272c393a42Smrg 3328c9710b42Smrg #include <fontconfig/fontconfig.h> 33292c393a42Smrg 3330a6844aabSmrg 3331ca08ab68Smrg FcBool FcConfigBuildFonts(FcConfig *config); 33322c393a42Smrg 33332c393a42SmrgDescription 33342c393a42Smrg 3335ca08ab68Smrg Builds the set of available fonts for the given configuration. Note that 3336ca08ab68Smrg any changes to the configuration after this call have indeterminate 3337ca08ab68Smrg effects. Returns FcFalse if this operation runs out of memory. If config 3338ca08ab68Smrg is NULL, the current configuration is used. 33392c393a42Smrg 33402c393a42SmrgVersion 33412c393a42Smrg 33426fc018e4Smrg Fontconfig version 2.11.0 33432c393a42Smrg 3344ca08ab68Smrg FcConfigGetConfigDirs 33452c393a42Smrg 33462c393a42SmrgName 33472c393a42Smrg 3348ca08ab68Smrg FcConfigGetConfigDirs -- Get config directories 33492c393a42Smrg 33502c393a42SmrgSynopsis 33512c393a42Smrg 3352c9710b42Smrg #include <fontconfig/fontconfig.h> 33532c393a42Smrg 3354a6844aabSmrg 3355ca08ab68Smrg FcStrList * FcConfigGetConfigDirs(FcConfig *config); 33562c393a42Smrg 33572c393a42SmrgDescription 33582c393a42Smrg 3359ca08ab68Smrg Returns the list of font directories specified in the configuration files 3360ca08ab68Smrg for config. Does not include any subdirectories. If config is NULL, the 3361ca08ab68Smrg current configuration is used. 33622c393a42Smrg 33632c393a42SmrgVersion 33642c393a42Smrg 33656fc018e4Smrg Fontconfig version 2.11.0 33662c393a42Smrg 3367ca08ab68Smrg FcConfigGetFontDirs 33682c393a42Smrg 33692c393a42SmrgName 33702c393a42Smrg 3371ca08ab68Smrg FcConfigGetFontDirs -- Get font directories 33722c393a42Smrg 33732c393a42SmrgSynopsis 33742c393a42Smrg 3375c9710b42Smrg #include <fontconfig/fontconfig.h> 33762c393a42Smrg 3377a6844aabSmrg 3378ca08ab68Smrg FcStrList * FcConfigGetFontDirs(FcConfig *config); 33792c393a42Smrg 33802c393a42SmrgDescription 33812c393a42Smrg 3382ca08ab68Smrg Returns the list of font directories in config. This includes the 3383ca08ab68Smrg configured font directories along with any directories below those in the 3384ca08ab68Smrg filesystem. If config is NULL, the current configuration is used. 33852c393a42Smrg 33862c393a42SmrgVersion 33872c393a42Smrg 33886fc018e4Smrg Fontconfig version 2.11.0 33892c393a42Smrg 3390ca08ab68Smrg FcConfigGetConfigFiles 33912c393a42Smrg 33922c393a42SmrgName 33932c393a42Smrg 3394ca08ab68Smrg FcConfigGetConfigFiles -- Get config files 33952c393a42Smrg 33962c393a42SmrgSynopsis 33972c393a42Smrg 3398c9710b42Smrg #include <fontconfig/fontconfig.h> 33992c393a42Smrg 3400a6844aabSmrg 3401ca08ab68Smrg FcStrList * FcConfigGetConfigFiles(FcConfig *config); 34022c393a42Smrg 34032c393a42SmrgDescription 34042c393a42Smrg 3405ca08ab68Smrg Returns the list of known configuration files used to generate config. If 3406ca08ab68Smrg config is NULL, the current configuration is used. 34072c393a42Smrg 34082c393a42SmrgVersion 34092c393a42Smrg 34106fc018e4Smrg Fontconfig version 2.11.0 34112c393a42Smrg 3412ca08ab68Smrg FcConfigGetCache 34132c393a42Smrg 34142c393a42SmrgName 34152c393a42Smrg 3416ca08ab68Smrg FcConfigGetCache -- DEPRECATED used to return per-user cache filename 34172c393a42Smrg 34182c393a42SmrgSynopsis 34192c393a42Smrg 3420c9710b42Smrg #include <fontconfig/fontconfig.h> 34212c393a42Smrg 3422a6844aabSmrg 3423ca08ab68Smrg FcChar8 * FcConfigGetCache(FcConfig *config); 34242c393a42Smrg 34252c393a42SmrgDescription 34262c393a42Smrg 3427ca08ab68Smrg With fontconfig no longer using per-user cache files, this function now 3428ca08ab68Smrg simply returns NULL to indicate that no per-user file exists. 34292c393a42Smrg 34302c393a42SmrgVersion 34312c393a42Smrg 34326fc018e4Smrg Fontconfig version 2.11.0 34332c393a42Smrg 3434ca08ab68Smrg FcConfigGetCacheDirs 34352c393a42Smrg 34362c393a42SmrgName 34372c393a42Smrg 3438ca08ab68Smrg FcConfigGetCacheDirs -- return the list of directories searched for cache 3439ca08ab68Smrg files 34402c393a42Smrg 34412c393a42SmrgSynopsis 34422c393a42Smrg 3443c9710b42Smrg #include <fontconfig/fontconfig.h> 34442c393a42Smrg 3445a6844aabSmrg 3446ca08ab68Smrg FcStrList * FcConfigGetCacheDirs(const FcConfig *config); 34472c393a42Smrg 34482c393a42SmrgDescription 34492c393a42Smrg 3450ca08ab68Smrg FcConfigGetCacheDirs returns a string list containing all of the 3451ca08ab68Smrg directories that fontconfig will search when attempting to load a cache 3452ca08ab68Smrg file for a font directory. If config is NULL, the current configuration is 3453ca08ab68Smrg used. 34542c393a42Smrg 34552c393a42SmrgVersion 34562c393a42Smrg 34576fc018e4Smrg Fontconfig version 2.11.0 34582c393a42Smrg 3459ca08ab68Smrg FcConfigGetFonts 34602c393a42Smrg 34612c393a42SmrgName 34622c393a42Smrg 3463ca08ab68Smrg FcConfigGetFonts -- Get config font set 34642c393a42Smrg 34652c393a42SmrgSynopsis 34662c393a42Smrg 3467c9710b42Smrg #include <fontconfig/fontconfig.h> 34682c393a42Smrg 3469a6844aabSmrg 3470ca08ab68Smrg FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set); 34712c393a42Smrg 34722c393a42SmrgDescription 34732c393a42Smrg 3474ca08ab68Smrg Returns one of the two sets of fonts from the configuration as specified 3475ca08ab68Smrg by set. This font set is owned by the library and must not be modified or 3476ca08ab68Smrg freed. If config is NULL, the current configuration is used. 34772c393a42Smrg 34782c393a42SmrgVersion 34792c393a42Smrg 34806fc018e4Smrg Fontconfig version 2.11.0 34812c393a42Smrg 3482ca08ab68Smrg FcConfigGetBlanks 34832c393a42Smrg 34842c393a42SmrgName 34852c393a42Smrg 3486ca08ab68Smrg FcConfigGetBlanks -- Get config blanks 34872c393a42Smrg 34882c393a42SmrgSynopsis 34892c393a42Smrg 3490c9710b42Smrg #include <fontconfig/fontconfig.h> 34912c393a42Smrg 3492a6844aabSmrg 3493ca08ab68Smrg FcBlanks * FcConfigGetBlanks(FcConfig *config); 34942c393a42Smrg 34952c393a42SmrgDescription 34962c393a42Smrg 3497ca08ab68Smrg Returns the FcBlanks object associated with the given configuration, if no 3498ca08ab68Smrg blanks were present in the configuration, this function will return 0. The 3499ca08ab68Smrg returned FcBlanks object if not NULL, is valid as long as the owning 3500ca08ab68Smrg FcConfig is alive. If config is NULL, the current configuration is used. 35012c393a42Smrg 35022c393a42SmrgVersion 35032c393a42Smrg 35046fc018e4Smrg Fontconfig version 2.11.0 35052c393a42Smrg 3506ca08ab68Smrg FcConfigGetRescanInterval 35072c393a42Smrg 35082c393a42SmrgName 35092c393a42Smrg 3510ca08ab68Smrg FcConfigGetRescanInterval -- Get config rescan interval 35112c393a42Smrg 35122c393a42SmrgSynopsis 35132c393a42Smrg 3514c9710b42Smrg #include <fontconfig/fontconfig.h> 35152c393a42Smrg 3516a6844aabSmrg 3517ca08ab68Smrg int FcConfigGetRescanInterval(FcConfig *config); 35182c393a42Smrg 35192c393a42SmrgDescription 35202c393a42Smrg 3521ca08ab68Smrg Returns the interval between automatic checks of the configuration (in 3522ca08ab68Smrg seconds) specified in config. The configuration is checked during a call 3523ca08ab68Smrg to FcFontList when this interval has passed since the last check. An 3524ca08ab68Smrg interval setting of zero disables automatic checks. If config is NULL, the 3525ca08ab68Smrg current configuration is used. 35262c393a42Smrg 35272c393a42SmrgVersion 35282c393a42Smrg 35296fc018e4Smrg Fontconfig version 2.11.0 35302c393a42Smrg 3531ca08ab68Smrg FcConfigSetRescanInterval 35322c393a42Smrg 35332c393a42SmrgName 35342c393a42Smrg 3535ca08ab68Smrg FcConfigSetRescanInterval -- Set config rescan interval 35362c393a42Smrg 35372c393a42SmrgSynopsis 35382c393a42Smrg 3539c9710b42Smrg #include <fontconfig/fontconfig.h> 35402c393a42Smrg 3541a6844aabSmrg 3542ca08ab68Smrg FcBool FcConfigSetRescanInterval(FcConfig *config, int rescanInterval); 35432c393a42Smrg 35442c393a42SmrgDescription 35452c393a42Smrg 3546ca08ab68Smrg Sets the rescan interval. Returns FcFalse if the interval cannot be set 3547ca08ab68Smrg (due to allocation failure). Otherwise returns FcTrue. An interval setting 3548ca08ab68Smrg of zero disables automatic checks. If config is NULL, the current 3549ca08ab68Smrg configuration is used. 35502c393a42Smrg 35512c393a42SmrgVersion 35522c393a42Smrg 35536fc018e4Smrg Fontconfig version 2.11.0 35542c393a42Smrg 3555ca08ab68Smrg FcConfigAppFontAddFile 35562c393a42Smrg 35572c393a42SmrgName 35582c393a42Smrg 3559ca08ab68Smrg FcConfigAppFontAddFile -- Add font file to font database 35602c393a42Smrg 35612c393a42SmrgSynopsis 35622c393a42Smrg 3563c9710b42Smrg #include <fontconfig/fontconfig.h> 35642c393a42Smrg 3565a6844aabSmrg 3566ca08ab68Smrg FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 *file); 35672c393a42Smrg 35682c393a42SmrgDescription 35692c393a42Smrg 3570ca08ab68Smrg Adds an application-specific font to the configuration. Returns FcFalse if 3571ca08ab68Smrg the fonts cannot be added (due to allocation failure). Otherwise returns 3572ca08ab68Smrg FcTrue. If config is NULL, the current configuration is used. 35732c393a42Smrg 35742c393a42SmrgVersion 35752c393a42Smrg 35766fc018e4Smrg Fontconfig version 2.11.0 35772c393a42Smrg 3578ca08ab68Smrg FcConfigAppFontAddDir 35792c393a42Smrg 35802c393a42SmrgName 35812c393a42Smrg 3582ca08ab68Smrg FcConfigAppFontAddDir -- Add fonts from directory to font database 35832c393a42Smrg 35842c393a42SmrgSynopsis 35852c393a42Smrg 3586c9710b42Smrg #include <fontconfig/fontconfig.h> 35872c393a42Smrg 3588a6844aabSmrg 3589ca08ab68Smrg FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 *dir); 35902c393a42Smrg 35912c393a42SmrgDescription 35922c393a42Smrg 3593ca08ab68Smrg Scans the specified directory for fonts, adding each one found to the 3594ca08ab68Smrg application-specific set of fonts. Returns FcFalse if the fonts cannot be 3595ca08ab68Smrg added (due to allocation failure). Otherwise returns FcTrue. If config is 3596ca08ab68Smrg NULL, the current configuration is used. 35972c393a42Smrg 35982c393a42SmrgVersion 35992c393a42Smrg 36006fc018e4Smrg Fontconfig version 2.11.0 36012c393a42Smrg 3602ca08ab68Smrg FcConfigAppFontClear 36032c393a42Smrg 36042c393a42SmrgName 36052c393a42Smrg 3606ca08ab68Smrg FcConfigAppFontClear -- Remove all app fonts from font database 36072c393a42Smrg 36082c393a42SmrgSynopsis 36092c393a42Smrg 3610c9710b42Smrg #include <fontconfig/fontconfig.h> 36112c393a42Smrg 3612a6844aabSmrg 3613ca08ab68Smrg void FcConfigAppFontClear(FcConfig *config); 36142c393a42Smrg 36152c393a42SmrgDescription 36162c393a42Smrg 3617ca08ab68Smrg Clears the set of application-specific fonts. If config is NULL, the 3618ca08ab68Smrg current configuration is used. 36192c393a42Smrg 36202c393a42SmrgVersion 36212c393a42Smrg 36226fc018e4Smrg Fontconfig version 2.11.0 36232c393a42Smrg 3624ca08ab68Smrg FcConfigSubstituteWithPat 36252c393a42Smrg 36262c393a42SmrgName 36272c393a42Smrg 3628ca08ab68Smrg FcConfigSubstituteWithPat -- Execute substitutions 36292c393a42Smrg 36302c393a42SmrgSynopsis 36312c393a42Smrg 3632c9710b42Smrg #include <fontconfig/fontconfig.h> 36332c393a42Smrg 3634a6844aabSmrg 3635ca08ab68Smrg FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern *p, FcPattern 3636ca08ab68Smrg *p_pat, FcMatchKind kind); 36372c393a42Smrg 36382c393a42SmrgDescription 36392c393a42Smrg 3640ca08ab68Smrg Performs the sequence of pattern modification operations, if kind is 3641ca08ab68Smrg FcMatchPattern, then those tagged as pattern operations are applied, else 3642ca08ab68Smrg if kind is FcMatchFont, those tagged as font operations are applied and 3643ca08ab68Smrg p_pat is used for <test> elements with target=pattern. Returns FcFalse if 3644ca08ab68Smrg the substitution cannot be performed (due to allocation failure). 3645ca08ab68Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3646ca08ab68Smrg used. 36472c393a42Smrg 36482c393a42SmrgVersion 36492c393a42Smrg 36506fc018e4Smrg Fontconfig version 2.11.0 36512c393a42Smrg 3652ca08ab68Smrg FcConfigSubstitute 36532c393a42Smrg 36542c393a42SmrgName 36552c393a42Smrg 3656ca08ab68Smrg FcConfigSubstitute -- Execute substitutions 36572c393a42Smrg 36582c393a42SmrgSynopsis 36592c393a42Smrg 3660c9710b42Smrg #include <fontconfig/fontconfig.h> 36612c393a42Smrg 3662a6844aabSmrg 3663ca08ab68Smrg FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, FcMatchKind 3664ca08ab68Smrg kind); 36652c393a42Smrg 36662c393a42SmrgDescription 36672c393a42Smrg 3668ca08ab68Smrg Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse if 3669ca08ab68Smrg the substitution cannot be performed (due to allocation failure). 3670ca08ab68Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3671ca08ab68Smrg used. 36722c393a42Smrg 36732c393a42SmrgVersion 36742c393a42Smrg 36756fc018e4Smrg Fontconfig version 2.11.0 36762c393a42Smrg 3677ca08ab68Smrg FcFontMatch 36782c393a42Smrg 36792c393a42SmrgName 36802c393a42Smrg 3681ca08ab68Smrg FcFontMatch -- Return best font 36822c393a42Smrg 36832c393a42SmrgSynopsis 36842c393a42Smrg 3685c9710b42Smrg #include <fontconfig/fontconfig.h> 36862c393a42Smrg 3687a6844aabSmrg 3688ca08ab68Smrg FcPattern * FcFontMatch(FcConfig *config, FcPattern *p, FcResult *result); 36892c393a42Smrg 36902c393a42SmrgDescription 36912c393a42Smrg 3692ca08ab68Smrg Finds the font in sets most closely matching pattern and returns the 3693ca08ab68Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 3694ca08ab68Smrg function should be called only after FcConfigSubstitute and 3695ca08ab68Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 3696ca08ab68Smrg be correct. If config is NULL, the current configuration is used. 36972c393a42Smrg 36982c393a42SmrgVersion 36992c393a42Smrg 37006fc018e4Smrg Fontconfig version 2.11.0 37012c393a42Smrg 3702ca08ab68Smrg FcFontSort 37032c393a42Smrg 37042c393a42SmrgName 37052c393a42Smrg 3706ca08ab68Smrg FcFontSort -- Return list of matching fonts 37072c393a42Smrg 37082c393a42SmrgSynopsis 37092c393a42Smrg 3710c9710b42Smrg #include <fontconfig/fontconfig.h> 37112c393a42Smrg 3712a6844aabSmrg 3713ca08ab68Smrg FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool trim, 3714ca08ab68Smrg FcCharSet **csp, FcResult *result); 37152c393a42Smrg 37162c393a42SmrgDescription 37172c393a42Smrg 3718ca08ab68Smrg Returns the list of fonts sorted by closeness to p. If trim is FcTrue, 3719ca08ab68Smrg elements in the list which don't include Unicode coverage not provided by 3720ca08ab68Smrg earlier elements in the list are elided. The union of Unicode coverage of 3721ca08ab68Smrg all of the fonts is returned in csp, if csp is not NULL. This function 3722ca08ab68Smrg should be called only after FcConfigSubstitute and FcDefaultSubstitute 3723ca08ab68Smrg have been called for p; otherwise the results will not be correct. 37242c393a42Smrg 3725ca08ab68Smrg The returned FcFontSet references FcPattern structures which may be shared 3726ca08ab68Smrg by the return value from multiple FcFontSort calls, applications must not 3727ca08ab68Smrg modify these patterns. Instead, they should be passed, along with p to 3728ca08ab68Smrg FcFontRenderPrepare which combines them into a complete pattern. 37292c393a42Smrg 3730ca08ab68Smrg The FcFontSet returned by FcFontSort is destroyed by calling 3731ca08ab68Smrg FcFontSetDestroy. If config is NULL, the current configuration is used. 37322c393a42Smrg 37332c393a42SmrgVersion 37342c393a42Smrg 37356fc018e4Smrg Fontconfig version 2.11.0 37362c393a42Smrg 3737ca08ab68Smrg FcFontRenderPrepare 37382c393a42Smrg 37392c393a42SmrgName 37402c393a42Smrg 3741ca08ab68Smrg FcFontRenderPrepare -- Prepare pattern for loading font file 37422c393a42Smrg 37432c393a42SmrgSynopsis 37442c393a42Smrg 3745c9710b42Smrg #include <fontconfig/fontconfig.h> 37462c393a42Smrg 3747a6844aabSmrg 3748ca08ab68Smrg FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern *pat, 3749ca08ab68Smrg FcPattern *font); 37502c393a42Smrg 37512c393a42SmrgDescription 37522c393a42Smrg 3753ca08ab68Smrg Creates a new pattern consisting of elements of font not appearing in pat, 3754ca08ab68Smrg elements of pat not appearing in font and the best matching value from pat 3755ca08ab68Smrg for elements appearing in both. The result is passed to 3756ca08ab68Smrg FcConfigSubstituteWithPat with kind FcMatchFont and then returned. 37572c393a42Smrg 37582c393a42SmrgVersion 37592c393a42Smrg 37606fc018e4Smrg Fontconfig version 2.11.0 37612c393a42Smrg 3762ca08ab68Smrg FcFontList 37632c393a42Smrg 37642c393a42SmrgName 37652c393a42Smrg 3766ca08ab68Smrg FcFontList -- List fonts 37672c393a42Smrg 37682c393a42SmrgSynopsis 37692c393a42Smrg 3770c9710b42Smrg #include <fontconfig/fontconfig.h> 37712c393a42Smrg 3772a6844aabSmrg 3773ca08ab68Smrg FcFontSet * FcFontList(FcConfig *config, FcPattern *p, FcObjectSet *os); 37742c393a42Smrg 37752c393a42SmrgDescription 37762c393a42Smrg 3777ca08ab68Smrg Selects fonts matching p, creates patterns from those fonts containing 3778ca08ab68Smrg only the objects in os and returns the set of unique such patterns. If 3779ca08ab68Smrg config is NULL, the default configuration is checked to be up to date, and 3780ca08ab68Smrg used. 37812c393a42Smrg 37822c393a42SmrgVersion 37832c393a42Smrg 37846fc018e4Smrg Fontconfig version 2.11.0 37852c393a42Smrg 3786ca08ab68Smrg FcConfigFilename 37872c393a42Smrg 37882c393a42SmrgName 37892c393a42Smrg 3790ca08ab68Smrg FcConfigFilename -- Find a config file 37912c393a42Smrg 37922c393a42SmrgSynopsis 37932c393a42Smrg 3794c9710b42Smrg #include <fontconfig/fontconfig.h> 37952c393a42Smrg 3796a6844aabSmrg 3797ca08ab68Smrg FcChar8 * FcConfigFilename(const FcChar8 *name); 37982c393a42Smrg 37992c393a42SmrgDescription 38002c393a42Smrg 3801ca08ab68Smrg Given the specified external entity name, return the associated filename. 3802ca08ab68Smrg This provides applications a way to convert various configuration file 3803ca08ab68Smrg references into filename form. 38042c393a42Smrg 3805ca08ab68Smrg A null or empty name indicates that the default configuration file should 3806ca08ab68Smrg be used; which file this references can be overridden with the 3807ca08ab68Smrg FONTCONFIG_FILE environment variable. Next, if the name starts with ~, it 3808ca08ab68Smrg refers to a file in the current users home directory. Otherwise if the 3809ca08ab68Smrg name doesn't start with '/', it refers to a file in the default 3810ca08ab68Smrg configuration directory; the built-in default directory can be overridden 3811ca08ab68Smrg with the FONTCONFIG_PATH environment variable. 38122c393a42Smrg 38132c393a42SmrgVersion 38142c393a42Smrg 38156fc018e4Smrg Fontconfig version 2.11.0 38162c393a42Smrg 3817ca08ab68Smrg FcConfigParseAndLoad 38182c393a42Smrg 38192c393a42SmrgName 38202c393a42Smrg 3821ca08ab68Smrg FcConfigParseAndLoad -- load a configuration file 38222c393a42Smrg 38232c393a42SmrgSynopsis 38242c393a42Smrg 3825c9710b42Smrg #include <fontconfig/fontconfig.h> 38262c393a42Smrg 3827a6844aabSmrg 3828ca08ab68Smrg FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8 *file, FcBool 3829ca08ab68Smrg complain); 38302c393a42Smrg 38312c393a42SmrgDescription 38322c393a42Smrg 3833ca08ab68Smrg Walks the configuration in 'file' and constructs the internal 3834ca08ab68Smrg representation in 'config'. Any include files referenced from within 3835ca08ab68Smrg 'file' will be loaded and parsed. If 'complain' is FcFalse, no warning 3836ca08ab68Smrg will be displayed if 'file' does not exist. Error and warning messages 3837ca08ab68Smrg will be output to stderr. Returns FcFalse if some error occurred while 3838ca08ab68Smrg loading the file, either a parse error, semantic error or allocation 3839ca08ab68Smrg failure. Otherwise returns FcTrue. 38402c393a42Smrg 38412c393a42SmrgVersion 38422c393a42Smrg 38436fc018e4Smrg Fontconfig version 2.11.0 3844c9710b42Smrg 3845c9710b42Smrg FcConfigGetSysRoot 3846c9710b42Smrg 3847c9710b42SmrgName 3848c9710b42Smrg 3849c9710b42Smrg FcConfigGetSysRoot -- Obtain the system root directory 3850c9710b42Smrg 3851c9710b42SmrgSynopsis 3852c9710b42Smrg 3853c9710b42Smrg #include <fontconfig/fontconfig.h> 3854c9710b42Smrg 3855c9710b42Smrg 3856c9710b42Smrg const FcChar8 * FcConfigGetSysRoot(const FcConfig *config); 3857c9710b42Smrg 3858c9710b42SmrgDescription 3859c9710b42Smrg 3860c9710b42Smrg Obtrains the system root directory in 'config' if available. 3861c9710b42Smrg 3862c9710b42SmrgVersion 3863c9710b42Smrg 38646fc018e4Smrg Fontconfig version 2.11.0 3865c9710b42Smrg 3866c9710b42Smrg FcConfigSetSysRoot 3867c9710b42Smrg 3868c9710b42SmrgName 3869c9710b42Smrg 3870c9710b42Smrg FcConfigSetSysRoot -- Set the system root directory 3871c9710b42Smrg 3872c9710b42SmrgSynopsis 3873c9710b42Smrg 3874c9710b42Smrg #include <fontconfig/fontconfig.h> 3875c9710b42Smrg 3876c9710b42Smrg 3877c9710b42Smrg void FcConfigSetSysRoot(FcConfig *config, const FcChar8 *sysroot); 3878c9710b42Smrg 3879c9710b42SmrgDescription 3880c9710b42Smrg 3881c9710b42Smrg Set 'sysroot' as the system root directory. fontconfig prepend 'sysroot' 3882c9710b42Smrg to the cache directories in order to allow people to generate caches at 3883c9710b42Smrg the build time. Note that this causes changing current config. i.e. this 3884c9710b42Smrg function calls FcConfigSetCurrent() internally. 3885c9710b42Smrg 3886c9710b42SmrgVersion 3887c9710b42Smrg 38886fc018e4Smrg Fontconfig version 2.11.0 3889ca08ab68Smrg 3890ca08ab68Smrg -------------------------------------------------------------------------- 3891ca08ab68Smrg 3892ca08ab68Smrg FcObjectType 38932c393a42Smrg 3894ca08ab68Smrg Table of Contents 38952c393a42Smrg 3896c9710b42Smrg [127]FcNameRegisterObjectTypes -- Register object types 38972c393a42Smrg 3898c9710b42Smrg [128]FcNameUnregisterObjectTypes -- Unregister object types 3899a6844aabSmrg 3900c9710b42Smrg [129]FcNameGetObjectType -- Lookup an object type 39012c393a42Smrg 3902ca08ab68Smrg Provides for application-specified font name object types so that new 3903ca08ab68Smrg pattern elements can be generated from font names. 3904ca08ab68Smrg 3905ca08ab68Smrg FcNameRegisterObjectTypes 39062c393a42Smrg 39072c393a42SmrgName 39082c393a42Smrg 3909ca08ab68Smrg FcNameRegisterObjectTypes -- Register object types 39102c393a42Smrg 39112c393a42SmrgSynopsis 39122c393a42Smrg 3913c9710b42Smrg #include <fontconfig/fontconfig.h> 39142c393a42Smrg 3915a6844aabSmrg 3916ca08ab68Smrg FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int ntype); 39172c393a42Smrg 39182c393a42SmrgDescription 39192c393a42Smrg 3920c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 39212c393a42Smrg 39222c393a42SmrgVersion 39232c393a42Smrg 39246fc018e4Smrg Fontconfig version 2.11.0 39252c393a42Smrg 3926ca08ab68Smrg FcNameUnregisterObjectTypes 39272c393a42Smrg 39282c393a42SmrgName 39292c393a42Smrg 3930ca08ab68Smrg FcNameUnregisterObjectTypes -- Unregister object types 39312c393a42Smrg 39322c393a42SmrgSynopsis 39332c393a42Smrg 3934c9710b42Smrg #include <fontconfig/fontconfig.h> 39352c393a42Smrg 3936a6844aabSmrg 3937ca08ab68Smrg FcBool FcNameUnregisterObjectTypes(const FcObjectType *types, int ntype); 39382c393a42Smrg 39392c393a42SmrgDescription 39402c393a42Smrg 3941c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 39422c393a42Smrg 39432c393a42SmrgVersion 39442c393a42Smrg 39456fc018e4Smrg Fontconfig version 2.11.0 39462c393a42Smrg 3947ca08ab68Smrg FcNameGetObjectType 39482c393a42Smrg 39492c393a42SmrgName 39502c393a42Smrg 3951ca08ab68Smrg FcNameGetObjectType -- Lookup an object type 39522c393a42Smrg 39532c393a42SmrgSynopsis 39542c393a42Smrg 3955c9710b42Smrg #include <fontconfig/fontconfig.h> 39562c393a42Smrg 3957a6844aabSmrg 3958ca08ab68Smrg const FcObjectType * FcNameGetObjectType(const char *object); 39592c393a42Smrg 39602c393a42SmrgDescription 39612c393a42Smrg 3962ca08ab68Smrg Return the object type for the pattern element named object. 39632c393a42Smrg 39642c393a42SmrgVersion 39652c393a42Smrg 39666fc018e4Smrg Fontconfig version 2.11.0 3967ca08ab68Smrg 3968ca08ab68Smrg -------------------------------------------------------------------------- 3969a6844aabSmrg 3970ca08ab68Smrg FcConstant 39712c393a42Smrg 3972ca08ab68Smrg Table of Contents 39732c393a42Smrg 3974c9710b42Smrg [130]FcNameRegisterConstants -- Register symbolic constants 39752c393a42Smrg 3976c9710b42Smrg [131]FcNameUnregisterConstants -- Unregister symbolic constants 39772c393a42Smrg 3978c9710b42Smrg [132]FcNameGetConstant -- Lookup symbolic constant 3979ca08ab68Smrg 3980c9710b42Smrg [133]FcNameConstant -- Get the value for a symbolic constant 3981ca08ab68Smrg 3982ca08ab68Smrg Provides for application-specified symbolic constants for font names. 3983ca08ab68Smrg 3984ca08ab68Smrg FcNameRegisterConstants 39852c393a42Smrg 39862c393a42SmrgName 39872c393a42Smrg 3988ca08ab68Smrg FcNameRegisterConstants -- Register symbolic constants 39892c393a42Smrg 39902c393a42SmrgSynopsis 39912c393a42Smrg 3992c9710b42Smrg #include <fontconfig/fontconfig.h> 39932c393a42Smrg 3994a6844aabSmrg 3995ca08ab68Smrg FcBool FcNameRegisterConstants(const FcConstant *consts, int nconsts); 39962c393a42Smrg 39972c393a42SmrgDescription 39982c393a42Smrg 3999c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 40002c393a42Smrg 40012c393a42SmrgVersion 40022c393a42Smrg 40036fc018e4Smrg Fontconfig version 2.11.0 40042c393a42Smrg 4005ca08ab68Smrg FcNameUnregisterConstants 40062c393a42Smrg 40072c393a42SmrgName 40082c393a42Smrg 4009ca08ab68Smrg FcNameUnregisterConstants -- Unregister symbolic constants 40102c393a42Smrg 40112c393a42SmrgSynopsis 40122c393a42Smrg 4013c9710b42Smrg #include <fontconfig/fontconfig.h> 40142c393a42Smrg 4015a6844aabSmrg 4016ca08ab68Smrg FcBool FcNameUnregisterConstants(const FcConstant *consts, int nconsts); 40172c393a42Smrg 40182c393a42SmrgDescription 40192c393a42Smrg 4020c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 40212c393a42Smrg 40222c393a42SmrgVersion 40232c393a42Smrg 40246fc018e4Smrg Fontconfig version 2.11.0 40252c393a42Smrg 4026ca08ab68Smrg FcNameGetConstant 40272c393a42Smrg 40282c393a42SmrgName 40292c393a42Smrg 4030ca08ab68Smrg FcNameGetConstant -- Lookup symbolic constant 40312c393a42Smrg 40322c393a42SmrgSynopsis 40332c393a42Smrg 4034c9710b42Smrg #include <fontconfig/fontconfig.h> 40352c393a42Smrg 4036a6844aabSmrg 4037ca08ab68Smrg const FcConstant * FcNameGetConstant(FcChar8 *string); 40382c393a42Smrg 40392c393a42SmrgDescription 40402c393a42Smrg 4041ca08ab68Smrg Return the FcConstant structure related to symbolic constant string. 40422c393a42Smrg 40432c393a42SmrgVersion 40442c393a42Smrg 40456fc018e4Smrg Fontconfig version 2.11.0 40462c393a42Smrg 4047ca08ab68Smrg FcNameConstant 40482c393a42Smrg 40492c393a42SmrgName 40502c393a42Smrg 4051ca08ab68Smrg FcNameConstant -- Get the value for a symbolic constant 40522c393a42Smrg 40532c393a42SmrgSynopsis 40542c393a42Smrg 4055c9710b42Smrg #include <fontconfig/fontconfig.h> 40562c393a42Smrg 4057a6844aabSmrg 4058ca08ab68Smrg FcBool FcNameConstant(FcChar8 *string, int *result); 40592c393a42Smrg 40602c393a42SmrgDescription 40612c393a42Smrg 4062ca08ab68Smrg Returns whether a symbolic constant with name string is registered, 4063ca08ab68Smrg placing the value of the constant in result if present. 40642c393a42Smrg 40652c393a42SmrgVersion 40662c393a42Smrg 40676fc018e4Smrg Fontconfig version 2.11.0 4068ca08ab68Smrg 4069ca08ab68Smrg -------------------------------------------------------------------------- 4070a6844aabSmrg 4071ca08ab68Smrg FcBlanks 40722c393a42Smrg 4073ca08ab68Smrg Table of Contents 40742c393a42Smrg 4075c9710b42Smrg [134]FcBlanksCreate -- Create an FcBlanks 40762c393a42Smrg 4077c9710b42Smrg [135]FcBlanksDestroy -- Destroy and FcBlanks 40782c393a42Smrg 4079c9710b42Smrg [136]FcBlanksAdd -- Add a character to an FcBlanks 4080ca08ab68Smrg 4081c9710b42Smrg [137]FcBlanksIsMember -- Query membership in an FcBlanks 4082ca08ab68Smrg 4083ca08ab68Smrg An FcBlanks object holds a list of Unicode chars which are expected to be 4084ca08ab68Smrg blank when drawn. When scanning new fonts, any glyphs which are empty and 4085ca08ab68Smrg not in this list will be assumed to be broken and not placed in the 4086ca08ab68Smrg FcCharSet associated with the font. This provides a significantly more 4087ca08ab68Smrg accurate CharSet for applications. 4088ca08ab68Smrg 4089ca08ab68Smrg FcBlanksCreate 40902c393a42Smrg 40912c393a42SmrgName 40922c393a42Smrg 4093ca08ab68Smrg FcBlanksCreate -- Create an FcBlanks 40942c393a42Smrg 40952c393a42SmrgSynopsis 40962c393a42Smrg 4097c9710b42Smrg #include <fontconfig/fontconfig.h> 40982c393a42Smrg 4099a6844aabSmrg 4100ca08ab68Smrg FcBlanks * FcBlanksCreate(void); 41012c393a42Smrg 41022c393a42SmrgDescription 41032c393a42Smrg 4104ca08ab68Smrg Creates an empty FcBlanks object. 41052c393a42Smrg 41062c393a42SmrgVersion 41072c393a42Smrg 41086fc018e4Smrg Fontconfig version 2.11.0 41092c393a42Smrg 4110ca08ab68Smrg FcBlanksDestroy 41112c393a42Smrg 41122c393a42SmrgName 41132c393a42Smrg 4114ca08ab68Smrg FcBlanksDestroy -- Destroy and FcBlanks 41152c393a42Smrg 41162c393a42SmrgSynopsis 41172c393a42Smrg 4118c9710b42Smrg #include <fontconfig/fontconfig.h> 41192c393a42Smrg 4120a6844aabSmrg 4121ca08ab68Smrg void FcBlanksDestroy(FcBlanks *b); 41222c393a42Smrg 41232c393a42SmrgDescription 41242c393a42Smrg 4125ca08ab68Smrg Destroys an FcBlanks object, freeing any associated memory. 41262c393a42Smrg 41272c393a42SmrgVersion 41282c393a42Smrg 41296fc018e4Smrg Fontconfig version 2.11.0 41302c393a42Smrg 4131ca08ab68Smrg FcBlanksAdd 41322c393a42Smrg 41332c393a42SmrgName 41342c393a42Smrg 4135ca08ab68Smrg FcBlanksAdd -- Add a character to an FcBlanks 41362c393a42Smrg 41372c393a42SmrgSynopsis 41382c393a42Smrg 4139c9710b42Smrg #include <fontconfig/fontconfig.h> 41402c393a42Smrg 4141a6844aabSmrg 4142ca08ab68Smrg FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4); 41432c393a42Smrg 41442c393a42SmrgDescription 41452c393a42Smrg 4146ca08ab68Smrg Adds a single character to an FcBlanks object, returning FcFalse if this 4147ca08ab68Smrg process ran out of memory. 41482c393a42Smrg 41492c393a42SmrgVersion 41502c393a42Smrg 41516fc018e4Smrg Fontconfig version 2.11.0 41522c393a42Smrg 4153ca08ab68Smrg FcBlanksIsMember 41542c393a42Smrg 41552c393a42SmrgName 41562c393a42Smrg 4157ca08ab68Smrg FcBlanksIsMember -- Query membership in an FcBlanks 41582c393a42Smrg 41592c393a42SmrgSynopsis 41602c393a42Smrg 4161c9710b42Smrg #include <fontconfig/fontconfig.h> 41622c393a42Smrg 4163a6844aabSmrg 4164ca08ab68Smrg FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4); 41652c393a42Smrg 41662c393a42SmrgDescription 41672c393a42Smrg 4168ca08ab68Smrg Returns whether the specified FcBlanks object contains the indicated 4169ca08ab68Smrg Unicode value. 41702c393a42Smrg 41712c393a42SmrgVersion 41722c393a42Smrg 41736fc018e4Smrg Fontconfig version 2.11.0 4174ca08ab68Smrg 4175ca08ab68Smrg -------------------------------------------------------------------------- 4176ca08ab68Smrg 4177ca08ab68Smrg FcAtomic 4178ca08ab68Smrg 4179ca08ab68Smrg Table of Contents 4180ca08ab68Smrg 4181c9710b42Smrg [138]FcAtomicCreate -- create an FcAtomic object 4182ca08ab68Smrg 4183c9710b42Smrg [139]FcAtomicLock -- lock a file 4184ca08ab68Smrg 4185c9710b42Smrg [140]FcAtomicNewFile -- return new temporary file name 4186a6844aabSmrg 4187c9710b42Smrg [141]FcAtomicOrigFile -- return original file name 41882c393a42Smrg 4189c9710b42Smrg [142]FcAtomicReplaceOrig -- replace original with new 41902c393a42Smrg 4191c9710b42Smrg [143]FcAtomicDeleteNew -- delete new file 41922c393a42Smrg 4193c9710b42Smrg [144]FcAtomicUnlock -- unlock a file 41942c393a42Smrg 4195c9710b42Smrg [145]FcAtomicDestroy -- destroy an FcAtomic object 4196ca08ab68Smrg 4197ca08ab68Smrg These functions provide a safe way to update configuration files, allowing 4198ca08ab68Smrg ongoing reading of the old configuration file while locked for writing and 4199ca08ab68Smrg ensuring that a consistent and complete version of the configuration file 4200ca08ab68Smrg is always available. 4201ca08ab68Smrg 4202ca08ab68Smrg FcAtomicCreate 42032c393a42Smrg 42042c393a42SmrgName 42052c393a42Smrg 4206ca08ab68Smrg FcAtomicCreate -- create an FcAtomic object 42072c393a42Smrg 42082c393a42SmrgSynopsis 42092c393a42Smrg 4210c9710b42Smrg #include <fontconfig/fontconfig.h> 42112c393a42Smrg 4212a6844aabSmrg 4213ca08ab68Smrg FcAtomic * FcAtomicCreate(const FcChar8 *file); 42142c393a42Smrg 42152c393a42SmrgDescription 42162c393a42Smrg 4217ca08ab68Smrg Creates a data structure containing data needed to control access to file. 4218ca08ab68Smrg Writing is done to a separate file. Once that file is complete, the 4219ca08ab68Smrg original configuration file is atomically replaced so that reading process 4220ca08ab68Smrg always see a consistent and complete file without the need to lock for 4221ca08ab68Smrg reading. 42222c393a42Smrg 42232c393a42SmrgVersion 42242c393a42Smrg 42256fc018e4Smrg Fontconfig version 2.11.0 42262c393a42Smrg 4227ca08ab68Smrg FcAtomicLock 42282c393a42Smrg 42292c393a42SmrgName 42302c393a42Smrg 4231ca08ab68Smrg FcAtomicLock -- lock a file 42322c393a42Smrg 42332c393a42SmrgSynopsis 42342c393a42Smrg 4235c9710b42Smrg #include <fontconfig/fontconfig.h> 42362c393a42Smrg 4237a6844aabSmrg 4238ca08ab68Smrg FcBool FcAtomicLock(FcAtomic *atomic); 42392c393a42Smrg 42402c393a42SmrgDescription 42412c393a42Smrg 4242ca08ab68Smrg Attempts to lock the file referenced by atomic. Returns FcFalse if the 4243ca08ab68Smrg file is already locked, else returns FcTrue and leaves the file locked. 42442c393a42Smrg 42452c393a42SmrgVersion 42462c393a42Smrg 42476fc018e4Smrg Fontconfig version 2.11.0 42482c393a42Smrg 4249ca08ab68Smrg FcAtomicNewFile 42502c393a42Smrg 42512c393a42SmrgName 42522c393a42Smrg 4253ca08ab68Smrg FcAtomicNewFile -- return new temporary file name 42542c393a42Smrg 42552c393a42SmrgSynopsis 42562c393a42Smrg 4257c9710b42Smrg #include <fontconfig/fontconfig.h> 42582c393a42Smrg 4259a6844aabSmrg 4260ca08ab68Smrg FcChar8 * FcAtomicNewFile(FcAtomic *atomic); 42612c393a42Smrg 42622c393a42SmrgDescription 42632c393a42Smrg 4264ca08ab68Smrg Returns the filename for writing a new version of the file referenced by 4265ca08ab68Smrg atomic. 42662c393a42Smrg 42672c393a42SmrgVersion 42682c393a42Smrg 42696fc018e4Smrg Fontconfig version 2.11.0 42702c393a42Smrg 4271ca08ab68Smrg FcAtomicOrigFile 42722c393a42Smrg 42732c393a42SmrgName 42742c393a42Smrg 4275ca08ab68Smrg FcAtomicOrigFile -- return original file name 42762c393a42Smrg 42772c393a42SmrgSynopsis 42782c393a42Smrg 4279c9710b42Smrg #include <fontconfig/fontconfig.h> 42802c393a42Smrg 4281a6844aabSmrg 4282ca08ab68Smrg FcChar8 * FcAtomicOrigFile(FcAtomic *atomic); 42832c393a42Smrg 42842c393a42SmrgDescription 42852c393a42Smrg 4286ca08ab68Smrg Returns the file referenced by atomic. 42872c393a42Smrg 42882c393a42SmrgVersion 42892c393a42Smrg 42906fc018e4Smrg Fontconfig version 2.11.0 42912c393a42Smrg 4292ca08ab68Smrg FcAtomicReplaceOrig 42932c393a42Smrg 42942c393a42SmrgName 42952c393a42Smrg 4296ca08ab68Smrg FcAtomicReplaceOrig -- replace original with new 42972c393a42Smrg 42982c393a42SmrgSynopsis 42992c393a42Smrg 4300c9710b42Smrg #include <fontconfig/fontconfig.h> 43012c393a42Smrg 4302a6844aabSmrg 4303ca08ab68Smrg FcBool FcAtomicReplaceOrig(FcAtomic *atomic); 43042c393a42Smrg 43052c393a42SmrgDescription 43062c393a42Smrg 4307ca08ab68Smrg Replaces the original file referenced by atomic with the new file. Returns 4308ca08ab68Smrg FcFalse if the file cannot be replaced due to permission issues in the 4309ca08ab68Smrg filesystem. Otherwise returns FcTrue. 43102c393a42Smrg 43112c393a42SmrgVersion 43122c393a42Smrg 43136fc018e4Smrg Fontconfig version 2.11.0 43142c393a42Smrg 4315ca08ab68Smrg FcAtomicDeleteNew 43162c393a42Smrg 43172c393a42SmrgName 43182c393a42Smrg 4319ca08ab68Smrg FcAtomicDeleteNew -- delete new file 43202c393a42Smrg 43212c393a42SmrgSynopsis 43222c393a42Smrg 4323c9710b42Smrg #include <fontconfig/fontconfig.h> 43242c393a42Smrg 4325a6844aabSmrg 4326ca08ab68Smrg void FcAtomicDeleteNew(FcAtomic *atomic); 43272c393a42Smrg 43282c393a42SmrgDescription 43292c393a42Smrg 4330ca08ab68Smrg Deletes the new file. Used in error recovery to back out changes. 43312c393a42Smrg 43322c393a42SmrgVersion 43332c393a42Smrg 43346fc018e4Smrg Fontconfig version 2.11.0 43352c393a42Smrg 4336ca08ab68Smrg FcAtomicUnlock 43372c393a42Smrg 43382c393a42SmrgName 43392c393a42Smrg 4340ca08ab68Smrg FcAtomicUnlock -- unlock a file 43412c393a42Smrg 43422c393a42SmrgSynopsis 43432c393a42Smrg 4344c9710b42Smrg #include <fontconfig/fontconfig.h> 43452c393a42Smrg 4346a6844aabSmrg 4347ca08ab68Smrg void FcAtomicUnlock(FcAtomic *atomic); 43482c393a42Smrg 43492c393a42SmrgDescription 43502c393a42Smrg 4351ca08ab68Smrg Unlocks the file. 43522c393a42Smrg 43532c393a42SmrgVersion 43542c393a42Smrg 43556fc018e4Smrg Fontconfig version 2.11.0 43562c393a42Smrg 4357ca08ab68Smrg FcAtomicDestroy 43582c393a42Smrg 43592c393a42SmrgName 43602c393a42Smrg 4361ca08ab68Smrg FcAtomicDestroy -- destroy an FcAtomic object 43622c393a42Smrg 43632c393a42SmrgSynopsis 43642c393a42Smrg 4365c9710b42Smrg #include <fontconfig/fontconfig.h> 43662c393a42Smrg 4367a6844aabSmrg 4368ca08ab68Smrg void FcAtomicDestroy(FcAtomic *atomic); 43692c393a42Smrg 43702c393a42SmrgDescription 43712c393a42Smrg 4372ca08ab68Smrg Destroys atomic. 43732c393a42Smrg 43742c393a42SmrgVersion 43752c393a42Smrg 43766fc018e4Smrg Fontconfig version 2.11.0 4377ca08ab68Smrg 4378ca08ab68Smrg -------------------------------------------------------------------------- 4379ca08ab68Smrg 4380ca08ab68Smrg File and Directory routines 4381ca08ab68Smrg 4382ca08ab68Smrg Table of Contents 4383ca08ab68Smrg 4384c9710b42Smrg [146]FcFileScan -- scan a font file 4385ca08ab68Smrg 4386c9710b42Smrg [147]FcFileIsDir -- check whether a file is a directory 4387ca08ab68Smrg 4388c9710b42Smrg [148]FcDirScan -- scan a font directory without caching it 4389ca08ab68Smrg 4390c9710b42Smrg [149]FcDirSave -- DEPRECATED: formerly used to save a directory cache 43912c393a42Smrg 4392c9710b42Smrg [150]FcDirCacheUnlink -- Remove all caches related to dir 43932c393a42Smrg 4394c9710b42Smrg [151]FcDirCacheValid -- check directory cache 43952c393a42Smrg 4396c9710b42Smrg [152]FcDirCacheLoad -- load a directory cache 43972c393a42Smrg 4398c9710b42Smrg [153]FcDirCacheRead -- read or construct a directory cache 43992c393a42Smrg 4400c9710b42Smrg [154]FcDirCacheLoadFile -- load a cache file 4401ca08ab68Smrg 4402c9710b42Smrg [155]FcDirCacheUnload -- unload a cache file 4403ca08ab68Smrg 4404ca08ab68Smrg These routines work with font files and directories, including font 4405ca08ab68Smrg directory cache files. 4406ca08ab68Smrg 4407ca08ab68Smrg FcFileScan 44082c393a42Smrg 44092c393a42SmrgName 44102c393a42Smrg 4411ca08ab68Smrg FcFileScan -- scan a font file 44122c393a42Smrg 44132c393a42SmrgSynopsis 44142c393a42Smrg 4415c9710b42Smrg #include <fontconfig/fontconfig.h> 44162c393a42Smrg 4417a6844aabSmrg 4418ca08ab68Smrg FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 4419ca08ab68Smrg FcBlanks *blanks, const FcChar8 *file, FcBool force); 44202c393a42Smrg 44212c393a42SmrgDescription 44222c393a42Smrg 4423ca08ab68Smrg Scans a single file and adds all fonts found to set. If force is FcTrue, 4424ca08ab68Smrg then the file is scanned even if associated information is found in cache. 4425ca08ab68Smrg If file is a directory, it is added to dirs. Whether fonts are found 4426ca08ab68Smrg depends on fontconfig policy as well as the current configuration. 4427ca08ab68Smrg Internally, fontconfig will ignore BDF and PCF fonts which are not in 4428ca08ab68Smrg Unicode (or the effectively equivalent ISO Latin-1) encoding as those are 4429ca08ab68Smrg not usable by Unicode-based applications. The configuration can ignore 4430ca08ab68Smrg fonts based on filename or contents of the font file itself. Returns 4431ca08ab68Smrg FcFalse if any of the fonts cannot be added (due to allocation failure). 4432ca08ab68Smrg Otherwise returns FcTrue. 44332c393a42Smrg 44342c393a42SmrgVersion 44352c393a42Smrg 44366fc018e4Smrg Fontconfig version 2.11.0 44372c393a42Smrg 4438ca08ab68Smrg FcFileIsDir 44392c393a42Smrg 44402c393a42SmrgName 44412c393a42Smrg 4442ca08ab68Smrg FcFileIsDir -- check whether a file is a directory 44432c393a42Smrg 44442c393a42SmrgSynopsis 44452c393a42Smrg 4446c9710b42Smrg #include <fontconfig/fontconfig.h> 44472c393a42Smrg 4448a6844aabSmrg 4449ca08ab68Smrg FcBool FcFileIsDir(const FcChar8 *file); 44502c393a42Smrg 44512c393a42SmrgDescription 44522c393a42Smrg 4453ca08ab68Smrg Returns FcTrue if file is a directory, otherwise returns FcFalse. 44542c393a42Smrg 44552c393a42SmrgVersion 44562c393a42Smrg 44576fc018e4Smrg Fontconfig version 2.11.0 44582c393a42Smrg 4459ca08ab68Smrg FcDirScan 44602c393a42Smrg 44612c393a42SmrgName 44622c393a42Smrg 4463ca08ab68Smrg FcDirScan -- scan a font directory without caching it 44642c393a42Smrg 44652c393a42SmrgSynopsis 44662c393a42Smrg 4467c9710b42Smrg #include <fontconfig/fontconfig.h> 44682c393a42Smrg 4469a6844aabSmrg 4470ca08ab68Smrg FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 4471ca08ab68Smrg FcBlanks *blanks, const FcChar8 *dir, FcBool force); 44722c393a42Smrg 44732c393a42SmrgDescription 44742c393a42Smrg 4475ca08ab68Smrg If cache is not zero or if force is FcFalse, this function currently 4476ca08ab68Smrg returns FcFalse. Otherwise, it scans an entire directory and adds all 4477ca08ab68Smrg fonts found to set. Any subdirectories found are added to dirs. Calling 4478ca08ab68Smrg this function does not create any cache files. Use FcDirCacheRead() if 4479ca08ab68Smrg caching is desired. 44802c393a42Smrg 44812c393a42SmrgVersion 44822c393a42Smrg 44836fc018e4Smrg Fontconfig version 2.11.0 44842c393a42Smrg 4485ca08ab68Smrg FcDirSave 44862c393a42Smrg 44872c393a42SmrgName 44882c393a42Smrg 4489ca08ab68Smrg FcDirSave -- DEPRECATED: formerly used to save a directory cache 44902c393a42Smrg 44912c393a42SmrgSynopsis 44922c393a42Smrg 4493c9710b42Smrg #include <fontconfig/fontconfig.h> 44942c393a42Smrg 4495a6844aabSmrg 4496ca08ab68Smrg FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); 44972c393a42Smrg 44982c393a42SmrgDescription 44992c393a42Smrg 4500ca08ab68Smrg This function now does nothing aside from returning FcFalse. It used to 4501ca08ab68Smrg creates the per-directory cache file for dir and populates it with the 4502ca08ab68Smrg fonts in set and subdirectories in dirs. All of this functionality is now 4503ca08ab68Smrg automatically managed by FcDirCacheLoad and FcDirCacheRead. 45042c393a42Smrg 45052c393a42SmrgVersion 45062c393a42Smrg 45076fc018e4Smrg Fontconfig version 2.11.0 45082c393a42Smrg 4509ca08ab68Smrg FcDirCacheUnlink 45102c393a42Smrg 45112c393a42SmrgName 45122c393a42Smrg 4513ca08ab68Smrg FcDirCacheUnlink -- Remove all caches related to dir 45142c393a42Smrg 45152c393a42SmrgSynopsis 45162c393a42Smrg 4517c9710b42Smrg #include <fontconfig/fontconfig.h> 45182c393a42Smrg 4519a6844aabSmrg 4520ca08ab68Smrg FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config); 45212c393a42Smrg 45222c393a42SmrgDescription 45232c393a42Smrg 4524ca08ab68Smrg Scans the cache directories in config, removing any instances of the cache 4525ca08ab68Smrg file for dir. Returns FcFalse when some internal error occurs (out of 4526ca08ab68Smrg memory, etc). Errors actually unlinking any files are ignored. 45272c393a42Smrg 45282c393a42SmrgVersion 45292c393a42Smrg 45306fc018e4Smrg Fontconfig version 2.11.0 45312c393a42Smrg 4532ca08ab68Smrg FcDirCacheValid 45332c393a42Smrg 45342c393a42SmrgName 45352c393a42Smrg 4536ca08ab68Smrg FcDirCacheValid -- check directory cache 45372c393a42Smrg 45382c393a42SmrgSynopsis 45392c393a42Smrg 4540c9710b42Smrg #include <fontconfig/fontconfig.h> 45412c393a42Smrg 4542a6844aabSmrg 4543ca08ab68Smrg FcBool FcDirCacheValid(const FcChar8 *dir); 45442c393a42Smrg 45452c393a42SmrgDescription 45462c393a42Smrg 4547ca08ab68Smrg Returns FcTrue if dir has an associated valid cache file, else returns 4548ca08ab68Smrg FcFalse 45492c393a42Smrg 45502c393a42SmrgVersion 45512c393a42Smrg 45526fc018e4Smrg Fontconfig version 2.11.0 45532c393a42Smrg 4554ca08ab68Smrg FcDirCacheLoad 45552c393a42Smrg 45562c393a42SmrgName 45572c393a42Smrg 4558ca08ab68Smrg FcDirCacheLoad -- load a directory cache 45592c393a42Smrg 45602c393a42SmrgSynopsis 45612c393a42Smrg 4562c9710b42Smrg #include <fontconfig/fontconfig.h> 45632c393a42Smrg 4564a6844aabSmrg 4565ca08ab68Smrg FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, FcChar8 4566ca08ab68Smrg **cache_file); 45672c393a42Smrg 45682c393a42SmrgDescription 45692c393a42Smrg 4570ca08ab68Smrg Loads the cache related to dir. If no cache file exists, returns NULL. The 4571ca08ab68Smrg name of the cache file is returned in cache_file, unless that is NULL. See 4572ca08ab68Smrg also FcDirCacheRead. 45732c393a42Smrg 45742c393a42SmrgVersion 45752c393a42Smrg 45766fc018e4Smrg Fontconfig version 2.11.0 45772c393a42Smrg 4578ca08ab68Smrg FcDirCacheRead 45792c393a42Smrg 45802c393a42SmrgName 45812c393a42Smrg 4582ca08ab68Smrg FcDirCacheRead -- read or construct a directory cache 45832c393a42Smrg 45842c393a42SmrgSynopsis 45852c393a42Smrg 4586c9710b42Smrg #include <fontconfig/fontconfig.h> 45872c393a42Smrg 4588a6844aabSmrg 4589ca08ab68Smrg FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force, FcConfig 4590ca08ab68Smrg *config); 45912c393a42Smrg 45922c393a42SmrgDescription 45932c393a42Smrg 4594ca08ab68Smrg This returns a cache for dir. If force is FcFalse, then an existing, valid 4595ca08ab68Smrg cache file will be used. Otherwise, a new cache will be created by 4596ca08ab68Smrg scanning the directory and that returned. 45972c393a42Smrg 45982c393a42SmrgVersion 45992c393a42Smrg 46006fc018e4Smrg Fontconfig version 2.11.0 46012c393a42Smrg 4602ca08ab68Smrg FcDirCacheLoadFile 46032c393a42Smrg 46042c393a42SmrgName 46052c393a42Smrg 4606ca08ab68Smrg FcDirCacheLoadFile -- load a cache file 46072c393a42Smrg 46082c393a42SmrgSynopsis 46092c393a42Smrg 4610c9710b42Smrg #include <fontconfig/fontconfig.h> 46112c393a42Smrg 4612a6844aabSmrg 4613ca08ab68Smrg FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct stat 4614ca08ab68Smrg *file_stat); 46152c393a42Smrg 46162c393a42SmrgDescription 46172c393a42Smrg 4618ca08ab68Smrg This function loads a directory cache from cache_file. If file_stat is 4619ca08ab68Smrg non-NULL, it will be filled with the results of stat(2) on the cache file. 46202c393a42Smrg 46212c393a42SmrgVersion 46222c393a42Smrg 46236fc018e4Smrg Fontconfig version 2.11.0 46242c393a42Smrg 4625ca08ab68Smrg FcDirCacheUnload 46262c393a42Smrg 46272c393a42SmrgName 46282c393a42Smrg 4629ca08ab68Smrg FcDirCacheUnload -- unload a cache file 46302c393a42Smrg 46312c393a42SmrgSynopsis 46322c393a42Smrg 4633c9710b42Smrg #include <fontconfig/fontconfig.h> 46342c393a42Smrg 4635a6844aabSmrg 4636ca08ab68Smrg void FcDirCacheUnload(FcCache *cache); 46372c393a42Smrg 46382c393a42SmrgDescription 46392c393a42Smrg 4640ca08ab68Smrg This function dereferences cache. When no other references to it remain, 4641ca08ab68Smrg all memory associated with the cache will be freed. 46422c393a42Smrg 46432c393a42SmrgVersion 46442c393a42Smrg 46456fc018e4Smrg Fontconfig version 2.11.0 4646ca08ab68Smrg 4647ca08ab68Smrg -------------------------------------------------------------------------- 4648ca08ab68Smrg 4649ca08ab68Smrg FcCache routines 4650ca08ab68Smrg 4651ca08ab68Smrg Table of Contents 4652ca08ab68Smrg 4653c9710b42Smrg [156]FcCacheDir -- Return directory of cache 4654ca08ab68Smrg 4655c9710b42Smrg [157]FcCacheCopySet -- Returns a copy of the fontset from cache 4656ca08ab68Smrg 4657c9710b42Smrg [158]FcCacheSubdir -- Return the i'th subdirectory. 46582c393a42Smrg 4659c9710b42Smrg [159]FcCacheNumSubdir -- Return the number of subdirectories in cache. 46602c393a42Smrg 4661c9710b42Smrg [160]FcCacheNumFont -- Returns the number of fonts in cache. 46622c393a42Smrg 4663c9710b42Smrg [161]FcDirCacheClean -- This tries to clean up the cache directory of 4664ca08ab68Smrg cache_dir. This returns FcTrue if the operation is successfully complete. 4665ca08ab68Smrg otherwise FcFalse. 46662c393a42Smrg 4667c9710b42Smrg [162]FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 46682c393a42Smrg 4669ca08ab68Smrg These routines work with font directory caches, accessing their contents 4670ca08ab68Smrg in limited ways. It is not expected that normal applications will need to 4671ca08ab68Smrg use these functions. 4672ca08ab68Smrg 4673ca08ab68Smrg FcCacheDir 46742c393a42Smrg 46752c393a42SmrgName 46762c393a42Smrg 4677ca08ab68Smrg FcCacheDir -- Return directory of cache 46782c393a42Smrg 46792c393a42SmrgSynopsis 46802c393a42Smrg 4681c9710b42Smrg #include <fontconfig/fontconfig.h> 46822c393a42Smrg 4683a6844aabSmrg 4684ca08ab68Smrg const FcChar8 * FcCacheDir(const FcCache *cache); 46852c393a42Smrg 46862c393a42SmrgDescription 46872c393a42Smrg 4688ca08ab68Smrg This function returns the directory from which the cache was constructed. 46892c393a42Smrg 46902c393a42SmrgVersion 46912c393a42Smrg 46926fc018e4Smrg Fontconfig version 2.11.0 46932c393a42Smrg 4694ca08ab68Smrg FcCacheCopySet 46952c393a42Smrg 46962c393a42SmrgName 46972c393a42Smrg 4698ca08ab68Smrg FcCacheCopySet -- Returns a copy of the fontset from cache 46992c393a42Smrg 47002c393a42SmrgSynopsis 47012c393a42Smrg 4702c9710b42Smrg #include <fontconfig/fontconfig.h> 47032c393a42Smrg 4704a6844aabSmrg 4705ca08ab68Smrg FcFontSet * FcCacheCopySet(const FcCache *cache); 47062c393a42Smrg 47072c393a42SmrgDescription 47082c393a42Smrg 4709ca08ab68Smrg The returned fontset contains each of the font patterns from cache. This 4710ca08ab68Smrg fontset may be modified, but the patterns from the cache are read-only. 47112c393a42Smrg 47122c393a42SmrgVersion 47132c393a42Smrg 47146fc018e4Smrg Fontconfig version 2.11.0 47152c393a42Smrg 4716ca08ab68Smrg FcCacheSubdir 47172c393a42Smrg 47182c393a42SmrgName 47192c393a42Smrg 4720ca08ab68Smrg FcCacheSubdir -- Return the i'th subdirectory. 47212c393a42Smrg 47222c393a42SmrgSynopsis 47232c393a42Smrg 4724c9710b42Smrg #include <fontconfig/fontconfig.h> 47252c393a42Smrg 4726a6844aabSmrg 4727ca08ab68Smrg const FcChar8 * FcCacheSubdir(const FcCache *cache, inti); 47282c393a42Smrg 47292c393a42SmrgDescription 47302c393a42Smrg 4731ca08ab68Smrg The set of subdirectories stored in a cache file are indexed by this 4732ca08ab68Smrg function, i should range from 0 to n-1, where n is the return value from 4733ca08ab68Smrg FcCacheNumSubdir. 47342c393a42Smrg 47352c393a42SmrgVersion 47362c393a42Smrg 47376fc018e4Smrg Fontconfig version 2.11.0 47382c393a42Smrg 4739ca08ab68Smrg FcCacheNumSubdir 47402c393a42Smrg 47412c393a42SmrgName 47422c393a42Smrg 4743ca08ab68Smrg FcCacheNumSubdir -- Return the number of subdirectories in cache. 47442c393a42Smrg 47452c393a42SmrgSynopsis 47462c393a42Smrg 4747c9710b42Smrg #include <fontconfig/fontconfig.h> 47482c393a42Smrg 4749a6844aabSmrg 4750ca08ab68Smrg int FcCacheNumSubdir(const FcCache *cache); 47512c393a42Smrg 47522c393a42SmrgDescription 47532c393a42Smrg 4754ca08ab68Smrg This returns the total number of subdirectories in the cache. 47552c393a42Smrg 47562c393a42SmrgVersion 47572c393a42Smrg 47586fc018e4Smrg Fontconfig version 2.11.0 47592c393a42Smrg 4760ca08ab68Smrg FcCacheNumFont 47612c393a42Smrg 47622c393a42SmrgName 47632c393a42Smrg 4764ca08ab68Smrg FcCacheNumFont -- Returns the number of fonts in cache. 47652c393a42Smrg 47662c393a42SmrgSynopsis 47672c393a42Smrg 4768c9710b42Smrg #include <fontconfig/fontconfig.h> 47692c393a42Smrg 4770a6844aabSmrg 4771ca08ab68Smrg int FcCacheNumFont(const FcCache *cache); 47722c393a42Smrg 47732c393a42SmrgDescription 47742c393a42Smrg 4775ca08ab68Smrg This returns the number of fonts which would be included in the return 4776ca08ab68Smrg from FcCacheCopySet. 47772c393a42Smrg 47782c393a42SmrgVersion 47792c393a42Smrg 47806fc018e4Smrg Fontconfig version 2.11.0 4781ca08ab68Smrg 4782ca08ab68Smrg FcDirCacheClean 4783ca08ab68Smrg 4784ca08ab68SmrgName 4785ca08ab68Smrg 4786ca08ab68Smrg FcDirCacheClean -- This tries to clean up the cache directory of 4787ca08ab68Smrg cache_dir. This returns FcTrue if the operation is successfully complete. 4788ca08ab68Smrg otherwise FcFalse. 4789ca08ab68Smrg 4790ca08ab68SmrgSynopsis 4791ca08ab68Smrg 4792c9710b42Smrg #include <fontconfig/fontconfig.h> 4793ca08ab68Smrg 4794a6844aabSmrg 4795ca08ab68Smrg FcBool FcDirCacheClean(const FcChar8 *cache_dir, FcBoolverbose); 4796ca08ab68Smrg 4797ca08ab68SmrgDescription 47982c393a42Smrg 47992c393a42Smrg 48002c393a42Smrg 4801ca08ab68SmrgVersion 48022c393a42Smrg 48036fc018e4Smrg Fontconfig version 2.11.0 4804ca08ab68Smrg 4805ca08ab68Smrg FcCacheCreateTagFile 48062c393a42Smrg 48072c393a42SmrgName 48082c393a42Smrg 4809ca08ab68Smrg FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 48102c393a42Smrg 48112c393a42SmrgSynopsis 48122c393a42Smrg 4813c9710b42Smrg #include <fontconfig/fontconfig.h> 48142c393a42Smrg 4815a6844aabSmrg 4816ca08ab68Smrg void FcCacheCreateTagFile(const FcConfig *config); 48172c393a42Smrg 48182c393a42SmrgDescription 48192c393a42Smrg 4820ca08ab68Smrg This tries to create CACHEDIR.TAG file at the cache directory registered 4821ca08ab68Smrg to config. 48222c393a42Smrg 48232c393a42SmrgVersion 48242c393a42Smrg 48256fc018e4Smrg Fontconfig version 2.11.0 4826ca08ab68Smrg 4827ca08ab68Smrg -------------------------------------------------------------------------- 4828ca08ab68Smrg 4829ca08ab68Smrg FcStrSet and FcStrList 4830ca08ab68Smrg 4831ca08ab68Smrg Table of Contents 4832ca08ab68Smrg 4833c9710b42Smrg [163]FcStrSetCreate -- create a string set 4834ca08ab68Smrg 4835c9710b42Smrg [164]FcStrSetMember -- check set for membership 4836ca08ab68Smrg 4837c9710b42Smrg [165]FcStrSetEqual -- check sets for equality 4838ca08ab68Smrg 4839c9710b42Smrg [166]FcStrSetAdd -- add to a string set 4840ca08ab68Smrg 4841c9710b42Smrg [167]FcStrSetAddFilename -- add a filename to a string set 4842ca08ab68Smrg 4843c9710b42Smrg [168]FcStrSetDel -- delete from a string set 4844ca08ab68Smrg 4845c9710b42Smrg [169]FcStrSetDestroy -- destroy a string set 4846ca08ab68Smrg 4847c9710b42Smrg [170]FcStrListCreate -- create a string iterator 4848ca08ab68Smrg 48496fc018e4Smrg [171]FcStrListFirst -- get first string in iteration 48506fc018e4Smrg 48516fc018e4Smrg [172]FcStrListNext -- get next string in iteration 4852ca08ab68Smrg 48536fc018e4Smrg [173]FcStrListDone -- destroy a string iterator 4854ca08ab68Smrg 4855ca08ab68Smrg A data structure for enumerating strings, used to list directories while 4856ca08ab68Smrg scanning the configuration as directories are added while scanning. 48572c393a42Smrg 4858ca08ab68Smrg FcStrSetCreate 48592c393a42Smrg 48602c393a42SmrgName 48612c393a42Smrg 4862ca08ab68Smrg FcStrSetCreate -- create a string set 48632c393a42Smrg 48642c393a42SmrgSynopsis 48652c393a42Smrg 4866c9710b42Smrg #include <fontconfig/fontconfig.h> 48672c393a42Smrg 4868a6844aabSmrg 4869ca08ab68Smrg FcStrSet * FcStrSetCreate(void); 48702c393a42Smrg 48712c393a42SmrgDescription 48722c393a42Smrg 4873ca08ab68Smrg Create an empty set. 48742c393a42Smrg 48752c393a42SmrgVersion 48762c393a42Smrg 48776fc018e4Smrg Fontconfig version 2.11.0 48782c393a42Smrg 4879ca08ab68Smrg FcStrSetMember 48802c393a42Smrg 48812c393a42SmrgName 48822c393a42Smrg 4883ca08ab68Smrg FcStrSetMember -- check set for membership 48842c393a42Smrg 48852c393a42SmrgSynopsis 48862c393a42Smrg 4887c9710b42Smrg #include <fontconfig/fontconfig.h> 48882c393a42Smrg 4889a6844aabSmrg 4890ca08ab68Smrg FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s); 48912c393a42Smrg 48922c393a42SmrgDescription 48932c393a42Smrg 4894ca08ab68Smrg Returns whether s is a member of set. 48952c393a42Smrg 48962c393a42SmrgVersion 48972c393a42Smrg 48986fc018e4Smrg Fontconfig version 2.11.0 48992c393a42Smrg 4900ca08ab68Smrg FcStrSetEqual 49012c393a42Smrg 49022c393a42SmrgName 49032c393a42Smrg 4904ca08ab68Smrg FcStrSetEqual -- check sets for equality 49052c393a42Smrg 49062c393a42SmrgSynopsis 49072c393a42Smrg 4908c9710b42Smrg #include <fontconfig/fontconfig.h> 49092c393a42Smrg 4910a6844aabSmrg 4911ca08ab68Smrg FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b); 49122c393a42Smrg 49132c393a42SmrgDescription 49142c393a42Smrg 4915ca08ab68Smrg Returns whether set_a contains precisely the same strings as set_b. 4916ca08ab68Smrg Ordering of strings within the two sets is not considered. 49172c393a42Smrg 49182c393a42SmrgVersion 49192c393a42Smrg 49206fc018e4Smrg Fontconfig version 2.11.0 49212c393a42Smrg 4922ca08ab68Smrg FcStrSetAdd 49232c393a42Smrg 49242c393a42SmrgName 49252c393a42Smrg 4926ca08ab68Smrg FcStrSetAdd -- add to a string set 49272c393a42Smrg 49282c393a42SmrgSynopsis 49292c393a42Smrg 4930c9710b42Smrg #include <fontconfig/fontconfig.h> 49312c393a42Smrg 4932a6844aabSmrg 4933ca08ab68Smrg FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s); 49342c393a42Smrg 49352c393a42SmrgDescription 49362c393a42Smrg 4937ca08ab68Smrg Adds a copy of s to set. 49382c393a42Smrg 49392c393a42SmrgVersion 49402c393a42Smrg 49416fc018e4Smrg Fontconfig version 2.11.0 49422c393a42Smrg 4943ca08ab68Smrg FcStrSetAddFilename 49442c393a42Smrg 49452c393a42SmrgName 49462c393a42Smrg 4947ca08ab68Smrg FcStrSetAddFilename -- add a filename to a string set 49482c393a42Smrg 49492c393a42SmrgSynopsis 49502c393a42Smrg 4951c9710b42Smrg #include <fontconfig/fontconfig.h> 49522c393a42Smrg 4953a6844aabSmrg 4954ca08ab68Smrg FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s); 49552c393a42Smrg 49562c393a42SmrgDescription 49572c393a42Smrg 4958ca08ab68Smrg Adds a copy s to set, The copy is created with FcStrCopyFilename so that 4959ca08ab68Smrg leading '~' values are replaced with the value of the HOME environment 4960ca08ab68Smrg variable. 49612c393a42Smrg 49622c393a42SmrgVersion 49632c393a42Smrg 49646fc018e4Smrg Fontconfig version 2.11.0 49652c393a42Smrg 4966ca08ab68Smrg FcStrSetDel 49672c393a42Smrg 49682c393a42SmrgName 49692c393a42Smrg 4970ca08ab68Smrg FcStrSetDel -- delete from a string set 49712c393a42Smrg 49722c393a42SmrgSynopsis 49732c393a42Smrg 4974c9710b42Smrg #include <fontconfig/fontconfig.h> 49752c393a42Smrg 4976a6844aabSmrg 4977ca08ab68Smrg FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s); 49782c393a42Smrg 49792c393a42SmrgDescription 49802c393a42Smrg 4981ca08ab68Smrg Removes s from set, returning FcTrue if s was a member else FcFalse. 49822c393a42Smrg 49832c393a42SmrgVersion 49842c393a42Smrg 49856fc018e4Smrg Fontconfig version 2.11.0 49862c393a42Smrg 4987ca08ab68Smrg FcStrSetDestroy 49882c393a42Smrg 49892c393a42SmrgName 49902c393a42Smrg 4991ca08ab68Smrg FcStrSetDestroy -- destroy a string set 49922c393a42Smrg 49932c393a42SmrgSynopsis 49942c393a42Smrg 4995c9710b42Smrg #include <fontconfig/fontconfig.h> 49962c393a42Smrg 4997a6844aabSmrg 4998ca08ab68Smrg void FcStrSetDestroy(FcStrSet *set); 49992c393a42Smrg 50002c393a42SmrgDescription 50012c393a42Smrg 5002ca08ab68Smrg Destroys set. 50032c393a42Smrg 50042c393a42SmrgVersion 50052c393a42Smrg 50066fc018e4Smrg Fontconfig version 2.11.0 50072c393a42Smrg 5008ca08ab68Smrg FcStrListCreate 50092c393a42Smrg 50102c393a42SmrgName 50112c393a42Smrg 5012ca08ab68Smrg FcStrListCreate -- create a string iterator 50132c393a42Smrg 50142c393a42SmrgSynopsis 50152c393a42Smrg 5016c9710b42Smrg #include <fontconfig/fontconfig.h> 50172c393a42Smrg 5018a6844aabSmrg 5019ca08ab68Smrg FcStrList * FcStrListCreate(FcStrSet *set); 50202c393a42Smrg 50212c393a42SmrgDescription 50222c393a42Smrg 5023ca08ab68Smrg Creates an iterator to list the strings in set. 50242c393a42Smrg 50252c393a42SmrgVersion 50262c393a42Smrg 50276fc018e4Smrg Fontconfig version 2.11.0 50286fc018e4Smrg 50296fc018e4Smrg FcStrListFirst 50306fc018e4Smrg 50316fc018e4SmrgName 50326fc018e4Smrg 50336fc018e4Smrg FcStrListFirst -- get first string in iteration 50346fc018e4Smrg 50356fc018e4SmrgSynopsis 50366fc018e4Smrg 50376fc018e4Smrg #include <fontconfig/fontconfig.h> 50386fc018e4Smrg 50396fc018e4Smrg 50406fc018e4Smrg void FcStrListFirst(FcStrList *list); 50416fc018e4Smrg 50426fc018e4SmrgDescription 50436fc018e4Smrg 50446fc018e4Smrg Returns the first string in list. 50456fc018e4Smrg 50466fc018e4SmrgVersion 50476fc018e4Smrg 50486fc018e4Smrg Fontconfig version 2.11.0 50492c393a42Smrg 5050ca08ab68Smrg FcStrListNext 50512c393a42Smrg 50522c393a42SmrgName 50532c393a42Smrg 5054ca08ab68Smrg FcStrListNext -- get next string in iteration 50552c393a42Smrg 50562c393a42SmrgSynopsis 50572c393a42Smrg 5058c9710b42Smrg #include <fontconfig/fontconfig.h> 50592c393a42Smrg 5060a6844aabSmrg 5061ca08ab68Smrg FcChar8 * FcStrListNext(FcStrList *list); 50622c393a42Smrg 50632c393a42SmrgDescription 50642c393a42Smrg 50656fc018e4Smrg Returns the next string in list. 50662c393a42Smrg 50672c393a42SmrgVersion 50682c393a42Smrg 50696fc018e4Smrg Fontconfig version 2.11.0 50702c393a42Smrg 5071ca08ab68Smrg FcStrListDone 50722c393a42Smrg 5073ca08ab68SmrgName 5074ca08ab68Smrg 5075ca08ab68Smrg FcStrListDone -- destroy a string iterator 5076ca08ab68Smrg 5077ca08ab68SmrgSynopsis 5078ca08ab68Smrg 5079c9710b42Smrg #include <fontconfig/fontconfig.h> 5080ca08ab68Smrg 5081ca08ab68Smrg 5082ca08ab68Smrg void FcStrListDone(FcStrList *list); 5083ca08ab68Smrg 5084ca08ab68SmrgDescription 5085ca08ab68Smrg 5086ca08ab68Smrg Destroys the enumerator list. 5087ca08ab68Smrg 5088ca08ab68SmrgVersion 5089ca08ab68Smrg 50906fc018e4Smrg Fontconfig version 2.11.0 5091ca08ab68Smrg 5092ca08ab68Smrg -------------------------------------------------------------------------- 5093ca08ab68Smrg 5094ca08ab68Smrg String utilities 5095ca08ab68Smrg 5096ca08ab68Smrg Table of Contents 5097ca08ab68Smrg 50986fc018e4Smrg [174]FcUtf8ToUcs4 -- convert UTF-8 to UCS4 5099ca08ab68Smrg 51006fc018e4Smrg [175]FcUcs4ToUtf8 -- convert UCS4 to UTF-8 51012c393a42Smrg 51026fc018e4Smrg [176]FcUtf8Len -- count UTF-8 encoded chars 51032c393a42Smrg 51046fc018e4Smrg [177]FcUtf16ToUcs4 -- convert UTF-16 to UCS4 51052c393a42Smrg 51066fc018e4Smrg [178]FcUtf16Len -- count UTF-16 encoded chars 5107ca08ab68Smrg 51086fc018e4Smrg [179]FcIsLower -- check for lower case ASCII character 5109ca08ab68Smrg 51106fc018e4Smrg [180]FcIsUpper -- check for upper case ASCII character 5111ca08ab68Smrg 51126fc018e4Smrg [181]FcToLower -- convert upper case ASCII to lower case 5113ca08ab68Smrg 51146fc018e4Smrg [182]FcStrCopy -- duplicate a string 5115ca08ab68Smrg 51166fc018e4Smrg [183]FcStrDowncase -- create a lower case translation of a string 5117ca08ab68Smrg 51186fc018e4Smrg [184]FcStrCopyFilename -- create a complete path from a filename 5119ca08ab68Smrg 51206fc018e4Smrg [185]FcStrCmp -- compare UTF-8 strings 5121ca08ab68Smrg 51226fc018e4Smrg [186]FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 5123ca08ab68Smrg 51246fc018e4Smrg [187]FcStrStr -- locate UTF-8 substring 5125ca08ab68Smrg 51266fc018e4Smrg [188]FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 5127ca08ab68Smrg 51286fc018e4Smrg [189]FcStrPlus -- concatenate two strings 5129ca08ab68Smrg 51306fc018e4Smrg [190]FcStrFree -- free a string 5131ca08ab68Smrg 51326fc018e4Smrg [191]FcStrDirname -- directory part of filename 5133ca08ab68Smrg 51346fc018e4Smrg [192]FcStrBasename -- last component of filename 5135ca08ab68Smrg 5136ca08ab68Smrg Fontconfig manipulates many UTF-8 strings represented with the FcChar8 5137ca08ab68Smrg type. These functions are exposed to help applications deal with these 5138ca08ab68Smrg UTF-8 strings in a locale-insensitive manner. 5139ca08ab68Smrg 5140ca08ab68Smrg FcUtf8ToUcs4 51412c393a42Smrg 51422c393a42SmrgName 51432c393a42Smrg 5144ca08ab68Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 51452c393a42Smrg 51462c393a42SmrgSynopsis 51472c393a42Smrg 5148c9710b42Smrg #include <fontconfig/fontconfig.h> 51492c393a42Smrg 5150a6844aabSmrg 5151ca08ab68Smrg int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len); 51522c393a42Smrg 51532c393a42SmrgDescription 51542c393a42Smrg 5155ca08ab68Smrg Converts the next Unicode char from src into dst and returns the number of 5156ca08ab68Smrg bytes containing the char. src must be at least len bytes long. 51572c393a42Smrg 51582c393a42SmrgVersion 51592c393a42Smrg 51606fc018e4Smrg Fontconfig version 2.11.0 51612c393a42Smrg 5162ca08ab68Smrg FcUcs4ToUtf8 51632c393a42Smrg 51642c393a42SmrgName 51652c393a42Smrg 5166ca08ab68Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 51672c393a42Smrg 51682c393a42SmrgSynopsis 51692c393a42Smrg 5170c9710b42Smrg #include <fontconfig/fontconfig.h> 51712c393a42Smrg 5172a6844aabSmrg 5173ca08ab68Smrg int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]); 51742c393a42Smrg 51752c393a42SmrgDescription 51762c393a42Smrg 5177ca08ab68Smrg Converts the Unicode char from src into dst and returns the number of 5178ca08ab68Smrg bytes needed to encode the char. 51792c393a42Smrg 51802c393a42SmrgVersion 51812c393a42Smrg 51826fc018e4Smrg Fontconfig version 2.11.0 51832c393a42Smrg 5184ca08ab68Smrg FcUtf8Len 51852c393a42Smrg 51862c393a42SmrgName 51872c393a42Smrg 5188ca08ab68Smrg FcUtf8Len -- count UTF-8 encoded chars 51892c393a42Smrg 51902c393a42SmrgSynopsis 51912c393a42Smrg 5192c9710b42Smrg #include <fontconfig/fontconfig.h> 51932c393a42Smrg 5194a6844aabSmrg 5195ca08ab68Smrg FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int *wchar); 51962c393a42Smrg 51972c393a42SmrgDescription 51982c393a42Smrg 5199ca08ab68Smrg Counts the number of Unicode chars in len bytes of src. Places that count 5200ca08ab68Smrg in nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed 5201ca08ab68Smrg to hold the largest Unicode char counted. The return value indicates 5202ca08ab68Smrg whether src is a well-formed UTF8 string. 52032c393a42Smrg 52042c393a42SmrgVersion 52052c393a42Smrg 52066fc018e4Smrg Fontconfig version 2.11.0 52072c393a42Smrg 5208ca08ab68Smrg FcUtf16ToUcs4 52092c393a42Smrg 52102c393a42SmrgName 52112c393a42Smrg 5212ca08ab68Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 52132c393a42Smrg 52142c393a42SmrgSynopsis 52152c393a42Smrg 5216c9710b42Smrg #include <fontconfig/fontconfig.h> 52172c393a42Smrg 5218a6844aabSmrg 5219ca08ab68Smrg int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst, int len); 52202c393a42Smrg 52212c393a42SmrgDescription 52222c393a42Smrg 5223ca08ab68Smrg Converts the next Unicode char from src into dst and returns the number of 5224ca08ab68Smrg bytes containing the char. src must be at least len bytes long. Bytes of 5225ca08ab68Smrg src are combined into 16-bit units according to endian. 52262c393a42Smrg 52272c393a42SmrgVersion 52282c393a42Smrg 52296fc018e4Smrg Fontconfig version 2.11.0 52302c393a42Smrg 5231ca08ab68Smrg FcUtf16Len 52322c393a42Smrg 52332c393a42SmrgName 52342c393a42Smrg 5235ca08ab68Smrg FcUtf16Len -- count UTF-16 encoded chars 52362c393a42Smrg 52372c393a42SmrgSynopsis 52382c393a42Smrg 5239c9710b42Smrg #include <fontconfig/fontconfig.h> 52402c393a42Smrg 5241a6844aabSmrg 5242ca08ab68Smrg FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int *nchar, int 5243ca08ab68Smrg *wchar); 52442c393a42Smrg 52452c393a42SmrgDescription 52462c393a42Smrg 5247ca08ab68Smrg Counts the number of Unicode chars in len bytes of src. Bytes of src are 5248ca08ab68Smrg combined into 16-bit units according to endian. Places that count in 5249ca08ab68Smrg nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed to 5250ca08ab68Smrg hold the largest Unicode char counted. The return value indicates whether 5251ca08ab68Smrg string is a well-formed UTF16 string. 52522c393a42Smrg 52532c393a42SmrgVersion 52542c393a42Smrg 52556fc018e4Smrg Fontconfig version 2.11.0 52562c393a42Smrg 5257ca08ab68Smrg FcIsLower 52582c393a42Smrg 52592c393a42SmrgName 52602c393a42Smrg 5261ca08ab68Smrg FcIsLower -- check for lower case ASCII character 52622c393a42Smrg 52632c393a42SmrgSynopsis 52642c393a42Smrg 5265c9710b42Smrg #include <fontconfig/fontconfig.h> 52662c393a42Smrg 5267a6844aabSmrg 5268ca08ab68Smrg FcBool FcIsLower(FcChar8c); 52692c393a42Smrg 52702c393a42SmrgDescription 52712c393a42Smrg 5272ca08ab68Smrg This macro checks whether c is an lower case ASCII letter. 52732c393a42Smrg 52742c393a42SmrgVersion 52752c393a42Smrg 52766fc018e4Smrg Fontconfig version 2.11.0 52772c393a42Smrg 5278ca08ab68Smrg FcIsUpper 52792c393a42Smrg 52802c393a42SmrgName 52812c393a42Smrg 5282ca08ab68Smrg FcIsUpper -- check for upper case ASCII character 52832c393a42Smrg 52842c393a42SmrgSynopsis 52852c393a42Smrg 5286c9710b42Smrg #include <fontconfig/fontconfig.h> 52872c393a42Smrg 5288a6844aabSmrg 5289ca08ab68Smrg FcBool FcIsUpper(FcChar8c); 52902c393a42Smrg 52912c393a42SmrgDescription 52922c393a42Smrg 5293ca08ab68Smrg This macro checks whether c is a upper case ASCII letter. 52942c393a42Smrg 52952c393a42SmrgVersion 52962c393a42Smrg 52976fc018e4Smrg Fontconfig version 2.11.0 52982c393a42Smrg 5299ca08ab68Smrg FcToLower 53002c393a42Smrg 53012c393a42SmrgName 53022c393a42Smrg 5303ca08ab68Smrg FcToLower -- convert upper case ASCII to lower case 53042c393a42Smrg 53052c393a42SmrgSynopsis 53062c393a42Smrg 5307c9710b42Smrg #include <fontconfig/fontconfig.h> 53082c393a42Smrg 5309a6844aabSmrg 5310ca08ab68Smrg FcChar8 FcToLower(FcChar8c); 53112c393a42Smrg 53122c393a42SmrgDescription 53132c393a42Smrg 5314ca08ab68Smrg This macro converts upper case ASCII c to the equivalent lower case 5315ca08ab68Smrg letter. 53162c393a42Smrg 53172c393a42SmrgVersion 53182c393a42Smrg 53196fc018e4Smrg Fontconfig version 2.11.0 53202c393a42Smrg 5321ca08ab68Smrg FcStrCopy 53222c393a42Smrg 53232c393a42SmrgName 53242c393a42Smrg 5325ca08ab68Smrg FcStrCopy -- duplicate a string 53262c393a42Smrg 53272c393a42SmrgSynopsis 53282c393a42Smrg 5329c9710b42Smrg #include <fontconfig/fontconfig.h> 53302c393a42Smrg 5331a6844aabSmrg 5332ca08ab68Smrg FcChar8 * FcStrCopy(const FcChar8 *s); 53332c393a42Smrg 53342c393a42SmrgDescription 53352c393a42Smrg 5336ca08ab68Smrg Allocates memory, copies s and returns the resulting buffer. Yes, this is 5337ca08ab68Smrg strdup, but that function isn't available on every platform. 53382c393a42Smrg 53392c393a42SmrgVersion 53402c393a42Smrg 53416fc018e4Smrg Fontconfig version 2.11.0 53422c393a42Smrg 5343ca08ab68Smrg FcStrDowncase 53442c393a42Smrg 53452c393a42SmrgName 53462c393a42Smrg 5347ca08ab68Smrg FcStrDowncase -- create a lower case translation of a string 53482c393a42Smrg 53492c393a42SmrgSynopsis 53502c393a42Smrg 5351c9710b42Smrg #include <fontconfig/fontconfig.h> 53522c393a42Smrg 5353a6844aabSmrg 5354ca08ab68Smrg FcChar8 * FcStrDowncase(const FcChar8 *s); 53552c393a42Smrg 53562c393a42SmrgDescription 53572c393a42Smrg 5358ca08ab68Smrg Allocates memory, copies s, converting upper case letters to lower case 5359ca08ab68Smrg and returns the allocated buffer. 53602c393a42Smrg 53612c393a42SmrgVersion 53622c393a42Smrg 53636fc018e4Smrg Fontconfig version 2.11.0 53642c393a42Smrg 5365ca08ab68Smrg FcStrCopyFilename 53662c393a42Smrg 53672c393a42SmrgName 53682c393a42Smrg 5369ca08ab68Smrg FcStrCopyFilename -- create a complete path from a filename 53702c393a42Smrg 53712c393a42SmrgSynopsis 53722c393a42Smrg 5373c9710b42Smrg #include <fontconfig/fontconfig.h> 53742c393a42Smrg 5375a6844aabSmrg 5376ca08ab68Smrg FcChar8 * FcStrCopyFilename(const FcChar8 *s); 53772c393a42Smrg 53782c393a42SmrgDescription 53792c393a42Smrg 5380ca08ab68Smrg FcStrCopyFilename constructs an absolute pathname from s. It converts any 5381ca08ab68Smrg leading '~' characters in to the value of the HOME environment variable, 5382ca08ab68Smrg and any relative paths are converted to absolute paths using the current 5383ca08ab68Smrg working directory. Sequences of '/' characters are converted to a single 5384ca08ab68Smrg '/', and names containing the current directory '.' or parent directory 5385ca08ab68Smrg '..' are correctly reconstructed. Returns NULL if '~' is the leading 5386ca08ab68Smrg character and HOME is unset or disabled (see FcConfigEnableHome). 53872c393a42Smrg 53882c393a42SmrgVersion 53892c393a42Smrg 53906fc018e4Smrg Fontconfig version 2.11.0 53912c393a42Smrg 5392ca08ab68Smrg FcStrCmp 53932c393a42Smrg 53942c393a42SmrgName 53952c393a42Smrg 5396ca08ab68Smrg FcStrCmp -- compare UTF-8 strings 53972c393a42Smrg 53982c393a42SmrgSynopsis 53992c393a42Smrg 5400c9710b42Smrg #include <fontconfig/fontconfig.h> 54012c393a42Smrg 5402a6844aabSmrg 5403ca08ab68Smrg int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2); 54042c393a42Smrg 54052c393a42SmrgDescription 54062c393a42Smrg 5407ca08ab68Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. 54082c393a42Smrg 54092c393a42SmrgVersion 54102c393a42Smrg 54116fc018e4Smrg Fontconfig version 2.11.0 54122c393a42Smrg 5413ca08ab68Smrg FcStrCmpIgnoreCase 54142c393a42Smrg 54152c393a42SmrgName 54162c393a42Smrg 5417ca08ab68Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 54182c393a42Smrg 54192c393a42SmrgSynopsis 54202c393a42Smrg 5421c9710b42Smrg #include <fontconfig/fontconfig.h> 54222c393a42Smrg 5423a6844aabSmrg 5424ca08ab68Smrg int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 54252c393a42Smrg 54262c393a42SmrgDescription 54272c393a42Smrg 5428ca08ab68Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. This test is 5429ca08ab68Smrg case-insensitive for all proper UTF-8 encoded strings. 54302c393a42Smrg 54312c393a42SmrgVersion 54322c393a42Smrg 54336fc018e4Smrg Fontconfig version 2.11.0 54342c393a42Smrg 5435ca08ab68Smrg FcStrStr 54362c393a42Smrg 54372c393a42SmrgName 54382c393a42Smrg 5439ca08ab68Smrg FcStrStr -- locate UTF-8 substring 54402c393a42Smrg 54412c393a42SmrgSynopsis 54422c393a42Smrg 5443c9710b42Smrg #include <fontconfig/fontconfig.h> 54442c393a42Smrg 5445a6844aabSmrg 5446ca08ab68Smrg FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2); 54472c393a42Smrg 54482c393a42SmrgDescription 54492c393a42Smrg 5450ca08ab68Smrg Returns the location of s2 in s1. Returns NULL if s2 is not present in s1. 5451ca08ab68Smrg This test will operate properly with UTF8 encoded strings. 54522c393a42Smrg 54532c393a42SmrgVersion 54542c393a42Smrg 54556fc018e4Smrg Fontconfig version 2.11.0 54562c393a42Smrg 5457ca08ab68Smrg FcStrStrIgnoreCase 54582c393a42Smrg 54592c393a42SmrgName 54602c393a42Smrg 5461ca08ab68Smrg FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 54622c393a42Smrg 54632c393a42SmrgSynopsis 54642c393a42Smrg 5465c9710b42Smrg #include <fontconfig/fontconfig.h> 54662c393a42Smrg 5467a6844aabSmrg 5468ca08ab68Smrg FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 54692c393a42Smrg 54702c393a42SmrgDescription 54712c393a42Smrg 5472ca08ab68Smrg Returns the location of s2 in s1, ignoring case. Returns NULL if s2 is not 5473ca08ab68Smrg present in s1. This test is case-insensitive for all proper UTF-8 encoded 5474ca08ab68Smrg strings. 54752c393a42Smrg 54762c393a42SmrgVersion 54772c393a42Smrg 54786fc018e4Smrg Fontconfig version 2.11.0 54792c393a42Smrg 5480ca08ab68Smrg FcStrPlus 54812c393a42Smrg 54822c393a42SmrgName 54832c393a42Smrg 5484ca08ab68Smrg FcStrPlus -- concatenate two strings 54852c393a42Smrg 54862c393a42SmrgSynopsis 54872c393a42Smrg 5488c9710b42Smrg #include <fontconfig/fontconfig.h> 54892c393a42Smrg 5490a6844aabSmrg 5491ca08ab68Smrg FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2); 54922c393a42Smrg 54932c393a42SmrgDescription 54942c393a42Smrg 5495ca08ab68Smrg This function allocates new storage and places the concatenation of s1 and 5496ca08ab68Smrg s2 there, returning the new string. 54972c393a42Smrg 54982c393a42SmrgVersion 54992c393a42Smrg 55006fc018e4Smrg Fontconfig version 2.11.0 55012c393a42Smrg 5502ca08ab68Smrg FcStrFree 55032c393a42Smrg 55042c393a42SmrgName 55052c393a42Smrg 5506ca08ab68Smrg FcStrFree -- free a string 55072c393a42Smrg 55082c393a42SmrgSynopsis 55092c393a42Smrg 5510c9710b42Smrg #include <fontconfig/fontconfig.h> 55112c393a42Smrg 5512a6844aabSmrg 5513ca08ab68Smrg void FcStrFree(FcChar8 *s); 55142c393a42Smrg 55152c393a42SmrgDescription 55162c393a42Smrg 5517ca08ab68Smrg This is just a wrapper around free(3) which helps track memory usage of 5518ca08ab68Smrg strings within the fontconfig library. 55192c393a42Smrg 55202c393a42SmrgVersion 55212c393a42Smrg 55226fc018e4Smrg Fontconfig version 2.11.0 55232c393a42Smrg 5524ca08ab68Smrg FcStrDirname 55252c393a42Smrg 55262c393a42SmrgName 55272c393a42Smrg 5528ca08ab68Smrg FcStrDirname -- directory part of filename 55292c393a42Smrg 55302c393a42SmrgSynopsis 55312c393a42Smrg 5532c9710b42Smrg #include <fontconfig/fontconfig.h> 55332c393a42Smrg 5534a6844aabSmrg 5535ca08ab68Smrg FcChar8 * FcStrDirname(const FcChar8 *file); 55362c393a42Smrg 55372c393a42SmrgDescription 55382c393a42Smrg 5539ca08ab68Smrg Returns the directory containing file. This is returned in newly allocated 5540ca08ab68Smrg storage which should be freed when no longer needed. 55412c393a42Smrg 55422c393a42SmrgVersion 55432c393a42Smrg 55446fc018e4Smrg Fontconfig version 2.11.0 55452c393a42Smrg 5546ca08ab68Smrg FcStrBasename 55472c393a42Smrg 55482c393a42SmrgName 55492c393a42Smrg 5550ca08ab68Smrg FcStrBasename -- last component of filename 55512c393a42Smrg 55522c393a42SmrgSynopsis 55532c393a42Smrg 5554c9710b42Smrg #include <fontconfig/fontconfig.h> 55552c393a42Smrg 5556a6844aabSmrg 5557ca08ab68Smrg FcChar8 * FcStrBasename(const FcChar8 *file); 55582c393a42Smrg 55592c393a42SmrgDescription 55602c393a42Smrg 5561ca08ab68Smrg Returns the filename of file stripped of any leading directory names. This 5562ca08ab68Smrg is returned in newly allocated storage which should be freed when no 5563ca08ab68Smrg longer needed. 55642c393a42Smrg 55652c393a42SmrgVersion 55662c393a42Smrg 55676fc018e4Smrg Fontconfig version 2.11.0 5568ca08ab68Smrg 5569ca08ab68SmrgReferences 5570a6844aabSmrg 5571ca08ab68Smrg Visible links 55726fc018e4Smrg 1. file:///tmp/html-6vSr2R#AEN16 55736fc018e4Smrg 2. file:///tmp/html-6vSr2R#AEN19 55746fc018e4Smrg 3. file:///tmp/html-6vSr2R#AEN31 55756fc018e4Smrg 4. file:///tmp/html-6vSr2R#AEN102 55766fc018e4Smrg 5. file:///tmp/html-6vSr2R#FCINITLOADCONFIG 55776fc018e4Smrg 6. file:///tmp/html-6vSr2R#FCINITLOADCONFIGANDFONTS 55786fc018e4Smrg 7. file:///tmp/html-6vSr2R#FCINIT 55796fc018e4Smrg 8. file:///tmp/html-6vSr2R#FCFINI 55806fc018e4Smrg 9. file:///tmp/html-6vSr2R#FCGETVERSION 55816fc018e4Smrg 10. file:///tmp/html-6vSr2R#FCINITREINITIALIZE 55826fc018e4Smrg 11. file:///tmp/html-6vSr2R#FCINITBRINGUPTODATE 55836fc018e4Smrg 12. file:///tmp/html-6vSr2R#FCPATTERNCREATE 55846fc018e4Smrg 13. file:///tmp/html-6vSr2R#FCPATTERNDUPLICATE 55856fc018e4Smrg 14. file:///tmp/html-6vSr2R#FCPATTERNREFERENCE 55866fc018e4Smrg 15. file:///tmp/html-6vSr2R#FCPATTERNDESTROY 55876fc018e4Smrg 16. file:///tmp/html-6vSr2R#FCPATTERNEQUAL 55886fc018e4Smrg 17. file:///tmp/html-6vSr2R#FCPATTERNEQUALSUBSET 55896fc018e4Smrg 18. file:///tmp/html-6vSr2R#FCPATTERNFILTER 55906fc018e4Smrg 19. file:///tmp/html-6vSr2R#FCPATTERNHASH 55916fc018e4Smrg 20. file:///tmp/html-6vSr2R#FCPATTERNADD 55926fc018e4Smrg 21. file:///tmp/html-6vSr2R#FCPATTERNADDWEAK 55936fc018e4Smrg 22. file:///tmp/html-6vSr2R#FCPATTERNADD-TYPE 55946fc018e4Smrg 23. file:///tmp/html-6vSr2R#FCPATTERNGET 55956fc018e4Smrg 24. file:///tmp/html-6vSr2R#FCPATTERNGET-TYPE 55966fc018e4Smrg 25. file:///tmp/html-6vSr2R#FCPATTERNBUILD 55976fc018e4Smrg 26. file:///tmp/html-6vSr2R#FCPATTERNDEL 55986fc018e4Smrg 27. file:///tmp/html-6vSr2R#FCPATTERNREMOVE 55996fc018e4Smrg 28. file:///tmp/html-6vSr2R#FCPATTERNPRINT 56006fc018e4Smrg 29. file:///tmp/html-6vSr2R#FCDEFAULTSUBSTITUTE 56016fc018e4Smrg 30. file:///tmp/html-6vSr2R#FCNAMEPARSE 56026fc018e4Smrg 31. file:///tmp/html-6vSr2R#FCNAMEUNPARSE 56036fc018e4Smrg 32. file:///tmp/html-6vSr2R#FCPATTERNFORMAT 56046fc018e4Smrg 33. file:///tmp/html-6vSr2R#FCFONTSETCREATE 56056fc018e4Smrg 34. file:///tmp/html-6vSr2R#FCFONTSETDESTROY 56066fc018e4Smrg 35. file:///tmp/html-6vSr2R#FCFONTSETADD 56076fc018e4Smrg 36. file:///tmp/html-6vSr2R#FCFONTSETLIST 56086fc018e4Smrg 37. file:///tmp/html-6vSr2R#FCFONTSETMATCH 56096fc018e4Smrg 38. file:///tmp/html-6vSr2R#FCFONTSETPRINT 56106fc018e4Smrg 39. file:///tmp/html-6vSr2R#FCFONTSETSORT 56116fc018e4Smrg 40. file:///tmp/html-6vSr2R#FCFONTSETSORTDESTROY 56126fc018e4Smrg 41. file:///tmp/html-6vSr2R#FCOBJECTSETCREATE 56136fc018e4Smrg 42. file:///tmp/html-6vSr2R#FCOBJECTSETADD 56146fc018e4Smrg 43. file:///tmp/html-6vSr2R#FCOBJECTSETDESTROY 56156fc018e4Smrg 44. file:///tmp/html-6vSr2R#FCOBJECTSETBUILD 56166fc018e4Smrg 45. file:///tmp/html-6vSr2R#FCFREETYPECHARINDEX 56176fc018e4Smrg 46. file:///tmp/html-6vSr2R#FCFREETYPECHARSET 56186fc018e4Smrg 47. file:///tmp/html-6vSr2R#FCFREETYPECHARSETANDSPACING 56196fc018e4Smrg 48. file:///tmp/html-6vSr2R#FCFREETYPEQUERY 56206fc018e4Smrg 49. file:///tmp/html-6vSr2R#FCFREETYPEQUERYFACE 56216fc018e4Smrg 50. file:///tmp/html-6vSr2R#FCVALUEDESTROY 56226fc018e4Smrg 51. file:///tmp/html-6vSr2R#FCVALUESAVE 56236fc018e4Smrg 52. file:///tmp/html-6vSr2R#FCVALUEPRINT 56246fc018e4Smrg 53. file:///tmp/html-6vSr2R#FCVALUEEQUAL 56256fc018e4Smrg 54. file:///tmp/html-6vSr2R#FCCHARSETCREATE 56266fc018e4Smrg 55. file:///tmp/html-6vSr2R#FCCHARSETDESTROY 56276fc018e4Smrg 56. file:///tmp/html-6vSr2R#FCCHARSETADDCHAR 56286fc018e4Smrg 57. file:///tmp/html-6vSr2R#FCCHARSETDELCHAR 56296fc018e4Smrg 58. file:///tmp/html-6vSr2R#FCCHARSETCOPY 56306fc018e4Smrg 59. file:///tmp/html-6vSr2R#FCCHARSETEQUAL 56316fc018e4Smrg 60. file:///tmp/html-6vSr2R#FCCHARSETINTERSECT 56326fc018e4Smrg 61. file:///tmp/html-6vSr2R#FCCHARSETUNION 56336fc018e4Smrg 62. file:///tmp/html-6vSr2R#FCCHARSETSUBTRACT 56346fc018e4Smrg 63. file:///tmp/html-6vSr2R#FCCHARSETMERGE 56356fc018e4Smrg 64. file:///tmp/html-6vSr2R#FCCHARSETHASCHAR 56366fc018e4Smrg 65. file:///tmp/html-6vSr2R#FCCHARSETCOUNT 56376fc018e4Smrg 66. file:///tmp/html-6vSr2R#FCCHARSETINTERSECTCOUNT 56386fc018e4Smrg 67. file:///tmp/html-6vSr2R#FCCHARSETSUBTRACTCOUNT 56396fc018e4Smrg 68. file:///tmp/html-6vSr2R#FCCHARSETISSUBSET 56406fc018e4Smrg 69. file:///tmp/html-6vSr2R#FCCHARSETFIRSTPAGE 56416fc018e4Smrg 70. file:///tmp/html-6vSr2R#FCCHARSETNEXTPAGE 56426fc018e4Smrg 71. file:///tmp/html-6vSr2R#FCCHARSETCOVERAGE 56436fc018e4Smrg 72. file:///tmp/html-6vSr2R#FCCHARSETNEW 56446fc018e4Smrg 73. file:///tmp/html-6vSr2R#FCLANGSETCREATE 56456fc018e4Smrg 74. file:///tmp/html-6vSr2R#FCLANGSETDESTROY 56466fc018e4Smrg 75. file:///tmp/html-6vSr2R#FCLANGSETCOPY 56476fc018e4Smrg 76. file:///tmp/html-6vSr2R#FCLANGSETADD 56486fc018e4Smrg 77. file:///tmp/html-6vSr2R#FCLANGSETDEL 56496fc018e4Smrg 78. file:///tmp/html-6vSr2R#FCLANGSETUNION 56506fc018e4Smrg 79. file:///tmp/html-6vSr2R#FCLANGSETSUBTRACT 56516fc018e4Smrg 80. file:///tmp/html-6vSr2R#FCLANGSETCOMPARE 56526fc018e4Smrg 81. file:///tmp/html-6vSr2R#FCLANGSETCONTAINS 56536fc018e4Smrg 82. file:///tmp/html-6vSr2R#FCLANGSETEQUAL 56546fc018e4Smrg 83. file:///tmp/html-6vSr2R#FCLANGSETHASH 56556fc018e4Smrg 84. file:///tmp/html-6vSr2R#FCLANGSETHASLANG 56566fc018e4Smrg 85. file:///tmp/html-6vSr2R#FCGETDEFAULTLANGS 56576fc018e4Smrg 86. file:///tmp/html-6vSr2R#FCGETLANGS 56586fc018e4Smrg 87. file:///tmp/html-6vSr2R#FCLANGNORMALIZE 56596fc018e4Smrg 88. file:///tmp/html-6vSr2R#FCLANGGETCHARSET 56606fc018e4Smrg 89. file:///tmp/html-6vSr2R#FCMATRIXINIT 56616fc018e4Smrg 90. file:///tmp/html-6vSr2R#FCMATRIXCOPY 56626fc018e4Smrg 91. file:///tmp/html-6vSr2R#FCMATRIXEQUAL 56636fc018e4Smrg 92. file:///tmp/html-6vSr2R#FCMATRIXMULTIPLY 56646fc018e4Smrg 93. file:///tmp/html-6vSr2R#FCMATRIXROTATE 56656fc018e4Smrg 94. file:///tmp/html-6vSr2R#FCMATRIXSCALE 56666fc018e4Smrg 95. file:///tmp/html-6vSr2R#FCMATRIXSHEAR 56676fc018e4Smrg 96. file:///tmp/html-6vSr2R#FCCONFIGCREATE 56686fc018e4Smrg 97. file:///tmp/html-6vSr2R#FCCONFIGREFERENCE 56696fc018e4Smrg 98. file:///tmp/html-6vSr2R#FCCONFIGDESTROY 56706fc018e4Smrg 99. file:///tmp/html-6vSr2R#FCCONFIGSETCURRENT 56716fc018e4Smrg 100. file:///tmp/html-6vSr2R#FCCONFIGGETCURRENT 56726fc018e4Smrg 101. file:///tmp/html-6vSr2R#FCCONFIGUPTODATE 56736fc018e4Smrg 102. file:///tmp/html-6vSr2R#FCCONFIGHOME 56746fc018e4Smrg 103. file:///tmp/html-6vSr2R#FCCONFIGENABLEHOME 56756fc018e4Smrg 104. file:///tmp/html-6vSr2R#FCCONFIGBUILDFONTS 56766fc018e4Smrg 105. file:///tmp/html-6vSr2R#FCCONFIGGETCONFIGDIRS 56776fc018e4Smrg 106. file:///tmp/html-6vSr2R#FCCONFIGGETFONTDIRS 56786fc018e4Smrg 107. file:///tmp/html-6vSr2R#FCCONFIGGETCONFIGFILES 56796fc018e4Smrg 108. file:///tmp/html-6vSr2R#FCCONFIGGETCACHE 56806fc018e4Smrg 109. file:///tmp/html-6vSr2R#FCCONFIGGETCACHEDIRS 56816fc018e4Smrg 110. file:///tmp/html-6vSr2R#FCCONFIGGETFONTS 56826fc018e4Smrg 111. file:///tmp/html-6vSr2R#FCCONFIGGETBLANKS 56836fc018e4Smrg 112. file:///tmp/html-6vSr2R#FCCONFIGGETRESCANINTERVAL 56846fc018e4Smrg 113. file:///tmp/html-6vSr2R#FCCONFIGSETRESCANINTERVAL 56856fc018e4Smrg 114. file:///tmp/html-6vSr2R#FCCONFIGAPPFONTADDFILE 56866fc018e4Smrg 115. file:///tmp/html-6vSr2R#FCCONFIGAPPFONTADDDIR 56876fc018e4Smrg 116. file:///tmp/html-6vSr2R#FCCONFIGAPPFONTCLEAR 56886fc018e4Smrg 117. file:///tmp/html-6vSr2R#FCCONFIGSUBSTITUTEWITHPAT 56896fc018e4Smrg 118. file:///tmp/html-6vSr2R#FCCONFIGSUBSTITUTE 56906fc018e4Smrg 119. file:///tmp/html-6vSr2R#FCFONTMATCH 56916fc018e4Smrg 120. file:///tmp/html-6vSr2R#FCFONTSORT 56926fc018e4Smrg 121. file:///tmp/html-6vSr2R#FCFONTRENDERPREPARE 56936fc018e4Smrg 122. file:///tmp/html-6vSr2R#FCFONTLIST 56946fc018e4Smrg 123. file:///tmp/html-6vSr2R#FCCONFIGFILENAME 56956fc018e4Smrg 124. file:///tmp/html-6vSr2R#FCCONFIGPARSEANDLOAD 56966fc018e4Smrg 125. file:///tmp/html-6vSr2R#FCCONFIGGETSYSROOT 56976fc018e4Smrg 126. file:///tmp/html-6vSr2R#FCCONFIGSETSYSROOT 56986fc018e4Smrg 127. file:///tmp/html-6vSr2R#FCNAMEREGISTEROBJECTTYPES 56996fc018e4Smrg 128. file:///tmp/html-6vSr2R#FCNAMEUNREGISTEROBJECTTYPES 57006fc018e4Smrg 129. file:///tmp/html-6vSr2R#FCNAMEGETOBJECTTYPE 57016fc018e4Smrg 130. file:///tmp/html-6vSr2R#FCNAMEREGISTERCONSTANTS 57026fc018e4Smrg 131. file:///tmp/html-6vSr2R#FCNAMEUNREGISTERCONSTANTS 57036fc018e4Smrg 132. file:///tmp/html-6vSr2R#FCNAMEGETCONSTANT 57046fc018e4Smrg 133. file:///tmp/html-6vSr2R#FCNAMECONSTANT 57056fc018e4Smrg 134. file:///tmp/html-6vSr2R#FCBLANKSCREATE 57066fc018e4Smrg 135. file:///tmp/html-6vSr2R#FCBLANKSDESTROY 57076fc018e4Smrg 136. file:///tmp/html-6vSr2R#FCBLANKSADD 57086fc018e4Smrg 137. file:///tmp/html-6vSr2R#FCBLANKSISMEMBER 57096fc018e4Smrg 138. file:///tmp/html-6vSr2R#FCATOMICCREATE 57106fc018e4Smrg 139. file:///tmp/html-6vSr2R#FCATOMICLOCK 57116fc018e4Smrg 140. file:///tmp/html-6vSr2R#FCATOMICNEWFILE 57126fc018e4Smrg 141. file:///tmp/html-6vSr2R#FCATOMICORIGFILE 57136fc018e4Smrg 142. file:///tmp/html-6vSr2R#FCATOMICREPLACEORIG 57146fc018e4Smrg 143. file:///tmp/html-6vSr2R#FCATOMICDELETENEW 57156fc018e4Smrg 144. file:///tmp/html-6vSr2R#FCATOMICUNLOCK 57166fc018e4Smrg 145. file:///tmp/html-6vSr2R#FCATOMICDESTROY 57176fc018e4Smrg 146. file:///tmp/html-6vSr2R#FCFILESCAN 57186fc018e4Smrg 147. file:///tmp/html-6vSr2R#FCFILEISDIR 57196fc018e4Smrg 148. file:///tmp/html-6vSr2R#FCDIRSCAN 57206fc018e4Smrg 149. file:///tmp/html-6vSr2R#FCDIRSAVE 57216fc018e4Smrg 150. file:///tmp/html-6vSr2R#FCDIRCACHEUNLINK 57226fc018e4Smrg 151. file:///tmp/html-6vSr2R#FCDIRCACHEVALID 57236fc018e4Smrg 152. file:///tmp/html-6vSr2R#FCDIRCACHELOAD 57246fc018e4Smrg 153. file:///tmp/html-6vSr2R#FCDIRCACHEREAD 57256fc018e4Smrg 154. file:///tmp/html-6vSr2R#FCDIRCACHELOADFILE 57266fc018e4Smrg 155. file:///tmp/html-6vSr2R#FCDIRCACHEUNLOAD 57276fc018e4Smrg 156. file:///tmp/html-6vSr2R#FCCACHEDIR 57286fc018e4Smrg 157. file:///tmp/html-6vSr2R#FCCACHECOPYSET 57296fc018e4Smrg 158. file:///tmp/html-6vSr2R#FCCACHESUBDIR 57306fc018e4Smrg 159. file:///tmp/html-6vSr2R#FCCACHENUMSUBDIR 57316fc018e4Smrg 160. file:///tmp/html-6vSr2R#FCCACHENUMFONT 57326fc018e4Smrg 161. file:///tmp/html-6vSr2R#FCDIRCACHECLEAN 57336fc018e4Smrg 162. file:///tmp/html-6vSr2R#FCCACHECREATETAGFILE 57346fc018e4Smrg 163. file:///tmp/html-6vSr2R#FCSTRSETCREATE 57356fc018e4Smrg 164. file:///tmp/html-6vSr2R#FCSTRSETMEMBER 57366fc018e4Smrg 165. file:///tmp/html-6vSr2R#FCSTRSETEQUAL 57376fc018e4Smrg 166. file:///tmp/html-6vSr2R#FCSTRSETADD 57386fc018e4Smrg 167. file:///tmp/html-6vSr2R#FCSTRSETADDFILENAME 57396fc018e4Smrg 168. file:///tmp/html-6vSr2R#FCSTRSETDEL 57406fc018e4Smrg 169. file:///tmp/html-6vSr2R#FCSTRSETDESTROY 57416fc018e4Smrg 170. file:///tmp/html-6vSr2R#FCSTRLISTCREATE 57426fc018e4Smrg 171. file:///tmp/html-6vSr2R#FCSTRLISTFIRST 57436fc018e4Smrg 172. file:///tmp/html-6vSr2R#FCSTRLISTNEXT 57446fc018e4Smrg 173. file:///tmp/html-6vSr2R#FCSTRLISTDONE 57456fc018e4Smrg 174. file:///tmp/html-6vSr2R#FCUTF8TOUCS4 57466fc018e4Smrg 175. file:///tmp/html-6vSr2R#FCUCS4TOUTF8 57476fc018e4Smrg 176. file:///tmp/html-6vSr2R#FCUTF8LEN 57486fc018e4Smrg 177. file:///tmp/html-6vSr2R#FCUTF16TOUCS4 57496fc018e4Smrg 178. file:///tmp/html-6vSr2R#FCUTF16LEN 57506fc018e4Smrg 179. file:///tmp/html-6vSr2R#FCISLOWER 57516fc018e4Smrg 180. file:///tmp/html-6vSr2R#FCISUPPER 57526fc018e4Smrg 181. file:///tmp/html-6vSr2R#FCTOLOWER 57536fc018e4Smrg 182. file:///tmp/html-6vSr2R#FCSTRCOPY 57546fc018e4Smrg 183. file:///tmp/html-6vSr2R#FCSTRDOWNCASE 57556fc018e4Smrg 184. file:///tmp/html-6vSr2R#FCSTRCOPYFILENAME 57566fc018e4Smrg 185. file:///tmp/html-6vSr2R#FCSTRCMP 57576fc018e4Smrg 186. file:///tmp/html-6vSr2R#FCSTRCMPIGNORECASE 57586fc018e4Smrg 187. file:///tmp/html-6vSr2R#FCSTRSTR 57596fc018e4Smrg 188. file:///tmp/html-6vSr2R#FCSTRSTRIGNORECASE 57606fc018e4Smrg 189. file:///tmp/html-6vSr2R#FCSTRPLUS 57616fc018e4Smrg 190. file:///tmp/html-6vSr2R#FCSTRFREE 57626fc018e4Smrg 191. file:///tmp/html-6vSr2R#FCSTRDIRNAME 57636fc018e4Smrg 192. file:///tmp/html-6vSr2R#FCSTRBASENAME 5764