fontconfig-devel.txt revision 2c393a42
12c393a42SmrgFontconfig Developers Reference, Version 2.6.0 22c393a42Smrg 32c393a42SmrgKeith Packard 42c393a42Smrg 52c393a42Smrg HP Cambridge Research Lab 62c393a42Smrg __________________________________________________________ 72c393a42Smrg 82c393a42Smrg Table of Contents 92c393a42Smrg 1. DESCRIPTION 102c393a42Smrg 2. FUNCTIONAL OVERVIEW 112c393a42Smrg 122c393a42Smrg 2.1. FONT CONFIGURATION 132c393a42Smrg 2.2. FONT PROPERTIES 142c393a42Smrg 152c393a42Smrg 3. Datatypes 162c393a42Smrg 172c393a42Smrg 3.1. FcChar8, FcChar16, FcChar32, FcBool 182c393a42Smrg 3.2. FcMatrix 192c393a42Smrg 3.3. FcCharSet 202c393a42Smrg 3.4. FcLangSet 212c393a42Smrg 3.5. FcLangResult 222c393a42Smrg 3.6. FcType 232c393a42Smrg 3.7. FcValue 242c393a42Smrg 3.8. FcPattern 252c393a42Smrg 3.9. FcFontSet 262c393a42Smrg 3.10. FcStrSet, FcStrList 272c393a42Smrg 3.11. FcObjectSet 282c393a42Smrg 3.12. FcObjectType 292c393a42Smrg 3.13. FcConstant 302c393a42Smrg 3.14. FcBlanks 312c393a42Smrg 3.15. FcFileCache 322c393a42Smrg 3.16. FcConfig 332c393a42Smrg 3.17. FcSetName 342c393a42Smrg 3.18. FcResult 352c393a42Smrg 3.19. FcAtomic 362c393a42Smrg 3.20. FcCache 372c393a42Smrg 382c393a42Smrg 4. FUNCTIONS 392c393a42Smrg 402c393a42Smrg 4.1. Initialization 412c393a42Smrg 422c393a42Smrg FcInitLoadConfig -- load configuration 432c393a42Smrg FcInitLoadConfigAndFonts -- load configuration and 442c393a42Smrg font data 452c393a42Smrg 462c393a42Smrg FcInit -- initialize fontconfig library 472c393a42Smrg FcFini -- finalize fonconfig library 482c393a42Smrg FcGetVersion -- library version number 492c393a42Smrg FcInitReinitialize -- re-initialize library 502c393a42Smrg FcInitBringUptoDate -- reload configuration files if 512c393a42Smrg needed 522c393a42Smrg 532c393a42Smrg 4.2. FcPattern 542c393a42Smrg 552c393a42Smrg FcPatternCreate -- Create a pattern 562c393a42Smrg FcPatternDuplicate -- Copy a pattern 572c393a42Smrg FcPatternReference -- Increment pattern reference 582c393a42Smrg count 592c393a42Smrg 602c393a42Smrg FcPatternDestroy -- Destroy a pattern 612c393a42Smrg FcPatternEqual -- Compare patterns 622c393a42Smrg FcPatternEqualSubset -- Compare portions of patterns 632c393a42Smrg FcPatternHash -- Compute a pattern hash value 642c393a42Smrg FcPatternAdd -- Add a value to a pattern 652c393a42Smrg FcPatternAddWeak -- Add a value to a pattern with 662c393a42Smrg weak binding 672c393a42Smrg 682c393a42Smrg FcPatternAdd-Type -- Add a typed value to a pattern 692c393a42Smrg FcPatternGet -- Return a value from a pattern 702c393a42Smrg FcPatternGet-Type -- Return a typed value from a 712c393a42Smrg pattern 722c393a42Smrg 732c393a42Smrg FcPatternBuild -- Create patterns from arguments 742c393a42Smrg FcPatternDel -- Delete a property from a pattern 752c393a42Smrg FcPatternRemove -- Remove one object of the 762c393a42Smrg specified type from the pattern 772c393a42Smrg 782c393a42Smrg FcPatternPrint -- Print a pattern for debugging 792c393a42Smrg FcDefaultSubstitute -- Perform default substitutions 802c393a42Smrg in a pattern 812c393a42Smrg 822c393a42Smrg FcNameParse -- Parse a pattern string 832c393a42Smrg FcNameUnparse -- Convert a pattern back into a 842c393a42Smrg string that can be parsed 852c393a42Smrg 862c393a42Smrg 4.3. FcFontSet 872c393a42Smrg 882c393a42Smrg FcFontSetCreate -- Create a font set 892c393a42Smrg FcFontSetDestroy -- Destroy a font set 902c393a42Smrg FcFontSetAdd -- Add to a font set 912c393a42Smrg FcFontSetList -- List fonts from a set of font sets 922c393a42Smrg FcFontSetMatch -- Return the best font from a set of 932c393a42Smrg font sets 942c393a42Smrg 952c393a42Smrg FcFontSetPrint -- Print a set of patterns to stdout 962c393a42Smrg FcFontSetSort -- Add to a font set 972c393a42Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font 982c393a42Smrg set 992c393a42Smrg 1002c393a42Smrg 4.4. FcObjectSet 1012c393a42Smrg 1022c393a42Smrg FcObjectSetCreate -- Create an object set 1032c393a42Smrg FcObjectSetAdd -- Add to an object set 1042c393a42Smrg FcObjectSetDestroy -- Destroy an object set 1052c393a42Smrg FcObjectSetBuild -- Build object set from args 1062c393a42Smrg 1072c393a42Smrg 4.5. FreeType specific functions 1082c393a42Smrg 1092c393a42Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 1102c393a42Smrg FcFreeTypeCharSet -- compute unicode coverage 1112c393a42Smrg FcFreeTypeCharSetAndSpacing -- compute unicode 1122c393a42Smrg coverage and spacing type 1132c393a42Smrg 1142c393a42Smrg FcFreeTypeQuery -- compute pattern from font file 1152c393a42Smrg (and index) 1162c393a42Smrg 1172c393a42Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 1182c393a42Smrg 1192c393a42Smrg 4.6. FcValue 1202c393a42Smrg 1212c393a42Smrg FcValueDestroy -- Free a value 1222c393a42Smrg FcValueSave -- Copy a value 1232c393a42Smrg FcValuePrint -- Print a value to stdout 1242c393a42Smrg FcValueEqual -- Test two values for equality 1252c393a42Smrg 1262c393a42Smrg 4.7. FcCharSet 1272c393a42Smrg 1282c393a42Smrg FcCharSetCreate -- Create an empty character set 1292c393a42Smrg FcCharSetDestroy -- Destroy a character set 1302c393a42Smrg FcCharSetAddChar -- Add a character to a charset 1312c393a42Smrg FcCharSetCopy -- Copy a charset 1322c393a42Smrg FcCharSetEqual -- Compare two charsets 1332c393a42Smrg FcCharSetIntersect -- Intersect charsets 1342c393a42Smrg FcCharSetUnion -- Add charsets 1352c393a42Smrg FcCharSetSubtract -- Subtract charsets 1362c393a42Smrg FcCharSetHasChar -- Check a charset for a char 1372c393a42Smrg FcCharSetCount -- Count entries in a charset 1382c393a42Smrg FcCharSetIntersectCount -- Intersect and count 1392c393a42Smrg charsets 1402c393a42Smrg 1412c393a42Smrg FcCharSetSubtractCount -- Subtract and count 1422c393a42Smrg charsets 1432c393a42Smrg 1442c393a42Smrg FcCharSetIsSubset -- Test for charset inclusion 1452c393a42Smrg FcCharSetFirstPage -- Start enumerating charset 1462c393a42Smrg contents 1472c393a42Smrg 1482c393a42Smrg FcCharSetNextPage -- Continue enumerating charset 1492c393a42Smrg contents 1502c393a42Smrg 1512c393a42Smrg FcCharSetCoverage -- DEPRECATED return coverage for 1522c393a42Smrg a Unicode page 1532c393a42Smrg 1542c393a42Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 1552c393a42Smrg 1562c393a42Smrg 4.8. FcLangSet 1572c393a42Smrg 1582c393a42Smrg FcLangSetCreate -- create a langset object 1592c393a42Smrg FcLangSetDestroy -- destroy a langset object 1602c393a42Smrg FcLangSetCopy -- copy a langset object 1612c393a42Smrg FcLangSetAdd -- add a language to a langset 1622c393a42Smrg FcLangSetCompare -- compare language sets 1632c393a42Smrg FcLangSetContains -- check langset subset relation 1642c393a42Smrg FcLangSetEqual -- test for matching langsets 1652c393a42Smrg FcLangSetHash -- return a hash value for a langset 1662c393a42Smrg FcLangSetHasLang -- test langset for language 1672c393a42Smrg support 1682c393a42Smrg 1692c393a42Smrg FcGetLangs -- Get list of languages 1702c393a42Smrg FcLangGetCharSet -- Get character map for a language 1712c393a42Smrg 1722c393a42Smrg 4.9. FcMatrix 1732c393a42Smrg 1742c393a42Smrg FcMatrixInit -- initialize an FcMatrix structure 1752c393a42Smrg FcMatrixCopy -- Copy a matrix 1762c393a42Smrg FcMatrixEqual -- Compare two matrices 1772c393a42Smrg FcMatrixMultiply -- Multiply matrices 1782c393a42Smrg FcMatrixRotate -- Rotate a matrix 1792c393a42Smrg FcMatrixScale -- Scale a matrix 1802c393a42Smrg FcMatrixShear -- Shear a matrix 1812c393a42Smrg 1822c393a42Smrg 4.10. FcConfig 1832c393a42Smrg 1842c393a42Smrg FcConfigCreate -- Create a configuration 1852c393a42Smrg FcConfigDestroy -- Destroy a configuration 1862c393a42Smrg FcConfigSetCurrent -- Set configuration as default 1872c393a42Smrg FcConfigGetCurrent -- Return current configuration 1882c393a42Smrg FcConfigUptoDate -- Check timestamps on config files 1892c393a42Smrg FcConfigHome -- return the current home directory. 1902c393a42Smrg FcConfigEnableHome -- controls use of the home 1912c393a42Smrg directory. 1922c393a42Smrg 1932c393a42Smrg FcConfigBuildFonts -- Build font database 1942c393a42Smrg FcConfigGetConfigDirs -- Get config directories 1952c393a42Smrg FcConfigGetFontDirs -- Get font directories 1962c393a42Smrg FcConfigGetConfigFiles -- Get config files 1972c393a42Smrg FcConfigGetCache -- DEPRECATED used to return 1982c393a42Smrg per-user cache filename 1992c393a42Smrg 2002c393a42Smrg FcConfigGetCacheDirs -- return the list of 2012c393a42Smrg directories searched for cache files 2022c393a42Smrg 2032c393a42Smrg FcConfigGetFonts -- Get config font set 2042c393a42Smrg FcConfigGetBlanks -- Get config blanks 2052c393a42Smrg FcConfigGetRescanInterval -- Get config rescan 2062c393a42Smrg interval 2072c393a42Smrg 2082c393a42Smrg FcConfigSetRescanInterval -- Set config rescan 2092c393a42Smrg interval 2102c393a42Smrg 2112c393a42Smrg FcConfigAppFontAddFile -- Add font file to font 2122c393a42Smrg database 2132c393a42Smrg 2142c393a42Smrg FcConfigAppFontAddDir -- Add fonts from directory to 2152c393a42Smrg font database 2162c393a42Smrg 2172c393a42Smrg FcConfigAppFontClear -- Remove all app fonts from 2182c393a42Smrg font database 2192c393a42Smrg 2202c393a42Smrg FcConfigSubstituteWithPat -- Execute substitutions 2212c393a42Smrg FcConfigSubstitute -- Execute substitutions 2222c393a42Smrg FcFontMatch -- Return best font 2232c393a42Smrg FcFontSort -- Return list of matching fonts 2242c393a42Smrg FcFontRenderPrepare -- Prepare pattern for loading 2252c393a42Smrg font file 2262c393a42Smrg 2272c393a42Smrg FcFontList -- List fonts 2282c393a42Smrg FcConfigFilename -- Find a config file 2292c393a42Smrg FcConfigParseAndLoad -- load a configuration file 2302c393a42Smrg 2312c393a42Smrg 4.11. FcObjectType 2322c393a42Smrg 2332c393a42Smrg FcNameRegisterObjectTypes -- Register object types 2342c393a42Smrg FcNameUnregisterObjectTypes -- Unregister object 2352c393a42Smrg types 2362c393a42Smrg 2372c393a42Smrg FcNameGetObjectType -- Lookup an object type 2382c393a42Smrg 2392c393a42Smrg 4.12. FcConstant 2402c393a42Smrg 2412c393a42Smrg FcNameRegisterConstants -- Register symbolic 2422c393a42Smrg constants 2432c393a42Smrg 2442c393a42Smrg FcNameUnregisterConstants -- Unregister symbolic 2452c393a42Smrg constants 2462c393a42Smrg 2472c393a42Smrg FcNameGetConstant -- Lookup symbolic constant 2482c393a42Smrg FcNameConstant -- Get the value for a symbolic 2492c393a42Smrg constant 2502c393a42Smrg 2512c393a42Smrg 4.13. FcBlanks 2522c393a42Smrg 2532c393a42Smrg FcBlanksCreate -- Create an FcBlanks 2542c393a42Smrg FcBlanksDestroy -- Destroy and FcBlanks 2552c393a42Smrg FcBlanksAdd -- Add a character to an FcBlanks 2562c393a42Smrg FcBlanksIsMember -- Query membership in an FcBlanks 2572c393a42Smrg 2582c393a42Smrg 4.14. FcAtomic 2592c393a42Smrg 2602c393a42Smrg FcAtomicCreate -- create an FcAtomic object 2612c393a42Smrg FcAtomicLock -- lock a file 2622c393a42Smrg FcAtomicNewFile -- return new temporary file name 2632c393a42Smrg FcAtomicOrigFile -- return original file name 2642c393a42Smrg FcAtomicReplaceOrig -- replace original with new 2652c393a42Smrg FcAtomicDeleteNew -- delete new file 2662c393a42Smrg FcAtomicUnlock -- unlock a file 2672c393a42Smrg FcAtomicDestroy -- destroy an FcAtomic object 2682c393a42Smrg 2692c393a42Smrg 4.15. File and Directory routines 2702c393a42Smrg 2712c393a42Smrg FcFileScan -- scan a font file 2722c393a42Smrg FcFileIsDir -- check whether a file is a directory 2732c393a42Smrg FcDirScan -- DEPRECATED: formerly used to scan a 2742c393a42Smrg font directory 2752c393a42Smrg 2762c393a42Smrg FcDirSave -- DEPRECATED: formerly used to save a 2772c393a42Smrg directory cache 2782c393a42Smrg 2792c393a42Smrg FcDirCacheUnlink -- Remove all caches related to dir 2802c393a42Smrg FcDirCacheValid -- check directory cache 2812c393a42Smrg FcDirCacheLoad -- load a directory cache 2822c393a42Smrg FcDirCacheRead -- read or construct a directory 2832c393a42Smrg cache 2842c393a42Smrg 2852c393a42Smrg FcDirCacheLoadFile -- load a cache file 2862c393a42Smrg FcDirCacheUnload -- unload a cache file 2872c393a42Smrg 2882c393a42Smrg 4.16. FcCache routines 2892c393a42Smrg 2902c393a42Smrg FcCacheDir -- Return directory of cache 2912c393a42Smrg FcCacheCopySet -- Returns a copy of the fontset from 2922c393a42Smrg cache 2932c393a42Smrg 2942c393a42Smrg FcCacheSubdir -- Return the i'th subdirectory. 2952c393a42Smrg FcCacheNumSubdir -- Return the number of 2962c393a42Smrg subdirectories in cache. 2972c393a42Smrg 2982c393a42Smrg FcCacheNumFont -- Returns the number of fonts in 2992c393a42Smrg cache. 3002c393a42Smrg 3012c393a42Smrg 4.17. FcStrSet and FcStrList 3022c393a42Smrg 3032c393a42Smrg FcStrSetCreate -- create a string set 3042c393a42Smrg FcStrSetMember -- check set for membership 3052c393a42Smrg FcStrSetEqual -- check sets for equality 3062c393a42Smrg FcStrSetAdd -- add to a string set 3072c393a42Smrg FcStrSetAddFilename -- add a filename to a string 3082c393a42Smrg set 3092c393a42Smrg 3102c393a42Smrg FcStrSetDel -- delete from a string set 3112c393a42Smrg FcStrSetDestroy -- destroy a string set 3122c393a42Smrg FcStrListCreate -- create a string iterator 3132c393a42Smrg FcStrListNext -- get next string in iteration 3142c393a42Smrg FcStrListDone -- destroy a string iterator 3152c393a42Smrg 3162c393a42Smrg 4.18. String utilities 3172c393a42Smrg 3182c393a42Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 3192c393a42Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 3202c393a42Smrg FcUtf8Len -- count UTF-8 encoded chars 3212c393a42Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 3222c393a42Smrg FcUtf16Len -- count UTF-16 encoded chars 3232c393a42Smrg FcIsLower -- check for lower case ASCII character 3242c393a42Smrg FcIsUpper -- check for upper case ASCII character 3252c393a42Smrg FcToLower -- convert upper case ASCII to lower case 3262c393a42Smrg FcStrCopy -- duplicate a string 3272c393a42Smrg FcStrDowncase -- create a lower case translation of 3282c393a42Smrg a string 3292c393a42Smrg 3302c393a42Smrg FcStrCopyFilename -- create a complete path from a 3312c393a42Smrg filename 3322c393a42Smrg 3332c393a42Smrg FcStrCmp -- compare UTF-8 strings 3342c393a42Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring 3352c393a42Smrg case 3362c393a42Smrg 3372c393a42Smrg FcStrStr -- locate UTF-8 substring 3382c393a42Smrg FcStrStrIgnoreCase -- locate UTF-8 substring 3392c393a42Smrg ignoring ASCII case 3402c393a42Smrg 3412c393a42Smrg FcStrPlus -- concatenate two strings 3422c393a42Smrg FcStrFree -- free a string 3432c393a42Smrg FcStrDirname -- directory part of filename 3442c393a42Smrg FcStrBasename -- last component of filename 3452c393a42Smrg 3462c393a42Smrg1. DESCRIPTION 3472c393a42Smrg 3482c393a42Smrg Fontconfig is a library designed to provide system-wide font 3492c393a42Smrg configuration, customization and application access. 3502c393a42Smrg __________________________________________________________ 3512c393a42Smrg 3522c393a42Smrg2. FUNCTIONAL OVERVIEW 3532c393a42Smrg 3542c393a42Smrg Fontconfig contains two essential modules, the configuration 3552c393a42Smrg module which builds an internal configuration from XML files 3562c393a42Smrg and the matching module which accepts font patterns and returns 3572c393a42Smrg the nearest matching font. 3582c393a42Smrg __________________________________________________________ 3592c393a42Smrg 3602c393a42Smrg2.1. FONT CONFIGURATION 3612c393a42Smrg 3622c393a42Smrg The configuration module consists of the FcConfig datatype, 3632c393a42Smrg libexpat and FcConfigParse which walks over an XML tree and 3642c393a42Smrg ammends a configuration with data found within. From an 3652c393a42Smrg external perspective, configuration of the library consists of 3662c393a42Smrg generating a valid XML tree and feeding that to FcConfigParse. 3672c393a42Smrg The only other mechanism provided to applications for changing 3682c393a42Smrg the running configuration is to add fonts and directories to 3692c393a42Smrg the list of application-provided font files. 3702c393a42Smrg 3712c393a42Smrg The intent is to make font configurations relatively static, 3722c393a42Smrg and shared by as many applications as possible. It is hoped 3732c393a42Smrg that this will lead to more stable font selection when passing 3742c393a42Smrg names from one application to another. XML was chosen as a 3752c393a42Smrg configuration file format because it provides a format which is 3762c393a42Smrg easy for external agents to edit while retaining the correct 3772c393a42Smrg structure and syntax. 3782c393a42Smrg 3792c393a42Smrg Font configuration is separate from font matching; applications 3802c393a42Smrg needing to do their own matching can access the available fonts 3812c393a42Smrg from the library and perform private matching. The intent is to 3822c393a42Smrg permit applications to pick and choose appropriate 3832c393a42Smrg functionality from the library instead of forcing them to 3842c393a42Smrg choose between this library and a private configuration 3852c393a42Smrg mechanism. The hope is that this will ensure that configuration 3862c393a42Smrg of fonts for all applications can be centralized in one place. 3872c393a42Smrg Centralizing font configuration will simplify and regularize 3882c393a42Smrg font installation and customization. 3892c393a42Smrg __________________________________________________________ 3902c393a42Smrg 3912c393a42Smrg2.2. FONT PROPERTIES 3922c393a42Smrg 3932c393a42Smrg While font patterns may contain essentially any properties, 3942c393a42Smrg there are some well known properties with associated types. 3952c393a42Smrg Fontconfig uses some of these properties for font matching and 3962c393a42Smrg font completion. Others are provided as a convenience for the 3972c393a42Smrg applications rendering mechanism. 3982c393a42Smrg Property Definitions 3992c393a42Smrg 4002c393a42Smrg Property CPP Symbol Type Description 4012c393a42Smrg ---------------------------------------------------- 4022c393a42Smrg family FC_FAMILY String Font family names 4032c393a42Smrg familylang FC_FAMILYLANG String Language cooresponding t 4042c393a42Smrgo 4052c393a42Smrg each family name 4062c393a42Smrg style FC_STYLE String Font style. Overrides we 4072c393a42Smrgight 4082c393a42Smrg and slant 4092c393a42Smrg stylelang FC_STYLELANG String Language cooresponding t 4102c393a42Smrgo 4112c393a42Smrg each style name 4122c393a42Smrg fullname FC_FULLNAME String Font face full name wher 4132c393a42Smrge 4142c393a42Smrg different from family an 4152c393a42Smrgd 4162c393a42Smrg family + style 4172c393a42Smrg fullnamelang FC_FULLNAMELANG String Language cooresponding t 4182c393a42Smrgo 4192c393a42Smrg each fullname 4202c393a42Smrg slant FC_SLANT Int Italic, oblique or roman 4212c393a42Smrg weight FC_WEIGHT Int Light, medium, demibold, 4222c393a42Smrg bold or black 4232c393a42Smrg size FC_SIZE Double Point size 4242c393a42Smrg width FC_WIDTH Int Condensed, normal or exp 4252c393a42Smrganded 4262c393a42Smrg aspect FC_ASPECT Double Stretches glyphs horizon 4272c393a42Smrgtally 4282c393a42Smrg before hinting 4292c393a42Smrg pixelsize FC_PIXEL_SIZE Double Pixel size 4302c393a42Smrg spacing FC_SPACING Int Proportional, dual-width 4312c393a42Smrg, 4322c393a42Smrg monospace or charcell 4332c393a42Smrg foundry FC_FOUNDRY String Font foundry name 4342c393a42Smrg antialias FC_ANTIALIAS Bool Whether glyphs can be 4352c393a42Smrg antialiased 4362c393a42Smrg hinting FC_HINTING Bool Whether the rasterizer s 4372c393a42Smrghould 4382c393a42Smrg use hinting 4392c393a42Smrg hintstyle FC_HINT_STYLE Int Automatic hinting style 4402c393a42Smrg verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 4412c393a42Smrg autohint FC_AUTOHINT Bool Use autohinter instead o 4422c393a42Smrgf 4432c393a42Smrg normal hinter 4442c393a42Smrg globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance 4452c393a42Smrgdata 4462c393a42Smrg file FC_FILE String The filename holding the 4472c393a42Smrg font 4482c393a42Smrg index FC_INDEX Int The index of the font wi 4492c393a42Smrgthin 4502c393a42Smrg the file 4512c393a42Smrg ftface FC_FT_FACE FT_Face Use the specified FreeTy 4522c393a42Smrgpe 4532c393a42Smrg face object 4542c393a42Smrg rasterizer FC_RASTERIZER String Which rasterizer is in u 4552c393a42Smrgse 4562c393a42Smrg outline FC_OUTLINE Bool Whether the glyphs are o 4572c393a42Smrgutlines 4582c393a42Smrg scalable FC_SCALABLE Bool Whether glyphs can be sc 4592c393a42Smrgaled 4602c393a42Smrg scale FC_SCALE Double Scale factor for point-> 4612c393a42Smrgpixel 4622c393a42Smrg conversions 4632c393a42Smrg dpi FC_DPI Double Target dots per inch 4642c393a42Smrg rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 4652c393a42Smrg vbgr, none - subpixel ge 4662c393a42Smrgometry 4672c393a42Smrg lcdfilter FC_LCD_FILTER Int Type of LCD filter 4682c393a42Smrg minspace FC_MINSPACE Bool Eliminate leading from l 4692c393a42Smrgine 4702c393a42Smrg spacing 4712c393a42Smrg charset FC_CHARSET CharSet Unicode chars encoded by 4722c393a42Smrg the font 4732c393a42Smrg lang FC_LANG LangSet Set of RFC-3066-style 4742c393a42Smrg languages this font supp 4752c393a42Smrgorts 4762c393a42Smrg fontversion FC_FONTVERSION Int Version number of the fo 4772c393a42Smrgnt 4782c393a42Smrg capability FC_CAPABILITY String List of layout capabilit 4792c393a42Smrgies in 4802c393a42Smrg the font 4812c393a42Smrg embolden FC_EMBOLDEN Bool Rasterizer should 4822c393a42Smrg synthetically embolden t 4832c393a42Smrghe font 4842c393a42Smrg __________________________________________________________ 4852c393a42Smrg 4862c393a42Smrg3. Datatypes 4872c393a42Smrg 4882c393a42Smrg Fontconfig uses abstract datatypes to hide internal 4892c393a42Smrg implementation details for most data structures. A few 4902c393a42Smrg structures are exposed where appropriate. 4912c393a42Smrg __________________________________________________________ 4922c393a42Smrg 4932c393a42Smrg3.1. FcChar8, FcChar16, FcChar32, FcBool 4942c393a42Smrg 4952c393a42Smrg These are primitive datatypes; the FcChar* types hold precisely 4962c393a42Smrg the number of bits stated (if supported by the C 4972c393a42Smrg implementation). FcBool holds one of two CPP symbols: FcFalse 4982c393a42Smrg or FcTrue. 4992c393a42Smrg __________________________________________________________ 5002c393a42Smrg 5012c393a42Smrg3.2. FcMatrix 5022c393a42Smrg 5032c393a42Smrg An FcMatrix holds an affine transformation, usually used to 5042c393a42Smrg reshape glyphs. A small set of matrix operations are provided 5052c393a42Smrg to manipulate these. 5062c393a42Smrg typedef struct _FcMatrix { 5072c393a42Smrg double xx, xy, yx, yy; 5082c393a42Smrg } FcMatrix; 5092c393a42Smrg __________________________________________________________ 5102c393a42Smrg 5112c393a42Smrg3.3. FcCharSet 5122c393a42Smrg 5132c393a42Smrg An FcCharSet is an abstract type that holds the set of encoded 5142c393a42Smrg unicode chars in a font. Operations to build and compare these 5152c393a42Smrg sets are provided. 5162c393a42Smrg __________________________________________________________ 5172c393a42Smrg 5182c393a42Smrg3.4. FcLangSet 5192c393a42Smrg 5202c393a42Smrg An FcLangSet is an abstract type that holds the set of 5212c393a42Smrg languages supported by a font. Operations to build and compare 5222c393a42Smrg these sets are provided. These are computed for a font based on 5232c393a42Smrg orthographic information built into the fontconfig library. 5242c393a42Smrg Fontconfig has orthographies for all of the ISO 639-1 languages 5252c393a42Smrg except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. 5262c393a42Smrg If you have orthographic information for any of these 5272c393a42Smrg languages, please submit them. 5282c393a42Smrg __________________________________________________________ 5292c393a42Smrg 5302c393a42Smrg3.5. FcLangResult 5312c393a42Smrg 5322c393a42Smrg An FcLangResult is an enumeration used to return the results of 5332c393a42Smrg comparing two language strings or FcLangSet objects. 5342c393a42Smrg FcLangEqual means the objects match language and territory. 5352c393a42Smrg FcLangDifferentTerritory means the objects match in language 5362c393a42Smrg but differ in territory. FcLangDifferentLang means the objects 5372c393a42Smrg differ in language. 5382c393a42Smrg __________________________________________________________ 5392c393a42Smrg 5402c393a42Smrg3.6. FcType 5412c393a42Smrg 5422c393a42Smrg Tags the kind of data stored in an FcValue. 5432c393a42Smrg __________________________________________________________ 5442c393a42Smrg 5452c393a42Smrg3.7. FcValue 5462c393a42Smrg 5472c393a42Smrg An FcValue object holds a single value with one of a number of 5482c393a42Smrg different types. The 'type' tag indicates which member is 5492c393a42Smrg valid. 5502c393a42Smrg typedef struct _FcValue { 5512c393a42Smrg FcType type; 5522c393a42Smrg union { 5532c393a42Smrg const FcChar8 *s; 5542c393a42Smrg int i; 5552c393a42Smrg FcBool b; 5562c393a42Smrg double d; 5572c393a42Smrg const FcMatrix *m; 5582c393a42Smrg const FcCharSet *c; 5592c393a42Smrg void *f; 5602c393a42Smrg const FcLangSet *l; 5612c393a42Smrg } u; 5622c393a42Smrg } FcValue; 5632c393a42Smrg 5642c393a42Smrg FcValue Members 5652c393a42Smrg 5662c393a42Smrg Type Union member Datatype 5672c393a42Smrg -------------------------------- 5682c393a42Smrg FcTypeVoid (none) (none) 5692c393a42Smrg FcTypeInteger i int 5702c393a42Smrg FcTypeDouble d double 5712c393a42Smrg FcTypeString s FcChar8 * 5722c393a42Smrg FcTypeBool b b 5732c393a42Smrg FcTypeMatrix m FcMatrix * 5742c393a42Smrg FcTypeCharSet c FcCharSet * 5752c393a42Smrg FcTypeFTFace f void * (FT_Face) 5762c393a42Smrg FcTypeLangSet l FcLangSet * 5772c393a42Smrg __________________________________________________________ 5782c393a42Smrg 5792c393a42Smrg3.8. FcPattern 5802c393a42Smrg 5812c393a42Smrg holds a set of names with associated value lists; each name 5822c393a42Smrg refers to a property of a font. FcPatterns are used as inputs 5832c393a42Smrg to the matching code as well as holding information about 5842c393a42Smrg specific fonts. Each property can hold one or more values; 5852c393a42Smrg conventionally all of the same type, although the interface 5862c393a42Smrg doesn't demand that. 5872c393a42Smrg __________________________________________________________ 5882c393a42Smrg 5892c393a42Smrg3.9. FcFontSet 5902c393a42Smrg 5912c393a42Smrg typedef struct _FcFontSet { 5922c393a42Smrg int nfont; 5932c393a42Smrg int sfont; 5942c393a42Smrg FcPattern **fonts; 5952c393a42Smrg } FcFontSet; 5962c393a42Smrg 5972c393a42Smrg An FcFontSet contains a list of FcPatterns. Internally 5982c393a42Smrg fontconfig uses this data structure to hold sets of fonts. 5992c393a42Smrg Externally, fontconfig returns the results of listing fonts in 6002c393a42Smrg this format. 'nfont' holds the number of patterns in the 6012c393a42Smrg 'fonts' array; 'sfont' is used to indicate the size of that 6022c393a42Smrg array. 6032c393a42Smrg __________________________________________________________ 6042c393a42Smrg 6052c393a42Smrg3.10. FcStrSet, FcStrList 6062c393a42Smrg 6072c393a42Smrg FcStrSet holds a list of strings that can be appended to and 6082c393a42Smrg enumerated. Its unique characteristic is that the enumeration 6092c393a42Smrg works even while strings are appended during enumeration. 6102c393a42Smrg FcStrList is used during enumeration to safely and correctly 6112c393a42Smrg walk the list of strings even while that list is edited in the 6122c393a42Smrg middle of enumeration. 6132c393a42Smrg __________________________________________________________ 6142c393a42Smrg 6152c393a42Smrg3.11. FcObjectSet 6162c393a42Smrg 6172c393a42Smrg typedef struct _FcObjectSet { 6182c393a42Smrg int nobject; 6192c393a42Smrg int sobject; 6202c393a42Smrg const char **objects; 6212c393a42Smrg } FcObjectSet; 6222c393a42Smrg 6232c393a42Smrg holds a set of names and is used to specify which fields from 6242c393a42Smrg fonts are placed in the the list of returned patterns when 6252c393a42Smrg listing fonts. 6262c393a42Smrg __________________________________________________________ 6272c393a42Smrg 6282c393a42Smrg3.12. FcObjectType 6292c393a42Smrg 6302c393a42Smrg typedef struct _FcObjectType { 6312c393a42Smrg const char *object; 6322c393a42Smrg FcType type; 6332c393a42Smrg } FcObjectType; 6342c393a42Smrg 6352c393a42Smrg marks the type of a pattern element generated when parsing font 6362c393a42Smrg names. Applications can add new object types so that font names 6372c393a42Smrg may contain the new elements. 6382c393a42Smrg __________________________________________________________ 6392c393a42Smrg 6402c393a42Smrg3.13. FcConstant 6412c393a42Smrg 6422c393a42Smrg typedef struct _FcConstant { 6432c393a42Smrg const FcChar8 *name; 6442c393a42Smrg const char *object; 6452c393a42Smrg int value; 6462c393a42Smrg } FcConstant; 6472c393a42Smrg 6482c393a42Smrg Provides for symbolic constants for new pattern elements. When 6492c393a42Smrg 'name' is seen in a font name, an 'object' element is created 6502c393a42Smrg with value 'value'. 6512c393a42Smrg __________________________________________________________ 6522c393a42Smrg 6532c393a42Smrg3.14. FcBlanks 6542c393a42Smrg 6552c393a42Smrg holds a list of Unicode chars which are expected to be blank; 6562c393a42Smrg unexpectedly blank chars are assumed to be invalid and are 6572c393a42Smrg elided from the charset associated with the font. 6582c393a42Smrg __________________________________________________________ 6592c393a42Smrg 6602c393a42Smrg3.15. FcFileCache 6612c393a42Smrg 6622c393a42Smrg holds the per-user cache information for use while loading the 6632c393a42Smrg font database. This is built automatically for the current 6642c393a42Smrg configuration when that is loaded. Applications must always 6652c393a42Smrg pass '0' when one is requested. 6662c393a42Smrg __________________________________________________________ 6672c393a42Smrg 6682c393a42Smrg3.16. FcConfig 6692c393a42Smrg 6702c393a42Smrg holds a complete configuration of the library; there is one 6712c393a42Smrg default configuration, other can be constructed from XML data 6722c393a42Smrg structures. All public entry points that need global data can 6732c393a42Smrg take an optional FcConfig* argument; passing 0 uses the default 6742c393a42Smrg configuration. FcConfig objects hold two sets of fonts, the 6752c393a42Smrg first contains those specified by the configuration, the second 6762c393a42Smrg set holds those added by the application at run-time. 6772c393a42Smrg Interfaces that need to reference a particulat set use one of 6782c393a42Smrg the FcSetName enumerated values. 6792c393a42Smrg __________________________________________________________ 6802c393a42Smrg 6812c393a42Smrg3.17. FcSetName 6822c393a42Smrg 6832c393a42Smrg Specifies one of the two sets of fonts available in a 6842c393a42Smrg configuration; FcSetSystem for those fonts specified in the 6852c393a42Smrg configuration and FcSetApplication which holds fonts provided 6862c393a42Smrg by the application. 6872c393a42Smrg __________________________________________________________ 6882c393a42Smrg 6892c393a42Smrg3.18. FcResult 6902c393a42Smrg 6912c393a42Smrg Used as a return type for functions manipulating FcPattern 6922c393a42Smrg objects. 6932c393a42Smrg FcResult Values 6942c393a42Smrg Result Code Meaning 6952c393a42Smrg ----------------------------------------------------------- 6962c393a42Smrg FcResultMatch Object exists with the specified ID 6972c393a42Smrg FcResultNoMatch Object doesn't exist at all 6982c393a42Smrg FcResultTypeMismatch Object exists, but the type doesn't matc 6992c393a42Smrgh 7002c393a42Smrg FcResultNoId Object exists, but has fewer values 7012c393a42Smrg than specified 7022c393a42Smrg FcResultOutOfMemory Malloc failed 7032c393a42Smrg __________________________________________________________ 7042c393a42Smrg 7052c393a42Smrg3.19. FcAtomic 7062c393a42Smrg 7072c393a42Smrg Used for locking access to config files. Provides a safe way to 7082c393a42Smrg update configuration files. 7092c393a42Smrg __________________________________________________________ 7102c393a42Smrg 7112c393a42Smrg3.20. FcCache 7122c393a42Smrg 7132c393a42Smrg Holds information about the fonts contained in a single 7142c393a42Smrg directory. Normal applications need not worry about this as 7152c393a42Smrg caches for font access are automatically managed by the 7162c393a42Smrg library. Applications dealing with cache management may want to 7172c393a42Smrg use some of these objects in their work, however the included 7182c393a42Smrg 'fc-cache' program generally suffices for all of that. 7192c393a42Smrg __________________________________________________________ 7202c393a42Smrg 7212c393a42Smrg4. FUNCTIONS 7222c393a42Smrg 7232c393a42Smrg These are grouped by functionality, often using the main 7242c393a42Smrg datatype being manipulated. 7252c393a42Smrg __________________________________________________________ 7262c393a42Smrg 7272c393a42Smrg4.1. Initialization 7282c393a42Smrg 7292c393a42Smrg Table of Contents 7302c393a42Smrg FcInitLoadConfig -- load configuration 7312c393a42Smrg FcInitLoadConfigAndFonts -- load configuration and font data 7322c393a42Smrg FcInit -- initialize fontconfig library 7332c393a42Smrg FcFini -- finalize fonconfig library 7342c393a42Smrg FcGetVersion -- library version number 7352c393a42Smrg FcInitReinitialize -- re-initialize library 7362c393a42Smrg FcInitBringUptoDate -- reload configuration files if needed 7372c393a42Smrg 7382c393a42Smrg These functions provide some control over how the library is 7392c393a42Smrg initialized. 7402c393a42Smrg 7412c393a42SmrgFcInitLoadConfig 7422c393a42Smrg 7432c393a42SmrgName 7442c393a42Smrg 7452c393a42Smrg FcInitLoadConfig -- load configuration 7462c393a42Smrg 7472c393a42SmrgSynopsis 7482c393a42Smrg 7492c393a42Smrg#include <fontconfig.h> 7502c393a42Smrg 7512c393a42Smrg FcConfig * FcInitLoadConfig(void); 7522c393a42Smrg 7532c393a42SmrgDescription 7542c393a42Smrg 7552c393a42Smrg Loads the default configuration file and returns the resulting 7562c393a42Smrg configuration. Does not load any font information. 7572c393a42Smrg 7582c393a42SmrgVersion 7592c393a42Smrg 7602c393a42Smrg Fontconfig version 2.6.0 7612c393a42Smrg 7622c393a42SmrgFcInitLoadConfigAndFonts 7632c393a42Smrg 7642c393a42SmrgName 7652c393a42Smrg 7662c393a42Smrg FcInitLoadConfigAndFonts -- load configuration and font data 7672c393a42Smrg 7682c393a42SmrgSynopsis 7692c393a42Smrg 7702c393a42Smrg#include <fontconfig.h> 7712c393a42Smrg 7722c393a42Smrg FcConfig * FcInitLoadConfigAndFonts(void); 7732c393a42Smrg 7742c393a42SmrgDescription 7752c393a42Smrg 7762c393a42Smrg Loads the default configuration file and builds information 7772c393a42Smrg about the available fonts. Returns the resulting configuration. 7782c393a42Smrg 7792c393a42SmrgVersion 7802c393a42Smrg 7812c393a42Smrg Fontconfig version 2.6.0 7822c393a42Smrg 7832c393a42SmrgFcInit 7842c393a42Smrg 7852c393a42SmrgName 7862c393a42Smrg 7872c393a42Smrg FcInit -- initialize fontconfig library 7882c393a42Smrg 7892c393a42SmrgSynopsis 7902c393a42Smrg 7912c393a42Smrg#include <fontconfig.h> 7922c393a42Smrg 7932c393a42Smrg FcBool FcInit(void); 7942c393a42Smrg 7952c393a42SmrgDescription 7962c393a42Smrg 7972c393a42Smrg Loads the default configuration file and the fonts referenced 7982c393a42Smrg therein and sets the default configuration to that result. 7992c393a42Smrg Returns whether this process succeeded or not. If the default 8002c393a42Smrg configuration has already been loaded, this routine does 8012c393a42Smrg nothing and returns FcTrue. 8022c393a42Smrg 8032c393a42SmrgVersion 8042c393a42Smrg 8052c393a42Smrg Fontconfig version 2.6.0 8062c393a42Smrg 8072c393a42SmrgFcFini 8082c393a42Smrg 8092c393a42SmrgName 8102c393a42Smrg 8112c393a42Smrg FcFini -- finalize fonconfig library 8122c393a42Smrg 8132c393a42SmrgSynopsis 8142c393a42Smrg 8152c393a42Smrg#include <fontconfig.h> 8162c393a42Smrg 8172c393a42Smrg void FcFini(void); 8182c393a42Smrg 8192c393a42SmrgDescription 8202c393a42Smrg 8212c393a42Smrg Frees all data structures allocated by previous calls to 8222c393a42Smrg fontconfig functions. Fontconfig returns to an uninitialized 8232c393a42Smrg state, requiring a new call to one of the FcInit functions 8242c393a42Smrg before any other fontconfig function may be called. 8252c393a42Smrg 8262c393a42SmrgVersion 8272c393a42Smrg 8282c393a42Smrg Fontconfig version 2.6.0 8292c393a42Smrg 8302c393a42SmrgFcGetVersion 8312c393a42Smrg 8322c393a42SmrgName 8332c393a42Smrg 8342c393a42Smrg FcGetVersion -- library version number 8352c393a42Smrg 8362c393a42SmrgSynopsis 8372c393a42Smrg 8382c393a42Smrg#include <fontconfig.h> 8392c393a42Smrg 8402c393a42Smrg int FcGetVersion(void); 8412c393a42Smrg 8422c393a42SmrgDescription 8432c393a42Smrg 8442c393a42Smrg Returns the version number of the library. 8452c393a42Smrg 8462c393a42SmrgVersion 8472c393a42Smrg 8482c393a42Smrg Fontconfig version 2.6.0 8492c393a42Smrg 8502c393a42SmrgFcInitReinitialize 8512c393a42Smrg 8522c393a42SmrgName 8532c393a42Smrg 8542c393a42Smrg FcInitReinitialize -- re-initialize library 8552c393a42Smrg 8562c393a42SmrgSynopsis 8572c393a42Smrg 8582c393a42Smrg#include <fontconfig.h> 8592c393a42Smrg 8602c393a42Smrg FcBool FcInitReinitialize(void); 8612c393a42Smrg 8622c393a42SmrgDescription 8632c393a42Smrg 8642c393a42Smrg Forces the default configuration file to be reloaded and resets 8652c393a42Smrg the default configuration. Returns FcFalse if the configuration 8662c393a42Smrg cannot be reloaded (due to config file errors, allocation 8672c393a42Smrg failures or other issues) and leaves the existing configuration 8682c393a42Smrg unchanged. Otherwise returns FcTrue. 8692c393a42Smrg 8702c393a42SmrgVersion 8712c393a42Smrg 8722c393a42Smrg Fontconfig version 2.6.0 8732c393a42Smrg 8742c393a42SmrgFcInitBringUptoDate 8752c393a42Smrg 8762c393a42SmrgName 8772c393a42Smrg 8782c393a42Smrg FcInitBringUptoDate -- reload configuration files if needed 8792c393a42Smrg 8802c393a42SmrgSynopsis 8812c393a42Smrg 8822c393a42Smrg#include <fontconfig.h> 8832c393a42Smrg 8842c393a42Smrg FcBool FcInitBringUptoDate(void); 8852c393a42Smrg 8862c393a42SmrgDescription 8872c393a42Smrg 8882c393a42Smrg Checks the rescan interval in the default configuration, 8892c393a42Smrg checking the configuration if the interval has passed and 8902c393a42Smrg reloading the configuration if when any changes are detected. 8912c393a42Smrg Returns FcFalse if the configuration cannot be reloaded (see 8922c393a42Smrg FcInitReinitialize). Otherwise returns FcTrue. 8932c393a42Smrg 8942c393a42SmrgVersion 8952c393a42Smrg 8962c393a42Smrg Fontconfig version 2.6.0 8972c393a42Smrg __________________________________________________________ 8982c393a42Smrg 8992c393a42Smrg4.2. FcPattern 9002c393a42Smrg 9012c393a42Smrg Table of Contents 9022c393a42Smrg FcPatternCreate -- Create a pattern 9032c393a42Smrg FcPatternDuplicate -- Copy a pattern 9042c393a42Smrg FcPatternReference -- Increment pattern reference count 9052c393a42Smrg FcPatternDestroy -- Destroy a pattern 9062c393a42Smrg FcPatternEqual -- Compare patterns 9072c393a42Smrg FcPatternEqualSubset -- Compare portions of patterns 9082c393a42Smrg FcPatternHash -- Compute a pattern hash value 9092c393a42Smrg FcPatternAdd -- Add a value to a pattern 9102c393a42Smrg FcPatternAddWeak -- Add a value to a pattern with weak binding 9112c393a42Smrg FcPatternAdd-Type -- Add a typed value to a pattern 9122c393a42Smrg FcPatternGet -- Return a value from a pattern 9132c393a42Smrg FcPatternGet-Type -- Return a typed value from a pattern 9142c393a42Smrg FcPatternBuild -- Create patterns from arguments 9152c393a42Smrg FcPatternDel -- Delete a property from a pattern 9162c393a42Smrg FcPatternRemove -- Remove one object of the specified type from 9172c393a42Smrg the pattern 9182c393a42Smrg 9192c393a42Smrg FcPatternPrint -- Print a pattern for debugging 9202c393a42Smrg FcDefaultSubstitute -- Perform default substitutions in a 9212c393a42Smrg pattern 9222c393a42Smrg 9232c393a42Smrg FcNameParse -- Parse a pattern string 9242c393a42Smrg FcNameUnparse -- Convert a pattern back into a string that can 9252c393a42Smrg be parsed 9262c393a42Smrg 9272c393a42Smrg An FcPattern is an opaque type that holds both patterns to 9282c393a42Smrg match against the available fonts, as well as the information 9292c393a42Smrg about each font. 9302c393a42Smrg 9312c393a42SmrgFcPatternCreate 9322c393a42Smrg 9332c393a42SmrgName 9342c393a42Smrg 9352c393a42Smrg FcPatternCreate -- Create a pattern 9362c393a42Smrg 9372c393a42SmrgSynopsis 9382c393a42Smrg 9392c393a42Smrg#include <fontconfig.h> 9402c393a42Smrg 9412c393a42Smrg FcPattern * FcPatternCreate(void); 9422c393a42Smrg 9432c393a42SmrgDescription 9442c393a42Smrg 9452c393a42Smrg Creates a pattern with no properties; used to build patterns 9462c393a42Smrg from scratch. 9472c393a42Smrg 9482c393a42SmrgVersion 9492c393a42Smrg 9502c393a42Smrg Fontconfig version 2.6.0 9512c393a42Smrg 9522c393a42SmrgFcPatternDuplicate 9532c393a42Smrg 9542c393a42SmrgName 9552c393a42Smrg 9562c393a42Smrg FcPatternDuplicate -- Copy a pattern 9572c393a42Smrg 9582c393a42SmrgSynopsis 9592c393a42Smrg 9602c393a42Smrg#include <fontconfig.h> 9612c393a42Smrg 9622c393a42Smrg FcPattern * FcPatternDuplicate(FcPattern *p); 9632c393a42Smrg 9642c393a42SmrgDescription 9652c393a42Smrg 9662c393a42Smrg Copy a pattern, returning a new pattern that matches p. Each 9672c393a42Smrg pattern may be modified without affecting the other. 9682c393a42Smrg 9692c393a42SmrgVersion 9702c393a42Smrg 9712c393a42Smrg Fontconfig version 2.6.0 9722c393a42Smrg 9732c393a42SmrgFcPatternReference 9742c393a42Smrg 9752c393a42SmrgName 9762c393a42Smrg 9772c393a42Smrg FcPatternReference -- Increment pattern reference count 9782c393a42Smrg 9792c393a42SmrgSynopsis 9802c393a42Smrg 9812c393a42Smrg#include <fontconfig.h> 9822c393a42Smrg 9832c393a42Smrg void FcPatternReference(FcPattern *p); 9842c393a42Smrg 9852c393a42SmrgDescription 9862c393a42Smrg 9872c393a42Smrg Add another reference to p. Patterns are freed only when the 9882c393a42Smrg reference count reaches zero. 9892c393a42Smrg 9902c393a42SmrgVersion 9912c393a42Smrg 9922c393a42Smrg Fontconfig version 2.6.0 9932c393a42Smrg 9942c393a42SmrgFcPatternDestroy 9952c393a42Smrg 9962c393a42SmrgName 9972c393a42Smrg 9982c393a42Smrg FcPatternDestroy -- Destroy a pattern 9992c393a42Smrg 10002c393a42SmrgSynopsis 10012c393a42Smrg 10022c393a42Smrg#include <fontconfig.h> 10032c393a42Smrg 10042c393a42Smrg void FcPatternDestroy(FcPattern *p); 10052c393a42Smrg 10062c393a42SmrgDescription 10072c393a42Smrg 10082c393a42Smrg Decrement the pattern reference count. If all references are 10092c393a42Smrg gone, destroys the pattern, in the process destroying all 10102c393a42Smrg related values. 10112c393a42Smrg 10122c393a42SmrgVersion 10132c393a42Smrg 10142c393a42Smrg Fontconfig version 2.6.0 10152c393a42Smrg 10162c393a42SmrgFcPatternEqual 10172c393a42Smrg 10182c393a42SmrgName 10192c393a42Smrg 10202c393a42Smrg FcPatternEqual -- Compare patterns 10212c393a42Smrg 10222c393a42SmrgSynopsis 10232c393a42Smrg 10242c393a42Smrg#include <fontconfig.h> 10252c393a42Smrg 10262c393a42Smrg FcBool FcPatternEqual(const FcPattern *pa, const FcPattern 10272c393a42Smrg *pb); 10282c393a42Smrg 10292c393a42SmrgDescription 10302c393a42Smrg 10312c393a42Smrg Returns whether pa and pb are exactly alike. 10322c393a42Smrg 10332c393a42SmrgVersion 10342c393a42Smrg 10352c393a42Smrg Fontconfig version 2.6.0 10362c393a42Smrg 10372c393a42SmrgFcPatternEqualSubset 10382c393a42Smrg 10392c393a42SmrgName 10402c393a42Smrg 10412c393a42Smrg FcPatternEqualSubset -- Compare portions of patterns 10422c393a42Smrg 10432c393a42SmrgSynopsis 10442c393a42Smrg 10452c393a42Smrg#include <fontconfig.h> 10462c393a42Smrg 10472c393a42Smrg FcBool FcPatternEqualSubset(const FcPattern *pa, const 10482c393a42Smrg FcPattern *pb, const FcObjectSet *os); 10492c393a42Smrg 10502c393a42SmrgDescription 10512c393a42Smrg 10522c393a42Smrg Returns whether pa and pb have exactly the same values for all 10532c393a42Smrg of the objects in os. 10542c393a42Smrg 10552c393a42SmrgVersion 10562c393a42Smrg 10572c393a42Smrg Fontconfig version 2.6.0 10582c393a42Smrg 10592c393a42SmrgFcPatternHash 10602c393a42Smrg 10612c393a42SmrgName 10622c393a42Smrg 10632c393a42Smrg FcPatternHash -- Compute a pattern hash value 10642c393a42Smrg 10652c393a42SmrgSynopsis 10662c393a42Smrg 10672c393a42Smrg#include <fontconfig.h> 10682c393a42Smrg 10692c393a42Smrg FcChar32 FcPatternHash(const FcPattern *p); 10702c393a42Smrg 10712c393a42SmrgDescription 10722c393a42Smrg 10732c393a42Smrg Returns a 32-bit number which is the same for any two patterns 10742c393a42Smrg which are equal. 10752c393a42Smrg 10762c393a42SmrgVersion 10772c393a42Smrg 10782c393a42Smrg Fontconfig version 2.6.0 10792c393a42Smrg 10802c393a42SmrgFcPatternAdd 10812c393a42Smrg 10822c393a42SmrgName 10832c393a42Smrg 10842c393a42Smrg FcPatternAdd -- Add a value to a pattern 10852c393a42Smrg 10862c393a42SmrgSynopsis 10872c393a42Smrg 10882c393a42Smrg#include <fontconfig.h> 10892c393a42Smrg 10902c393a42Smrg FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue 10912c393a42Smrg value, FcBool append); 10922c393a42Smrg 10932c393a42SmrgDescription 10942c393a42Smrg 10952c393a42Smrg Adds a single value to the list of values associated with the 10962c393a42Smrg property named `object. If `append is FcTrue, the value is 10972c393a42Smrg added at the end of any existing list, otherwise it is inserted 10982c393a42Smrg at the begining. `value' is saved (with FcValueSave) when 10992c393a42Smrg inserted into the pattern so that the library retains no 11002c393a42Smrg reference to any application-supplied data structure. 11012c393a42Smrg 11022c393a42SmrgVersion 11032c393a42Smrg 11042c393a42Smrg Fontconfig version 2.6.0 11052c393a42Smrg 11062c393a42SmrgFcPatternAddWeak 11072c393a42Smrg 11082c393a42SmrgName 11092c393a42Smrg 11102c393a42Smrg FcPatternAddWeak -- Add a value to a pattern with weak binding 11112c393a42Smrg 11122c393a42SmrgSynopsis 11132c393a42Smrg 11142c393a42Smrg#include <fontconfig.h> 11152c393a42Smrg 11162c393a42Smrg FcBool FcPatternAddWeak(FcPattern *p, const char *object, 11172c393a42Smrg FcValue value, FcBool append); 11182c393a42Smrg 11192c393a42SmrgDescription 11202c393a42Smrg 11212c393a42Smrg FcPatternAddWeak is essentially the same as FcPatternAdd except 11222c393a42Smrg that any values added to the list have binding weak instead of 11232c393a42Smrg strong. 11242c393a42Smrg 11252c393a42SmrgVersion 11262c393a42Smrg 11272c393a42Smrg Fontconfig version 2.6.0 11282c393a42Smrg 11292c393a42SmrgFcPatternAdd-Type 11302c393a42Smrg 11312c393a42SmrgName 11322c393a42Smrg 11332c393a42Smrg FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString, 11342c393a42Smrg FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool, 11352c393a42Smrg FcPatternAddFTFace, FcPatternAddLangSet -- Add a typed value to 11362c393a42Smrg a pattern 11372c393a42Smrg 11382c393a42SmrgSynopsis 11392c393a42Smrg 11402c393a42Smrg#include <fontconfig.h> 11412c393a42Smrg 11422c393a42Smrg FcBool FcPatternAddInteger(FcPattern *p, const char *object, 11432c393a42Smrg int i); 11442c393a42Smrg 11452c393a42Smrg FcBool FcPatternAddDouble(FcPattern *p, const char *object, 11462c393a42Smrg double d); 11472c393a42Smrg 11482c393a42Smrg FcBool FcPatternAddString(FcPattern *p, const char *object, 11492c393a42Smrg const FcChar8 *s); 11502c393a42Smrg 11512c393a42Smrg FcBool FcPatternAddMatrix(FcPattern *p, const char *object, 11522c393a42Smrg const FcMatrix *m); 11532c393a42Smrg 11542c393a42Smrg FcBool FcPatternAddCharSet(FcPattern *p, const char *object, 11552c393a42Smrg const FcCharSet *c); 11562c393a42Smrg 11572c393a42Smrg FcBool FcPatternAddBool(FcPattern *p, const char *object, 11582c393a42Smrg FcBool b); 11592c393a42Smrg 11602c393a42Smrg FcBool FcPatternAddFTFace(FcPattern *p, const char *object, 11612c393a42Smrg const FT_Facef); 11622c393a42Smrg 11632c393a42Smrg FcBool FcPatternAddLangSet(FcPattern *p, const char *object, 11642c393a42Smrg const FcLangSet *l); 11652c393a42Smrg 11662c393a42SmrgDescription 11672c393a42Smrg 11682c393a42Smrg These are all convenience functions that insert objects of the 11692c393a42Smrg specified type into the pattern. Use these in preference to 11702c393a42Smrg FcPatternAdd as they will provide compile-time typechecking. 11712c393a42Smrg These all append values to any existing list of values. 11722c393a42Smrg 11732c393a42SmrgVersion 11742c393a42Smrg 11752c393a42Smrg Fontconfig version 2.6.0 11762c393a42Smrg 11772c393a42SmrgFcPatternGet 11782c393a42Smrg 11792c393a42SmrgName 11802c393a42Smrg 11812c393a42Smrg FcPatternGet -- Return a value from a pattern 11822c393a42Smrg 11832c393a42SmrgSynopsis 11842c393a42Smrg 11852c393a42Smrg#include <fontconfig.h> 11862c393a42Smrg 11872c393a42Smrg FcResult FcPatternGet(FcPattern *p, const char *object, int id, 11882c393a42Smrg FcValue *v); 11892c393a42Smrg 11902c393a42SmrgDescription 11912c393a42Smrg 11922c393a42Smrg Returns in v the id'th value associated with the property 11932c393a42Smrg object. The value returned is not a copy, but rather refers to 11942c393a42Smrg the data stored within the pattern directly. Applications must 11952c393a42Smrg not free this value. 11962c393a42Smrg 11972c393a42SmrgVersion 11982c393a42Smrg 11992c393a42Smrg Fontconfig version 2.6.0 12002c393a42Smrg 12012c393a42SmrgFcPatternGet-Type 12022c393a42Smrg 12032c393a42SmrgName 12042c393a42Smrg 12052c393a42Smrg FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString, 12062c393a42Smrg FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool, 12072c393a42Smrg FcPatternGetFTFace, FcPatternGetLangSet -- Return a typed value 12082c393a42Smrg from a pattern 12092c393a42Smrg 12102c393a42SmrgSynopsis 12112c393a42Smrg 12122c393a42Smrg#include <fontconfig.h> 12132c393a42Smrg 12142c393a42Smrg FcResult FcPatternGetInteger(FcPattern *p, const char *object, 12152c393a42Smrg int n, int *i); 12162c393a42Smrg 12172c393a42Smrg FcResult FcPatternGetDouble(FcPattern *p, const char *object, 12182c393a42Smrg int n, double *d); 12192c393a42Smrg 12202c393a42Smrg FcResult FcPatternGetString(FcPattern *p, const char *object, 12212c393a42Smrg int n, FcChar8 **s); 12222c393a42Smrg 12232c393a42Smrg FcResult FcPatternGetMatrix(FcPattern *p, const char *object, 12242c393a42Smrg int n, FcMatrix **s); 12252c393a42Smrg 12262c393a42Smrg FcResult FcPatternGetCharSet(FcPattern *p, const char *object, 12272c393a42Smrg int n, FcCharSet **c); 12282c393a42Smrg 12292c393a42Smrg FcResult FcPatternGetBool(FcPattern *p, const char *object, int 12302c393a42Smrg n, FcBool *b); 12312c393a42Smrg 12322c393a42Smrg FcBool FcPatternGetFTFace(FcPattern *p, const char *object, 12332c393a42Smrg const FT_Face *f); 12342c393a42Smrg 12352c393a42Smrg FcBool FcPatternGetLangSet(FcPattern *p, const char *object, 12362c393a42Smrg const FcLangSet **l); 12372c393a42Smrg 12382c393a42SmrgDescription 12392c393a42Smrg 12402c393a42Smrg These are convenience functions that call FcPatternGet and 12412c393a42Smrg verify that the returned data is of the expected type. They 12422c393a42Smrg return FcResultTypeMismatch if this is not the case. Note that 12432c393a42Smrg these (like FcPatternGet) do not make a copy of any data 12442c393a42Smrg structure referenced by the return value. Use these in 12452c393a42Smrg preference to FcPatternGet to provide compile-time 12462c393a42Smrg typechecking. 12472c393a42Smrg 12482c393a42SmrgVersion 12492c393a42Smrg 12502c393a42Smrg Fontconfig version 2.6.0 12512c393a42Smrg 12522c393a42SmrgFcPatternBuild 12532c393a42Smrg 12542c393a42SmrgName 12552c393a42Smrg 12562c393a42Smrg FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create 12572c393a42Smrg patterns from arguments 12582c393a42Smrg 12592c393a42SmrgSynopsis 12602c393a42Smrg 12612c393a42Smrg#include <fontconfig.h> 12622c393a42Smrg 12632c393a42Smrg FcPattern * FcPatternBuild(FcPattern *orig, ...); 12642c393a42Smrg 12652c393a42Smrg FcPattern * FcPatternVaBuild(FcPattern *orig, va_list va); 12662c393a42Smrg 12672c393a42Smrg void FcPatternVapBuild(FcPattern *result, FcPattern *orig, 12682c393a42Smrg va_list va); 12692c393a42Smrg 12702c393a42SmrgDescription 12712c393a42Smrg 12722c393a42Smrg Builds a pattern using a list of objects, types and values. 12732c393a42Smrg Each value to be entered in the pattern is specified with three 12742c393a42Smrg arguments: 12752c393a42Smrg 12762c393a42Smrg 1. Object name, a string describing the property to be added. 12772c393a42Smrg 2. Object type, one of the FcType enumerated values 12782c393a42Smrg 3. Value, not an FcValue, but the raw type as passed to any of 12792c393a42Smrg the FcPatternAdd<type> functions. Must match the type of 12802c393a42Smrg the second argument. 12812c393a42Smrg 12822c393a42Smrg The argument list is terminated by a null object name, no 12832c393a42Smrg object type nor value need be passed for this. The values are 12842c393a42Smrg added to `pattern', if `pattern' is null, a new pattern is 12852c393a42Smrg created. In either case, the pattern is returned. Example 12862c393a42Smrgpattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 12872c393a42Smrg0); 12882c393a42Smrg 12892c393a42Smrg FcPatternVaBuild is used when the arguments are already in the 12902c393a42Smrg form of a varargs value. FcPatternVapBuild is a macro version 12912c393a42Smrg of FcPatternVaBuild which returns its result directly in the 12922c393a42Smrg result variable. 12932c393a42Smrg 12942c393a42SmrgVersion 12952c393a42Smrg 12962c393a42Smrg Fontconfig version 2.6.0 12972c393a42Smrg 12982c393a42SmrgFcPatternDel 12992c393a42Smrg 13002c393a42SmrgName 13012c393a42Smrg 13022c393a42Smrg FcPatternDel -- Delete a property from a pattern 13032c393a42Smrg 13042c393a42SmrgSynopsis 13052c393a42Smrg 13062c393a42Smrg#include <fontconfig.h> 13072c393a42Smrg 13082c393a42Smrg FcBool FcPatternDel(FcPattern *p, const char *object); 13092c393a42Smrg 13102c393a42SmrgDescription 13112c393a42Smrg 13122c393a42Smrg Deletes all values associated with the property `object', 13132c393a42Smrg returning whether the property existed or not. 13142c393a42Smrg 13152c393a42SmrgVersion 13162c393a42Smrg 13172c393a42Smrg Fontconfig version 2.6.0 13182c393a42Smrg 13192c393a42SmrgFcPatternRemove 13202c393a42Smrg 13212c393a42SmrgName 13222c393a42Smrg 13232c393a42Smrg FcPatternRemove -- Remove one object of the specified type from 13242c393a42Smrg the pattern 13252c393a42Smrg 13262c393a42SmrgSynopsis 13272c393a42Smrg 13282c393a42Smrg#include <fontconfig.h> 13292c393a42Smrg 13302c393a42Smrg FcBool FcPatternRemove(FcPattern *p, const char *object, int 13312c393a42Smrg id); 13322c393a42Smrg 13332c393a42SmrgDescription 13342c393a42Smrg 13352c393a42Smrg Removes the value associated with the property `object' at 13362c393a42Smrg position `id', returning whether the property existed and had a 13372c393a42Smrg value at that position or not. 13382c393a42Smrg 13392c393a42SmrgVersion 13402c393a42Smrg 13412c393a42Smrg Fontconfig version 2.6.0 13422c393a42Smrg 13432c393a42SmrgFcPatternPrint 13442c393a42Smrg 13452c393a42SmrgName 13462c393a42Smrg 13472c393a42Smrg FcPatternPrint -- Print a pattern for debugging 13482c393a42Smrg 13492c393a42SmrgSynopsis 13502c393a42Smrg 13512c393a42Smrg#include <fontconfig.h> 13522c393a42Smrg 13532c393a42Smrg void FcPatternPrint(const FcPattern *p); 13542c393a42Smrg 13552c393a42SmrgDescription 13562c393a42Smrg 13572c393a42Smrg Prints an easily readable version of the pattern to stdout. 13582c393a42Smrg There is no provision for reparsing data in this format, it's 13592c393a42Smrg just for diagnostics and debugging. 13602c393a42Smrg 13612c393a42SmrgVersion 13622c393a42Smrg 13632c393a42Smrg Fontconfig version 2.6.0 13642c393a42Smrg 13652c393a42SmrgFcDefaultSubstitute 13662c393a42Smrg 13672c393a42SmrgName 13682c393a42Smrg 13692c393a42Smrg FcDefaultSubstitute -- Perform default substitutions in a 13702c393a42Smrg pattern 13712c393a42Smrg 13722c393a42SmrgSynopsis 13732c393a42Smrg 13742c393a42Smrg#include <fontconfig.h> 13752c393a42Smrg 13762c393a42Smrg void FcDefaultSubstitute(FcPattern *pattern); 13772c393a42Smrg 13782c393a42SmrgDescription 13792c393a42Smrg 13802c393a42Smrg Supplies default values for underspecified font patterns: 13812c393a42Smrg 13822c393a42Smrg * Patterns without a specified style or weight are set to 13832c393a42Smrg Medium 13842c393a42Smrg * Patterns without a specified style or slant are set to 13852c393a42Smrg Roman 13862c393a42Smrg * Patterns without a specified pixel size are given one 13872c393a42Smrg computed from any specified point size (default 12), dpi 13882c393a42Smrg (default 75) and scale (default 1). 13892c393a42Smrg 13902c393a42SmrgVersion 13912c393a42Smrg 13922c393a42Smrg Fontconfig version 2.6.0 13932c393a42Smrg 13942c393a42SmrgFcNameParse 13952c393a42Smrg 13962c393a42SmrgName 13972c393a42Smrg 13982c393a42Smrg FcNameParse -- Parse a pattern string 13992c393a42Smrg 14002c393a42SmrgSynopsis 14012c393a42Smrg 14022c393a42Smrg#include <fontconfig.h> 14032c393a42Smrg 14042c393a42Smrg FcPattern * FcNameParse(const FcChar8 *name); 14052c393a42Smrg 14062c393a42SmrgDescription 14072c393a42Smrg 14082c393a42Smrg Converts name from the standard text format described above 14092c393a42Smrg into a pattern. 14102c393a42Smrg 14112c393a42SmrgVersion 14122c393a42Smrg 14132c393a42Smrg Fontconfig version 2.6.0 14142c393a42Smrg 14152c393a42SmrgFcNameUnparse 14162c393a42Smrg 14172c393a42SmrgName 14182c393a42Smrg 14192c393a42Smrg FcNameUnparse -- Convert a pattern back into a string that can 14202c393a42Smrg be parsed 14212c393a42Smrg 14222c393a42SmrgSynopsis 14232c393a42Smrg 14242c393a42Smrg#include <fontconfig.h> 14252c393a42Smrg 14262c393a42Smrg FcChar8 * FcNameUnparse(FcPattern *pat); 14272c393a42Smrg 14282c393a42SmrgDescription 14292c393a42Smrg 14302c393a42Smrg Converts the given pattern into the standard text format 14312c393a42Smrg described above. The return value is not static, but instead 14322c393a42Smrg refers to newly allocated memory which should be freed by the 14332c393a42Smrg caller. 14342c393a42Smrg 14352c393a42SmrgVersion 14362c393a42Smrg 14372c393a42Smrg Fontconfig version 2.6.0 14382c393a42Smrg __________________________________________________________ 14392c393a42Smrg 14402c393a42Smrg4.3. FcFontSet 14412c393a42Smrg 14422c393a42Smrg Table of Contents 14432c393a42Smrg FcFontSetCreate -- Create a font set 14442c393a42Smrg FcFontSetDestroy -- Destroy a font set 14452c393a42Smrg FcFontSetAdd -- Add to a font set 14462c393a42Smrg FcFontSetList -- List fonts from a set of font sets 14472c393a42Smrg FcFontSetMatch -- Return the best font from a set of font sets 14482c393a42Smrg FcFontSetPrint -- Print a set of patterns to stdout 14492c393a42Smrg FcFontSetSort -- Add to a font set 14502c393a42Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font set 14512c393a42Smrg 14522c393a42Smrg An FcFontSet simply holds a list of patterns; these are used to 14532c393a42Smrg return the results of listing available fonts. 14542c393a42Smrg 14552c393a42SmrgFcFontSetCreate 14562c393a42Smrg 14572c393a42SmrgName 14582c393a42Smrg 14592c393a42Smrg FcFontSetCreate -- Create a font set 14602c393a42Smrg 14612c393a42SmrgSynopsis 14622c393a42Smrg 14632c393a42Smrg#include <fontconfig.h> 14642c393a42Smrg 14652c393a42Smrg FcFontSet * FcFontSetCreate(void); 14662c393a42Smrg 14672c393a42SmrgDescription 14682c393a42Smrg 14692c393a42Smrg Creates an empty font set. 14702c393a42Smrg 14712c393a42SmrgVersion 14722c393a42Smrg 14732c393a42Smrg Fontconfig version 2.6.0 14742c393a42Smrg 14752c393a42SmrgFcFontSetDestroy 14762c393a42Smrg 14772c393a42SmrgName 14782c393a42Smrg 14792c393a42Smrg FcFontSetDestroy -- Destroy a font set 14802c393a42Smrg 14812c393a42SmrgSynopsis 14822c393a42Smrg 14832c393a42Smrg#include <fontconfig.h> 14842c393a42Smrg 14852c393a42Smrg void FcFontSetDestroy(FcFontSet *s); 14862c393a42Smrg 14872c393a42SmrgDescription 14882c393a42Smrg 14892c393a42Smrg Destroys a font set. Note that this destroys any referenced 14902c393a42Smrg patterns as well. 14912c393a42Smrg 14922c393a42SmrgVersion 14932c393a42Smrg 14942c393a42Smrg Fontconfig version 2.6.0 14952c393a42Smrg 14962c393a42SmrgFcFontSetAdd 14972c393a42Smrg 14982c393a42SmrgName 14992c393a42Smrg 15002c393a42Smrg FcFontSetAdd -- Add to a font set 15012c393a42Smrg 15022c393a42SmrgSynopsis 15032c393a42Smrg 15042c393a42Smrg#include <fontconfig.h> 15052c393a42Smrg 15062c393a42Smrg FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font); 15072c393a42Smrg 15082c393a42SmrgDescription 15092c393a42Smrg 15102c393a42Smrg Adds a pattern to a font set. Note that the pattern is not 15112c393a42Smrg copied before being inserted into the set. Returns FcFalse if 15122c393a42Smrg the pattern cannot be inserted into the set (due to allocation 15132c393a42Smrg failure). Otherwise returns FcTrue. 15142c393a42Smrg 15152c393a42SmrgVersion 15162c393a42Smrg 15172c393a42Smrg Fontconfig version 2.6.0 15182c393a42Smrg 15192c393a42SmrgFcFontSetList 15202c393a42Smrg 15212c393a42SmrgName 15222c393a42Smrg 15232c393a42Smrg FcFontSetList -- List fonts from a set of font sets 15242c393a42Smrg 15252c393a42SmrgSynopsis 15262c393a42Smrg 15272c393a42Smrg#include <fontconfig.h> 15282c393a42Smrg 15292c393a42Smrg FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets, 15302c393a42Smrg intnsets, FcPattern *pattern, FcObjectSet *object_set); 15312c393a42Smrg 15322c393a42SmrgDescription 15332c393a42Smrg 15342c393a42Smrg Selects fonts matching pattern from sets, creates patterns from 15352c393a42Smrg those fonts containing only the objects in object_set and 15362c393a42Smrg returns the set of unique such patterns. 15372c393a42Smrg 15382c393a42SmrgVersion 15392c393a42Smrg 15402c393a42Smrg Fontconfig version 2.6.0 15412c393a42Smrg 15422c393a42SmrgFcFontSetMatch 15432c393a42Smrg 15442c393a42SmrgName 15452c393a42Smrg 15462c393a42Smrg FcFontSetMatch -- Return the best font from a set of font sets 15472c393a42Smrg 15482c393a42SmrgSynopsis 15492c393a42Smrg 15502c393a42Smrg#include <fontconfig.h> 15512c393a42Smrg 15522c393a42Smrg FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets, 15532c393a42Smrg intnsets, FcPattern *pattern, FcResult *result); 15542c393a42Smrg 15552c393a42SmrgDescription 15562c393a42Smrg 15572c393a42Smrg Finds the font in sets most closely matching pattern and 15582c393a42Smrg returns the result of FcFontRenderPrepare for that font and the 15592c393a42Smrg provided pattern. This function should be called only after 15602c393a42Smrg FcConfigSubstitute and FcDefaultSubstitute have been called for 15612c393a42Smrg pattern; otherwise the results will not be correct. Returns 15622c393a42Smrg NULL if an error occurs during this process. 15632c393a42Smrg 15642c393a42SmrgVersion 15652c393a42Smrg 15662c393a42Smrg Fontconfig version 2.6.0 15672c393a42Smrg 15682c393a42SmrgFcFontSetPrint 15692c393a42Smrg 15702c393a42SmrgName 15712c393a42Smrg 15722c393a42Smrg FcFontSetPrint -- Print a set of patterns to stdout 15732c393a42Smrg 15742c393a42SmrgSynopsis 15752c393a42Smrg 15762c393a42Smrg#include <fontconfig.h> 15772c393a42Smrg 15782c393a42Smrg void FcFontSetPrint(FcFontSet *set); 15792c393a42Smrg 15802c393a42SmrgDescription 15812c393a42Smrg 15822c393a42Smrg This function is useful for diagnosing font related issues, 15832c393a42Smrg printing the complete contents of every pattern in set. The 15842c393a42Smrg format of the output is designed to be of help to users and 15852c393a42Smrg developers, and may change at any time. 15862c393a42Smrg 15872c393a42SmrgVersion 15882c393a42Smrg 15892c393a42Smrg Fontconfig version 2.6.0 15902c393a42Smrg 15912c393a42SmrgFcFontSetSort 15922c393a42Smrg 15932c393a42SmrgName 15942c393a42Smrg 15952c393a42Smrg FcFontSetSort -- Add to a font set 15962c393a42Smrg 15972c393a42SmrgSynopsis 15982c393a42Smrg 15992c393a42Smrg#include <fontconfig.h> 16002c393a42Smrg 16012c393a42Smrg FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets, 16022c393a42Smrg FcPattern *pattern, FcBool trim, FcCharSet **csp, FcResult 16032c393a42Smrg *result); 16042c393a42Smrg 16052c393a42SmrgDescription 16062c393a42Smrg 16072c393a42Smrg Returns the list of fonts from sets sorted by closeness to 16082c393a42Smrg pattern. If trim is FcTrue, elements in the list which don't 16092c393a42Smrg include Unicode coverage not provided by earlier elements in 16102c393a42Smrg the list are elided. The union of Unicode coverage of all of 16112c393a42Smrg the fonts is returned in csp, if csp is not NULL. This function 16122c393a42Smrg should be called only after FcConfigSubstitute and 16132c393a42Smrg FcDefaultSubstitute have been called for p; otherwise the 16142c393a42Smrg results will not be correct. 16152c393a42Smrg 16162c393a42Smrg The returned FcFontSet references FcPattern structures which 16172c393a42Smrg may be shared by the return value from multiple FcFontSort 16182c393a42Smrg calls, applications cannot modify these patterns. Instead, they 16192c393a42Smrg should be passed, along with pattern to FcFontRenderPrepare 16202c393a42Smrg which combines them into a complete pattern. 16212c393a42Smrg 16222c393a42Smrg The FcFontSet returned by FcFontSetSort is destroyed by caling 16232c393a42Smrg FcFontSetDestroy. 16242c393a42Smrg 16252c393a42SmrgVersion 16262c393a42Smrg 16272c393a42Smrg Fontconfig version 2.6.0 16282c393a42Smrg 16292c393a42SmrgFcFontSetSortDestroy 16302c393a42Smrg 16312c393a42SmrgName 16322c393a42Smrg 16332c393a42Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font set 16342c393a42Smrg 16352c393a42SmrgSynopsis 16362c393a42Smrg 16372c393a42Smrg#include <fontconfig.h> 16382c393a42Smrg 16392c393a42Smrg FcFontSetSortDestroy(FcFontSet *set); 16402c393a42Smrg 16412c393a42SmrgDescription 16422c393a42Smrg 16432c393a42Smrg This function is DEPRECATED. FcFontSetSortDestroy destroys set 16442c393a42Smrg by calling FcFontSetDestroy. Applications should use 16452c393a42Smrg FcFontSetDestroy directly instead. 16462c393a42Smrg 16472c393a42SmrgVersion 16482c393a42Smrg 16492c393a42Smrg Fontconfig version 2.6.0 16502c393a42Smrg __________________________________________________________ 16512c393a42Smrg 16522c393a42Smrg4.4. FcObjectSet 16532c393a42Smrg 16542c393a42Smrg Table of Contents 16552c393a42Smrg FcObjectSetCreate -- Create an object set 16562c393a42Smrg FcObjectSetAdd -- Add to an object set 16572c393a42Smrg FcObjectSetDestroy -- Destroy an object set 16582c393a42Smrg FcObjectSetBuild -- Build object set from args 16592c393a42Smrg 16602c393a42Smrg An FcObjectSet holds a list of pattern property names; it is 16612c393a42Smrg used to indiciate which properties are to be returned in the 16622c393a42Smrg patterns from FcFontList. 16632c393a42Smrg 16642c393a42SmrgFcObjectSetCreate 16652c393a42Smrg 16662c393a42SmrgName 16672c393a42Smrg 16682c393a42Smrg FcObjectSetCreate -- Create an object set 16692c393a42Smrg 16702c393a42SmrgSynopsis 16712c393a42Smrg 16722c393a42Smrg#include <fontconfig.h> 16732c393a42Smrg 16742c393a42Smrg FcObjectSet * FcObjectSetCreate(void); 16752c393a42Smrg 16762c393a42SmrgDescription 16772c393a42Smrg 16782c393a42Smrg Creates an empty set. 16792c393a42Smrg 16802c393a42SmrgVersion 16812c393a42Smrg 16822c393a42Smrg Fontconfig version 2.6.0 16832c393a42Smrg 16842c393a42SmrgFcObjectSetAdd 16852c393a42Smrg 16862c393a42SmrgName 16872c393a42Smrg 16882c393a42Smrg FcObjectSetAdd -- Add to an object set 16892c393a42Smrg 16902c393a42SmrgSynopsis 16912c393a42Smrg 16922c393a42Smrg#include <fontconfig.h> 16932c393a42Smrg 16942c393a42Smrg FcBool FcObjectSetAdd(FcObjectSet *os, const char *object); 16952c393a42Smrg 16962c393a42SmrgDescription 16972c393a42Smrg 16982c393a42Smrg Adds a proprety name to the set. Returns FcFalse if the 16992c393a42Smrg property name cannot be inserted into the set (due to 17002c393a42Smrg allocation failure). Otherwise returns FcTrue. 17012c393a42Smrg 17022c393a42SmrgVersion 17032c393a42Smrg 17042c393a42Smrg Fontconfig version 2.6.0 17052c393a42Smrg 17062c393a42SmrgFcObjectSetDestroy 17072c393a42Smrg 17082c393a42SmrgName 17092c393a42Smrg 17102c393a42Smrg FcObjectSetDestroy -- Destroy an object set 17112c393a42Smrg 17122c393a42SmrgSynopsis 17132c393a42Smrg 17142c393a42Smrg#include <fontconfig.h> 17152c393a42Smrg 17162c393a42Smrg void FcObjectSetDestroy(FcObjectSet *os); 17172c393a42Smrg 17182c393a42SmrgDescription 17192c393a42Smrg 17202c393a42Smrg Destroys an object set. 17212c393a42Smrg 17222c393a42SmrgVersion 17232c393a42Smrg 17242c393a42Smrg Fontconfig version 2.6.0 17252c393a42Smrg 17262c393a42SmrgFcObjectSetBuild 17272c393a42Smrg 17282c393a42SmrgName 17292c393a42Smrg 17302c393a42Smrg FcObjectSetBuild, FcObjectSetVaBuild, 17312c393a42Smrg FcObjectSetVapBuild -- Build object set from args 17322c393a42Smrg 17332c393a42SmrgSynopsis 17342c393a42Smrg 17352c393a42Smrg#include <fontconfig.h> 17362c393a42Smrg 17372c393a42Smrg FcObjectSet * FcObjectSetBuild(const char *first, ...); 17382c393a42Smrg 17392c393a42Smrg FcObjectSet * FcObjectSetVaBuild(const char *first, va_list 17402c393a42Smrg va); 17412c393a42Smrg 17422c393a42Smrg void FcObjectSetVapBuild(FcObjectSet *result, const char 17432c393a42Smrg *first, va_list va); 17442c393a42Smrg 17452c393a42SmrgDescription 17462c393a42Smrg 17472c393a42Smrg These build an object set from a null-terminated list of 17482c393a42Smrg property names. FcObjectSetVapBuild is a macro version of 17492c393a42Smrg FcObjectSetVaBuild which returns the result in the result 17502c393a42Smrg variable directly. 17512c393a42Smrg 17522c393a42SmrgVersion 17532c393a42Smrg 17542c393a42Smrg Fontconfig version 2.6.0 17552c393a42Smrg __________________________________________________________ 17562c393a42Smrg 17572c393a42Smrg4.5. FreeType specific functions 17582c393a42Smrg 17592c393a42Smrg Table of Contents 17602c393a42Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 17612c393a42Smrg FcFreeTypeCharSet -- compute unicode coverage 17622c393a42Smrg FcFreeTypeCharSetAndSpacing -- compute unicode coverage and 17632c393a42Smrg spacing type 17642c393a42Smrg 17652c393a42Smrg FcFreeTypeQuery -- compute pattern from font file (and index) 17662c393a42Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 17672c393a42Smrg 17682c393a42Smrg While the fontconfig library doesn't insist that FreeType be 17692c393a42Smrg used as the rasterization mechanism for fonts, it does provide 17702c393a42Smrg some convenience functions. 17712c393a42Smrg 17722c393a42SmrgFcFreeTypeCharIndex 17732c393a42Smrg 17742c393a42SmrgName 17752c393a42Smrg 17762c393a42Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 17772c393a42Smrg 17782c393a42SmrgSynopsis 17792c393a42Smrg 17802c393a42Smrg#include <fontconfig.h> 17812c393a42Smrg#include <fcfreetype.h> 17822c393a42Smrg 17832c393a42Smrg FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4); 17842c393a42Smrg 17852c393a42SmrgDescription 17862c393a42Smrg 17872c393a42Smrg Maps a Unicode char to a glyph index. This function uses 17882c393a42Smrg information from several possible underlying encoding tables to 17892c393a42Smrg work around broken fonts. As a result, this function isn't 17902c393a42Smrg designed to be used in performance sensitive areas; results 17912c393a42Smrg from this function are intended to be cached by higher level 17922c393a42Smrg functions. 17932c393a42Smrg 17942c393a42SmrgVersion 17952c393a42Smrg 17962c393a42Smrg Fontconfig version 2.6.0 17972c393a42Smrg 17982c393a42SmrgFcFreeTypeCharSet 17992c393a42Smrg 18002c393a42SmrgName 18012c393a42Smrg 18022c393a42Smrg FcFreeTypeCharSet -- compute unicode coverage 18032c393a42Smrg 18042c393a42SmrgSynopsis 18052c393a42Smrg 18062c393a42Smrg#include <fontconfig.h> 18072c393a42Smrg#include <fcfreetype.h> 18082c393a42Smrg 18092c393a42Smrg FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks); 18102c393a42Smrg 18112c393a42SmrgDescription 18122c393a42Smrg 18132c393a42Smrg Scans a FreeType face and returns the set of encoded Unicode 18142c393a42Smrg chars. This scans several encoding tables to build as complete 18152c393a42Smrg a list as possible. If 'blanks' is not 0, the glyphs in the 18162c393a42Smrg font are examined and any blank glyphs not in 'blanks' are not 18172c393a42Smrg placed in the returned FcCharSet. 18182c393a42Smrg 18192c393a42SmrgVersion 18202c393a42Smrg 18212c393a42Smrg Fontconfig version 2.6.0 18222c393a42Smrg 18232c393a42SmrgFcFreeTypeCharSetAndSpacing 18242c393a42Smrg 18252c393a42SmrgName 18262c393a42Smrg 18272c393a42Smrg FcFreeTypeCharSetAndSpacing -- compute unicode coverage and 18282c393a42Smrg spacing type 18292c393a42Smrg 18302c393a42SmrgSynopsis 18312c393a42Smrg 18322c393a42Smrg#include <fontconfig.h> 18332c393a42Smrg#include <fcfreetype.h> 18342c393a42Smrg 18352c393a42Smrg FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks 18362c393a42Smrg *blanks, int *spacing); 18372c393a42Smrg 18382c393a42SmrgDescription 18392c393a42Smrg 18402c393a42Smrg Scans a FreeType face and returns the set of encoded Unicode 18412c393a42Smrg chars. This scans several encoding tables to build as complete 18422c393a42Smrg a list as possible. If 'blanks' is not 0, the glyphs in the 18432c393a42Smrg font are examined and any blank glyphs not in 'blanks' are not 18442c393a42Smrg placed in the returned FcCharSet. spacing receives the computed 18452c393a42Smrg spacing type of the font, one of FC_MONO for a font where all 18462c393a42Smrg glyphs have the same width, FC_DUAL, where the font has glyphs 18472c393a42Smrg in precisely two widths, one twice as wide as the other, or 18482c393a42Smrg FC_PROPORTIONAL where the font has glyphs of many widths. 18492c393a42Smrg 18502c393a42SmrgVersion 18512c393a42Smrg 18522c393a42Smrg Fontconfig version 2.6.0 18532c393a42Smrg 18542c393a42SmrgFcFreeTypeQuery 18552c393a42Smrg 18562c393a42SmrgName 18572c393a42Smrg 18582c393a42Smrg FcFreeTypeQuery -- compute pattern from font file (and index) 18592c393a42Smrg 18602c393a42SmrgSynopsis 18612c393a42Smrg 18622c393a42Smrg#include <fontconfig.h> 18632c393a42Smrg#include <fcfreetype.h> 18642c393a42Smrg 18652c393a42Smrg FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id, 18662c393a42Smrg FcBlanks *blanks, int *count); 18672c393a42Smrg 18682c393a42SmrgDescription 18692c393a42Smrg 18702c393a42Smrg Constructs a pattern representing the 'id'th font in 'file'. 18712c393a42Smrg The number of fonts in 'file' is returned in 'count'. 18722c393a42Smrg 18732c393a42SmrgVersion 18742c393a42Smrg 18752c393a42Smrg Fontconfig version 2.6.0 18762c393a42Smrg 18772c393a42SmrgFcFreeTypeQueryFace 18782c393a42Smrg 18792c393a42SmrgName 18802c393a42Smrg 18812c393a42Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 18822c393a42Smrg 18832c393a42SmrgSynopsis 18842c393a42Smrg 18852c393a42Smrg#include <fontconfig.h> 18862c393a42Smrg#include <fcfreetype.h> 18872c393a42Smrg 18882c393a42Smrg FcPattern * FcFreeTypeQueryFace(const FT_Face face, const 18892c393a42Smrg FcChar8 *file, int id, FcBlanks *blanks); 18902c393a42Smrg 18912c393a42SmrgDescription 18922c393a42Smrg 18932c393a42Smrg Constructs a pattern representing 'face'. 'file' and 'id' are 18942c393a42Smrg used solely as data for pattern elements (FC_FILE, FC_INDEX and 18952c393a42Smrg sometimes FC_FAMILY). 18962c393a42Smrg 18972c393a42SmrgVersion 18982c393a42Smrg 18992c393a42Smrg Fontconfig version 2.6.0 19002c393a42Smrg __________________________________________________________ 19012c393a42Smrg 19022c393a42Smrg4.6. FcValue 19032c393a42Smrg 19042c393a42Smrg Table of Contents 19052c393a42Smrg FcValueDestroy -- Free a value 19062c393a42Smrg FcValueSave -- Copy a value 19072c393a42Smrg FcValuePrint -- Print a value to stdout 19082c393a42Smrg FcValueEqual -- Test two values for equality 19092c393a42Smrg 19102c393a42Smrg FcValue is a structure containing a type tag and a union of all 19112c393a42Smrg possible datatypes. The tag is an enum of type FcType and is 19122c393a42Smrg intended to provide a measure of run-time typechecking, 19132c393a42Smrg although that depends on careful programming. 19142c393a42Smrg 19152c393a42SmrgFcValueDestroy 19162c393a42Smrg 19172c393a42SmrgName 19182c393a42Smrg 19192c393a42Smrg FcValueDestroy -- Free a value 19202c393a42Smrg 19212c393a42SmrgSynopsis 19222c393a42Smrg 19232c393a42Smrg#include <fontconfig.h> 19242c393a42Smrg 19252c393a42Smrg void FcValueDestroy(FcValue v); 19262c393a42Smrg 19272c393a42SmrgDescription 19282c393a42Smrg 19292c393a42Smrg Frees any memory referenced by v. Values of type FcTypeString, 19302c393a42Smrg FcTypeMatrix and FcTypeCharSet reference memory, the other 19312c393a42Smrg types do not. 19322c393a42Smrg 19332c393a42SmrgVersion 19342c393a42Smrg 19352c393a42Smrg Fontconfig version 2.6.0 19362c393a42Smrg 19372c393a42SmrgFcValueSave 19382c393a42Smrg 19392c393a42SmrgName 19402c393a42Smrg 19412c393a42Smrg FcValueSave -- Copy a value 19422c393a42Smrg 19432c393a42SmrgSynopsis 19442c393a42Smrg 19452c393a42Smrg#include <fontconfig.h> 19462c393a42Smrg 19472c393a42Smrg FcValue FcValueSave(FcValue v); 19482c393a42Smrg 19492c393a42SmrgDescription 19502c393a42Smrg 19512c393a42Smrg Returns a copy of v duplicating any object referenced by it so 19522c393a42Smrg that v may be safely destroyed without harming the new value. 19532c393a42Smrg 19542c393a42SmrgVersion 19552c393a42Smrg 19562c393a42Smrg Fontconfig version 2.6.0 19572c393a42Smrg 19582c393a42SmrgFcValuePrint 19592c393a42Smrg 19602c393a42SmrgName 19612c393a42Smrg 19622c393a42Smrg FcValuePrint -- Print a value to stdout 19632c393a42Smrg 19642c393a42SmrgSynopsis 19652c393a42Smrg 19662c393a42Smrg#include <fontconfig.h> 19672c393a42Smrg 19682c393a42Smrg void FcValuePrint(FcValue v); 19692c393a42Smrg 19702c393a42SmrgDescription 19712c393a42Smrg 19722c393a42Smrg Prints a human-readable representation of v to stdout. The 19732c393a42Smrg format should not be considered part of the library 19742c393a42Smrg specification as it may change in the future. 19752c393a42Smrg 19762c393a42SmrgVersion 19772c393a42Smrg 19782c393a42Smrg Fontconfig version 2.6.0 19792c393a42Smrg 19802c393a42SmrgFcValueEqual 19812c393a42Smrg 19822c393a42SmrgName 19832c393a42Smrg 19842c393a42Smrg FcValueEqual -- Test two values for equality 19852c393a42Smrg 19862c393a42SmrgSynopsis 19872c393a42Smrg 19882c393a42Smrg#include <fontconfig.h> 19892c393a42Smrg 19902c393a42Smrg FcBool FcValueEqual(FcValue v_a, FcValue v_b); 19912c393a42Smrg 19922c393a42SmrgDescription 19932c393a42Smrg 19942c393a42Smrg Compares two values. Integers and Doubles are compared as 19952c393a42Smrg numbers; otherwise the two values have to be the same type to 19962c393a42Smrg be considered equal. Strings are compared ignoring case. 19972c393a42Smrg 19982c393a42SmrgVersion 19992c393a42Smrg 20002c393a42Smrg Fontconfig version 2.6.0 20012c393a42Smrg __________________________________________________________ 20022c393a42Smrg 20032c393a42Smrg4.7. FcCharSet 20042c393a42Smrg 20052c393a42Smrg Table of Contents 20062c393a42Smrg FcCharSetCreate -- Create an empty character set 20072c393a42Smrg FcCharSetDestroy -- Destroy a character set 20082c393a42Smrg FcCharSetAddChar -- Add a character to a charset 20092c393a42Smrg FcCharSetCopy -- Copy a charset 20102c393a42Smrg FcCharSetEqual -- Compare two charsets 20112c393a42Smrg FcCharSetIntersect -- Intersect charsets 20122c393a42Smrg FcCharSetUnion -- Add charsets 20132c393a42Smrg FcCharSetSubtract -- Subtract charsets 20142c393a42Smrg FcCharSetHasChar -- Check a charset for a char 20152c393a42Smrg FcCharSetCount -- Count entries in a charset 20162c393a42Smrg FcCharSetIntersectCount -- Intersect and count charsets 20172c393a42Smrg FcCharSetSubtractCount -- Subtract and count charsets 20182c393a42Smrg FcCharSetIsSubset -- Test for charset inclusion 20192c393a42Smrg FcCharSetFirstPage -- Start enumerating charset contents 20202c393a42Smrg FcCharSetNextPage -- Continue enumerating charset contents 20212c393a42Smrg FcCharSetCoverage -- DEPRECATED return coverage for a Unicode 20222c393a42Smrg page 20232c393a42Smrg 20242c393a42Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 20252c393a42Smrg 20262c393a42Smrg An FcCharSet is a boolean array indicating a set of unicode 20272c393a42Smrg chars. Those associated with a font are marked constant and 20282c393a42Smrg cannot be edited. FcCharSets may be reference counted 20292c393a42Smrg internally to reduce memory consumption; this may be visible to 20302c393a42Smrg applications as the result of FcCharSetCopy may return it's 20312c393a42Smrg argument, and that CharSet may remain unmodifiable. 20322c393a42Smrg 20332c393a42SmrgFcCharSetCreate 20342c393a42Smrg 20352c393a42SmrgName 20362c393a42Smrg 20372c393a42Smrg FcCharSetCreate -- Create an empty character set 20382c393a42Smrg 20392c393a42SmrgSynopsis 20402c393a42Smrg 20412c393a42Smrg#include <fontconfig.h> 20422c393a42Smrg 20432c393a42Smrg FcCharSet * FcCharSetCreate(void); 20442c393a42Smrg 20452c393a42SmrgDescription 20462c393a42Smrg 20472c393a42Smrg FcCharSetCreate allocates and initializes a new empty character 20482c393a42Smrg set object. 20492c393a42Smrg 20502c393a42SmrgVersion 20512c393a42Smrg 20522c393a42Smrg Fontconfig version 2.6.0 20532c393a42Smrg 20542c393a42SmrgFcCharSetDestroy 20552c393a42Smrg 20562c393a42SmrgName 20572c393a42Smrg 20582c393a42Smrg FcCharSetDestroy -- Destroy a character set 20592c393a42Smrg 20602c393a42SmrgSynopsis 20612c393a42Smrg 20622c393a42Smrg#include <fontconfig.h> 20632c393a42Smrg 20642c393a42Smrg void FcCharSetDestroy(FcCharSet *fcs); 20652c393a42Smrg 20662c393a42SmrgDescription 20672c393a42Smrg 20682c393a42Smrg FcCharSetDestroy decrements the reference count fcs. If the 20692c393a42Smrg reference count becomes zero, all memory referenced is freed. 20702c393a42Smrg 20712c393a42SmrgVersion 20722c393a42Smrg 20732c393a42Smrg Fontconfig version 2.6.0 20742c393a42Smrg 20752c393a42SmrgFcCharSetAddChar 20762c393a42Smrg 20772c393a42SmrgName 20782c393a42Smrg 20792c393a42Smrg FcCharSetAddChar -- Add a character to a charset 20802c393a42Smrg 20812c393a42SmrgSynopsis 20822c393a42Smrg 20832c393a42Smrg#include <fontconfig.h> 20842c393a42Smrg 20852c393a42Smrg FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4); 20862c393a42Smrg 20872c393a42SmrgDescription 20882c393a42Smrg 20892c393a42Smrg FcCharSetAddChar adds a single unicode char to the set, 20902c393a42Smrg returning FcFalse on failure, either as a result of a constant 20912c393a42Smrg set or from running out of memory. 20922c393a42Smrg 20932c393a42SmrgVersion 20942c393a42Smrg 20952c393a42Smrg Fontconfig version 2.6.0 20962c393a42Smrg 20972c393a42SmrgFcCharSetCopy 20982c393a42Smrg 20992c393a42SmrgName 21002c393a42Smrg 21012c393a42Smrg FcCharSetCopy -- Copy a charset 21022c393a42Smrg 21032c393a42SmrgSynopsis 21042c393a42Smrg 21052c393a42Smrg#include <fontconfig.h> 21062c393a42Smrg 21072c393a42Smrg FcCharSet * FcCharSetCopy(FcCharSet *src); 21082c393a42Smrg 21092c393a42SmrgDescription 21102c393a42Smrg 21112c393a42Smrg Makes a copy of src; note that this may not actually do 21122c393a42Smrg anything more than increment the reference count on src. 21132c393a42Smrg 21142c393a42SmrgVersion 21152c393a42Smrg 21162c393a42Smrg Fontconfig version 2.6.0 21172c393a42Smrg 21182c393a42SmrgFcCharSetEqual 21192c393a42Smrg 21202c393a42SmrgName 21212c393a42Smrg 21222c393a42Smrg FcCharSetEqual -- Compare two charsets 21232c393a42Smrg 21242c393a42SmrgSynopsis 21252c393a42Smrg 21262c393a42Smrg#include <fontconfig.h> 21272c393a42Smrg 21282c393a42Smrg FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b); 21292c393a42Smrg 21302c393a42SmrgDescription 21312c393a42Smrg 21322c393a42Smrg Returns whether a and b contain the same set of unicode chars. 21332c393a42Smrg 21342c393a42SmrgVersion 21352c393a42Smrg 21362c393a42Smrg Fontconfig version 2.6.0 21372c393a42Smrg 21382c393a42SmrgFcCharSetIntersect 21392c393a42Smrg 21402c393a42SmrgName 21412c393a42Smrg 21422c393a42Smrg FcCharSetIntersect -- Intersect charsets 21432c393a42Smrg 21442c393a42SmrgSynopsis 21452c393a42Smrg 21462c393a42Smrg#include <fontconfig.h> 21472c393a42Smrg 21482c393a42Smrg FcCharSet * FcCharSetIntersect(const FcCharSet *a, const 21492c393a42Smrg FcCharSet *b); 21502c393a42Smrg 21512c393a42SmrgDescription 21522c393a42Smrg 21532c393a42Smrg Returns a set including only those chars found in both a and b. 21542c393a42Smrg 21552c393a42SmrgVersion 21562c393a42Smrg 21572c393a42Smrg Fontconfig version 2.6.0 21582c393a42Smrg 21592c393a42SmrgFcCharSetUnion 21602c393a42Smrg 21612c393a42SmrgName 21622c393a42Smrg 21632c393a42Smrg FcCharSetUnion -- Add charsets 21642c393a42Smrg 21652c393a42SmrgSynopsis 21662c393a42Smrg 21672c393a42Smrg#include <fontconfig.h> 21682c393a42Smrg 21692c393a42Smrg FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet 21702c393a42Smrg *b); 21712c393a42Smrg 21722c393a42SmrgDescription 21732c393a42Smrg 21742c393a42Smrg Returns a set including only those chars found in either a or 21752c393a42Smrg b. 21762c393a42Smrg 21772c393a42SmrgVersion 21782c393a42Smrg 21792c393a42Smrg Fontconfig version 2.6.0 21802c393a42Smrg 21812c393a42SmrgFcCharSetSubtract 21822c393a42Smrg 21832c393a42SmrgName 21842c393a42Smrg 21852c393a42Smrg FcCharSetSubtract -- Subtract charsets 21862c393a42Smrg 21872c393a42SmrgSynopsis 21882c393a42Smrg 21892c393a42Smrg#include <fontconfig.h> 21902c393a42Smrg 21912c393a42Smrg FcCharSet * FcCharSetSubtract(const FcCharSet *a, const 21922c393a42Smrg FcCharSet *b); 21932c393a42Smrg 21942c393a42SmrgDescription 21952c393a42Smrg 21962c393a42Smrg Returns a set including only those chars found in a but not b. 21972c393a42Smrg 21982c393a42SmrgVersion 21992c393a42Smrg 22002c393a42Smrg Fontconfig version 2.6.0 22012c393a42Smrg 22022c393a42SmrgFcCharSetHasChar 22032c393a42Smrg 22042c393a42SmrgName 22052c393a42Smrg 22062c393a42Smrg FcCharSetHasChar -- Check a charset for a char 22072c393a42Smrg 22082c393a42SmrgSynopsis 22092c393a42Smrg 22102c393a42Smrg#include <fontconfig.h> 22112c393a42Smrg 22122c393a42Smrg FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4); 22132c393a42Smrg 22142c393a42SmrgDescription 22152c393a42Smrg 22162c393a42Smrg Returns whether fcs contains the char ucs4. 22172c393a42Smrg 22182c393a42SmrgVersion 22192c393a42Smrg 22202c393a42Smrg Fontconfig version 2.6.0 22212c393a42Smrg 22222c393a42SmrgFcCharSetCount 22232c393a42Smrg 22242c393a42SmrgName 22252c393a42Smrg 22262c393a42Smrg FcCharSetCount -- Count entries in a charset 22272c393a42Smrg 22282c393a42SmrgSynopsis 22292c393a42Smrg 22302c393a42Smrg#include <fontconfig.h> 22312c393a42Smrg 22322c393a42Smrg FcChar32 FcCharSetCount(const FcCharSet *a); 22332c393a42Smrg 22342c393a42SmrgDescription 22352c393a42Smrg 22362c393a42Smrg Returns the total number of unicode chars in a. 22372c393a42Smrg 22382c393a42SmrgVersion 22392c393a42Smrg 22402c393a42Smrg Fontconfig version 2.6.0 22412c393a42Smrg 22422c393a42SmrgFcCharSetIntersectCount 22432c393a42Smrg 22442c393a42SmrgName 22452c393a42Smrg 22462c393a42Smrg FcCharSetIntersectCount -- Intersect and count charsets 22472c393a42Smrg 22482c393a42SmrgSynopsis 22492c393a42Smrg 22502c393a42Smrg#include <fontconfig.h> 22512c393a42Smrg 22522c393a42Smrg FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const 22532c393a42Smrg FcCharSet *b); 22542c393a42Smrg 22552c393a42SmrgDescription 22562c393a42Smrg 22572c393a42Smrg Returns the number of chars that are in both a and b. 22582c393a42Smrg 22592c393a42SmrgVersion 22602c393a42Smrg 22612c393a42Smrg Fontconfig version 2.6.0 22622c393a42Smrg 22632c393a42SmrgFcCharSetSubtractCount 22642c393a42Smrg 22652c393a42SmrgName 22662c393a42Smrg 22672c393a42Smrg FcCharSetSubtractCount -- Subtract and count charsets 22682c393a42Smrg 22692c393a42SmrgSynopsis 22702c393a42Smrg 22712c393a42Smrg#include <fontconfig.h> 22722c393a42Smrg 22732c393a42Smrg FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const 22742c393a42Smrg FcCharSet *b); 22752c393a42Smrg 22762c393a42SmrgDescription 22772c393a42Smrg 22782c393a42Smrg Returns the number of chars that are in a but not in b. 22792c393a42Smrg 22802c393a42SmrgVersion 22812c393a42Smrg 22822c393a42Smrg Fontconfig version 2.6.0 22832c393a42Smrg 22842c393a42SmrgFcCharSetIsSubset 22852c393a42Smrg 22862c393a42SmrgName 22872c393a42Smrg 22882c393a42Smrg FcCharSetIsSubset -- Test for charset inclusion 22892c393a42Smrg 22902c393a42SmrgSynopsis 22912c393a42Smrg 22922c393a42Smrg#include <fontconfig.h> 22932c393a42Smrg 22942c393a42Smrg FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet 22952c393a42Smrg *b); 22962c393a42Smrg 22972c393a42SmrgDescription 22982c393a42Smrg 22992c393a42Smrg Returns whether a is a subset of b. 23002c393a42Smrg 23012c393a42SmrgVersion 23022c393a42Smrg 23032c393a42Smrg Fontconfig version 2.6.0 23042c393a42Smrg 23052c393a42SmrgFcCharSetFirstPage 23062c393a42Smrg 23072c393a42SmrgName 23082c393a42Smrg 23092c393a42Smrg FcCharSetFirstPage -- Start enumerating charset contents 23102c393a42Smrg 23112c393a42SmrgSynopsis 23122c393a42Smrg 23132c393a42Smrg#include <fontconfig.h> 23142c393a42Smrg 23152c393a42Smrg FcChar32 FcCharSetFirstPage(const FcCharSet *a, 23162c393a42Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 23172c393a42Smrg 23182c393a42SmrgDescription 23192c393a42Smrg 23202c393a42Smrg Builds an array of bits marking the first page of Unicode 23212c393a42Smrg coverage of a. Returns the base of the array. next contains the 23222c393a42Smrg next page in the font. 23232c393a42Smrg 23242c393a42SmrgVersion 23252c393a42Smrg 23262c393a42Smrg Fontconfig version 2.6.0 23272c393a42Smrg 23282c393a42SmrgFcCharSetNextPage 23292c393a42Smrg 23302c393a42SmrgName 23312c393a42Smrg 23322c393a42Smrg FcCharSetNextPage -- Continue enumerating charset contents 23332c393a42Smrg 23342c393a42SmrgSynopsis 23352c393a42Smrg 23362c393a42Smrg#include <fontconfig.h> 23372c393a42Smrg 23382c393a42Smrg FcChar32 FcCharSetNextPage(const FcCharSet *a, 23392c393a42Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 23402c393a42Smrg 23412c393a42SmrgDescription 23422c393a42Smrg 23432c393a42Smrg Builds an array of bits marking the Unicode coverage of a for 23442c393a42Smrg page *next. Returns the base of the array. next contains the 23452c393a42Smrg next page in the font. 23462c393a42Smrg 23472c393a42SmrgVersion 23482c393a42Smrg 23492c393a42Smrg Fontconfig version 2.6.0 23502c393a42Smrg 23512c393a42SmrgFcCharSetCoverage 23522c393a42Smrg 23532c393a42SmrgName 23542c393a42Smrg 23552c393a42Smrg FcCharSetCoverage -- DEPRECATED return coverage for a Unicode 23562c393a42Smrg page 23572c393a42Smrg 23582c393a42SmrgSynopsis 23592c393a42Smrg 23602c393a42Smrg#include <fontconfig.h> 23612c393a42Smrg 23622c393a42Smrg FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page, 23632c393a42Smrg FcChar32[8]result); 23642c393a42Smrg 23652c393a42SmrgDescription 23662c393a42Smrg 23672c393a42Smrg DEPRECATED This function returns a bitmask in result which 23682c393a42Smrg indicates which code points in page are included in a. 23692c393a42Smrg FcCharSetCoverage returns the next page in the charset which 23702c393a42Smrg has any coverage. 23712c393a42Smrg 23722c393a42SmrgVersion 23732c393a42Smrg 23742c393a42Smrg Fontconfig version 2.6.0 23752c393a42Smrg 23762c393a42SmrgFcCharSetNew 23772c393a42Smrg 23782c393a42SmrgName 23792c393a42Smrg 23802c393a42Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 23812c393a42Smrg 23822c393a42SmrgSynopsis 23832c393a42Smrg 23842c393a42Smrg#include <fontconfig.h> 23852c393a42Smrg 23862c393a42Smrg FcCharSet * FcCharSetNew(void); 23872c393a42Smrg 23882c393a42SmrgDescription 23892c393a42Smrg 23902c393a42Smrg FcCharSetNew is a DEPRECATED alias for FcCharSetCreate. 23912c393a42Smrg 23922c393a42SmrgVersion 23932c393a42Smrg 23942c393a42Smrg Fontconfig version 2.6.0 23952c393a42Smrg __________________________________________________________ 23962c393a42Smrg 23972c393a42Smrg4.8. FcLangSet 23982c393a42Smrg 23992c393a42Smrg Table of Contents 24002c393a42Smrg FcLangSetCreate -- create a langset object 24012c393a42Smrg FcLangSetDestroy -- destroy a langset object 24022c393a42Smrg FcLangSetCopy -- copy a langset object 24032c393a42Smrg FcLangSetAdd -- add a language to a langset 24042c393a42Smrg FcLangSetCompare -- compare language sets 24052c393a42Smrg FcLangSetContains -- check langset subset relation 24062c393a42Smrg FcLangSetEqual -- test for matching langsets 24072c393a42Smrg FcLangSetHash -- return a hash value for a langset 24082c393a42Smrg FcLangSetHasLang -- test langset for language support 24092c393a42Smrg FcGetLangs -- Get list of languages 24102c393a42Smrg FcLangGetCharSet -- Get character map for a language 24112c393a42Smrg 24122c393a42Smrg An FcLangSet is a set of language names (each of which include 24132c393a42Smrg language and an optional territory). They are used when 24142c393a42Smrg selecting fonts to indicate which languages the fonts need to 24152c393a42Smrg support. Each font is marked, using language orthography 24162c393a42Smrg information built into fontconfig, with the set of supported 24172c393a42Smrg languages. 24182c393a42Smrg 24192c393a42SmrgFcLangSetCreate 24202c393a42Smrg 24212c393a42SmrgName 24222c393a42Smrg 24232c393a42Smrg FcLangSetCreate -- create a langset object 24242c393a42Smrg 24252c393a42SmrgSynopsis 24262c393a42Smrg 24272c393a42Smrg#include <fontconfig.h> 24282c393a42Smrg 24292c393a42Smrg FcLangSet * FcLangSetCreate(void); 24302c393a42Smrg 24312c393a42SmrgDescription 24322c393a42Smrg 24332c393a42Smrg FcLangSetCreate creates a new FcLangSet object. 24342c393a42Smrg 24352c393a42SmrgVersion 24362c393a42Smrg 24372c393a42Smrg Fontconfig version 2.6.0 24382c393a42Smrg 24392c393a42SmrgFcLangSetDestroy 24402c393a42Smrg 24412c393a42SmrgName 24422c393a42Smrg 24432c393a42Smrg FcLangSetDestroy -- destroy a langset object 24442c393a42Smrg 24452c393a42SmrgSynopsis 24462c393a42Smrg 24472c393a42Smrg#include <fontconfig.h> 24482c393a42Smrg 24492c393a42Smrg void FcLangSetDestroy(FcLangSet *ls); 24502c393a42Smrg 24512c393a42SmrgDescription 24522c393a42Smrg 24532c393a42Smrg FcLangSetDestroy destroys a FcLangSet object, freeing all 24542c393a42Smrg memory associated with it. 24552c393a42Smrg 24562c393a42SmrgVersion 24572c393a42Smrg 24582c393a42Smrg Fontconfig version 2.6.0 24592c393a42Smrg 24602c393a42SmrgFcLangSetCopy 24612c393a42Smrg 24622c393a42SmrgName 24632c393a42Smrg 24642c393a42Smrg FcLangSetCopy -- copy a langset object 24652c393a42Smrg 24662c393a42SmrgSynopsis 24672c393a42Smrg 24682c393a42Smrg#include <fontconfig.h> 24692c393a42Smrg 24702c393a42Smrg FcLangSet * FcLangSetCopy(const FcLangSet *ls); 24712c393a42Smrg 24722c393a42SmrgDescription 24732c393a42Smrg 24742c393a42Smrg FcLangSetCopy creates a new FcLangSet object and populates it 24752c393a42Smrg with the contents of ls. 24762c393a42Smrg 24772c393a42SmrgVersion 24782c393a42Smrg 24792c393a42Smrg Fontconfig version 2.6.0 24802c393a42Smrg 24812c393a42SmrgFcLangSetAdd 24822c393a42Smrg 24832c393a42SmrgName 24842c393a42Smrg 24852c393a42Smrg FcLangSetAdd -- add a language to a langset 24862c393a42Smrg 24872c393a42SmrgSynopsis 24882c393a42Smrg 24892c393a42Smrg#include <fontconfig.h> 24902c393a42Smrg 24912c393a42Smrg FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang); 24922c393a42Smrg 24932c393a42SmrgDescription 24942c393a42Smrg 24952c393a42Smrg lang is added to ls. lang should be of the form Ll-Tt where Ll 24962c393a42Smrg is a two or three letter language from ISO 639 and Tt is a 24972c393a42Smrg territory from ISO 3166. 24982c393a42Smrg 24992c393a42SmrgVersion 25002c393a42Smrg 25012c393a42Smrg Fontconfig version 2.6.0 25022c393a42Smrg 25032c393a42SmrgFcLangSetCompare 25042c393a42Smrg 25052c393a42SmrgName 25062c393a42Smrg 25072c393a42Smrg FcLangSetCompare -- compare language sets 25082c393a42Smrg 25092c393a42SmrgSynopsis 25102c393a42Smrg 25112c393a42Smrg#include <fontconfig.h> 25122c393a42Smrg 25132c393a42Smrg FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const 25142c393a42Smrg FcLangSet *ls_b); 25152c393a42Smrg 25162c393a42SmrgDescription 25172c393a42Smrg 25182c393a42Smrg FcLangSetCompare compares language coverage for ls_a and ls_b. 25192c393a42Smrg If they share any language and territory pair, this function 25202c393a42Smrg returns FcLangEqual. If they share a language but differ in 25212c393a42Smrg which territory that language is for, this function returns 25222c393a42Smrg FcLangDiffentTerritory. If they share no languages in common, 25232c393a42Smrg this function returns FcLangDifferentLang. 25242c393a42Smrg 25252c393a42SmrgVersion 25262c393a42Smrg 25272c393a42Smrg Fontconfig version 2.6.0 25282c393a42Smrg 25292c393a42SmrgFcLangSetContains 25302c393a42Smrg 25312c393a42SmrgName 25322c393a42Smrg 25332c393a42Smrg FcLangSetContains -- check langset subset relation 25342c393a42Smrg 25352c393a42SmrgSynopsis 25362c393a42Smrg 25372c393a42Smrg#include <fontconfig.h> 25382c393a42Smrg 25392c393a42Smrg FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet 25402c393a42Smrg *ls_b); 25412c393a42Smrg 25422c393a42SmrgDescription 25432c393a42Smrg 25442c393a42Smrg FcLangSetContains returns FcTrue if ls_a contains every 25452c393a42Smrg language in ls_b. ls_a will 'contain' a language from ls_b if 25462c393a42Smrg ls_a has exactly the language, or either the language or ls_a 25472c393a42Smrg has no territory. 25482c393a42Smrg 25492c393a42SmrgVersion 25502c393a42Smrg 25512c393a42Smrg Fontconfig version 2.6.0 25522c393a42Smrg 25532c393a42SmrgFcLangSetEqual 25542c393a42Smrg 25552c393a42SmrgName 25562c393a42Smrg 25572c393a42Smrg FcLangSetEqual -- test for matching langsets 25582c393a42Smrg 25592c393a42SmrgSynopsis 25602c393a42Smrg 25612c393a42Smrg#include <fontconfig.h> 25622c393a42Smrg 25632c393a42Smrg FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet 25642c393a42Smrg *ls_b); 25652c393a42Smrg 25662c393a42SmrgDescription 25672c393a42Smrg 25682c393a42Smrg Returns FcTrue if and only if ls_a supports precisely the same 25692c393a42Smrg language and territory combinations as ls_b. 25702c393a42Smrg 25712c393a42SmrgVersion 25722c393a42Smrg 25732c393a42Smrg Fontconfig version 2.6.0 25742c393a42Smrg 25752c393a42SmrgFcLangSetHash 25762c393a42Smrg 25772c393a42SmrgName 25782c393a42Smrg 25792c393a42Smrg FcLangSetHash -- return a hash value for a langset 25802c393a42Smrg 25812c393a42SmrgSynopsis 25822c393a42Smrg 25832c393a42Smrg#include <fontconfig.h> 25842c393a42Smrg 25852c393a42Smrg FcChar32 FcLangSetHash(const FcLangSet *ls); 25862c393a42Smrg 25872c393a42SmrgDescription 25882c393a42Smrg 25892c393a42Smrg This function returns a value which depends solely on the 25902c393a42Smrg languages supported by ls. Any language which equals ls will 25912c393a42Smrg have the same result from FcLangSetHash. However, two langsets 25922c393a42Smrg with the same hash value may not be equal. 25932c393a42Smrg 25942c393a42SmrgVersion 25952c393a42Smrg 25962c393a42Smrg Fontconfig version 2.6.0 25972c393a42Smrg 25982c393a42SmrgFcLangSetHasLang 25992c393a42Smrg 26002c393a42SmrgName 26012c393a42Smrg 26022c393a42Smrg FcLangSetHasLang -- test langset for language support 26032c393a42Smrg 26042c393a42SmrgSynopsis 26052c393a42Smrg 26062c393a42Smrg#include <fontconfig.h> 26072c393a42Smrg 26082c393a42Smrg FcLangResult FcLangSetHasLang(const FcLangSet *ls, const 26092c393a42Smrg FcChar8 *lang); 26102c393a42Smrg 26112c393a42SmrgDescription 26122c393a42Smrg 26132c393a42Smrg FcLangSetHasLang checks whether ls supports lang. If ls has a 26142c393a42Smrg matching language and territory pair, this function returns 26152c393a42Smrg FcLangEqual. If ls has a matching language but differs in which 26162c393a42Smrg territory that language is for, this function returns 26172c393a42Smrg FcLangDiffentTerritory. If ls has no matching language, this 26182c393a42Smrg function returns FcLangDifferentLang. 26192c393a42Smrg 26202c393a42SmrgVersion 26212c393a42Smrg 26222c393a42Smrg Fontconfig version 2.6.0 26232c393a42Smrg 26242c393a42SmrgFcGetLangs 26252c393a42Smrg 26262c393a42SmrgName 26272c393a42Smrg 26282c393a42Smrg FcGetLangs -- Get list of languages 26292c393a42Smrg 26302c393a42SmrgSynopsis 26312c393a42Smrg 26322c393a42Smrg#include <fontconfig.h> 26332c393a42Smrg 26342c393a42Smrg FcStrSet * FcGetLangs(void); 26352c393a42Smrg 26362c393a42SmrgDescription 26372c393a42Smrg 26382c393a42Smrg Returns a string set of all known languages. 26392c393a42Smrg 26402c393a42SmrgVersion 26412c393a42Smrg 26422c393a42Smrg Fontconfig version 2.6.0 26432c393a42Smrg 26442c393a42SmrgFcLangGetCharSet 26452c393a42Smrg 26462c393a42SmrgName 26472c393a42Smrg 26482c393a42Smrg FcLangGetCharSet -- Get character map for a language 26492c393a42Smrg 26502c393a42SmrgSynopsis 26512c393a42Smrg 26522c393a42Smrg#include <fontconfig.h> 26532c393a42Smrg 26542c393a42Smrg const FcCharSet * FcLangGetCharSet(const FcChar8 *lang); 26552c393a42Smrg 26562c393a42SmrgDescription 26572c393a42Smrg 26582c393a42Smrg Returns the FcCharMap for a language. 26592c393a42Smrg 26602c393a42SmrgVersion 26612c393a42Smrg 26622c393a42Smrg Fontconfig version 2.6.0 26632c393a42Smrg __________________________________________________________ 26642c393a42Smrg 26652c393a42Smrg4.9. FcMatrix 26662c393a42Smrg 26672c393a42Smrg Table of Contents 26682c393a42Smrg FcMatrixInit -- initialize an FcMatrix structure 26692c393a42Smrg FcMatrixCopy -- Copy a matrix 26702c393a42Smrg FcMatrixEqual -- Compare two matrices 26712c393a42Smrg FcMatrixMultiply -- Multiply matrices 26722c393a42Smrg FcMatrixRotate -- Rotate a matrix 26732c393a42Smrg FcMatrixScale -- Scale a matrix 26742c393a42Smrg FcMatrixShear -- Shear a matrix 26752c393a42Smrg 26762c393a42Smrg FcMatrix structures hold an affine transformation in matrix 26772c393a42Smrg form. 26782c393a42Smrg 26792c393a42SmrgFcMatrixInit 26802c393a42Smrg 26812c393a42SmrgName 26822c393a42Smrg 26832c393a42Smrg FcMatrixInit -- initialize an FcMatrix structure 26842c393a42Smrg 26852c393a42SmrgSynopsis 26862c393a42Smrg 26872c393a42Smrg#include <fontconfig.h> 26882c393a42Smrg 26892c393a42Smrg void FcMatrixInit(FcMatrix *matrix); 26902c393a42Smrg 26912c393a42SmrgDescription 26922c393a42Smrg 26932c393a42Smrg FcMatrixInit initializes matrix to the identity matrix. 26942c393a42Smrg 26952c393a42SmrgVersion 26962c393a42Smrg 26972c393a42Smrg Fontconfig version 2.6.0 26982c393a42Smrg 26992c393a42SmrgFcMatrixCopy 27002c393a42Smrg 27012c393a42SmrgName 27022c393a42Smrg 27032c393a42Smrg FcMatrixCopy -- Copy a matrix 27042c393a42Smrg 27052c393a42SmrgSynopsis 27062c393a42Smrg 27072c393a42Smrg#include <fontconfig.h> 27082c393a42Smrg 27092c393a42Smrg void FcMatrixCopy(const FcMatrix *matrix); 27102c393a42Smrg 27112c393a42SmrgDescription 27122c393a42Smrg 27132c393a42Smrg FcMatrixCopy allocates a new FcMatrix and copies mat into it. 27142c393a42Smrg 27152c393a42SmrgVersion 27162c393a42Smrg 27172c393a42Smrg Fontconfig version 2.6.0 27182c393a42Smrg 27192c393a42SmrgFcMatrixEqual 27202c393a42Smrg 27212c393a42SmrgName 27222c393a42Smrg 27232c393a42Smrg FcMatrixEqual -- Compare two matrices 27242c393a42Smrg 27252c393a42SmrgSynopsis 27262c393a42Smrg 27272c393a42Smrg#include <fontconfig.h> 27282c393a42Smrg 27292c393a42Smrg void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix 27302c393a42Smrg *matrix2); 27312c393a42Smrg 27322c393a42SmrgDescription 27332c393a42Smrg 27342c393a42Smrg FcMatrixEqual compares matrix1 and matrix2 returning FcTrue 27352c393a42Smrg when they are equal and FcFalse when they are not. 27362c393a42Smrg 27372c393a42SmrgVersion 27382c393a42Smrg 27392c393a42Smrg Fontconfig version 2.6.0 27402c393a42Smrg 27412c393a42SmrgFcMatrixMultiply 27422c393a42Smrg 27432c393a42SmrgName 27442c393a42Smrg 27452c393a42Smrg FcMatrixMultiply -- Multiply matrices 27462c393a42Smrg 27472c393a42SmrgSynopsis 27482c393a42Smrg 27492c393a42Smrg#include <fontconfig.h> 27502c393a42Smrg 27512c393a42Smrg void FcMatrixMultiply(FcMatrix *result, const FcMatrix 27522c393a42Smrg *matrix1, const FcMatrix *matrix2); 27532c393a42Smrg 27542c393a42SmrgDescription 27552c393a42Smrg 27562c393a42Smrg FcMatrixMultiply multiplies matrix1 and matrix2 storing the 27572c393a42Smrg result in result. 27582c393a42Smrg 27592c393a42SmrgVersion 27602c393a42Smrg 27612c393a42Smrg Fontconfig version 2.6.0 27622c393a42Smrg 27632c393a42SmrgFcMatrixRotate 27642c393a42Smrg 27652c393a42SmrgName 27662c393a42Smrg 27672c393a42Smrg FcMatrixRotate -- Rotate a matrix 27682c393a42Smrg 27692c393a42SmrgSynopsis 27702c393a42Smrg 27712c393a42Smrg#include <fontconfig.h> 27722c393a42Smrg 27732c393a42Smrg void FcMatrixRotate(FcMatrix *matrix, double cos, double sin); 27742c393a42Smrg 27752c393a42SmrgDescription 27762c393a42Smrg 27772c393a42Smrg FcMatrixRotate rotates matrix by the angle who's sine is sin 27782c393a42Smrg and cosine is cos. This is done by multiplying by the matrix: 27792c393a42Smrg cos -sin 27802c393a42Smrg sin cos 27812c393a42Smrg 27822c393a42SmrgVersion 27832c393a42Smrg 27842c393a42Smrg Fontconfig version 2.6.0 27852c393a42Smrg 27862c393a42SmrgFcMatrixScale 27872c393a42Smrg 27882c393a42SmrgName 27892c393a42Smrg 27902c393a42Smrg FcMatrixScale -- Scale a matrix 27912c393a42Smrg 27922c393a42SmrgSynopsis 27932c393a42Smrg 27942c393a42Smrg#include <fontconfig.h> 27952c393a42Smrg 27962c393a42Smrg void FcMatrixScale(FcMatrix *matrix, double sx, double dy); 27972c393a42Smrg 27982c393a42SmrgDescription 27992c393a42Smrg 28002c393a42Smrg FcMatrixScale multiplies matrix x values by sx and y values by 28012c393a42Smrg sy. This is done by multiplying by the matrix: 28022c393a42Smrg sx 0 28032c393a42Smrg 0 sy 28042c393a42Smrg 28052c393a42SmrgVersion 28062c393a42Smrg 28072c393a42Smrg Fontconfig version 2.6.0 28082c393a42Smrg 28092c393a42SmrgFcMatrixShear 28102c393a42Smrg 28112c393a42SmrgName 28122c393a42Smrg 28132c393a42Smrg FcMatrixShear -- Shear a matrix 28142c393a42Smrg 28152c393a42SmrgSynopsis 28162c393a42Smrg 28172c393a42Smrg#include <fontconfig.h> 28182c393a42Smrg 28192c393a42Smrg void FcMatrixShear(FcMatrix *matrix, double sh, double sv); 28202c393a42Smrg 28212c393a42SmrgDescription 28222c393a42Smrg 28232c393a42Smrg FcMatrixShare shears matrix horizontally by sh and vertically 28242c393a42Smrg by sv. This is done by multiplying by the matrix: 28252c393a42Smrg 1 sh 28262c393a42Smrg sv 1 28272c393a42Smrg 28282c393a42SmrgVersion 28292c393a42Smrg 28302c393a42Smrg Fontconfig version 2.6.0 28312c393a42Smrg __________________________________________________________ 28322c393a42Smrg 28332c393a42Smrg4.10. FcConfig 28342c393a42Smrg 28352c393a42Smrg Table of Contents 28362c393a42Smrg FcConfigCreate -- Create a configuration 28372c393a42Smrg FcConfigDestroy -- Destroy a configuration 28382c393a42Smrg FcConfigSetCurrent -- Set configuration as default 28392c393a42Smrg FcConfigGetCurrent -- Return current configuration 28402c393a42Smrg FcConfigUptoDate -- Check timestamps on config files 28412c393a42Smrg FcConfigHome -- return the current home directory. 28422c393a42Smrg FcConfigEnableHome -- controls use of the home directory. 28432c393a42Smrg FcConfigBuildFonts -- Build font database 28442c393a42Smrg FcConfigGetConfigDirs -- Get config directories 28452c393a42Smrg FcConfigGetFontDirs -- Get font directories 28462c393a42Smrg FcConfigGetConfigFiles -- Get config files 28472c393a42Smrg FcConfigGetCache -- DEPRECATED used to return per-user cache 28482c393a42Smrg filename 28492c393a42Smrg 28502c393a42Smrg FcConfigGetCacheDirs -- return the list of directories searched 28512c393a42Smrg for cache files 28522c393a42Smrg 28532c393a42Smrg FcConfigGetFonts -- Get config font set 28542c393a42Smrg FcConfigGetBlanks -- Get config blanks 28552c393a42Smrg FcConfigGetRescanInterval -- Get config rescan interval 28562c393a42Smrg FcConfigSetRescanInterval -- Set config rescan interval 28572c393a42Smrg FcConfigAppFontAddFile -- Add font file to font database 28582c393a42Smrg FcConfigAppFontAddDir -- Add fonts from directory to font 28592c393a42Smrg database 28602c393a42Smrg 28612c393a42Smrg FcConfigAppFontClear -- Remove all app fonts from font database 28622c393a42Smrg FcConfigSubstituteWithPat -- Execute substitutions 28632c393a42Smrg FcConfigSubstitute -- Execute substitutions 28642c393a42Smrg FcFontMatch -- Return best font 28652c393a42Smrg FcFontSort -- Return list of matching fonts 28662c393a42Smrg FcFontRenderPrepare -- Prepare pattern for loading font file 28672c393a42Smrg FcFontList -- List fonts 28682c393a42Smrg FcConfigFilename -- Find a config file 28692c393a42Smrg FcConfigParseAndLoad -- load a configuration file 28702c393a42Smrg 28712c393a42Smrg An FcConfig object holds the internal representation of a 28722c393a42Smrg configuration. There is a default configuration which 28732c393a42Smrg applications may use by passing 0 to any function using the 28742c393a42Smrg data within an FcConfig. 28752c393a42Smrg 28762c393a42SmrgFcConfigCreate 28772c393a42Smrg 28782c393a42SmrgName 28792c393a42Smrg 28802c393a42Smrg FcConfigCreate -- Create a configuration 28812c393a42Smrg 28822c393a42SmrgSynopsis 28832c393a42Smrg 28842c393a42Smrg#include <fontconfig.h> 28852c393a42Smrg 28862c393a42Smrg FcConfig * FcConfigCreate(void); 28872c393a42Smrg 28882c393a42SmrgDescription 28892c393a42Smrg 28902c393a42Smrg Creates an empty configuration. 28912c393a42Smrg 28922c393a42SmrgVersion 28932c393a42Smrg 28942c393a42Smrg Fontconfig version 2.6.0 28952c393a42Smrg 28962c393a42SmrgFcConfigDestroy 28972c393a42Smrg 28982c393a42SmrgName 28992c393a42Smrg 29002c393a42Smrg FcConfigDestroy -- Destroy a configuration 29012c393a42Smrg 29022c393a42SmrgSynopsis 29032c393a42Smrg 29042c393a42Smrg#include <fontconfig.h> 29052c393a42Smrg 29062c393a42Smrg void FcConfigDestroy(FcConfig *config); 29072c393a42Smrg 29082c393a42SmrgDescription 29092c393a42Smrg 29102c393a42Smrg Destroys a configuration and any data associated with it. Note 29112c393a42Smrg that calling this function with the return from 29122c393a42Smrg FcConfigGetCurrent will place the library in an indeterminate 29132c393a42Smrg state. 29142c393a42Smrg 29152c393a42SmrgVersion 29162c393a42Smrg 29172c393a42Smrg Fontconfig version 2.6.0 29182c393a42Smrg 29192c393a42SmrgFcConfigSetCurrent 29202c393a42Smrg 29212c393a42SmrgName 29222c393a42Smrg 29232c393a42Smrg FcConfigSetCurrent -- Set configuration as default 29242c393a42Smrg 29252c393a42SmrgSynopsis 29262c393a42Smrg 29272c393a42Smrg#include <fontconfig.h> 29282c393a42Smrg 29292c393a42Smrg FcBool FcConfigSetCurrent(FcConfig *config); 29302c393a42Smrg 29312c393a42SmrgDescription 29322c393a42Smrg 29332c393a42Smrg Sets the current default configuration to config. Implicitly 29342c393a42Smrg calls FcConfigBuildFonts if necessary, returning FcFalse if 29352c393a42Smrg that call fails. 29362c393a42Smrg 29372c393a42SmrgVersion 29382c393a42Smrg 29392c393a42Smrg Fontconfig version 2.6.0 29402c393a42Smrg 29412c393a42SmrgFcConfigGetCurrent 29422c393a42Smrg 29432c393a42SmrgName 29442c393a42Smrg 29452c393a42Smrg FcConfigGetCurrent -- Return current configuration 29462c393a42Smrg 29472c393a42SmrgSynopsis 29482c393a42Smrg 29492c393a42Smrg#include <fontconfig.h> 29502c393a42Smrg 29512c393a42Smrg FcConfig * FcConfigGetCurrent(void); 29522c393a42Smrg 29532c393a42SmrgDescription 29542c393a42Smrg 29552c393a42Smrg Returns the current default configuration. 29562c393a42Smrg 29572c393a42SmrgVersion 29582c393a42Smrg 29592c393a42Smrg Fontconfig version 2.6.0 29602c393a42Smrg 29612c393a42SmrgFcConfigUptoDate 29622c393a42Smrg 29632c393a42SmrgName 29642c393a42Smrg 29652c393a42Smrg FcConfigUptoDate -- Check timestamps on config files 29662c393a42Smrg 29672c393a42SmrgSynopsis 29682c393a42Smrg 29692c393a42Smrg#include <fontconfig.h> 29702c393a42Smrg 29712c393a42Smrg FcBool FcConfigUptoDate(FcConfig *config); 29722c393a42Smrg 29732c393a42SmrgDescription 29742c393a42Smrg 29752c393a42Smrg Checks all of the files related to config and returns whether 29762c393a42Smrg any of them has been modified since the configuration was 29772c393a42Smrg created. 29782c393a42Smrg 29792c393a42SmrgVersion 29802c393a42Smrg 29812c393a42Smrg Fontconfig version 2.6.0 29822c393a42Smrg 29832c393a42SmrgFcConfigHome 29842c393a42Smrg 29852c393a42SmrgName 29862c393a42Smrg 29872c393a42Smrg FcConfigHome -- return the current home directory. 29882c393a42Smrg 29892c393a42SmrgSynopsis 29902c393a42Smrg 29912c393a42Smrg#include <fontconfig.h> 29922c393a42Smrg 29932c393a42Smrg FcBool FcConfigHome(void); 29942c393a42Smrg 29952c393a42SmrgDescription 29962c393a42Smrg 29972c393a42Smrg Return the current user's home directory, if it is available, 29982c393a42Smrg and if using it is enabled. See also FcConfigEnableHome). 29992c393a42Smrg 30002c393a42SmrgVersion 30012c393a42Smrg 30022c393a42Smrg Fontconfig version 2.6.0 30032c393a42Smrg 30042c393a42SmrgFcConfigEnableHome 30052c393a42Smrg 30062c393a42SmrgName 30072c393a42Smrg 30082c393a42Smrg FcConfigEnableHome -- controls use of the home directory. 30092c393a42Smrg 30102c393a42SmrgSynopsis 30112c393a42Smrg 30122c393a42Smrg#include <fontconfig.h> 30132c393a42Smrg 30142c393a42Smrg FcBol FcConfigEnableHome(FcBool enable); 30152c393a42Smrg 30162c393a42SmrgDescription 30172c393a42Smrg 30182c393a42Smrg If enable is FcTrue, then Fontconfig will use various files 30192c393a42Smrg which are specified relative to the user's home directory 30202c393a42Smrg (using the ~ notation in the configuration). When enable is 30212c393a42Smrg FcFalse, then all use of the home directory in these contexts 30222c393a42Smrg will be disabled. The previous setting of the value is 30232c393a42Smrg returned. 30242c393a42Smrg 30252c393a42SmrgVersion 30262c393a42Smrg 30272c393a42Smrg Fontconfig version 2.6.0 30282c393a42Smrg 30292c393a42SmrgFcConfigBuildFonts 30302c393a42Smrg 30312c393a42SmrgName 30322c393a42Smrg 30332c393a42Smrg FcConfigBuildFonts -- Build font database 30342c393a42Smrg 30352c393a42SmrgSynopsis 30362c393a42Smrg 30372c393a42Smrg#include <fontconfig.h> 30382c393a42Smrg 30392c393a42Smrg FcBool FcConfigBuildFonts(FcConfig *config); 30402c393a42Smrg 30412c393a42SmrgDescription 30422c393a42Smrg 30432c393a42Smrg Builds the set of available fonts for the given configuration. 30442c393a42Smrg Note that any changes to the configuration after this call have 30452c393a42Smrg indeterminate effects. Returns FcFalse if this operation runs 30462c393a42Smrg out of memory. 30472c393a42Smrg 30482c393a42SmrgVersion 30492c393a42Smrg 30502c393a42Smrg Fontconfig version 2.6.0 30512c393a42Smrg 30522c393a42SmrgFcConfigGetConfigDirs 30532c393a42Smrg 30542c393a42SmrgName 30552c393a42Smrg 30562c393a42Smrg FcConfigGetConfigDirs -- Get config directories 30572c393a42Smrg 30582c393a42SmrgSynopsis 30592c393a42Smrg 30602c393a42Smrg#include <fontconfig.h> 30612c393a42Smrg 30622c393a42Smrg FcStrList * FcConfigGetConfigDirs(FcConfig *config); 30632c393a42Smrg 30642c393a42SmrgDescription 30652c393a42Smrg 30662c393a42Smrg Returns the list of font directories specified in the 30672c393a42Smrg configuration files for config. Does not include any 30682c393a42Smrg subdirectories. 30692c393a42Smrg 30702c393a42SmrgVersion 30712c393a42Smrg 30722c393a42Smrg Fontconfig version 2.6.0 30732c393a42Smrg 30742c393a42SmrgFcConfigGetFontDirs 30752c393a42Smrg 30762c393a42SmrgName 30772c393a42Smrg 30782c393a42Smrg FcConfigGetFontDirs -- Get font directories 30792c393a42Smrg 30802c393a42SmrgSynopsis 30812c393a42Smrg 30822c393a42Smrg#include <fontconfig.h> 30832c393a42Smrg 30842c393a42Smrg FcStrList * FcConfigGetFontDirs(FcConfig *config); 30852c393a42Smrg 30862c393a42SmrgDescription 30872c393a42Smrg 30882c393a42Smrg Returns the list of font directories in config. This includes 30892c393a42Smrg the configured font directories along with any directories 30902c393a42Smrg below those in the filesystem. 30912c393a42Smrg 30922c393a42SmrgVersion 30932c393a42Smrg 30942c393a42Smrg Fontconfig version 2.6.0 30952c393a42Smrg 30962c393a42SmrgFcConfigGetConfigFiles 30972c393a42Smrg 30982c393a42SmrgName 30992c393a42Smrg 31002c393a42Smrg FcConfigGetConfigFiles -- Get config files 31012c393a42Smrg 31022c393a42SmrgSynopsis 31032c393a42Smrg 31042c393a42Smrg#include <fontconfig.h> 31052c393a42Smrg 31062c393a42Smrg FcStrList * FcConfigGetConfigFiles(FcConfig *config); 31072c393a42Smrg 31082c393a42SmrgDescription 31092c393a42Smrg 31102c393a42Smrg Returns the list of known configuration files used to generate 31112c393a42Smrg config. 31122c393a42Smrg 31132c393a42SmrgVersion 31142c393a42Smrg 31152c393a42Smrg Fontconfig version 2.6.0 31162c393a42Smrg 31172c393a42SmrgFcConfigGetCache 31182c393a42Smrg 31192c393a42SmrgName 31202c393a42Smrg 31212c393a42Smrg FcConfigGetCache -- DEPRECATED used to return per-user cache 31222c393a42Smrg filename 31232c393a42Smrg 31242c393a42SmrgSynopsis 31252c393a42Smrg 31262c393a42Smrg#include <fontconfig.h> 31272c393a42Smrg 31282c393a42Smrg FcChar8 * FcConfigGetCache(FcConfig *config); 31292c393a42Smrg 31302c393a42SmrgDescription 31312c393a42Smrg 31322c393a42Smrg With fontconfig no longer using per-user cache files, this 31332c393a42Smrg function now simply returns NULL to indicate that no per-user 31342c393a42Smrg file exists. 31352c393a42Smrg 31362c393a42SmrgVersion 31372c393a42Smrg 31382c393a42Smrg Fontconfig version 2.6.0 31392c393a42Smrg 31402c393a42SmrgFcConfigGetCacheDirs 31412c393a42Smrg 31422c393a42SmrgName 31432c393a42Smrg 31442c393a42Smrg FcConfigGetCacheDirs -- return the list of directories searched 31452c393a42Smrg for cache files 31462c393a42Smrg 31472c393a42SmrgSynopsis 31482c393a42Smrg 31492c393a42Smrg#include <fontconfig.h> 31502c393a42Smrg 31512c393a42Smrg FcStrList * FcConfigGetCacheDirs(FcConfig *config); 31522c393a42Smrg 31532c393a42SmrgDescription 31542c393a42Smrg 31552c393a42Smrg FcConfigGetCacheDirs returns a string list containing all of 31562c393a42Smrg the directories that fontconfig will search when attempting to 31572c393a42Smrg load a cache file for a font directory. 31582c393a42Smrg 31592c393a42SmrgVersion 31602c393a42Smrg 31612c393a42Smrg Fontconfig version 2.6.0 31622c393a42Smrg 31632c393a42SmrgFcConfigGetFonts 31642c393a42Smrg 31652c393a42SmrgName 31662c393a42Smrg 31672c393a42Smrg FcConfigGetFonts -- Get config font set 31682c393a42Smrg 31692c393a42SmrgSynopsis 31702c393a42Smrg 31712c393a42Smrg#include <fontconfig.h> 31722c393a42Smrg 31732c393a42Smrg FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set); 31742c393a42Smrg 31752c393a42SmrgDescription 31762c393a42Smrg 31772c393a42Smrg Returns one of the two sets of fonts from the configuration as 31782c393a42Smrg specified by set. This font set is owned by the library and 31792c393a42Smrg must not be freed. 31802c393a42Smrg 31812c393a42SmrgVersion 31822c393a42Smrg 31832c393a42Smrg Fontconfig version 2.6.0 31842c393a42Smrg 31852c393a42SmrgFcConfigGetBlanks 31862c393a42Smrg 31872c393a42SmrgName 31882c393a42Smrg 31892c393a42Smrg FcConfigGetBlanks -- Get config blanks 31902c393a42Smrg 31912c393a42SmrgSynopsis 31922c393a42Smrg 31932c393a42Smrg#include <fontconfig.h> 31942c393a42Smrg 31952c393a42Smrg FcBlanks * FcConfigGetBlanks(FcConfig *config); 31962c393a42Smrg 31972c393a42SmrgDescription 31982c393a42Smrg 31992c393a42Smrg Returns the FcBlanks object associated with the given 32002c393a42Smrg configuration, if no blanks were present in the configuration, 32012c393a42Smrg this function will return 0. 32022c393a42Smrg 32032c393a42SmrgVersion 32042c393a42Smrg 32052c393a42Smrg Fontconfig version 2.6.0 32062c393a42Smrg 32072c393a42SmrgFcConfigGetRescanInterval 32082c393a42Smrg 32092c393a42SmrgName 32102c393a42Smrg 32112c393a42Smrg FcConfigGetRescanInterval -- Get config rescan interval 32122c393a42Smrg 32132c393a42SmrgSynopsis 32142c393a42Smrg 32152c393a42Smrg#include <fontconfig.h> 32162c393a42Smrg 32172c393a42Smrg int FcConfigGetRescanInterval(FcConfig *config); 32182c393a42Smrg 32192c393a42SmrgDescription 32202c393a42Smrg 32212c393a42Smrg Returns the interval between automatic checks of the 32222c393a42Smrg configuration (in seconds) specified in config. The 32232c393a42Smrg configuration is checked during a call to FcFontList when this 32242c393a42Smrg interval has passed since the last check. 32252c393a42Smrg 32262c393a42SmrgVersion 32272c393a42Smrg 32282c393a42Smrg Fontconfig version 2.6.0 32292c393a42Smrg 32302c393a42SmrgFcConfigSetRescanInterval 32312c393a42Smrg 32322c393a42SmrgName 32332c393a42Smrg 32342c393a42Smrg FcConfigSetRescanInterval -- Set config rescan interval 32352c393a42Smrg 32362c393a42SmrgSynopsis 32372c393a42Smrg 32382c393a42Smrg#include <fontconfig.h> 32392c393a42Smrg 32402c393a42Smrg FcBool FcConfigSetRescanInterval(FcConfig *config, int 32412c393a42Smrg rescanInterval); 32422c393a42Smrg 32432c393a42SmrgDescription 32442c393a42Smrg 32452c393a42Smrg Sets the rescan interval. Returns FcFalse if the interval 32462c393a42Smrg cannot be set (due to allocation failure). Otherwise returns 32472c393a42Smrg FcTrue. 32482c393a42Smrg 32492c393a42SmrgVersion 32502c393a42Smrg 32512c393a42Smrg Fontconfig version 2.6.0 32522c393a42Smrg 32532c393a42SmrgFcConfigAppFontAddFile 32542c393a42Smrg 32552c393a42SmrgName 32562c393a42Smrg 32572c393a42Smrg FcConfigAppFontAddFile -- Add font file to font database 32582c393a42Smrg 32592c393a42SmrgSynopsis 32602c393a42Smrg 32612c393a42Smrg#include <fontconfig.h> 32622c393a42Smrg 32632c393a42Smrg FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 32642c393a42Smrg *file); 32652c393a42Smrg 32662c393a42SmrgDescription 32672c393a42Smrg 32682c393a42Smrg Adds an application-specific font to the configuration. Returns 32692c393a42Smrg FcFalse if the fonts cannot be added (due to allocation 32702c393a42Smrg failure). Otherwise returns FcTrue. 32712c393a42Smrg 32722c393a42SmrgVersion 32732c393a42Smrg 32742c393a42Smrg Fontconfig version 2.6.0 32752c393a42Smrg 32762c393a42SmrgFcConfigAppFontAddDir 32772c393a42Smrg 32782c393a42SmrgName 32792c393a42Smrg 32802c393a42Smrg FcConfigAppFontAddDir -- Add fonts from directory to font 32812c393a42Smrg database 32822c393a42Smrg 32832c393a42SmrgSynopsis 32842c393a42Smrg 32852c393a42Smrg#include <fontconfig.h> 32862c393a42Smrg 32872c393a42Smrg FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 32882c393a42Smrg *dir); 32892c393a42Smrg 32902c393a42SmrgDescription 32912c393a42Smrg 32922c393a42Smrg Scans the specified directory for fonts, adding each one found 32932c393a42Smrg to the application-specific set of fonts. Returns FcFalse if 32942c393a42Smrg the fonts cannot be added (due to allocation failure). 32952c393a42Smrg Otherwise returns FcTrue. 32962c393a42Smrg 32972c393a42SmrgVersion 32982c393a42Smrg 32992c393a42Smrg Fontconfig version 2.6.0 33002c393a42Smrg 33012c393a42SmrgFcConfigAppFontClear 33022c393a42Smrg 33032c393a42SmrgName 33042c393a42Smrg 33052c393a42Smrg FcConfigAppFontClear -- Remove all app fonts from font database 33062c393a42Smrg 33072c393a42SmrgSynopsis 33082c393a42Smrg 33092c393a42Smrg#include <fontconfig.h> 33102c393a42Smrg 33112c393a42Smrg void FcConfigAppFontClear(FcConfig *config); 33122c393a42Smrg 33132c393a42SmrgDescription 33142c393a42Smrg 33152c393a42Smrg Clears the set of application-specific fonts. 33162c393a42Smrg 33172c393a42SmrgVersion 33182c393a42Smrg 33192c393a42Smrg Fontconfig version 2.6.0 33202c393a42Smrg 33212c393a42SmrgFcConfigSubstituteWithPat 33222c393a42Smrg 33232c393a42SmrgName 33242c393a42Smrg 33252c393a42Smrg FcConfigSubstituteWithPat -- Execute substitutions 33262c393a42Smrg 33272c393a42SmrgSynopsis 33282c393a42Smrg 33292c393a42Smrg#include <fontconfig.h> 33302c393a42Smrg 33312c393a42Smrg FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern 33322c393a42Smrg *p, FcPattern *p_pat, FcMatchKind kind); 33332c393a42Smrg 33342c393a42SmrgDescription 33352c393a42Smrg 33362c393a42Smrg Performs the sequence of pattern modification operations, if 33372c393a42Smrg kind is FcMatchPattern, then those tagged as pattern operations 33382c393a42Smrg are applied, else if kind is FcMatchFont, those tagged as font 33392c393a42Smrg operations are applied and p_pat is used for <test> elements 33402c393a42Smrg with target=pattern. Returns FcFalse if the substitution cannot 33412c393a42Smrg be performed (due to allocation failure). Otherwise returns 33422c393a42Smrg FcTrue. 33432c393a42Smrg 33442c393a42SmrgVersion 33452c393a42Smrg 33462c393a42Smrg Fontconfig version 2.6.0 33472c393a42Smrg 33482c393a42SmrgFcConfigSubstitute 33492c393a42Smrg 33502c393a42SmrgName 33512c393a42Smrg 33522c393a42Smrg FcConfigSubstitute -- Execute substitutions 33532c393a42Smrg 33542c393a42SmrgSynopsis 33552c393a42Smrg 33562c393a42Smrg#include <fontconfig.h> 33572c393a42Smrg 33582c393a42Smrg FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, 33592c393a42Smrg FcMatchKind kind); 33602c393a42Smrg 33612c393a42SmrgDescription 33622c393a42Smrg 33632c393a42Smrg Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns 33642c393a42Smrg FcFalse if the substitution cannot be performed (due to 33652c393a42Smrg allocation failure). Otherwise returns FcTrue. 33662c393a42Smrg 33672c393a42SmrgVersion 33682c393a42Smrg 33692c393a42Smrg Fontconfig version 2.6.0 33702c393a42Smrg 33712c393a42SmrgFcFontMatch 33722c393a42Smrg 33732c393a42SmrgName 33742c393a42Smrg 33752c393a42Smrg FcFontMatch -- Return best font 33762c393a42Smrg 33772c393a42SmrgSynopsis 33782c393a42Smrg 33792c393a42Smrg#include <fontconfig.h> 33802c393a42Smrg 33812c393a42Smrg FcPattern * FcFontMatch(FcConfig *config, FcPattern *p, 33822c393a42Smrg FcResult *result); 33832c393a42Smrg 33842c393a42SmrgDescription 33852c393a42Smrg 33862c393a42Smrg Finds the font in sets most closely matching pattern and 33872c393a42Smrg returns the result of FcFontRenderPrepare for that font and the 33882c393a42Smrg provided pattern. This function should be called only after 33892c393a42Smrg FcConfigSubstitute and FcDefaultSubstitute have been called for 33902c393a42Smrg p; otherwise the results will not be correct. 33912c393a42Smrg 33922c393a42SmrgVersion 33932c393a42Smrg 33942c393a42Smrg Fontconfig version 2.6.0 33952c393a42Smrg 33962c393a42SmrgFcFontSort 33972c393a42Smrg 33982c393a42SmrgName 33992c393a42Smrg 34002c393a42Smrg FcFontSort -- Return list of matching fonts 34012c393a42Smrg 34022c393a42SmrgSynopsis 34032c393a42Smrg 34042c393a42Smrg#include <fontconfig.h> 34052c393a42Smrg 34062c393a42Smrg FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool 34072c393a42Smrg trim, FcCharSet **csp, FcResult *result); 34082c393a42Smrg 34092c393a42SmrgDescription 34102c393a42Smrg 34112c393a42Smrg Returns the list of fonts sorted by closeness to p. If trim is 34122c393a42Smrg FcTrue, elements in the list which don't include Unicode 34132c393a42Smrg coverage not provided by earlier elements in the list are 34142c393a42Smrg elided. The union of Unicode coverage of all of the fonts is 34152c393a42Smrg returned in csp, if csp is not NULL. This function should be 34162c393a42Smrg called only after FcConfigSubstitute and FcDefaultSubstitute 34172c393a42Smrg have been called for p; otherwise the results will not be 34182c393a42Smrg correct. 34192c393a42Smrg 34202c393a42Smrg The returned FcFontSet references FcPattern structures which 34212c393a42Smrg may be shared by the return value from multiple FcFontSort 34222c393a42Smrg calls, applications must not modify these patterns. Instead, 34232c393a42Smrg they should be passed, along with p to FcFontRenderPrepare 34242c393a42Smrg which combines them into a complete pattern. 34252c393a42Smrg 34262c393a42Smrg The FcFontSet returned by FcFontSort is destroyed by caling 34272c393a42Smrg FcFontSetDestroy. 34282c393a42Smrg 34292c393a42SmrgVersion 34302c393a42Smrg 34312c393a42Smrg Fontconfig version 2.6.0 34322c393a42Smrg 34332c393a42SmrgFcFontRenderPrepare 34342c393a42Smrg 34352c393a42SmrgName 34362c393a42Smrg 34372c393a42Smrg FcFontRenderPrepare -- Prepare pattern for loading font file 34382c393a42Smrg 34392c393a42SmrgSynopsis 34402c393a42Smrg 34412c393a42Smrg#include <fontconfig.h> 34422c393a42Smrg 34432c393a42Smrg FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern 34442c393a42Smrg *pat, FcPattern *font); 34452c393a42Smrg 34462c393a42SmrgDescription 34472c393a42Smrg 34482c393a42Smrg Creates a new pattern consisting of elements of font not 34492c393a42Smrg appearing in pat, elements of pat not appearing in font and the 34502c393a42Smrg best matching value from pat for elements appearing in both. 34512c393a42Smrg The result is passed to FcConfigSubstitute with kind 34522c393a42Smrg FcMatchFont and then returned. 34532c393a42Smrg 34542c393a42SmrgVersion 34552c393a42Smrg 34562c393a42Smrg Fontconfig version 2.6.0 34572c393a42Smrg 34582c393a42SmrgFcFontList 34592c393a42Smrg 34602c393a42SmrgName 34612c393a42Smrg 34622c393a42Smrg FcFontList -- List fonts 34632c393a42Smrg 34642c393a42SmrgSynopsis 34652c393a42Smrg 34662c393a42Smrg#include <fontconfig.h> 34672c393a42Smrg 34682c393a42Smrg FcFontSet * FcFontList(FcConfig *config, FcPattern *p, 34692c393a42Smrg FcObjectSet *os); 34702c393a42Smrg 34712c393a42SmrgDescription 34722c393a42Smrg 34732c393a42Smrg Selects fonts matching p, creates patterns from those fonts 34742c393a42Smrg containing only the objects in os and returns the set of unique 34752c393a42Smrg such patterns. 34762c393a42Smrg 34772c393a42SmrgVersion 34782c393a42Smrg 34792c393a42Smrg Fontconfig version 2.6.0 34802c393a42Smrg 34812c393a42SmrgFcConfigFilename 34822c393a42Smrg 34832c393a42SmrgName 34842c393a42Smrg 34852c393a42Smrg FcConfigFilename -- Find a config file 34862c393a42Smrg 34872c393a42SmrgSynopsis 34882c393a42Smrg 34892c393a42Smrg#include <fontconfig.h> 34902c393a42Smrg 34912c393a42Smrg FcChar8 * FcConfigFilename(const FcChar8 *name); 34922c393a42Smrg 34932c393a42SmrgDescription 34942c393a42Smrg 34952c393a42Smrg Given the specified external entity name, return the associated 34962c393a42Smrg filename. This provides applications a way to convert various 34972c393a42Smrg configuration file references into filename form. 34982c393a42Smrg 34992c393a42Smrg A null or empty name indicates that the default configuration 35002c393a42Smrg file should be used; which file this references can be 35012c393a42Smrg overridden with the FC_CONFIG_FILE environment variable. Next, 35022c393a42Smrg if the name starts with ~, it refers to a file in the current 35032c393a42Smrg users home directory. Otherwise if the name doesn't start with 35042c393a42Smrg '/', it refers to a file in the default configuration 35052c393a42Smrg directory; the built-in default directory can be overridden 35062c393a42Smrg with the FC_CONFIG_DIR environment variable. 35072c393a42Smrg 35082c393a42SmrgVersion 35092c393a42Smrg 35102c393a42Smrg Fontconfig version 2.6.0 35112c393a42Smrg 35122c393a42SmrgFcConfigParseAndLoad 35132c393a42Smrg 35142c393a42SmrgName 35152c393a42Smrg 35162c393a42Smrg FcConfigParseAndLoad -- load a configuration file 35172c393a42Smrg 35182c393a42SmrgSynopsis 35192c393a42Smrg 35202c393a42Smrg#include <fontconfig.h> 35212c393a42Smrg 35222c393a42Smrg FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8 35232c393a42Smrg *file, FcBool complain); 35242c393a42Smrg 35252c393a42SmrgDescription 35262c393a42Smrg 35272c393a42Smrg Walks the configuration in 'file' and constructs the internal 35282c393a42Smrg representation in 'config'. Any include files referenced from 35292c393a42Smrg within 'file' will be loaded and parsed. If 'complain' is 35302c393a42Smrg FcFalse, no warning will be displayed if 'file' does not exist. 35312c393a42Smrg Error and warning messages will be output to stderr. Returns 35322c393a42Smrg FcFalse if some error occurred while loading the file, either a 35332c393a42Smrg parse error, semantic error or allocation failure. Otherwise 35342c393a42Smrg returns FcTrue. 35352c393a42Smrg 35362c393a42SmrgVersion 35372c393a42Smrg 35382c393a42Smrg Fontconfig version 2.6.0 35392c393a42Smrg __________________________________________________________ 35402c393a42Smrg 35412c393a42Smrg4.11. FcObjectType 35422c393a42Smrg 35432c393a42Smrg Table of Contents 35442c393a42Smrg FcNameRegisterObjectTypes -- Register object types 35452c393a42Smrg FcNameUnregisterObjectTypes -- Unregister object types 35462c393a42Smrg FcNameGetObjectType -- Lookup an object type 35472c393a42Smrg 35482c393a42Smrg Provides for applcation-specified font name object types so 35492c393a42Smrg that new pattern elements can be generated from font names. 35502c393a42Smrg 35512c393a42SmrgFcNameRegisterObjectTypes 35522c393a42Smrg 35532c393a42SmrgName 35542c393a42Smrg 35552c393a42Smrg FcNameRegisterObjectTypes -- Register object types 35562c393a42Smrg 35572c393a42SmrgSynopsis 35582c393a42Smrg 35592c393a42Smrg#include <fontconfig.h> 35602c393a42Smrg 35612c393a42Smrg FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int 35622c393a42Smrg ntype); 35632c393a42Smrg 35642c393a42SmrgDescription 35652c393a42Smrg 35662c393a42Smrg Register ntype new object types. Returns FcFalse if some of the 35672c393a42Smrg names cannot be registered (due to allocation failure). 35682c393a42Smrg Otherwise returns FcTrue. 35692c393a42Smrg 35702c393a42SmrgVersion 35712c393a42Smrg 35722c393a42Smrg Fontconfig version 2.6.0 35732c393a42Smrg 35742c393a42SmrgFcNameUnregisterObjectTypes 35752c393a42Smrg 35762c393a42SmrgName 35772c393a42Smrg 35782c393a42Smrg FcNameUnregisterObjectTypes -- Unregister object types 35792c393a42Smrg 35802c393a42SmrgSynopsis 35812c393a42Smrg 35822c393a42Smrg#include <fontconfig.h> 35832c393a42Smrg 35842c393a42Smrg FcBool FcNameUnregisterObjectTypes(const FcObjectType *types, 35852c393a42Smrg int ntype); 35862c393a42Smrg 35872c393a42SmrgDescription 35882c393a42Smrg 35892c393a42Smrg Unregister ntype object types. Returns FcTrue. 35902c393a42Smrg 35912c393a42SmrgVersion 35922c393a42Smrg 35932c393a42Smrg Fontconfig version 2.6.0 35942c393a42Smrg 35952c393a42SmrgFcNameGetObjectType 35962c393a42Smrg 35972c393a42SmrgName 35982c393a42Smrg 35992c393a42Smrg FcNameGetObjectType -- Lookup an object type 36002c393a42Smrg 36012c393a42SmrgSynopsis 36022c393a42Smrg 36032c393a42Smrg#include <fontconfig.h> 36042c393a42Smrg 36052c393a42Smrg const FcObjectType * FcNameGetObjectType(const char *object); 36062c393a42Smrg 36072c393a42SmrgDescription 36082c393a42Smrg 36092c393a42Smrg Return the object type for the pattern element named object. 36102c393a42Smrg 36112c393a42SmrgVersion 36122c393a42Smrg 36132c393a42Smrg Fontconfig version 2.6.0 36142c393a42Smrg __________________________________________________________ 36152c393a42Smrg 36162c393a42Smrg4.12. FcConstant 36172c393a42Smrg 36182c393a42Smrg Table of Contents 36192c393a42Smrg FcNameRegisterConstants -- Register symbolic constants 36202c393a42Smrg FcNameUnregisterConstants -- Unregister symbolic constants 36212c393a42Smrg FcNameGetConstant -- Lookup symbolic constant 36222c393a42Smrg FcNameConstant -- Get the value for a symbolic constant 36232c393a42Smrg 36242c393a42Smrg Provides for application-specified symbolic constants for font 36252c393a42Smrg names. 36262c393a42Smrg 36272c393a42SmrgFcNameRegisterConstants 36282c393a42Smrg 36292c393a42SmrgName 36302c393a42Smrg 36312c393a42Smrg FcNameRegisterConstants -- Register symbolic constants 36322c393a42Smrg 36332c393a42SmrgSynopsis 36342c393a42Smrg 36352c393a42Smrg#include <fontconfig.h> 36362c393a42Smrg 36372c393a42Smrg FcBool FcNameRegisterConstants(const FcConstant *consts, int 36382c393a42Smrg nconsts); 36392c393a42Smrg 36402c393a42SmrgDescription 36412c393a42Smrg 36422c393a42Smrg Register nconsts new symbolic constants. Returns FcFalse if the 36432c393a42Smrg constants cannot be registered (due to allocation failure). 36442c393a42Smrg Otherwise returns FcTrue. 36452c393a42Smrg 36462c393a42SmrgVersion 36472c393a42Smrg 36482c393a42Smrg Fontconfig version 2.6.0 36492c393a42Smrg 36502c393a42SmrgFcNameUnregisterConstants 36512c393a42Smrg 36522c393a42SmrgName 36532c393a42Smrg 36542c393a42Smrg FcNameUnregisterConstants -- Unregister symbolic constants 36552c393a42Smrg 36562c393a42SmrgSynopsis 36572c393a42Smrg 36582c393a42Smrg#include <fontconfig.h> 36592c393a42Smrg 36602c393a42Smrg FcBool FcNameUnregisterConstants(const FcConstant *consts, int 36612c393a42Smrg nconsts); 36622c393a42Smrg 36632c393a42SmrgDescription 36642c393a42Smrg 36652c393a42Smrg Unregister nconsts symbolic constants. Returns FcFalse if the 36662c393a42Smrg specified constants were not registered. Otherwise returns 36672c393a42Smrg FcTrue. 36682c393a42Smrg 36692c393a42SmrgVersion 36702c393a42Smrg 36712c393a42Smrg Fontconfig version 2.6.0 36722c393a42Smrg 36732c393a42SmrgFcNameGetConstant 36742c393a42Smrg 36752c393a42SmrgName 36762c393a42Smrg 36772c393a42Smrg FcNameGetConstant -- Lookup symbolic constant 36782c393a42Smrg 36792c393a42SmrgSynopsis 36802c393a42Smrg 36812c393a42Smrg#include <fontconfig.h> 36822c393a42Smrg 36832c393a42Smrg const FcConstant * FcNameGetConstant(FcChar8 *string); 36842c393a42Smrg 36852c393a42SmrgDescription 36862c393a42Smrg 36872c393a42Smrg Return the FcConstant structure related to symbolic constant 36882c393a42Smrg string. 36892c393a42Smrg 36902c393a42SmrgVersion 36912c393a42Smrg 36922c393a42Smrg Fontconfig version 2.6.0 36932c393a42Smrg 36942c393a42SmrgFcNameConstant 36952c393a42Smrg 36962c393a42SmrgName 36972c393a42Smrg 36982c393a42Smrg FcNameConstant -- Get the value for a symbolic constant 36992c393a42Smrg 37002c393a42SmrgSynopsis 37012c393a42Smrg 37022c393a42Smrg#include <fontconfig.h> 37032c393a42Smrg 37042c393a42Smrg FcBool FcNameConstant(FcChar8 *string, int *result); 37052c393a42Smrg 37062c393a42SmrgDescription 37072c393a42Smrg 37082c393a42Smrg Returns whether a symbolic constant with name string is 37092c393a42Smrg registered, placing the value of the constant in result if 37102c393a42Smrg present. 37112c393a42Smrg 37122c393a42SmrgVersion 37132c393a42Smrg 37142c393a42Smrg Fontconfig version 2.6.0 37152c393a42Smrg __________________________________________________________ 37162c393a42Smrg 37172c393a42Smrg4.13. FcBlanks 37182c393a42Smrg 37192c393a42Smrg Table of Contents 37202c393a42Smrg FcBlanksCreate -- Create an FcBlanks 37212c393a42Smrg FcBlanksDestroy -- Destroy and FcBlanks 37222c393a42Smrg FcBlanksAdd -- Add a character to an FcBlanks 37232c393a42Smrg FcBlanksIsMember -- Query membership in an FcBlanks 37242c393a42Smrg 37252c393a42Smrg An FcBlanks object holds a list of Unicode chars which are 37262c393a42Smrg expected to be blank when drawn. When scanning new fonts, any 37272c393a42Smrg glyphs which are empty and not in this list will be assumed to 37282c393a42Smrg be broken and not placed in the FcCharSet associated with the 37292c393a42Smrg font. This provides a significantly more accurate CharSet for 37302c393a42Smrg applications. 37312c393a42Smrg 37322c393a42SmrgFcBlanksCreate 37332c393a42Smrg 37342c393a42SmrgName 37352c393a42Smrg 37362c393a42Smrg FcBlanksCreate -- Create an FcBlanks 37372c393a42Smrg 37382c393a42SmrgSynopsis 37392c393a42Smrg 37402c393a42Smrg#include <fontconfig.h> 37412c393a42Smrg 37422c393a42Smrg FcBlanks * FcBlanksCreate(void); 37432c393a42Smrg 37442c393a42SmrgDescription 37452c393a42Smrg 37462c393a42Smrg Creates an empty FcBlanks object. 37472c393a42Smrg 37482c393a42SmrgVersion 37492c393a42Smrg 37502c393a42Smrg Fontconfig version 2.6.0 37512c393a42Smrg 37522c393a42SmrgFcBlanksDestroy 37532c393a42Smrg 37542c393a42SmrgName 37552c393a42Smrg 37562c393a42Smrg FcBlanksDestroy -- Destroy and FcBlanks 37572c393a42Smrg 37582c393a42SmrgSynopsis 37592c393a42Smrg 37602c393a42Smrg#include <fontconfig.h> 37612c393a42Smrg 37622c393a42Smrg void FcBlanksDestroy(FcBlanks *b); 37632c393a42Smrg 37642c393a42SmrgDescription 37652c393a42Smrg 37662c393a42Smrg Destroys an FcBlanks object, freeing any associated memory. 37672c393a42Smrg 37682c393a42SmrgVersion 37692c393a42Smrg 37702c393a42Smrg Fontconfig version 2.6.0 37712c393a42Smrg 37722c393a42SmrgFcBlanksAdd 37732c393a42Smrg 37742c393a42SmrgName 37752c393a42Smrg 37762c393a42Smrg FcBlanksAdd -- Add a character to an FcBlanks 37772c393a42Smrg 37782c393a42SmrgSynopsis 37792c393a42Smrg 37802c393a42Smrg#include <fontconfig.h> 37812c393a42Smrg 37822c393a42Smrg FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4); 37832c393a42Smrg 37842c393a42SmrgDescription 37852c393a42Smrg 37862c393a42Smrg Adds a single character to an FcBlanks object, returning 37872c393a42Smrg FcFalse if this process ran out of memory. 37882c393a42Smrg 37892c393a42SmrgVersion 37902c393a42Smrg 37912c393a42Smrg Fontconfig version 2.6.0 37922c393a42Smrg 37932c393a42SmrgFcBlanksIsMember 37942c393a42Smrg 37952c393a42SmrgName 37962c393a42Smrg 37972c393a42Smrg FcBlanksIsMember -- Query membership in an FcBlanks 37982c393a42Smrg 37992c393a42SmrgSynopsis 38002c393a42Smrg 38012c393a42Smrg#include <fontconfig.h> 38022c393a42Smrg 38032c393a42Smrg FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4); 38042c393a42Smrg 38052c393a42SmrgDescription 38062c393a42Smrg 38072c393a42Smrg Returns whether the specified FcBlanks object contains the 38082c393a42Smrg indicated Unicode value. 38092c393a42Smrg 38102c393a42SmrgVersion 38112c393a42Smrg 38122c393a42Smrg Fontconfig version 2.6.0 38132c393a42Smrg __________________________________________________________ 38142c393a42Smrg 38152c393a42Smrg4.14. FcAtomic 38162c393a42Smrg 38172c393a42Smrg Table of Contents 38182c393a42Smrg FcAtomicCreate -- create an FcAtomic object 38192c393a42Smrg FcAtomicLock -- lock a file 38202c393a42Smrg FcAtomicNewFile -- return new temporary file name 38212c393a42Smrg FcAtomicOrigFile -- return original file name 38222c393a42Smrg FcAtomicReplaceOrig -- replace original with new 38232c393a42Smrg FcAtomicDeleteNew -- delete new file 38242c393a42Smrg FcAtomicUnlock -- unlock a file 38252c393a42Smrg FcAtomicDestroy -- destroy an FcAtomic object 38262c393a42Smrg 38272c393a42Smrg These functions provide a safe way to update config files, 38282c393a42Smrg allowing ongoing reading of the old config file while locked 38292c393a42Smrg for writing and ensuring that a consistent and complete version 38302c393a42Smrg of the config file is always available. 38312c393a42Smrg 38322c393a42SmrgFcAtomicCreate 38332c393a42Smrg 38342c393a42SmrgName 38352c393a42Smrg 38362c393a42Smrg FcAtomicCreate -- create an FcAtomic object 38372c393a42Smrg 38382c393a42SmrgSynopsis 38392c393a42Smrg 38402c393a42Smrg#include <fontconfig.h> 38412c393a42Smrg 38422c393a42Smrg FcAtomic * FcAtomicCreate(const FcChar8 *file); 38432c393a42Smrg 38442c393a42SmrgDescription 38452c393a42Smrg 38462c393a42Smrg Creates a data structure containing data needed to control 38472c393a42Smrg access to file. Writing is done to a separate file. Once that 38482c393a42Smrg file is complete, the original configuration file is atomically 38492c393a42Smrg replaced so that reading process always see a consistent and 38502c393a42Smrg complete file without the need to lock for reading. 38512c393a42Smrg 38522c393a42SmrgVersion 38532c393a42Smrg 38542c393a42Smrg Fontconfig version 2.6.0 38552c393a42Smrg 38562c393a42SmrgFcAtomicLock 38572c393a42Smrg 38582c393a42SmrgName 38592c393a42Smrg 38602c393a42Smrg FcAtomicLock -- lock a file 38612c393a42Smrg 38622c393a42SmrgSynopsis 38632c393a42Smrg 38642c393a42Smrg#include <fontconfig.h> 38652c393a42Smrg 38662c393a42Smrg FcBool FcAtomicLock(FcAtomic *atomic); 38672c393a42Smrg 38682c393a42SmrgDescription 38692c393a42Smrg 38702c393a42Smrg Attempts to lock the file referenced by atomic. Returns FcFalse 38712c393a42Smrg if the file is already locked, else returns FcTrue and leaves 38722c393a42Smrg the file locked. 38732c393a42Smrg 38742c393a42SmrgVersion 38752c393a42Smrg 38762c393a42Smrg Fontconfig version 2.6.0 38772c393a42Smrg 38782c393a42SmrgFcAtomicNewFile 38792c393a42Smrg 38802c393a42SmrgName 38812c393a42Smrg 38822c393a42Smrg FcAtomicNewFile -- return new temporary file name 38832c393a42Smrg 38842c393a42SmrgSynopsis 38852c393a42Smrg 38862c393a42Smrg#include <fontconfig.h> 38872c393a42Smrg 38882c393a42Smrg FcChar8 * FcAtomicNewFile(FcAtomic *atomic); 38892c393a42Smrg 38902c393a42SmrgDescription 38912c393a42Smrg 38922c393a42Smrg Returns the filename for writing a new version of the file 38932c393a42Smrg referenced by atomic. 38942c393a42Smrg 38952c393a42SmrgVersion 38962c393a42Smrg 38972c393a42Smrg Fontconfig version 2.6.0 38982c393a42Smrg 38992c393a42SmrgFcAtomicOrigFile 39002c393a42Smrg 39012c393a42SmrgName 39022c393a42Smrg 39032c393a42Smrg FcAtomicOrigFile -- return original file name 39042c393a42Smrg 39052c393a42SmrgSynopsis 39062c393a42Smrg 39072c393a42Smrg#include <fontconfig.h> 39082c393a42Smrg 39092c393a42Smrg FcChar8 * FcAtomicOrigFile(FcAtomic *atomic); 39102c393a42Smrg 39112c393a42SmrgDescription 39122c393a42Smrg 39132c393a42Smrg Returns the file refernced by atomic. 39142c393a42Smrg 39152c393a42SmrgVersion 39162c393a42Smrg 39172c393a42Smrg Fontconfig version 2.6.0 39182c393a42Smrg 39192c393a42SmrgFcAtomicReplaceOrig 39202c393a42Smrg 39212c393a42SmrgName 39222c393a42Smrg 39232c393a42Smrg FcAtomicReplaceOrig -- replace original with new 39242c393a42Smrg 39252c393a42SmrgSynopsis 39262c393a42Smrg 39272c393a42Smrg#include <fontconfig.h> 39282c393a42Smrg 39292c393a42Smrg FcBool FcAtomicReplaceOrig(FcAtomic *atomic); 39302c393a42Smrg 39312c393a42SmrgDescription 39322c393a42Smrg 39332c393a42Smrg Replaces the original file referenced by atomic with the new 39342c393a42Smrg file. Returns FcFalse if the file cannot be replaced due to 39352c393a42Smrg permission issues in the filesystem. Otherwise returns FcTrue. 39362c393a42Smrg 39372c393a42SmrgVersion 39382c393a42Smrg 39392c393a42Smrg Fontconfig version 2.6.0 39402c393a42Smrg 39412c393a42SmrgFcAtomicDeleteNew 39422c393a42Smrg 39432c393a42SmrgName 39442c393a42Smrg 39452c393a42Smrg FcAtomicDeleteNew -- delete new file 39462c393a42Smrg 39472c393a42SmrgSynopsis 39482c393a42Smrg 39492c393a42Smrg#include <fontconfig.h> 39502c393a42Smrg 39512c393a42Smrg void FcAtomicDeleteNew(FcAtomic *atomic); 39522c393a42Smrg 39532c393a42SmrgDescription 39542c393a42Smrg 39552c393a42Smrg Deletes the new file. Used in error recovery to back out 39562c393a42Smrg changes. 39572c393a42Smrg 39582c393a42SmrgVersion 39592c393a42Smrg 39602c393a42Smrg Fontconfig version 2.6.0 39612c393a42Smrg 39622c393a42SmrgFcAtomicUnlock 39632c393a42Smrg 39642c393a42SmrgName 39652c393a42Smrg 39662c393a42Smrg FcAtomicUnlock -- unlock a file 39672c393a42Smrg 39682c393a42SmrgSynopsis 39692c393a42Smrg 39702c393a42Smrg#include <fontconfig.h> 39712c393a42Smrg 39722c393a42Smrg void FcAtomicUnlock(FcAtomic *atomic); 39732c393a42Smrg 39742c393a42SmrgDescription 39752c393a42Smrg 39762c393a42Smrg Unlocks the file. 39772c393a42Smrg 39782c393a42SmrgVersion 39792c393a42Smrg 39802c393a42Smrg Fontconfig version 2.6.0 39812c393a42Smrg 39822c393a42SmrgFcAtomicDestroy 39832c393a42Smrg 39842c393a42SmrgName 39852c393a42Smrg 39862c393a42Smrg FcAtomicDestroy -- destroy an FcAtomic object 39872c393a42Smrg 39882c393a42SmrgSynopsis 39892c393a42Smrg 39902c393a42Smrg#include <fontconfig.h> 39912c393a42Smrg 39922c393a42Smrg void FcAtomicDestroy(FcAtomic *atomic); 39932c393a42Smrg 39942c393a42SmrgDescription 39952c393a42Smrg 39962c393a42Smrg Destroys atomic. 39972c393a42Smrg 39982c393a42SmrgVersion 39992c393a42Smrg 40002c393a42Smrg Fontconfig version 2.6.0 40012c393a42Smrg __________________________________________________________ 40022c393a42Smrg 40032c393a42Smrg4.15. File and Directory routines 40042c393a42Smrg 40052c393a42Smrg Table of Contents 40062c393a42Smrg FcFileScan -- scan a font file 40072c393a42Smrg FcFileIsDir -- check whether a file is a directory 40082c393a42Smrg FcDirScan -- DEPRECATED: formerly used to scan a font directory 40092c393a42Smrg FcDirSave -- DEPRECATED: formerly used to save a directory 40102c393a42Smrg cache 40112c393a42Smrg 40122c393a42Smrg FcDirCacheUnlink -- Remove all caches related to dir 40132c393a42Smrg FcDirCacheValid -- check directory cache 40142c393a42Smrg FcDirCacheLoad -- load a directory cache 40152c393a42Smrg FcDirCacheRead -- read or construct a directory cache 40162c393a42Smrg FcDirCacheLoadFile -- load a cache file 40172c393a42Smrg FcDirCacheUnload -- unload a cache file 40182c393a42Smrg 40192c393a42Smrg These routines work with font files and directories, including 40202c393a42Smrg font directory cache files. 40212c393a42Smrg 40222c393a42SmrgFcFileScan 40232c393a42Smrg 40242c393a42SmrgName 40252c393a42Smrg 40262c393a42Smrg FcFileScan -- scan a font file 40272c393a42Smrg 40282c393a42SmrgSynopsis 40292c393a42Smrg 40302c393a42Smrg#include <fontconfig.h> 40312c393a42Smrg 40322c393a42Smrg FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache 40332c393a42Smrg *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force); 40342c393a42Smrg 40352c393a42SmrgDescription 40362c393a42Smrg 40372c393a42Smrg Scans a single file and adds all fonts found to set. If force 40382c393a42Smrg is FcTrue, then the file is scanned even if associated 40392c393a42Smrg information is found in cache. If file is a directory, it is 40402c393a42Smrg added to dirs. Whether fonts are found depends on fontconfig 40412c393a42Smrg policy as well as the current configuration. Internally, 40422c393a42Smrg fontconfig will ignore BDF and PCF fonts which are not in 40432c393a42Smrg Unicode (or the effectively equivalent ISO Latin-1) encoding as 40442c393a42Smrg those are not usable by Unicode-based applications. The 40452c393a42Smrg configuration can ignore fonts based on filename or contents of 40462c393a42Smrg the font file itself. Returns FcFalse if any of the fonts 40472c393a42Smrg cannot be added (due to allocation failure). Otherwise returns 40482c393a42Smrg FcTrue. 40492c393a42Smrg 40502c393a42SmrgVersion 40512c393a42Smrg 40522c393a42Smrg Fontconfig version 2.6.0 40532c393a42Smrg 40542c393a42SmrgFcFileIsDir 40552c393a42Smrg 40562c393a42SmrgName 40572c393a42Smrg 40582c393a42Smrg FcFileIsDir -- check whether a file is a directory 40592c393a42Smrg 40602c393a42SmrgSynopsis 40612c393a42Smrg 40622c393a42Smrg#include <fontconfig.h> 40632c393a42Smrg 40642c393a42Smrg FcBool FcFileIsDir(const FcChar8 *file); 40652c393a42Smrg 40662c393a42SmrgDescription 40672c393a42Smrg 40682c393a42Smrg Returns FcTrue if file is a directory, otherwise returns 40692c393a42Smrg FcFalse. 40702c393a42Smrg 40712c393a42SmrgVersion 40722c393a42Smrg 40732c393a42Smrg Fontconfig version 2.6.0 40742c393a42Smrg 40752c393a42SmrgFcDirScan 40762c393a42Smrg 40772c393a42SmrgName 40782c393a42Smrg 40792c393a42Smrg FcDirScan -- DEPRECATED: formerly used to scan a font directory 40802c393a42Smrg 40812c393a42SmrgSynopsis 40822c393a42Smrg 40832c393a42Smrg#include <fontconfig.h> 40842c393a42Smrg 40852c393a42Smrg FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache 40862c393a42Smrg *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force); 40872c393a42Smrg 40882c393a42SmrgDescription 40892c393a42Smrg 40902c393a42Smrg This function does nothing aside from returning FcFalse. It 40912c393a42Smrg used to scan an entire directory and add all fonts found to 40922c393a42Smrg set. If force was FcTrue, then the directory and all files 40932c393a42Smrg within it were scanned even if information was present in the 40942c393a42Smrg per-directory cache file or cache. Any subdirectories found 40952c393a42Smrg were added to dirs. 40962c393a42Smrg 40972c393a42SmrgVersion 40982c393a42Smrg 40992c393a42Smrg Fontconfig version 2.6.0 41002c393a42Smrg 41012c393a42SmrgFcDirSave 41022c393a42Smrg 41032c393a42SmrgName 41042c393a42Smrg 41052c393a42Smrg FcDirSave -- DEPRECATED: formerly used to save a directory 41062c393a42Smrg cache 41072c393a42Smrg 41082c393a42SmrgSynopsis 41092c393a42Smrg 41102c393a42Smrg#include <fontconfig.h> 41112c393a42Smrg 41122c393a42Smrg FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8 41132c393a42Smrg *dir); 41142c393a42Smrg 41152c393a42SmrgDescription 41162c393a42Smrg 41172c393a42Smrg This function now does nothing aside from returning FcFalse. It 41182c393a42Smrg used to creates the per-directory cache file for dir and 41192c393a42Smrg populates it with the fonts in set and subdirectories in dirs. 41202c393a42Smrg All of this functionality is now automatically managed by 41212c393a42Smrg FcDirCacheLoad and FcDirCacheRead. 41222c393a42Smrg 41232c393a42SmrgVersion 41242c393a42Smrg 41252c393a42Smrg Fontconfig version 2.6.0 41262c393a42Smrg 41272c393a42SmrgFcDirCacheUnlink 41282c393a42Smrg 41292c393a42SmrgName 41302c393a42Smrg 41312c393a42Smrg FcDirCacheUnlink -- Remove all caches related to dir 41322c393a42Smrg 41332c393a42SmrgSynopsis 41342c393a42Smrg 41352c393a42Smrg#include <fontconfig.h> 41362c393a42Smrg 41372c393a42Smrg FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config); 41382c393a42Smrg 41392c393a42SmrgDescription 41402c393a42Smrg 41412c393a42Smrg Scans the cache directories in config, removing any instances 41422c393a42Smrg of the cache file for dir. Returns FcFalse when some internal 41432c393a42Smrg error occurs (out of memory, etc). Errors actually unlinking 41442c393a42Smrg any files are ignored. 41452c393a42Smrg 41462c393a42SmrgVersion 41472c393a42Smrg 41482c393a42Smrg Fontconfig version 2.6.0 41492c393a42Smrg 41502c393a42SmrgFcDirCacheValid 41512c393a42Smrg 41522c393a42SmrgName 41532c393a42Smrg 41542c393a42Smrg FcDirCacheValid -- check directory cache 41552c393a42Smrg 41562c393a42SmrgSynopsis 41572c393a42Smrg 41582c393a42Smrg#include <fontconfig.h> 41592c393a42Smrg 41602c393a42Smrg FcBool FcDirCacheValid(const FcChar8 *dir); 41612c393a42Smrg 41622c393a42SmrgDescription 41632c393a42Smrg 41642c393a42Smrg Returns FcTrue if dir has an associated valid cache file, else 41652c393a42Smrg returns FcFalse 41662c393a42Smrg 41672c393a42SmrgVersion 41682c393a42Smrg 41692c393a42Smrg Fontconfig version 2.6.0 41702c393a42Smrg 41712c393a42SmrgFcDirCacheLoad 41722c393a42Smrg 41732c393a42SmrgName 41742c393a42Smrg 41752c393a42Smrg FcDirCacheLoad -- load a directory cache 41762c393a42Smrg 41772c393a42SmrgSynopsis 41782c393a42Smrg 41792c393a42Smrg#include <fontconfig.h> 41802c393a42Smrg 41812c393a42Smrg FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, 41822c393a42Smrg FcChar8 **cache_file); 41832c393a42Smrg 41842c393a42SmrgDescription 41852c393a42Smrg 41862c393a42Smrg Loads the cache related to dir. If no cache file exists, 41872c393a42Smrg returns NULL. The name of the cache file is returned in 41882c393a42Smrg cache_file, unless that is NULL. See also FcDirCacheRead. 41892c393a42Smrg 41902c393a42SmrgVersion 41912c393a42Smrg 41922c393a42Smrg Fontconfig version 2.6.0 41932c393a42Smrg 41942c393a42SmrgFcDirCacheRead 41952c393a42Smrg 41962c393a42SmrgName 41972c393a42Smrg 41982c393a42Smrg FcDirCacheRead -- read or construct a directory cache 41992c393a42Smrg 42002c393a42SmrgSynopsis 42012c393a42Smrg 42022c393a42Smrg#include <fontconfig.h> 42032c393a42Smrg 42042c393a42Smrg FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force, 42052c393a42Smrg FcConfig *config); 42062c393a42Smrg 42072c393a42SmrgDescription 42082c393a42Smrg 42092c393a42Smrg This returns a cache for dir. If force is FcFalse, then an 42102c393a42Smrg existing, valid cache file will be used. Otherwise, a new cache 42112c393a42Smrg will be created by scanning the directory and that returned. 42122c393a42Smrg 42132c393a42SmrgVersion 42142c393a42Smrg 42152c393a42Smrg Fontconfig version 2.6.0 42162c393a42Smrg 42172c393a42SmrgFcDirCacheLoadFile 42182c393a42Smrg 42192c393a42SmrgName 42202c393a42Smrg 42212c393a42Smrg FcDirCacheLoadFile -- load a cache file 42222c393a42Smrg 42232c393a42SmrgSynopsis 42242c393a42Smrg 42252c393a42Smrg#include <fontconfig.h> 42262c393a42Smrg 42272c393a42Smrg FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct 42282c393a42Smrg stat *file_stat); 42292c393a42Smrg 42302c393a42SmrgDescription 42312c393a42Smrg 42322c393a42Smrg This function loads a directory cache from cache_file. If 42332c393a42Smrg file_stat is non-NULL, it will be filled with the results of 42342c393a42Smrg stat(2) on the cache file. 42352c393a42Smrg 42362c393a42SmrgVersion 42372c393a42Smrg 42382c393a42Smrg Fontconfig version 2.6.0 42392c393a42Smrg 42402c393a42SmrgFcDirCacheUnload 42412c393a42Smrg 42422c393a42SmrgName 42432c393a42Smrg 42442c393a42Smrg FcDirCacheUnload -- unload a cache file 42452c393a42Smrg 42462c393a42SmrgSynopsis 42472c393a42Smrg 42482c393a42Smrg#include <fontconfig.h> 42492c393a42Smrg 42502c393a42Smrg void FcDirCacheUnload(FcCache *cache); 42512c393a42Smrg 42522c393a42SmrgDescription 42532c393a42Smrg 42542c393a42Smrg This function dereferences cache. When no other references to 42552c393a42Smrg it remain, all memory associated with the cache will be freed. 42562c393a42Smrg 42572c393a42SmrgVersion 42582c393a42Smrg 42592c393a42Smrg Fontconfig version 2.6.0 42602c393a42Smrg __________________________________________________________ 42612c393a42Smrg 42622c393a42Smrg4.16. FcCache routines 42632c393a42Smrg 42642c393a42Smrg Table of Contents 42652c393a42Smrg FcCacheDir -- Return directory of cache 42662c393a42Smrg FcCacheCopySet -- Returns a copy of the fontset from cache 42672c393a42Smrg FcCacheSubdir -- Return the i'th subdirectory. 42682c393a42Smrg FcCacheNumSubdir -- Return the number of subdirectories in 42692c393a42Smrg cache. 42702c393a42Smrg 42712c393a42Smrg FcCacheNumFont -- Returns the number of fonts in cache. 42722c393a42Smrg 42732c393a42Smrg These routines work with font directory caches, accessing their 42742c393a42Smrg contents in limited ways. It is not expected that normal 42752c393a42Smrg applications will need to use these functions. 42762c393a42Smrg 42772c393a42SmrgFcCacheDir 42782c393a42Smrg 42792c393a42SmrgName 42802c393a42Smrg 42812c393a42Smrg FcCacheDir -- Return directory of cache 42822c393a42Smrg 42832c393a42SmrgSynopsis 42842c393a42Smrg 42852c393a42Smrg#include <fontconfig.h> 42862c393a42Smrg 42872c393a42Smrg const FcChar8 * FcCacheDir(const FcCache *cache); 42882c393a42Smrg 42892c393a42SmrgDescription 42902c393a42Smrg 42912c393a42Smrg This function returns the directory from which the cache was 42922c393a42Smrg constructed. 42932c393a42Smrg 42942c393a42SmrgVersion 42952c393a42Smrg 42962c393a42Smrg Fontconfig version 2.6.0 42972c393a42Smrg 42982c393a42SmrgFcCacheCopySet 42992c393a42Smrg 43002c393a42SmrgName 43012c393a42Smrg 43022c393a42Smrg FcCacheCopySet -- Returns a copy of the fontset from cache 43032c393a42Smrg 43042c393a42SmrgSynopsis 43052c393a42Smrg 43062c393a42Smrg#include <fontconfig.h> 43072c393a42Smrg 43082c393a42Smrg FcFontSet * FcCacheCopySet(const FcCache *cache); 43092c393a42Smrg 43102c393a42SmrgDescription 43112c393a42Smrg 43122c393a42Smrg The returned fontset contains each of the font patterns from 43132c393a42Smrg cache. This fontset may be modified, but the patterns from the 43142c393a42Smrg cache are read-only. 43152c393a42Smrg 43162c393a42SmrgVersion 43172c393a42Smrg 43182c393a42Smrg Fontconfig version 2.6.0 43192c393a42Smrg 43202c393a42SmrgFcCacheSubdir 43212c393a42Smrg 43222c393a42SmrgName 43232c393a42Smrg 43242c393a42Smrg FcCacheSubdir -- Return the i'th subdirectory. 43252c393a42Smrg 43262c393a42SmrgSynopsis 43272c393a42Smrg 43282c393a42Smrg#include <fontconfig.h> 43292c393a42Smrg 43302c393a42Smrg const FcChar8 * FcCacheSubdir(const FcCache *cache, inti); 43312c393a42Smrg 43322c393a42SmrgDescription 43332c393a42Smrg 43342c393a42Smrg The set of subdirectories stored in a cache file are indexed by 43352c393a42Smrg this function, i should range from 0 to n-1, where n is the 43362c393a42Smrg return value from FcCacheNumSubdir. 43372c393a42Smrg 43382c393a42SmrgVersion 43392c393a42Smrg 43402c393a42Smrg Fontconfig version 2.6.0 43412c393a42Smrg 43422c393a42SmrgFcCacheNumSubdir 43432c393a42Smrg 43442c393a42SmrgName 43452c393a42Smrg 43462c393a42Smrg FcCacheNumSubdir -- Return the number of subdirectories in 43472c393a42Smrg cache. 43482c393a42Smrg 43492c393a42SmrgSynopsis 43502c393a42Smrg 43512c393a42Smrg#include <fontconfig.h> 43522c393a42Smrg 43532c393a42Smrg int FcCacheNumSubdir(const FcCache *cache); 43542c393a42Smrg 43552c393a42SmrgDescription 43562c393a42Smrg 43572c393a42Smrg This returns the total number of subdirectories in the cache. 43582c393a42Smrg 43592c393a42SmrgVersion 43602c393a42Smrg 43612c393a42Smrg Fontconfig version 2.6.0 43622c393a42Smrg 43632c393a42SmrgFcCacheNumFont 43642c393a42Smrg 43652c393a42SmrgName 43662c393a42Smrg 43672c393a42Smrg FcCacheNumFont -- Returns the number of fonts in cache. 43682c393a42Smrg 43692c393a42SmrgSynopsis 43702c393a42Smrg 43712c393a42Smrg#include <fontconfig.h> 43722c393a42Smrg 43732c393a42Smrg int FcCacheNumFont(const FcCache *cache); 43742c393a42Smrg 43752c393a42SmrgDescription 43762c393a42Smrg 43772c393a42Smrg This returns the number of fonts which would be included in the 43782c393a42Smrg return from FcCacheCopySet. 43792c393a42Smrg 43802c393a42SmrgVersion 43812c393a42Smrg 43822c393a42Smrg Fontconfig version 2.6.0 43832c393a42Smrg __________________________________________________________ 43842c393a42Smrg 43852c393a42Smrg4.17. FcStrSet and FcStrList 43862c393a42Smrg 43872c393a42Smrg Table of Contents 43882c393a42Smrg FcStrSetCreate -- create a string set 43892c393a42Smrg FcStrSetMember -- check set for membership 43902c393a42Smrg FcStrSetEqual -- check sets for equality 43912c393a42Smrg FcStrSetAdd -- add to a string set 43922c393a42Smrg FcStrSetAddFilename -- add a filename to a string set 43932c393a42Smrg FcStrSetDel -- delete from a string set 43942c393a42Smrg FcStrSetDestroy -- destroy a string set 43952c393a42Smrg FcStrListCreate -- create a string iterator 43962c393a42Smrg FcStrListNext -- get next string in iteration 43972c393a42Smrg FcStrListDone -- destroy a string iterator 43982c393a42Smrg 43992c393a42Smrg A data structure for enumerating strings, used to list 44002c393a42Smrg directories while scanning the configuration as directories are 44012c393a42Smrg added while scanning. 44022c393a42Smrg 44032c393a42SmrgFcStrSetCreate 44042c393a42Smrg 44052c393a42SmrgName 44062c393a42Smrg 44072c393a42Smrg FcStrSetCreate -- create a string set 44082c393a42Smrg 44092c393a42SmrgSynopsis 44102c393a42Smrg 44112c393a42Smrg#include <fontconfig.h> 44122c393a42Smrg 44132c393a42Smrg FcStrSet * FcStrSetCreate(void); 44142c393a42Smrg 44152c393a42SmrgDescription 44162c393a42Smrg 44172c393a42Smrg Create an empty set. 44182c393a42Smrg 44192c393a42SmrgVersion 44202c393a42Smrg 44212c393a42Smrg Fontconfig version 2.6.0 44222c393a42Smrg 44232c393a42SmrgFcStrSetMember 44242c393a42Smrg 44252c393a42SmrgName 44262c393a42Smrg 44272c393a42Smrg FcStrSetMember -- check set for membership 44282c393a42Smrg 44292c393a42SmrgSynopsis 44302c393a42Smrg 44312c393a42Smrg#include <fontconfig.h> 44322c393a42Smrg 44332c393a42Smrg FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s); 44342c393a42Smrg 44352c393a42SmrgDescription 44362c393a42Smrg 44372c393a42Smrg Returns whether s is a member of set. 44382c393a42Smrg 44392c393a42SmrgVersion 44402c393a42Smrg 44412c393a42Smrg Fontconfig version 2.6.0 44422c393a42Smrg 44432c393a42SmrgFcStrSetEqual 44442c393a42Smrg 44452c393a42SmrgName 44462c393a42Smrg 44472c393a42Smrg FcStrSetEqual -- check sets for equality 44482c393a42Smrg 44492c393a42SmrgSynopsis 44502c393a42Smrg 44512c393a42Smrg#include <fontconfig.h> 44522c393a42Smrg 44532c393a42Smrg FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b); 44542c393a42Smrg 44552c393a42SmrgDescription 44562c393a42Smrg 44572c393a42Smrg Returns whether set_a contains precisely the same strings as 44582c393a42Smrg set_b. Ordering of strings within the two sets is not 44592c393a42Smrg considered. 44602c393a42Smrg 44612c393a42SmrgVersion 44622c393a42Smrg 44632c393a42Smrg Fontconfig version 2.6.0 44642c393a42Smrg 44652c393a42SmrgFcStrSetAdd 44662c393a42Smrg 44672c393a42SmrgName 44682c393a42Smrg 44692c393a42Smrg FcStrSetAdd -- add to a string set 44702c393a42Smrg 44712c393a42SmrgSynopsis 44722c393a42Smrg 44732c393a42Smrg#include <fontconfig.h> 44742c393a42Smrg 44752c393a42Smrg FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s); 44762c393a42Smrg 44772c393a42SmrgDescription 44782c393a42Smrg 44792c393a42Smrg Adds a copy of s to set. 44802c393a42Smrg 44812c393a42SmrgVersion 44822c393a42Smrg 44832c393a42Smrg Fontconfig version 2.6.0 44842c393a42Smrg 44852c393a42SmrgFcStrSetAddFilename 44862c393a42Smrg 44872c393a42SmrgName 44882c393a42Smrg 44892c393a42Smrg FcStrSetAddFilename -- add a filename to a string set 44902c393a42Smrg 44912c393a42SmrgSynopsis 44922c393a42Smrg 44932c393a42Smrg#include <fontconfig.h> 44942c393a42Smrg 44952c393a42Smrg FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s); 44962c393a42Smrg 44972c393a42SmrgDescription 44982c393a42Smrg 44992c393a42Smrg Adds a copy s to set, The copy is created with 45002c393a42Smrg FcStrCopyFilename so that leading '~' values are replaced with 45012c393a42Smrg the value of the HOME environment variable. 45022c393a42Smrg 45032c393a42SmrgVersion 45042c393a42Smrg 45052c393a42Smrg Fontconfig version 2.6.0 45062c393a42Smrg 45072c393a42SmrgFcStrSetDel 45082c393a42Smrg 45092c393a42SmrgName 45102c393a42Smrg 45112c393a42Smrg FcStrSetDel -- delete from a string set 45122c393a42Smrg 45132c393a42SmrgSynopsis 45142c393a42Smrg 45152c393a42Smrg#include <fontconfig.h> 45162c393a42Smrg 45172c393a42Smrg FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s); 45182c393a42Smrg 45192c393a42SmrgDescription 45202c393a42Smrg 45212c393a42Smrg Removes s from set, returning FcTrue if s was a member else 45222c393a42Smrg FcFalse. 45232c393a42Smrg 45242c393a42SmrgVersion 45252c393a42Smrg 45262c393a42Smrg Fontconfig version 2.6.0 45272c393a42Smrg 45282c393a42SmrgFcStrSetDestroy 45292c393a42Smrg 45302c393a42SmrgName 45312c393a42Smrg 45322c393a42Smrg FcStrSetDestroy -- destroy a string set 45332c393a42Smrg 45342c393a42SmrgSynopsis 45352c393a42Smrg 45362c393a42Smrg#include <fontconfig.h> 45372c393a42Smrg 45382c393a42Smrg void FcStrSetDestroy(FcStrSet *set); 45392c393a42Smrg 45402c393a42SmrgDescription 45412c393a42Smrg 45422c393a42Smrg Destroys set. 45432c393a42Smrg 45442c393a42SmrgVersion 45452c393a42Smrg 45462c393a42Smrg Fontconfig version 2.6.0 45472c393a42Smrg 45482c393a42SmrgFcStrListCreate 45492c393a42Smrg 45502c393a42SmrgName 45512c393a42Smrg 45522c393a42Smrg FcStrListCreate -- create a string iterator 45532c393a42Smrg 45542c393a42SmrgSynopsis 45552c393a42Smrg 45562c393a42Smrg#include <fontconfig.h> 45572c393a42Smrg 45582c393a42Smrg FcStrList * FcStrListCreate(FcStrSet *set); 45592c393a42Smrg 45602c393a42SmrgDescription 45612c393a42Smrg 45622c393a42Smrg Creates an iterator to list the strings in set. 45632c393a42Smrg 45642c393a42SmrgVersion 45652c393a42Smrg 45662c393a42Smrg Fontconfig version 2.6.0 45672c393a42Smrg 45682c393a42SmrgFcStrListNext 45692c393a42Smrg 45702c393a42SmrgName 45712c393a42Smrg 45722c393a42Smrg FcStrListNext -- get next string in iteration 45732c393a42Smrg 45742c393a42SmrgSynopsis 45752c393a42Smrg 45762c393a42Smrg#include <fontconfig.h> 45772c393a42Smrg 45782c393a42Smrg FcChar8 * FcStrListNext(FcStrList *list); 45792c393a42Smrg 45802c393a42SmrgDescription 45812c393a42Smrg 45822c393a42Smrg Returns the next string in set. 45832c393a42Smrg 45842c393a42SmrgVersion 45852c393a42Smrg 45862c393a42Smrg Fontconfig version 2.6.0 45872c393a42Smrg 45882c393a42SmrgFcStrListDone 45892c393a42Smrg 45902c393a42SmrgName 45912c393a42Smrg 45922c393a42Smrg FcStrListDone -- destroy a string iterator 45932c393a42Smrg 45942c393a42SmrgSynopsis 45952c393a42Smrg 45962c393a42Smrg#include <fontconfig.h> 45972c393a42Smrg 45982c393a42Smrg void FcStrListDone(FcStrList *list); 45992c393a42Smrg 46002c393a42SmrgDescription 46012c393a42Smrg 46022c393a42Smrg Destroys the enumerator list. 46032c393a42Smrg 46042c393a42SmrgVersion 46052c393a42Smrg 46062c393a42Smrg Fontconfig version 2.6.0 46072c393a42Smrg __________________________________________________________ 46082c393a42Smrg 46092c393a42Smrg4.18. String utilities 46102c393a42Smrg 46112c393a42Smrg Table of Contents 46122c393a42Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 46132c393a42Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 46142c393a42Smrg FcUtf8Len -- count UTF-8 encoded chars 46152c393a42Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 46162c393a42Smrg FcUtf16Len -- count UTF-16 encoded chars 46172c393a42Smrg FcIsLower -- check for lower case ASCII character 46182c393a42Smrg FcIsUpper -- check for upper case ASCII character 46192c393a42Smrg FcToLower -- convert upper case ASCII to lower case 46202c393a42Smrg FcStrCopy -- duplicate a string 46212c393a42Smrg FcStrDowncase -- create a lower case translation of a string 46222c393a42Smrg FcStrCopyFilename -- create a complete path from a filename 46232c393a42Smrg FcStrCmp -- compare UTF-8 strings 46242c393a42Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 46252c393a42Smrg FcStrStr -- locate UTF-8 substring 46262c393a42Smrg FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII 46272c393a42Smrg case 46282c393a42Smrg 46292c393a42Smrg FcStrPlus -- concatenate two strings 46302c393a42Smrg FcStrFree -- free a string 46312c393a42Smrg FcStrDirname -- directory part of filename 46322c393a42Smrg FcStrBasename -- last component of filename 46332c393a42Smrg 46342c393a42Smrg Fontconfig manipulates many UTF-8 strings represented with the 46352c393a42Smrg FcChar8 type. These functions are exposed to help applications 46362c393a42Smrg deal with these UTF-8 strings in a locale-insensitive manner. 46372c393a42Smrg 46382c393a42SmrgFcUtf8ToUcs4 46392c393a42Smrg 46402c393a42SmrgName 46412c393a42Smrg 46422c393a42Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 46432c393a42Smrg 46442c393a42SmrgSynopsis 46452c393a42Smrg 46462c393a42Smrg#include <fontconfig.h> 46472c393a42Smrg 46482c393a42Smrg int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len); 46492c393a42Smrg 46502c393a42SmrgDescription 46512c393a42Smrg 46522c393a42Smrg Converts the next Unicode char from src into dst and returns 46532c393a42Smrg the number of bytes containing the char. src must be at least 46542c393a42Smrg len bytes long. 46552c393a42Smrg 46562c393a42SmrgVersion 46572c393a42Smrg 46582c393a42Smrg Fontconfig version 2.6.0 46592c393a42Smrg 46602c393a42SmrgFcUcs4ToUtf8 46612c393a42Smrg 46622c393a42SmrgName 46632c393a42Smrg 46642c393a42Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 46652c393a42Smrg 46662c393a42SmrgSynopsis 46672c393a42Smrg 46682c393a42Smrg#include <fontconfig.h> 46692c393a42Smrg 46702c393a42Smrg int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]); 46712c393a42Smrg 46722c393a42SmrgDescription 46732c393a42Smrg 46742c393a42Smrg Converts the Unicode char from src into dst and returns the 46752c393a42Smrg number of bytes needed to encode the char. 46762c393a42Smrg 46772c393a42SmrgVersion 46782c393a42Smrg 46792c393a42Smrg Fontconfig version 2.6.0 46802c393a42Smrg 46812c393a42SmrgFcUtf8Len 46822c393a42Smrg 46832c393a42SmrgName 46842c393a42Smrg 46852c393a42Smrg FcUtf8Len -- count UTF-8 encoded chars 46862c393a42Smrg 46872c393a42SmrgSynopsis 46882c393a42Smrg 46892c393a42Smrg#include <fontconfig.h> 46902c393a42Smrg 46912c393a42Smrg FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int 46922c393a42Smrg *wchar); 46932c393a42Smrg 46942c393a42SmrgDescription 46952c393a42Smrg 46962c393a42Smrg Counts the number of Unicode chars in len bytes of src. Places 46972c393a42Smrg that count in nchar. wchar contains 1, 2 or 4 depending on the 46982c393a42Smrg number of bytes needed to hold the largest unicode char 46992c393a42Smrg counted. The return value indicates whether src is a 47002c393a42Smrg well-formed UTF8 string. 47012c393a42Smrg 47022c393a42SmrgVersion 47032c393a42Smrg 47042c393a42Smrg Fontconfig version 2.6.0 47052c393a42Smrg 47062c393a42SmrgFcUtf16ToUcs4 47072c393a42Smrg 47082c393a42SmrgName 47092c393a42Smrg 47102c393a42Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 47112c393a42Smrg 47122c393a42SmrgSynopsis 47132c393a42Smrg 47142c393a42Smrg#include <fontconfig.h> 47152c393a42Smrg 47162c393a42Smrg int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst, 47172c393a42Smrg int len); 47182c393a42Smrg 47192c393a42SmrgDescription 47202c393a42Smrg 47212c393a42Smrg Converts the next Unicode char from src into dst and returns 47222c393a42Smrg the number of bytes containing the char. src must be at least 47232c393a42Smrg len bytes long. Bytes of src are combined into 16-bit units 47242c393a42Smrg according to endian. 47252c393a42Smrg 47262c393a42SmrgVersion 47272c393a42Smrg 47282c393a42Smrg Fontconfig version 2.6.0 47292c393a42Smrg 47302c393a42SmrgFcUtf16Len 47312c393a42Smrg 47322c393a42SmrgName 47332c393a42Smrg 47342c393a42Smrg FcUtf16Len -- count UTF-16 encoded chars 47352c393a42Smrg 47362c393a42SmrgSynopsis 47372c393a42Smrg 47382c393a42Smrg#include <fontconfig.h> 47392c393a42Smrg 47402c393a42Smrg FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int 47412c393a42Smrg *nchar, int *wchar); 47422c393a42Smrg 47432c393a42SmrgDescription 47442c393a42Smrg 47452c393a42Smrg Counts the number of Unicode chars in len bytes of src. Bytes 47462c393a42Smrg of src are combined into 16-bit units according to endian. 47472c393a42Smrg Places that count in nchar. wchar contains 1, 2 or 4 depending 47482c393a42Smrg on the number of bytes needed to hold the largest unicode char 47492c393a42Smrg counted. The return value indicates whether string is a 47502c393a42Smrg well-formed UTF16 string. 47512c393a42Smrg 47522c393a42SmrgVersion 47532c393a42Smrg 47542c393a42Smrg Fontconfig version 2.6.0 47552c393a42Smrg 47562c393a42SmrgFcIsLower 47572c393a42Smrg 47582c393a42SmrgName 47592c393a42Smrg 47602c393a42Smrg FcIsLower -- check for lower case ASCII character 47612c393a42Smrg 47622c393a42SmrgSynopsis 47632c393a42Smrg 47642c393a42Smrg#include <fontconfig.h> 47652c393a42Smrg 47662c393a42Smrg FcBool FcIsLower(FcChar8c); 47672c393a42Smrg 47682c393a42SmrgDescription 47692c393a42Smrg 47702c393a42Smrg This macro checks whether c is an lower case ASCII letter. 47712c393a42Smrg 47722c393a42SmrgVersion 47732c393a42Smrg 47742c393a42Smrg Fontconfig version 2.6.0 47752c393a42Smrg 47762c393a42SmrgFcIsUpper 47772c393a42Smrg 47782c393a42SmrgName 47792c393a42Smrg 47802c393a42Smrg FcIsUpper -- check for upper case ASCII character 47812c393a42Smrg 47822c393a42SmrgSynopsis 47832c393a42Smrg 47842c393a42Smrg#include <fontconfig.h> 47852c393a42Smrg 47862c393a42Smrg FcBool FcIsUpper(FcChar8c); 47872c393a42Smrg 47882c393a42SmrgDescription 47892c393a42Smrg 47902c393a42Smrg This macro checks whether c is a upper case ASCII letter. 47912c393a42Smrg 47922c393a42SmrgVersion 47932c393a42Smrg 47942c393a42Smrg Fontconfig version 2.6.0 47952c393a42Smrg 47962c393a42SmrgFcToLower 47972c393a42Smrg 47982c393a42SmrgName 47992c393a42Smrg 48002c393a42Smrg FcToLower -- convert upper case ASCII to lower case 48012c393a42Smrg 48022c393a42SmrgSynopsis 48032c393a42Smrg 48042c393a42Smrg#include <fontconfig.h> 48052c393a42Smrg 48062c393a42Smrg FcChar8 FcToLower(FcChar8c); 48072c393a42Smrg 48082c393a42SmrgDescription 48092c393a42Smrg 48102c393a42Smrg This macro converts upper case ASCII c to the equivalent lower 48112c393a42Smrg case letter. 48122c393a42Smrg 48132c393a42SmrgVersion 48142c393a42Smrg 48152c393a42Smrg Fontconfig version 2.6.0 48162c393a42Smrg 48172c393a42SmrgFcStrCopy 48182c393a42Smrg 48192c393a42SmrgName 48202c393a42Smrg 48212c393a42Smrg FcStrCopy -- duplicate a string 48222c393a42Smrg 48232c393a42SmrgSynopsis 48242c393a42Smrg 48252c393a42Smrg#include <fontconfig.h> 48262c393a42Smrg 48272c393a42Smrg FcChar8 * FcStrCopy(const FcChar8 *s); 48282c393a42Smrg 48292c393a42SmrgDescription 48302c393a42Smrg 48312c393a42Smrg Allocates memory, copies s and returns the resulting buffer. 48322c393a42Smrg Yes, this is strdup, but that function isn't available on every 48332c393a42Smrg platform. 48342c393a42Smrg 48352c393a42SmrgVersion 48362c393a42Smrg 48372c393a42Smrg Fontconfig version 2.6.0 48382c393a42Smrg 48392c393a42SmrgFcStrDowncase 48402c393a42Smrg 48412c393a42SmrgName 48422c393a42Smrg 48432c393a42Smrg FcStrDowncase -- create a lower case translation of a string 48442c393a42Smrg 48452c393a42SmrgSynopsis 48462c393a42Smrg 48472c393a42Smrg#include <fontconfig.h> 48482c393a42Smrg 48492c393a42Smrg FcChar8 * FcStrDowncase(const FcChar8 *s); 48502c393a42Smrg 48512c393a42SmrgDescription 48522c393a42Smrg 48532c393a42Smrg Allocates memory, copies s, converting upper case letters to 48542c393a42Smrg lower case and returns the allocated buffer. 48552c393a42Smrg 48562c393a42SmrgVersion 48572c393a42Smrg 48582c393a42Smrg Fontconfig version 2.6.0 48592c393a42Smrg 48602c393a42SmrgFcStrCopyFilename 48612c393a42Smrg 48622c393a42SmrgName 48632c393a42Smrg 48642c393a42Smrg FcStrCopyFilename -- create a complete path from a filename 48652c393a42Smrg 48662c393a42SmrgSynopsis 48672c393a42Smrg 48682c393a42Smrg#include <fontconfig.h> 48692c393a42Smrg 48702c393a42Smrg FcChar8 * FcStrCopyFilename(const FcChar8 *s); 48712c393a42Smrg 48722c393a42SmrgDescription 48732c393a42Smrg 48742c393a42Smrg FcStrCopyFilename constructs an absolute pathname from s. It 48752c393a42Smrg converts any leading '~' characters in to the value of the HOME 48762c393a42Smrg environment variable, and any relative paths are converted to 48772c393a42Smrg absolute paths using the current working directory. Sequences 48782c393a42Smrg of '/' characters are converted to a single '/', and names 48792c393a42Smrg containing the current directory '.' or parent directory '..' 48802c393a42Smrg are correctly reconstructed. Returns NULL if '~' is the leading 48812c393a42Smrg character and HOME is unset or disabled (see 48822c393a42Smrg FcConfigEnableHome). 48832c393a42Smrg 48842c393a42SmrgVersion 48852c393a42Smrg 48862c393a42Smrg Fontconfig version 2.6.0 48872c393a42Smrg 48882c393a42SmrgFcStrCmp 48892c393a42Smrg 48902c393a42SmrgName 48912c393a42Smrg 48922c393a42Smrg FcStrCmp -- compare UTF-8 strings 48932c393a42Smrg 48942c393a42SmrgSynopsis 48952c393a42Smrg 48962c393a42Smrg#include <fontconfig.h> 48972c393a42Smrg 48982c393a42Smrg int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2); 48992c393a42Smrg 49002c393a42SmrgDescription 49012c393a42Smrg 49022c393a42Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. 49032c393a42Smrg 49042c393a42SmrgVersion 49052c393a42Smrg 49062c393a42Smrg Fontconfig version 2.6.0 49072c393a42Smrg 49082c393a42SmrgFcStrCmpIgnoreCase 49092c393a42Smrg 49102c393a42SmrgName 49112c393a42Smrg 49122c393a42Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 49132c393a42Smrg 49142c393a42SmrgSynopsis 49152c393a42Smrg 49162c393a42Smrg#include <fontconfig.h> 49172c393a42Smrg 49182c393a42Smrg int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 49192c393a42Smrg 49202c393a42SmrgDescription 49212c393a42Smrg 49222c393a42Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. This 49232c393a42Smrg test is case-insensitive for all proper UTF-8 encoded strings. 49242c393a42Smrg 49252c393a42SmrgVersion 49262c393a42Smrg 49272c393a42Smrg Fontconfig version 2.6.0 49282c393a42Smrg 49292c393a42SmrgFcStrStr 49302c393a42Smrg 49312c393a42SmrgName 49322c393a42Smrg 49332c393a42Smrg FcStrStr -- locate UTF-8 substring 49342c393a42Smrg 49352c393a42SmrgSynopsis 49362c393a42Smrg 49372c393a42Smrg#include <fontconfig.h> 49382c393a42Smrg 49392c393a42Smrg FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2); 49402c393a42Smrg 49412c393a42SmrgDescription 49422c393a42Smrg 49432c393a42Smrg Returns the location of s2 in s1. Returns NULL if s2 is not 49442c393a42Smrg present in s1. This test will operate properly with UTF8 49452c393a42Smrg encoded strings. 49462c393a42Smrg 49472c393a42SmrgVersion 49482c393a42Smrg 49492c393a42Smrg Fontconfig version 2.6.0 49502c393a42Smrg 49512c393a42SmrgFcStrStrIgnoreCase 49522c393a42Smrg 49532c393a42SmrgName 49542c393a42Smrg 49552c393a42Smrg FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII 49562c393a42Smrg case 49572c393a42Smrg 49582c393a42SmrgSynopsis 49592c393a42Smrg 49602c393a42Smrg#include <fontconfig.h> 49612c393a42Smrg 49622c393a42Smrg FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8 49632c393a42Smrg *s2); 49642c393a42Smrg 49652c393a42SmrgDescription 49662c393a42Smrg 49672c393a42Smrg Returns the location of s2 in s1, ignoring case. Returns NULL 49682c393a42Smrg if s2 is not present in s1. This test is case-insensitive for 49692c393a42Smrg all proper UTF-8 encoded strings. 49702c393a42Smrg 49712c393a42SmrgVersion 49722c393a42Smrg 49732c393a42Smrg Fontconfig version 2.6.0 49742c393a42Smrg 49752c393a42SmrgFcStrPlus 49762c393a42Smrg 49772c393a42SmrgName 49782c393a42Smrg 49792c393a42Smrg FcStrPlus -- concatenate two strings 49802c393a42Smrg 49812c393a42SmrgSynopsis 49822c393a42Smrg 49832c393a42Smrg#include <fontconfig.h> 49842c393a42Smrg 49852c393a42Smrg FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2); 49862c393a42Smrg 49872c393a42SmrgDescription 49882c393a42Smrg 49892c393a42Smrg This function allocates new storage and places the 49902c393a42Smrg concatenation of s1 and s2 there, returning the new string. 49912c393a42Smrg 49922c393a42SmrgVersion 49932c393a42Smrg 49942c393a42Smrg Fontconfig version 2.6.0 49952c393a42Smrg 49962c393a42SmrgFcStrFree 49972c393a42Smrg 49982c393a42SmrgName 49992c393a42Smrg 50002c393a42Smrg FcStrFree -- free a string 50012c393a42Smrg 50022c393a42SmrgSynopsis 50032c393a42Smrg 50042c393a42Smrg#include <fontconfig.h> 50052c393a42Smrg 50062c393a42Smrg void FcStrFree(FcChar8 *s); 50072c393a42Smrg 50082c393a42SmrgDescription 50092c393a42Smrg 50102c393a42Smrg This is just a wrapper around free(3) which helps track memory 50112c393a42Smrg usage of strings within the fontconfig library. 50122c393a42Smrg 50132c393a42SmrgVersion 50142c393a42Smrg 50152c393a42Smrg Fontconfig version 2.6.0 50162c393a42Smrg 50172c393a42SmrgFcStrDirname 50182c393a42Smrg 50192c393a42SmrgName 50202c393a42Smrg 50212c393a42Smrg FcStrDirname -- directory part of filename 50222c393a42Smrg 50232c393a42SmrgSynopsis 50242c393a42Smrg 50252c393a42Smrg#include <fontconfig.h> 50262c393a42Smrg 50272c393a42Smrg FcChar8 * FcStrDirname(const FcChar8 *file); 50282c393a42Smrg 50292c393a42SmrgDescription 50302c393a42Smrg 50312c393a42Smrg Returns the directory containing file. This is returned in 50322c393a42Smrg newly allocated storage which should be freed when no longer 50332c393a42Smrg needed. 50342c393a42Smrg 50352c393a42SmrgVersion 50362c393a42Smrg 50372c393a42Smrg Fontconfig version 2.6.0 50382c393a42Smrg 50392c393a42SmrgFcStrBasename 50402c393a42Smrg 50412c393a42SmrgName 50422c393a42Smrg 50432c393a42Smrg FcStrBasename -- last component of filename 50442c393a42Smrg 50452c393a42SmrgSynopsis 50462c393a42Smrg 50472c393a42Smrg#include <fontconfig.h> 50482c393a42Smrg 50492c393a42Smrg FcChar8 * FcStrBasename(const FcChar8 *file); 50502c393a42Smrg 50512c393a42SmrgDescription 50522c393a42Smrg 50532c393a42Smrg Returns the filename of file stripped of any leading directory 50542c393a42Smrg names. This is returned in newly allocated storage which should 50552c393a42Smrg be freed when no longer needed. 50562c393a42Smrg 50572c393a42SmrgVersion 50582c393a42Smrg 50592c393a42Smrg Fontconfig version 2.6.0 5060