fontconfig-devel.txt revision b09479dc
1b09479dcSmrg Fontconfig Developers Reference, Version 2.11.1 22c393a42Smrg 3ca08ab68Smrg Copyright © 2002 Keith Packard 42c393a42Smrg 5ca08ab68Smrg Permission to use, copy, modify, distribute, and sell this software and 6ca08ab68Smrg its documentation for any purpose is hereby granted without fee, provided 7ca08ab68Smrg that the above copyright notice appear in all copies and that both that 8ca08ab68Smrg copyright notice and this permission notice appear in supporting 9ca08ab68Smrg documentation, and that the name of the author(s) not be used in 10ca08ab68Smrg advertising or publicity pertaining to distribution of the software 11ca08ab68Smrg without specific, written prior permission. The authors make no 12ca08ab68Smrg representations about the suitability of this software for any purpose. It 13ca08ab68Smrg is provided "as is" without express or implied warranty. 142c393a42Smrg 15ca08ab68Smrg THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16ca08ab68Smrg INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 17ca08ab68Smrg EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 18ca08ab68Smrg CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 19ca08ab68Smrg USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 20ca08ab68Smrg OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 21ca08ab68Smrg PERFORMANCE OF THIS SOFTWARE. 222c393a42Smrg 23ca08ab68Smrg ------------------------------------------------------- 242c393a42Smrg 25ca08ab68Smrg Table of Contents 26ca08ab68Smrg 27ca08ab68Smrg [1]DESCRIPTION 28ca08ab68Smrg 29ca08ab68Smrg [2]FUNCTIONAL OVERVIEW 30ca08ab68Smrg 31ca08ab68Smrg [3]Datatypes 32ca08ab68Smrg 33ca08ab68Smrg [4]FUNCTIONS 342c393a42Smrg 35a6844aabSmrgDESCRIPTION 362c393a42Smrg 37ca08ab68Smrg Fontconfig is a library designed to provide system-wide font 38ca08ab68Smrg configuration, customization and application access. 392c393a42Smrg 40ca08ab68Smrg -------------------------------------------------------------------------- 412c393a42Smrg 42a6844aabSmrgFUNCTIONAL OVERVIEW 43a6844aabSmrg 44ca08ab68Smrg Fontconfig contains two essential modules, the configuration module which 45ca08ab68Smrg builds an internal configuration from XML files and the matching module 46ca08ab68Smrg which accepts font patterns and returns the nearest matching font. 47a6844aabSmrg 48ca08ab68Smrg -------------------------------------------------------------------------- 49a6844aabSmrg 50ca08ab68Smrg FONT CONFIGURATION 51a6844aabSmrg 52ca08ab68Smrg The configuration module consists of the FcConfig datatype, libexpat and 53ca08ab68Smrg FcConfigParse which walks over an XML tree and amends a configuration with 54ca08ab68Smrg data found within. From an external perspective, configuration of the 55ca08ab68Smrg library consists of generating a valid XML tree and feeding that to 56ca08ab68Smrg FcConfigParse. The only other mechanism provided to applications for 57ca08ab68Smrg changing the running configuration is to add fonts and directories to the 58ca08ab68Smrg list of application-provided font files. 59a6844aabSmrg 60ca08ab68Smrg The intent is to make font configurations relatively static, and shared by 61ca08ab68Smrg as many applications as possible. It is hoped that this will lead to more 62ca08ab68Smrg stable font selection when passing names from one application to another. 63ca08ab68Smrg XML was chosen as a configuration file format because it provides a format 64ca08ab68Smrg which is easy for external agents to edit while retaining the correct 65ca08ab68Smrg structure and syntax. 66a6844aabSmrg 67ca08ab68Smrg Font configuration is separate from font matching; applications needing to 68ca08ab68Smrg do their own matching can access the available fonts from the library and 69ca08ab68Smrg perform private matching. The intent is to permit applications to pick and 70ca08ab68Smrg choose appropriate functionality from the library instead of forcing them 71ca08ab68Smrg to choose between this library and a private configuration mechanism. The 72ca08ab68Smrg hope is that this will ensure that configuration of fonts for all 73ca08ab68Smrg applications can be centralized in one place. Centralizing font 74ca08ab68Smrg configuration will simplify and regularize font installation and 75ca08ab68Smrg customization. 76a6844aabSmrg 77ca08ab68Smrg -------------------------------------------------------------------------- 78a6844aabSmrg 79ca08ab68Smrg FONT PROPERTIES 80a6844aabSmrg 81ca08ab68Smrg While font patterns may contain essentially any properties, there are some 82ca08ab68Smrg well known properties with associated types. Fontconfig uses some of these 83ca08ab68Smrg properties for font matching and font completion. Others are provided as a 84ca08ab68Smrg convenience for the application's rendering mechanism. 852c393a42Smrg 862c393a42Smrg Property Definitions 872c393a42Smrg 88ca08ab68Smrg Property C Preprocessor Symbol Type Description 892c393a42Smrg ---------------------------------------------------- 90ca08ab68Smrg family FC_FAMILY String Font family names 91ca08ab68Smrg familylang FC_FAMILYLANG String Language corresponding to 92ca08ab68Smrg each family name 93ca08ab68Smrg style FC_STYLE String Font style. Overrides weight 94ca08ab68Smrg and slant 95ca08ab68Smrg stylelang FC_STYLELANG String Language corresponding to 96ca08ab68Smrg each style name 97ca08ab68Smrg fullname FC_FULLNAME String Font face full name where 98ca08ab68Smrg different from family and 99ca08ab68Smrg family + style 100ca08ab68Smrg fullnamelang FC_FULLNAMELANG String Language corresponding to 101ca08ab68Smrg each fullname 102ca08ab68Smrg slant FC_SLANT Int Italic, oblique or roman 103ca08ab68Smrg weight FC_WEIGHT Int Light, medium, demibold, 104ca08ab68Smrg bold or black 105ca08ab68Smrg size FC_SIZE Double Point size 106ca08ab68Smrg width FC_WIDTH Int Condensed, normal or expanded 107ca08ab68Smrg aspect FC_ASPECT Double Stretches glyphs horizontally 108ca08ab68Smrg before hinting 109ca08ab68Smrg pixelsize FC_PIXEL_SIZE Double Pixel size 110ca08ab68Smrg spacing FC_SPACING Int Proportional, dual-width, 111ca08ab68Smrg monospace or charcell 112ca08ab68Smrg foundry FC_FOUNDRY String Font foundry name 113ca08ab68Smrg antialias FC_ANTIALIAS Bool Whether glyphs can be 114ca08ab68Smrg antialiased 115ca08ab68Smrg hinting FC_HINTING Bool Whether the rasterizer should 116ca08ab68Smrg use hinting 117ca08ab68Smrg hintstyle FC_HINT_STYLE Int Automatic hinting style 118ca08ab68Smrg verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 119ca08ab68Smrg autohint FC_AUTOHINT Bool Use autohinter instead of 120ca08ab68Smrg normal hinter 121ca08ab68Smrg globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) 122ca08ab68Smrg file FC_FILE String The filename holding the font 123ca08ab68Smrg index FC_INDEX Int The index of the font within 124ca08ab68Smrg the file 125ca08ab68Smrg ftface FC_FT_FACE FT_Face Use the specified FreeType 126ca08ab68Smrg face object 1276fc018e4Smrg rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated) 128ca08ab68Smrg outline FC_OUTLINE Bool Whether the glyphs are outlines 129ca08ab68Smrg scalable FC_SCALABLE Bool Whether glyphs can be scaled 130ca08ab68Smrg scale FC_SCALE Double Scale factor for point->pixel 131ca08ab68Smrg conversions 132ca08ab68Smrg dpi FC_DPI Double Target dots per inch 133ca08ab68Smrg rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 134ca08ab68Smrg vbgr, none - subpixel geometry 135ca08ab68Smrg lcdfilter FC_LCD_FILTER Int Type of LCD filter 136ca08ab68Smrg minspace FC_MINSPACE Bool Eliminate leading from line 137ca08ab68Smrg spacing 138ca08ab68Smrg charset FC_CHARSET CharSet Unicode chars encoded by 139ca08ab68Smrg the font 140ca08ab68Smrg lang FC_LANG LangSet Set of RFC-3066-style 141ca08ab68Smrg languages this font supports 142ca08ab68Smrg fontversion FC_FONTVERSION Int Version number of the font 143ca08ab68Smrg capability FC_CAPABILITY String List of layout capabilities in 144ca08ab68Smrg the font 145ca08ab68Smrg embolden FC_EMBOLDEN Bool Rasterizer should 146ca08ab68Smrg synthetically embolden the font 147c9710b42Smrg fontfeatures FC_FONT_FEATURES String List of extra feature tags in 148c9710b42Smrg OpenType to be enabled 149ca08ab68Smrg namelang FC_NAMELANG String Language name to be used for the 150ca08ab68Smrg default value of familylang, 151ca08ab68Smrg stylelang and fullnamelang 152c9710b42Smrg prgname FC_PRGNAME String Name of the running program 1536fc018e4Smrg hash FC_HASH String SHA256 hash value of the font data 1546fc018e4Smrg with "sha256:" prefix. 1556fc018e4Smrg postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript 156ca08ab68Smrg 157ca08ab68Smrg 158ca08ab68Smrg -------------------------------------------------------------------------- 159a6844aabSmrg 160a6844aabSmrgDatatypes 1612c393a42Smrg 162ca08ab68Smrg Fontconfig uses abstract data types to hide internal implementation 163ca08ab68Smrg details for most data structures. A few structures are exposed where 164ca08ab68Smrg appropriate. 1652c393a42Smrg 166ca08ab68Smrg -------------------------------------------------------------------------- 1672c393a42Smrg 168ca08ab68Smrg FcChar8, FcChar16, FcChar32, FcBool 1692c393a42Smrg 170ca08ab68Smrg These are primitive data types; the FcChar* types hold precisely the 171ca08ab68Smrg number of bits stated (if supported by the C implementation). FcBool holds 172ca08ab68Smrg one of two C preprocessor symbols: FcFalse or FcTrue. 1732c393a42Smrg 174ca08ab68Smrg -------------------------------------------------------------------------- 175a6844aabSmrg 176ca08ab68Smrg FcMatrix 177a6844aabSmrg 178ca08ab68Smrg An FcMatrix holds an affine transformation, usually used to reshape 179ca08ab68Smrg glyphs. A small set of matrix operations are provided to manipulate these. 1802c393a42Smrg 181ca08ab68Smrg typedef struct _FcMatrix { 182ca08ab68Smrg double xx, xy, yx, yy; 183ca08ab68Smrg } FcMatrix; 1842c393a42Smrg 1852c393a42Smrg 186ca08ab68Smrg -------------------------------------------------------------------------- 187a6844aabSmrg 188ca08ab68Smrg FcCharSet 189a6844aabSmrg 190ca08ab68Smrg An FcCharSet is an abstract type that holds the set of encoded Unicode 191ca08ab68Smrg chars in a font. Operations to build and compare these sets are provided. 192a6844aabSmrg 193ca08ab68Smrg -------------------------------------------------------------------------- 194a6844aabSmrg 195ca08ab68Smrg FcLangSet 1962c393a42Smrg 197ca08ab68Smrg An FcLangSet is an abstract type that holds the set of languages supported 198ca08ab68Smrg by a font. Operations to build and compare these sets are provided. These 199ca08ab68Smrg are computed for a font based on orthographic information built into the 200ca08ab68Smrg fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 201ca08ab68Smrg languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If 202ca08ab68Smrg you have orthographic information for any of these languages, please 203ca08ab68Smrg submit them. 2042c393a42Smrg 205ca08ab68Smrg -------------------------------------------------------------------------- 2062c393a42Smrg 207ca08ab68Smrg FcLangResult 2082c393a42Smrg 209ca08ab68Smrg An FcLangResult is an enumeration used to return the results of comparing 210ca08ab68Smrg two language strings or FcLangSet objects. FcLangEqual means the objects 211ca08ab68Smrg match language and territory. FcLangDifferentTerritory means the objects 212ca08ab68Smrg match in language but differ in territory. FcLangDifferentLang means the 213ca08ab68Smrg objects differ in language. 2142c393a42Smrg 215ca08ab68Smrg -------------------------------------------------------------------------- 2162c393a42Smrg 217ca08ab68Smrg FcType 2182c393a42Smrg 219ca08ab68Smrg Tags the kind of data stored in an FcValue. 220a6844aabSmrg 221ca08ab68Smrg -------------------------------------------------------------------------- 222a6844aabSmrg 223ca08ab68Smrg FcValue 224a6844aabSmrg 225ca08ab68Smrg An FcValue object holds a single value with one of a number of different 226ca08ab68Smrg types. The 'type' tag indicates which member is valid. 2272c393a42Smrg 228ca08ab68Smrg typedef struct _FcValue { 229ca08ab68Smrg FcType type; 230ca08ab68Smrg union { 231ca08ab68Smrg const FcChar8 *s; 232ca08ab68Smrg int i; 233ca08ab68Smrg FcBool b; 234ca08ab68Smrg double d; 235ca08ab68Smrg const FcMatrix *m; 236ca08ab68Smrg const FcCharSet *c; 237ca08ab68Smrg void *f; 238ca08ab68Smrg const FcLangSet *l; 239ca08ab68Smrg } u; 240ca08ab68Smrg } FcValue; 2412c393a42Smrg 242a6844aabSmrg 243ca08ab68Smrg FcValue Members 2442c393a42Smrg 245ca08ab68Smrg Type Union member Datatype 246ca08ab68Smrg -------------------------------- 247ca08ab68Smrg FcTypeVoid (none) (none) 248ca08ab68Smrg FcTypeInteger i int 249ca08ab68Smrg FcTypeDouble d double 250ca08ab68Smrg FcTypeString s FcChar8 * 251ca08ab68Smrg FcTypeBool b b 252ca08ab68Smrg FcTypeMatrix m FcMatrix * 253ca08ab68Smrg FcTypeCharSet c FcCharSet * 254ca08ab68Smrg FcTypeFTFace f void * (FT_Face) 255ca08ab68Smrg FcTypeLangSet l FcLangSet * 2562c393a42Smrg 2572c393a42Smrg 258ca08ab68Smrg -------------------------------------------------------------------------- 259a6844aabSmrg 260ca08ab68Smrg FcPattern 2612c393a42Smrg 262ca08ab68Smrg holds a set of names with associated value lists; each name refers to a 263ca08ab68Smrg property of a font. FcPatterns are used as inputs to the matching code as 264ca08ab68Smrg well as holding information about specific fonts. Each property can hold 265ca08ab68Smrg one or more values; conventionally all of the same type, although the 266ca08ab68Smrg interface doesn't demand that. 267a6844aabSmrg 268ca08ab68Smrg -------------------------------------------------------------------------- 269a6844aabSmrg 270ca08ab68Smrg FcFontSet 2712c393a42Smrg 272ca08ab68Smrg typedef struct _FcFontSet { 273ca08ab68Smrg int nfont; 274ca08ab68Smrg int sfont; 275ca08ab68Smrg FcPattern **fonts; 276ca08ab68Smrg } FcFontSet; 2772c393a42Smrg 2782c393a42Smrg 279ca08ab68Smrg An FcFontSet contains a list of FcPatterns. Internally fontconfig uses 280ca08ab68Smrg this data structure to hold sets of fonts. Externally, fontconfig returns 281ca08ab68Smrg the results of listing fonts in this format. 'nfont' holds the number of 282ca08ab68Smrg patterns in the 'fonts' array; 'sfont' is used to indicate the size of 283ca08ab68Smrg that array. 284a6844aabSmrg 285ca08ab68Smrg -------------------------------------------------------------------------- 2862c393a42Smrg 287ca08ab68Smrg FcStrSet, FcStrList 2882c393a42Smrg 289ca08ab68Smrg FcStrSet holds a list of strings that can be appended to and enumerated. 290ca08ab68Smrg Its unique characteristic is that the enumeration works even while strings 291ca08ab68Smrg are appended during enumeration. FcStrList is used during enumeration to 292ca08ab68Smrg safely and correctly walk the list of strings even while that list is 293ca08ab68Smrg edited in the middle of enumeration. 294a6844aabSmrg 295ca08ab68Smrg -------------------------------------------------------------------------- 296a6844aabSmrg 297ca08ab68Smrg FcObjectSet 2982c393a42Smrg 299ca08ab68Smrg typedef struct _FcObjectSet { 300ca08ab68Smrg int nobject; 301ca08ab68Smrg int sobject; 302ca08ab68Smrg const char **objects; 303ca08ab68Smrg } FcObjectSet; 3042c393a42Smrg 3052c393a42Smrg 306ca08ab68Smrg holds a set of names and is used to specify which fields from fonts are 307ca08ab68Smrg placed in the the list of returned patterns when listing fonts. 308a6844aabSmrg 309ca08ab68Smrg -------------------------------------------------------------------------- 310a6844aabSmrg 311ca08ab68Smrg FcObjectType 3122c393a42Smrg 313ca08ab68Smrg typedef struct _FcObjectType { 314ca08ab68Smrg const char *object; 315ca08ab68Smrg FcType type; 316ca08ab68Smrg } FcObjectType; 3172c393a42Smrg 3182c393a42Smrg 319ca08ab68Smrg marks the type of a pattern element generated when parsing font names. 320ca08ab68Smrg Applications can add new object types so that font names may contain the 321ca08ab68Smrg new elements. 322a6844aabSmrg 323ca08ab68Smrg -------------------------------------------------------------------------- 324a6844aabSmrg 325ca08ab68Smrg FcConstant 3262c393a42Smrg 327ca08ab68Smrg typedef struct _FcConstant { 328ca08ab68Smrg const FcChar8 *name; 329ca08ab68Smrg const char *object; 330ca08ab68Smrg int value; 331ca08ab68Smrg } FcConstant; 3322c393a42Smrg 3332c393a42Smrg 334ca08ab68Smrg Provides for symbolic constants for new pattern elements. When 'name' is 335ca08ab68Smrg seen in a font name, an 'object' element is created with value 'value'. 336a6844aabSmrg 337ca08ab68Smrg -------------------------------------------------------------------------- 338a6844aabSmrg 339ca08ab68Smrg FcBlanks 340a6844aabSmrg 341ca08ab68Smrg holds a list of Unicode chars which are expected to be blank; unexpectedly 342ca08ab68Smrg blank chars are assumed to be invalid and are elided from the charset 343ca08ab68Smrg associated with the font. 3442c393a42Smrg 345ca08ab68Smrg -------------------------------------------------------------------------- 3462c393a42Smrg 347ca08ab68Smrg FcFileCache 3482c393a42Smrg 349ca08ab68Smrg holds the per-user cache information for use while loading the font 350ca08ab68Smrg database. This is built automatically for the current configuration when 351ca08ab68Smrg that is loaded. Applications must always pass '0' when one is requested. 3522c393a42Smrg 353ca08ab68Smrg -------------------------------------------------------------------------- 3542c393a42Smrg 355ca08ab68Smrg FcConfig 3562c393a42Smrg 357ca08ab68Smrg holds a complete configuration of the library; there is one default 358ca08ab68Smrg configuration, other can be constructed from XML data structures. All 359ca08ab68Smrg public entry points that need global data can take an optional FcConfig* 360ca08ab68Smrg argument; passing 0 uses the default configuration. FcConfig objects hold 361ca08ab68Smrg two sets of fonts, the first contains those specified by the 362ca08ab68Smrg configuration, the second set holds those added by the application at 363ca08ab68Smrg run-time. Interfaces that need to reference a particular set use one of 364ca08ab68Smrg the FcSetName enumerated values. 3652c393a42Smrg 366ca08ab68Smrg -------------------------------------------------------------------------- 3672c393a42Smrg 368ca08ab68Smrg FcSetName 369a6844aabSmrg 370ca08ab68Smrg Specifies one of the two sets of fonts available in a configuration; 371ca08ab68Smrg FcSetSystem for those fonts specified in the configuration and 372ca08ab68Smrg FcSetApplication which holds fonts provided by the application. 373a6844aabSmrg 374ca08ab68Smrg -------------------------------------------------------------------------- 375a6844aabSmrg 376ca08ab68Smrg FcResult 377a6844aabSmrg 378ca08ab68Smrg Used as a return type for functions manipulating FcPattern objects. 3792c393a42Smrg 380ca08ab68Smrg FcResult Values 381ca08ab68Smrg Result Code Meaning 382ca08ab68Smrg ----------------------------------------------------------- 383ca08ab68Smrg FcResultMatch Object exists with the specified ID 384ca08ab68Smrg FcResultNoMatch Object doesn't exist at all 385ca08ab68Smrg FcResultTypeMismatch Object exists, but the type doesn't match 386ca08ab68Smrg FcResultNoId Object exists, but has fewer values 387ca08ab68Smrg than specified 388ca08ab68Smrg FcResultOutOfMemory malloc failed 3892c393a42Smrg 3902c393a42Smrg 391ca08ab68Smrg -------------------------------------------------------------------------- 392a6844aabSmrg 393ca08ab68Smrg FcAtomic 394a6844aabSmrg 395ca08ab68Smrg Used for locking access to configuration files. Provides a safe way to 396ca08ab68Smrg update configuration files. 3972c393a42Smrg 398ca08ab68Smrg -------------------------------------------------------------------------- 3992c393a42Smrg 400ca08ab68Smrg FcCache 4012c393a42Smrg 402ca08ab68Smrg Holds information about the fonts contained in a single directory. Normal 403ca08ab68Smrg applications need not worry about this as caches for font access are 404ca08ab68Smrg automatically managed by the library. Applications dealing with cache 405ca08ab68Smrg management may want to use some of these objects in their work, however 406ca08ab68Smrg the included 'fc-cache' program generally suffices for all of that. 4072c393a42Smrg 408ca08ab68Smrg -------------------------------------------------------------------------- 4092c393a42Smrg 410a6844aabSmrgFUNCTIONS 4112c393a42Smrg 412ca08ab68Smrg These are grouped by functionality, often using the main data type being 413ca08ab68Smrg manipulated. 414ca08ab68Smrg 415ca08ab68Smrg -------------------------------------------------------------------------- 4162c393a42Smrg 417ca08ab68Smrg Initialization 418a6844aabSmrg 419ca08ab68Smrg Table of Contents 420a6844aabSmrg 421ca08ab68Smrg [5]FcInitLoadConfig -- load configuration 422a6844aabSmrg 423ca08ab68Smrg [6]FcInitLoadConfigAndFonts -- load configuration and font data 4242c393a42Smrg 425ca08ab68Smrg [7]FcInit -- initialize fontconfig library 426ca08ab68Smrg 427ca08ab68Smrg [8]FcFini -- finalize fontconfig library 428ca08ab68Smrg 429ca08ab68Smrg [9]FcGetVersion -- library version number 430ca08ab68Smrg 431ca08ab68Smrg [10]FcInitReinitialize -- re-initialize library 432ca08ab68Smrg 433ca08ab68Smrg [11]FcInitBringUptoDate -- reload configuration files if needed 434ca08ab68Smrg 435ca08ab68Smrg These functions provide some control over how the library is initialized. 436ca08ab68Smrg 437ca08ab68Smrg FcInitLoadConfig 4382c393a42Smrg 4392c393a42SmrgName 4402c393a42Smrg 441ca08ab68Smrg FcInitLoadConfig -- load configuration 4422c393a42Smrg 4432c393a42SmrgSynopsis 4442c393a42Smrg 445c9710b42Smrg #include <fontconfig/fontconfig.h> 4462c393a42Smrg 447a6844aabSmrg 448ca08ab68Smrg FcConfig * FcInitLoadConfig(void); 4492c393a42Smrg 4502c393a42SmrgDescription 4512c393a42Smrg 452ca08ab68Smrg Loads the default configuration file and returns the resulting 453ca08ab68Smrg configuration. Does not load any font information. 4542c393a42Smrg 455ca08ab68Smrg FcInitLoadConfigAndFonts 4562c393a42Smrg 4572c393a42SmrgName 4582c393a42Smrg 459ca08ab68Smrg FcInitLoadConfigAndFonts -- load configuration and font data 4602c393a42Smrg 4612c393a42SmrgSynopsis 4622c393a42Smrg 463c9710b42Smrg #include <fontconfig/fontconfig.h> 4642c393a42Smrg 465a6844aabSmrg 466ca08ab68Smrg FcConfig * FcInitLoadConfigAndFonts(void); 4672c393a42Smrg 4682c393a42SmrgDescription 4692c393a42Smrg 470ca08ab68Smrg Loads the default configuration file and builds information about the 471ca08ab68Smrg available fonts. Returns the resulting configuration. 4722c393a42Smrg 473ca08ab68Smrg FcInit 4742c393a42Smrg 4752c393a42SmrgName 4762c393a42Smrg 477ca08ab68Smrg FcInit -- initialize fontconfig library 4782c393a42Smrg 4792c393a42SmrgSynopsis 4802c393a42Smrg 481c9710b42Smrg #include <fontconfig/fontconfig.h> 4822c393a42Smrg 483a6844aabSmrg 484ca08ab68Smrg FcBool FcInit(void); 4852c393a42Smrg 4862c393a42SmrgDescription 4872c393a42Smrg 488ca08ab68Smrg Loads the default configuration file and the fonts referenced therein and 489ca08ab68Smrg sets the default configuration to that result. Returns whether this 490ca08ab68Smrg process succeeded or not. If the default configuration has already been 491ca08ab68Smrg loaded, this routine does nothing and returns FcTrue. 4922c393a42Smrg 493ca08ab68Smrg FcFini 4942c393a42Smrg 4952c393a42SmrgName 4962c393a42Smrg 497ca08ab68Smrg FcFini -- finalize fontconfig library 4982c393a42Smrg 4992c393a42SmrgSynopsis 5002c393a42Smrg 501c9710b42Smrg #include <fontconfig/fontconfig.h> 5022c393a42Smrg 503a6844aabSmrg 504ca08ab68Smrg void FcFini(void); 5052c393a42Smrg 5062c393a42SmrgDescription 5072c393a42Smrg 508ca08ab68Smrg Frees all data structures allocated by previous calls to fontconfig 509ca08ab68Smrg functions. Fontconfig returns to an uninitialized state, requiring a new 510ca08ab68Smrg call to one of the FcInit functions before any other fontconfig function 511ca08ab68Smrg may be called. 5122c393a42Smrg 513ca08ab68Smrg FcGetVersion 5142c393a42Smrg 5152c393a42SmrgName 5162c393a42Smrg 517ca08ab68Smrg FcGetVersion -- library version number 5182c393a42Smrg 5192c393a42SmrgSynopsis 5202c393a42Smrg 521c9710b42Smrg #include <fontconfig/fontconfig.h> 5222c393a42Smrg 523a6844aabSmrg 524ca08ab68Smrg int FcGetVersion(void); 5252c393a42Smrg 5262c393a42SmrgDescription 5272c393a42Smrg 528ca08ab68Smrg Returns the version number of the library. 5292c393a42Smrg 530ca08ab68Smrg FcInitReinitialize 5312c393a42Smrg 5322c393a42SmrgName 5332c393a42Smrg 534ca08ab68Smrg FcInitReinitialize -- re-initialize library 5352c393a42Smrg 5362c393a42SmrgSynopsis 5372c393a42Smrg 538c9710b42Smrg #include <fontconfig/fontconfig.h> 5392c393a42Smrg 540a6844aabSmrg 541ca08ab68Smrg FcBool FcInitReinitialize(void); 5422c393a42Smrg 5432c393a42SmrgDescription 5442c393a42Smrg 545ca08ab68Smrg Forces the default configuration file to be reloaded and resets the 546ca08ab68Smrg default configuration. Returns FcFalse if the configuration cannot be 547ca08ab68Smrg reloaded (due to configuration file errors, allocation failures or other 548ca08ab68Smrg issues) and leaves the existing configuration unchanged. Otherwise returns 549ca08ab68Smrg FcTrue. 5502c393a42Smrg 551ca08ab68Smrg FcInitBringUptoDate 5522c393a42Smrg 5532c393a42SmrgName 5542c393a42Smrg 555ca08ab68Smrg FcInitBringUptoDate -- reload configuration files if needed 5562c393a42Smrg 5572c393a42SmrgSynopsis 5582c393a42Smrg 559c9710b42Smrg #include <fontconfig/fontconfig.h> 5602c393a42Smrg 561a6844aabSmrg 562ca08ab68Smrg FcBool FcInitBringUptoDate(void); 5632c393a42Smrg 5642c393a42SmrgDescription 5652c393a42Smrg 566ca08ab68Smrg Checks the rescan interval in the default configuration, checking the 567ca08ab68Smrg configuration if the interval has passed and reloading the configuration 568ca08ab68Smrg if when any changes are detected. Returns FcFalse if the configuration 569ca08ab68Smrg cannot be reloaded (see FcInitReinitialize). Otherwise returns FcTrue. 5702c393a42Smrg 571ca08ab68Smrg -------------------------------------------------------------------------- 572ca08ab68Smrg 573ca08ab68Smrg FcPattern 574ca08ab68Smrg 575ca08ab68Smrg Table of Contents 576ca08ab68Smrg 577ca08ab68Smrg [12]FcPatternCreate -- Create a pattern 578ca08ab68Smrg 579ca08ab68Smrg [13]FcPatternDuplicate -- Copy a pattern 580ca08ab68Smrg 581ca08ab68Smrg [14]FcPatternReference -- Increment pattern reference count 582ca08ab68Smrg 583ca08ab68Smrg [15]FcPatternDestroy -- Destroy a pattern 584ca08ab68Smrg 585ca08ab68Smrg [16]FcPatternEqual -- Compare patterns 586ca08ab68Smrg 587ca08ab68Smrg [17]FcPatternEqualSubset -- Compare portions of patterns 588ca08ab68Smrg 589ca08ab68Smrg [18]FcPatternFilter -- Filter the objects of pattern 590ca08ab68Smrg 591ca08ab68Smrg [19]FcPatternHash -- Compute a pattern hash value 592ca08ab68Smrg 593ca08ab68Smrg [20]FcPatternAdd -- Add a value to a pattern 594ca08ab68Smrg 595ca08ab68Smrg [21]FcPatternAddWeak -- Add a value to a pattern with weak binding 596ca08ab68Smrg 597ca08ab68Smrg [22]FcPatternAdd-Type -- Add a typed value to a pattern 598ca08ab68Smrg 599ca08ab68Smrg [23]FcPatternGet -- Return a value from a pattern 600ca08ab68Smrg 601ca08ab68Smrg [24]FcPatternGet-Type -- Return a typed value from a pattern 602ca08ab68Smrg 603ca08ab68Smrg [25]FcPatternBuild -- Create patterns from arguments 604ca08ab68Smrg 605ca08ab68Smrg [26]FcPatternDel -- Delete a property from a pattern 606ca08ab68Smrg 607ca08ab68Smrg [27]FcPatternRemove -- Remove one object of the specified type from the 608ca08ab68Smrg pattern 609ca08ab68Smrg 610ca08ab68Smrg [28]FcPatternPrint -- Print a pattern for debugging 611ca08ab68Smrg 612ca08ab68Smrg [29]FcDefaultSubstitute -- Perform default substitutions in a pattern 6132c393a42Smrg 614ca08ab68Smrg [30]FcNameParse -- Parse a pattern string 6152c393a42Smrg 616ca08ab68Smrg [31]FcNameUnparse -- Convert a pattern back into a string that can be 617ca08ab68Smrg parsed 6182c393a42Smrg 619ca08ab68Smrg [32]FcPatternFormat -- Format a pattern into a string according to a 620ca08ab68Smrg format specifier 6212c393a42Smrg 622ca08ab68Smrg An FcPattern is an opaque type that holds both patterns to match against 623ca08ab68Smrg the available fonts, as well as the information about each font. 6242c393a42Smrg 625ca08ab68Smrg FcPatternCreate 6262c393a42Smrg 6272c393a42SmrgName 6282c393a42Smrg 629ca08ab68Smrg FcPatternCreate -- Create a pattern 6302c393a42Smrg 6312c393a42SmrgSynopsis 6322c393a42Smrg 633c9710b42Smrg #include <fontconfig/fontconfig.h> 6342c393a42Smrg 635a6844aabSmrg 636ca08ab68Smrg FcPattern * FcPatternCreate(void); 6372c393a42Smrg 6382c393a42SmrgDescription 6392c393a42Smrg 640ca08ab68Smrg Creates a pattern with no properties; used to build patterns from scratch. 6412c393a42Smrg 642ca08ab68Smrg FcPatternDuplicate 6432c393a42Smrg 6442c393a42SmrgName 6452c393a42Smrg 646ca08ab68Smrg FcPatternDuplicate -- Copy a pattern 6472c393a42Smrg 6482c393a42SmrgSynopsis 6492c393a42Smrg 650c9710b42Smrg #include <fontconfig/fontconfig.h> 6512c393a42Smrg 652a6844aabSmrg 653ca08ab68Smrg FcPattern * FcPatternDuplicate(const FcPattern *p); 6542c393a42Smrg 6552c393a42SmrgDescription 6562c393a42Smrg 657ca08ab68Smrg Copy a pattern, returning a new pattern that matches p. Each pattern may 658ca08ab68Smrg be modified without affecting the other. 6592c393a42Smrg 660ca08ab68Smrg FcPatternReference 6612c393a42Smrg 6622c393a42SmrgName 6632c393a42Smrg 664ca08ab68Smrg FcPatternReference -- Increment pattern reference count 6652c393a42Smrg 6662c393a42SmrgSynopsis 6672c393a42Smrg 668c9710b42Smrg #include <fontconfig/fontconfig.h> 6692c393a42Smrg 670a6844aabSmrg 671ca08ab68Smrg void FcPatternReference(FcPattern *p); 6722c393a42Smrg 6732c393a42SmrgDescription 6742c393a42Smrg 675ca08ab68Smrg Add another reference to p. Patterns are freed only when the reference 676ca08ab68Smrg count reaches zero. 6772c393a42Smrg 678ca08ab68Smrg FcPatternDestroy 6792c393a42Smrg 6802c393a42SmrgName 6812c393a42Smrg 682ca08ab68Smrg FcPatternDestroy -- Destroy a pattern 6832c393a42Smrg 6842c393a42SmrgSynopsis 6852c393a42Smrg 686c9710b42Smrg #include <fontconfig/fontconfig.h> 6872c393a42Smrg 688a6844aabSmrg 689ca08ab68Smrg void FcPatternDestroy(FcPattern *p); 6902c393a42Smrg 6912c393a42SmrgDescription 6922c393a42Smrg 693ca08ab68Smrg Decrement the pattern reference count. If all references are gone, 694ca08ab68Smrg destroys the pattern, in the process destroying all related values. 6952c393a42Smrg 696ca08ab68Smrg FcPatternEqual 6972c393a42Smrg 6982c393a42SmrgName 6992c393a42Smrg 700ca08ab68Smrg FcPatternEqual -- Compare patterns 7012c393a42Smrg 7022c393a42SmrgSynopsis 7032c393a42Smrg 704c9710b42Smrg #include <fontconfig/fontconfig.h> 7052c393a42Smrg 706a6844aabSmrg 707ca08ab68Smrg FcBool FcPatternEqual(const FcPattern *pa, const FcPattern *pb); 7082c393a42Smrg 7092c393a42SmrgDescription 7102c393a42Smrg 711ca08ab68Smrg Returns whether pa and pb are exactly alike. 7122c393a42Smrg 713ca08ab68Smrg FcPatternEqualSubset 7142c393a42Smrg 7152c393a42SmrgName 7162c393a42Smrg 717ca08ab68Smrg FcPatternEqualSubset -- Compare portions of patterns 7182c393a42Smrg 7192c393a42SmrgSynopsis 7202c393a42Smrg 721c9710b42Smrg #include <fontconfig/fontconfig.h> 7222c393a42Smrg 723a6844aabSmrg 724ca08ab68Smrg FcBool FcPatternEqualSubset(const FcPattern *pa, const FcPattern *pb, 725ca08ab68Smrg const FcObjectSet *os); 7262c393a42Smrg 7272c393a42SmrgDescription 7282c393a42Smrg 729ca08ab68Smrg Returns whether pa and pb have exactly the same values for all of the 730ca08ab68Smrg objects in os. 7312c393a42Smrg 732ca08ab68Smrg FcPatternFilter 733a6844aabSmrg 734a6844aabSmrgName 735a6844aabSmrg 736ca08ab68Smrg FcPatternFilter -- Filter the objects of pattern 737a6844aabSmrg 738a6844aabSmrgSynopsis 739a6844aabSmrg 740c9710b42Smrg #include <fontconfig/fontconfig.h> 741a6844aabSmrg 742a6844aabSmrg 743ca08ab68Smrg FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet *); 744a6844aabSmrg 745a6844aabSmrgDescription 746a6844aabSmrg 747ca08ab68Smrg Returns a new pattern that only has those objects from p that are in os. 748ca08ab68Smrg If os is NULL, a duplicate of p is returned. 749a6844aabSmrg 750ca08ab68Smrg FcPatternHash 7512c393a42Smrg 7522c393a42SmrgName 7532c393a42Smrg 754ca08ab68Smrg FcPatternHash -- Compute a pattern hash value 7552c393a42Smrg 7562c393a42SmrgSynopsis 7572c393a42Smrg 758c9710b42Smrg #include <fontconfig/fontconfig.h> 7592c393a42Smrg 760a6844aabSmrg 761ca08ab68Smrg FcChar32 FcPatternHash(const FcPattern *p); 7622c393a42Smrg 7632c393a42SmrgDescription 7642c393a42Smrg 765ca08ab68Smrg Returns a 32-bit number which is the same for any two patterns which are 766ca08ab68Smrg equal. 7672c393a42Smrg 768ca08ab68Smrg FcPatternAdd 7692c393a42Smrg 7702c393a42SmrgName 7712c393a42Smrg 772ca08ab68Smrg FcPatternAdd -- Add a value to a pattern 7732c393a42Smrg 7742c393a42SmrgSynopsis 7752c393a42Smrg 776c9710b42Smrg #include <fontconfig/fontconfig.h> 7772c393a42Smrg 778a6844aabSmrg 779ca08ab68Smrg FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue value, 780ca08ab68Smrg FcBool append); 7812c393a42Smrg 7822c393a42SmrgDescription 7832c393a42Smrg 784ca08ab68Smrg Adds a single value to the list of values associated with the property 785ca08ab68Smrg named `object. If `append is FcTrue, the value is added at the end of any 786ca08ab68Smrg existing list, otherwise it is inserted at the beginning. `value' is saved 787ca08ab68Smrg (with FcValueSave) when inserted into the pattern so that the library 788ca08ab68Smrg retains no reference to any application-supplied data structure. 7892c393a42Smrg 790ca08ab68Smrg FcPatternAddWeak 7912c393a42Smrg 7922c393a42SmrgName 7932c393a42Smrg 794ca08ab68Smrg FcPatternAddWeak -- Add a value to a pattern with weak binding 7952c393a42Smrg 7962c393a42SmrgSynopsis 7972c393a42Smrg 798c9710b42Smrg #include <fontconfig/fontconfig.h> 7992c393a42Smrg 800a6844aabSmrg 801ca08ab68Smrg FcBool FcPatternAddWeak(FcPattern *p, const char *object, FcValue value, 802ca08ab68Smrg FcBool append); 8032c393a42Smrg 8042c393a42SmrgDescription 8052c393a42Smrg 806ca08ab68Smrg FcPatternAddWeak is essentially the same as FcPatternAdd except that any 807ca08ab68Smrg values added to the list have binding weak instead of strong. 8082c393a42Smrg 809ca08ab68Smrg FcPatternAdd-Type 8102c393a42Smrg 8112c393a42SmrgName 8122c393a42Smrg 813ca08ab68Smrg FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString, 814ca08ab68Smrg FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool, 815ca08ab68Smrg FcPatternAddFTFace, FcPatternAddLangSet -- Add a typed value to a pattern 8162c393a42Smrg 8172c393a42SmrgSynopsis 8182c393a42Smrg 819c9710b42Smrg #include <fontconfig/fontconfig.h> 8202c393a42Smrg 8212c393a42Smrg 822ca08ab68Smrg FcBool FcPatternAddInteger(FcPattern *p, const char *object, int i); 823a6844aabSmrg 824ca08ab68Smrg FcBool FcPatternAddDouble(FcPattern *p, const char *object, double d); 8252c393a42Smrg 826ca08ab68Smrg FcBool FcPatternAddString(FcPattern *p, const char *object, const FcChar8 827ca08ab68Smrg *s); 8282c393a42Smrg 829ca08ab68Smrg FcBool FcPatternAddMatrix(FcPattern *p, const char *object, const FcMatrix 830ca08ab68Smrg *m); 8312c393a42Smrg 832ca08ab68Smrg FcBool FcPatternAddCharSet(FcPattern *p, const char *object, const 833ca08ab68Smrg FcCharSet *c); 8342c393a42Smrg 835ca08ab68Smrg FcBool FcPatternAddBool(FcPattern *p, const char *object, FcBool b); 8362c393a42Smrg 837ca08ab68Smrg FcBool FcPatternAddFTFace(FcPattern *p, const char *object, const 838ca08ab68Smrg FT_Facef); 8392c393a42Smrg 840ca08ab68Smrg FcBool FcPatternAddLangSet(FcPattern *p, const char *object, const 841ca08ab68Smrg FcLangSet *l); 8422c393a42Smrg 8432c393a42SmrgDescription 8442c393a42Smrg 845ca08ab68Smrg These are all convenience functions that insert objects of the specified 846ca08ab68Smrg type into the pattern. Use these in preference to FcPatternAdd as they 847ca08ab68Smrg will provide compile-time typechecking. These all append values to any 848ca08ab68Smrg existing list of values. 8492c393a42Smrg 850ca08ab68Smrg FcPatternGet 8512c393a42Smrg 8522c393a42SmrgName 8532c393a42Smrg 854ca08ab68Smrg FcPatternGet -- Return a value from a pattern 8552c393a42Smrg 8562c393a42SmrgSynopsis 8572c393a42Smrg 858c9710b42Smrg #include <fontconfig/fontconfig.h> 8592c393a42Smrg 860a6844aabSmrg 861ca08ab68Smrg FcResult FcPatternGet(FcPattern *p, const char *object, int id, FcValue 862ca08ab68Smrg *v); 8632c393a42Smrg 8642c393a42SmrgDescription 8652c393a42Smrg 866ca08ab68Smrg Returns in v the id'th value associated with the property object. The 867ca08ab68Smrg value returned is not a copy, but rather refers to the data stored within 868ca08ab68Smrg the pattern directly. Applications must not free this value. 8692c393a42Smrg 870ca08ab68Smrg FcPatternGet-Type 8712c393a42Smrg 8722c393a42SmrgName 8732c393a42Smrg 874ca08ab68Smrg FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString, 875ca08ab68Smrg FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool, 876ca08ab68Smrg FcPatternGetFTFace, FcPatternGetLangSet -- Return a typed value from a 877ca08ab68Smrg pattern 8782c393a42Smrg 8792c393a42SmrgSynopsis 8802c393a42Smrg 881c9710b42Smrg #include <fontconfig/fontconfig.h> 8822c393a42Smrg 8832c393a42Smrg 884ca08ab68Smrg FcResult FcPatternGetInteger(FcPattern *p, const char *object, int n, int 885ca08ab68Smrg *i); 886a6844aabSmrg 887ca08ab68Smrg FcResult FcPatternGetDouble(FcPattern *p, const char *object, int n, 888ca08ab68Smrg double *d); 8892c393a42Smrg 890ca08ab68Smrg FcResult FcPatternGetString(FcPattern *p, const char *object, int n, 891ca08ab68Smrg FcChar8 **s); 8922c393a42Smrg 893ca08ab68Smrg FcResult FcPatternGetMatrix(FcPattern *p, const char *object, int n, 894ca08ab68Smrg FcMatrix **s); 8952c393a42Smrg 896ca08ab68Smrg FcResult FcPatternGetCharSet(FcPattern *p, const char *object, int n, 897ca08ab68Smrg FcCharSet **c); 8982c393a42Smrg 899ca08ab68Smrg FcResult FcPatternGetBool(FcPattern *p, const char *object, int n, FcBool 900ca08ab68Smrg *b); 9012c393a42Smrg 902ca08ab68Smrg FcResult FcPatternGetFTFace(FcPattern *p, const char *object, int n); 9032c393a42Smrg 904ca08ab68Smrg FcResult FcPatternGetLangSet(FcPattern *p, const char *object, FT_Face 905ca08ab68Smrg *f); 9062c393a42Smrg 9072c393a42SmrgDescription 9082c393a42Smrg 909ca08ab68Smrg These are convenience functions that call FcPatternGet and verify that the 910ca08ab68Smrg returned data is of the expected type. They return FcResultTypeMismatch if 911ca08ab68Smrg this is not the case. Note that these (like FcPatternGet) do not make a 912ca08ab68Smrg copy of any data structure referenced by the return value. Use these in 913ca08ab68Smrg preference to FcPatternGet to provide compile-time typechecking. 9142c393a42Smrg 915ca08ab68Smrg FcPatternBuild 9162c393a42Smrg 9172c393a42SmrgName 9182c393a42Smrg 919ca08ab68Smrg FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create patterns 920ca08ab68Smrg from arguments 9212c393a42Smrg 9222c393a42SmrgSynopsis 9232c393a42Smrg 924c9710b42Smrg #include <fontconfig/fontconfig.h> 9252c393a42Smrg 9262c393a42Smrg 927ca08ab68Smrg FcPattern * FcPatternBuild(FcPattern *pattern, ...); 9282c393a42Smrg 929ca08ab68Smrg FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va); 930a6844aabSmrg 931ca08ab68Smrg void FcPatternVapBuild(FcPattern *result, FcPattern *pattern, va_list va); 9322c393a42Smrg 9332c393a42SmrgDescription 9342c393a42Smrg 935ca08ab68Smrg Builds a pattern using a list of objects, types and values. Each value to 936ca08ab68Smrg be entered in the pattern is specified with three arguments: 937a6844aabSmrg 938ca08ab68Smrg 1. Object name, a string describing the property to be added. 939a6844aabSmrg 940ca08ab68Smrg 2. Object type, one of the FcType enumerated values 9412c393a42Smrg 942ca08ab68Smrg 3. Value, not an FcValue, but the raw type as passed to any of the 943ca08ab68Smrg FcPatternAdd<type> functions. Must match the type of the second 944ca08ab68Smrg argument. 9452c393a42Smrg 946ca08ab68Smrg The argument list is terminated by a null object name, no object type nor 947ca08ab68Smrg value need be passed for this. The values are added to `pattern', if 948ca08ab68Smrg `pattern' is null, a new pattern is created. In either case, the pattern 949ca08ab68Smrg is returned. Example 9502c393a42Smrg 951ca08ab68Smrg pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0); 952a6844aabSmrg 953ca08ab68Smrg FcPatternVaBuild is used when the arguments are already in the form of a 954ca08ab68Smrg varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild 955ca08ab68Smrg which returns its result directly in the result variable. 9562c393a42Smrg 957ca08ab68Smrg FcPatternDel 9582c393a42Smrg 9592c393a42SmrgName 9602c393a42Smrg 961ca08ab68Smrg FcPatternDel -- Delete a property from a pattern 9622c393a42Smrg 9632c393a42SmrgSynopsis 9642c393a42Smrg 965c9710b42Smrg #include <fontconfig/fontconfig.h> 9662c393a42Smrg 967a6844aabSmrg 968ca08ab68Smrg FcBool FcPatternDel(FcPattern *p, const char *object); 9692c393a42Smrg 9702c393a42SmrgDescription 9712c393a42Smrg 972ca08ab68Smrg Deletes all values associated with the property `object', returning 973ca08ab68Smrg whether the property existed or not. 9742c393a42Smrg 975ca08ab68Smrg FcPatternRemove 9762c393a42Smrg 9772c393a42SmrgName 9782c393a42Smrg 979ca08ab68Smrg FcPatternRemove -- Remove one object of the specified type from the 980ca08ab68Smrg pattern 9812c393a42Smrg 9822c393a42SmrgSynopsis 9832c393a42Smrg 984c9710b42Smrg #include <fontconfig/fontconfig.h> 9852c393a42Smrg 986a6844aabSmrg 987ca08ab68Smrg FcBool FcPatternRemove(FcPattern *p, const char *object, int id); 9882c393a42Smrg 9892c393a42SmrgDescription 9902c393a42Smrg 991ca08ab68Smrg Removes the value associated with the property `object' at position `id', 992ca08ab68Smrg returning whether the property existed and had a value at that position or 993ca08ab68Smrg not. 9942c393a42Smrg 995ca08ab68Smrg FcPatternPrint 9962c393a42Smrg 9972c393a42SmrgName 9982c393a42Smrg 999ca08ab68Smrg FcPatternPrint -- Print a pattern for debugging 10002c393a42Smrg 10012c393a42SmrgSynopsis 10022c393a42Smrg 1003c9710b42Smrg #include <fontconfig/fontconfig.h> 10042c393a42Smrg 1005a6844aabSmrg 1006ca08ab68Smrg void FcPatternPrint(const FcPattern *p); 10072c393a42Smrg 10082c393a42SmrgDescription 10092c393a42Smrg 1010ca08ab68Smrg Prints an easily readable version of the pattern to stdout. There is no 1011ca08ab68Smrg provision for reparsing data in this format, it's just for diagnostics and 1012ca08ab68Smrg debugging. 10132c393a42Smrg 1014ca08ab68Smrg FcDefaultSubstitute 10152c393a42Smrg 10162c393a42SmrgName 10172c393a42Smrg 1018ca08ab68Smrg FcDefaultSubstitute -- Perform default substitutions in a pattern 10192c393a42Smrg 10202c393a42SmrgSynopsis 10212c393a42Smrg 1022c9710b42Smrg #include <fontconfig/fontconfig.h> 10232c393a42Smrg 1024a6844aabSmrg 1025ca08ab68Smrg void FcDefaultSubstitute(FcPattern *pattern); 10262c393a42Smrg 10272c393a42SmrgDescription 10282c393a42Smrg 1029ca08ab68Smrg Supplies default values for underspecified font patterns: 1030a6844aabSmrg 1031ca08ab68Smrg * Patterns without a specified style or weight are set to Medium 10322c393a42Smrg 1033ca08ab68Smrg * Patterns without a specified style or slant are set to Roman 1034a6844aabSmrg 1035ca08ab68Smrg * Patterns without a specified pixel size are given one computed from 1036ca08ab68Smrg any specified point size (default 12), dpi (default 75) and scale 1037ca08ab68Smrg (default 1). 10382c393a42Smrg 1039ca08ab68Smrg FcNameParse 10402c393a42Smrg 10412c393a42SmrgName 10422c393a42Smrg 1043ca08ab68Smrg FcNameParse -- Parse a pattern string 10442c393a42Smrg 10452c393a42SmrgSynopsis 10462c393a42Smrg 1047c9710b42Smrg #include <fontconfig/fontconfig.h> 10482c393a42Smrg 1049a6844aabSmrg 1050ca08ab68Smrg FcPattern * FcNameParse(const FcChar8 *name); 10512c393a42Smrg 10522c393a42SmrgDescription 10532c393a42Smrg 1054ca08ab68Smrg Converts name from the standard text format described above into a 1055ca08ab68Smrg pattern. 10562c393a42Smrg 1057ca08ab68Smrg FcNameUnparse 10582c393a42Smrg 10592c393a42SmrgName 10602c393a42Smrg 1061ca08ab68Smrg FcNameUnparse -- Convert a pattern back into a string that can be parsed 10622c393a42Smrg 10632c393a42SmrgSynopsis 10642c393a42Smrg 1065c9710b42Smrg #include <fontconfig/fontconfig.h> 10662c393a42Smrg 1067a6844aabSmrg 1068ca08ab68Smrg FcChar8 * FcNameUnparse(FcPattern *pat); 10692c393a42Smrg 10702c393a42SmrgDescription 10712c393a42Smrg 1072ca08ab68Smrg Converts the given pattern into the standard text format described above. 1073ca08ab68Smrg The return value is not static, but instead refers to newly allocated 1074ca08ab68Smrg memory which should be freed by the caller using free(). 1075a6844aabSmrg 1076ca08ab68Smrg FcPatternFormat 1077a6844aabSmrg 1078a6844aabSmrgName 1079a6844aabSmrg 1080ca08ab68Smrg FcPatternFormat -- Format a pattern into a string according to a format 1081ca08ab68Smrg specifier 1082a6844aabSmrg 1083a6844aabSmrgSynopsis 1084a6844aabSmrg 1085c9710b42Smrg #include <fontconfig/fontconfig.h> 1086a6844aabSmrg 1087a6844aabSmrg 1088ca08ab68Smrg FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8 *format); 1089a6844aabSmrg 1090a6844aabSmrgDescription 1091a6844aabSmrg 1092ca08ab68Smrg Converts given pattern pat into text described by the format specifier 1093ca08ab68Smrg format. The return value refers to newly allocated memory which should be 1094ca08ab68Smrg freed by the caller using free(), or NULL if format is invalid. 1095a6844aabSmrg 1096ca08ab68Smrg The format is loosely modeled after printf-style format string. The 1097ca08ab68Smrg format string is composed of zero or more directives: ordinary characters 1098ca08ab68Smrg (not "%"), which are copied unchanged to the output stream; and tags which 1099ca08ab68Smrg are interpreted to construct text from the pattern in a variety of ways 1100ca08ab68Smrg (explained below). Special characters can be escaped using backslash. 1101ca08ab68Smrg C-string style special characters like \n and \r are also supported (this 1102ca08ab68Smrg is useful when the format string is not a C string literal). It is 1103ca08ab68Smrg advisable to always escape curly braces that are meant to be copied to the 1104ca08ab68Smrg output as ordinary characters. 1105a6844aabSmrg 1106ca08ab68Smrg Each tag is introduced by the character "%", followed by an optional 1107ca08ab68Smrg minimum field width, followed by tag contents in curly braces ({}). If the 1108ca08ab68Smrg minimum field width value is provided the tag will be expanded and the 1109ca08ab68Smrg result padded to achieve the minimum width. If the minimum field width is 1110ca08ab68Smrg positive, the padding will right-align the text. Negative field width will 1111ca08ab68Smrg left-align. The rest of this section describes various supported tag 1112ca08ab68Smrg contents and their expansion. 1113a6844aabSmrg 1114ca08ab68Smrg A simple tag is one where the content is an identifier. When simple tags 1115ca08ab68Smrg are expanded, the named identifier will be looked up in pattern and the 1116ca08ab68Smrg resulting list of values returned, joined together using comma. For 1117ca08ab68Smrg example, to print the family name and style of the pattern, use the format 1118ca08ab68Smrg "%{family} %{style}\n". To extend the family column to forty characters 1119ca08ab68Smrg use "%-40{family}%{style}\n". 1120a6844aabSmrg 1121ca08ab68Smrg Simple tags expand to list of all values for an element. To only choose 1122ca08ab68Smrg one of the values, one can index using the syntax "%{elt[idx]}". For 1123ca08ab68Smrg example, to get the first family name only, use "%{family[0]}". 1124a6844aabSmrg 1125ca08ab68Smrg If a simple tag ends with "=" and the element is found in the pattern, 1126ca08ab68Smrg the name of the element followed by "=" will be output before the list of 1127ca08ab68Smrg values. For example, "%{weight=}" may expand to the string "weight=80". Or 1128ca08ab68Smrg to the empty string if pattern does not have weight set. 1129a6844aabSmrg 1130ca08ab68Smrg If a simple tag starts with ":" and the element is found in the pattern, 1131ca08ab68Smrg ":" will be printed first. For example, combining this with the =, the 1132ca08ab68Smrg format "%{:weight=}" may expand to ":weight=80" or to the empty string if 1133ca08ab68Smrg pattern does not have weight set. 1134a6844aabSmrg 1135ca08ab68Smrg If a simple tag contains the string ":-", the rest of the the tag 1136ca08ab68Smrg contents will be used as a default string. The default string is output if 1137ca08ab68Smrg the element is not found in the pattern. For example, the format 1138ca08ab68Smrg "%{:weight=:-123}" may expand to ":weight=80" or to the string 1139ca08ab68Smrg ":weight=123" if pattern does not have weight set. 1140a6844aabSmrg 1141ca08ab68Smrg A count tag is one that starts with the character "#" followed by an 1142ca08ab68Smrg element name, and expands to the number of values for the element in the 1143ca08ab68Smrg pattern. For example, "%{#family}" expands to the number of family names 1144ca08ab68Smrg pattern has set, which may be zero. 1145a6844aabSmrg 1146ca08ab68Smrg A sub-expression tag is one that expands a sub-expression. The tag 1147ca08ab68Smrg contents are the sub-expression to expand placed inside another set of 1148ca08ab68Smrg curly braces. Sub-expression tags are useful for aligning an entire 1149ca08ab68Smrg sub-expression, or to apply converters (explained later) to the entire 1150ca08ab68Smrg sub-expression output. For example, the format "%40{{%{family} %{style}}}" 1151ca08ab68Smrg expands the sub-expression to construct the family name followed by the 1152ca08ab68Smrg style, then takes the entire string and pads it on the left to be at least 1153ca08ab68Smrg forty characters. 1154a6844aabSmrg 1155ca08ab68Smrg A filter-out tag is one starting with the character "-" followed by a 1156ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1157ca08ab68Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1158ca08ab68Smrg pattern that has the listed elements removed from it. For example, the 1159ca08ab68Smrg format "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with pattern 1160ca08ab68Smrg sans the size and pixelsize elements. 1161a6844aabSmrg 1162ca08ab68Smrg A filter-in tag is one starting with the character "+" followed by a 1163ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1164ca08ab68Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1165ca08ab68Smrg pattern that only has the listed elements from the surrounding pattern. 1166ca08ab68Smrg For example, the format "%{+family,familylang{sub-expr}}" will expand 1167ca08ab68Smrg "sub-expr" with a sub-pattern consisting only the family and family lang 1168ca08ab68Smrg elements of pattern. 1169a6844aabSmrg 1170ca08ab68Smrg A conditional tag is one starting with the character "?" followed by a 1171ca08ab68Smrg comma-separated list of element conditions, followed by two sub-expression 1172ca08ab68Smrg enclosed in curly braces. An element condition can be an element name, in 1173ca08ab68Smrg which case it tests whether the element is defined in pattern, or the 1174ca08ab68Smrg character "!" followed by an element name, in which case the test is 1175ca08ab68Smrg negated. The conditional passes if all the element conditions pass. The 1176ca08ab68Smrg tag expands the first sub-expression if the conditional passes, and 1177ca08ab68Smrg expands the second sub-expression otherwise. For example, the format 1178ca08ab68Smrg "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if pattern has 1179ca08ab68Smrg size and dpi elements but no pixelsize element, and to "fail" otherwise. 1180a6844aabSmrg 1181ca08ab68Smrg An enumerate tag is one starting with the string "[]" followed by a 1182ca08ab68Smrg comma-separated list of element names, followed by a sub-expression 1183ca08ab68Smrg enclosed in curly braces. The list of values for the named elements are 1184ca08ab68Smrg walked in parallel and the sub-expression expanded each time with a 1185ca08ab68Smrg pattern just having a single value for those elements, starting from the 1186ca08ab68Smrg first value and continuing as long as any of those elements has a value. 1187ca08ab68Smrg For example, the format "%{[]family,familylang{%{family} 1188ca08ab68Smrg (%{familylang})\n}}" will expand the pattern "%{family} (%{familylang})\n" 1189ca08ab68Smrg with a pattern having only the first value of the family and familylang 1190ca08ab68Smrg elements, then expands it with the second values, then the third, etc. 1191a6844aabSmrg 1192ca08ab68Smrg As a special case, if an enumerate tag has only one element, and that 1193ca08ab68Smrg element has only one value in the pattern, and that value is of type 1194ca08ab68Smrg FcLangSet, the individual languages in the language set are enumerated. 1195a6844aabSmrg 1196ca08ab68Smrg A builtin tag is one starting with the character "=" followed by a 1197ca08ab68Smrg builtin name. The following builtins are defined: 1198a6844aabSmrg 1199ca08ab68Smrg unparse 1200a6844aabSmrg 1201ca08ab68Smrg Expands to the result of calling FcNameUnparse() on the pattern. 1202a6844aabSmrg 1203ca08ab68Smrg fcmatch 1204a6844aabSmrg 1205ca08ab68Smrg Expands to the output of the default output format of the fc-match 1206ca08ab68Smrg command on the pattern, without the final newline. 1207a6844aabSmrg 1208ca08ab68Smrg fclist 1209a6844aabSmrg 1210ca08ab68Smrg Expands to the output of the default output format of the fc-list 1211ca08ab68Smrg command on the pattern, without the final newline. 1212a6844aabSmrg 1213ca08ab68Smrg fccat 1214a6844aabSmrg 1215ca08ab68Smrg Expands to the output of the default output format of the fc-cat 1216ca08ab68Smrg command on the pattern, without the final newline. 1217a6844aabSmrg 1218ca08ab68Smrg pkgkit 1219a6844aabSmrg 1220ca08ab68Smrg Expands to the list of PackageKit font() tags for the pattern. 1221ca08ab68Smrg Currently this includes tags for each family name, and each 1222ca08ab68Smrg language from the pattern, enumerated and sanitized into a set of 1223ca08ab68Smrg tags terminated by newline. Package management systems can use 1224ca08ab68Smrg these tags to tag their packages accordingly. 1225a6844aabSmrg 1226ca08ab68Smrg For example, the format "%{+family,style{%{=unparse}}}\n" will expand to 1227ca08ab68Smrg an unparsed name containing only the family and style element values from 1228ca08ab68Smrg pattern. 1229a6844aabSmrg 1230ca08ab68Smrg The contents of any tag can be followed by a set of zero or more 1231ca08ab68Smrg converters. A converter is specified by the character "|" followed by the 1232ca08ab68Smrg converter name and arguments. The following converters are defined: 1233a6844aabSmrg 1234ca08ab68Smrg basename 1235a6844aabSmrg 1236ca08ab68Smrg Replaces text with the results of calling FcStrBasename() on it. 1237a6844aabSmrg 1238ca08ab68Smrg dirname 1239a6844aabSmrg 1240ca08ab68Smrg Replaces text with the results of calling FcStrDirname() on it. 1241a6844aabSmrg 1242ca08ab68Smrg downcase 1243a6844aabSmrg 1244ca08ab68Smrg Replaces text with the results of calling FcStrDowncase() on it. 1245a6844aabSmrg 1246ca08ab68Smrg shescape 1247a6844aabSmrg 1248ca08ab68Smrg Escapes text for one level of shell expansion. (Escapes 1249ca08ab68Smrg single-quotes, also encloses text in single-quotes.) 1250a6844aabSmrg 1251ca08ab68Smrg cescape 1252a6844aabSmrg 1253ca08ab68Smrg Escapes text such that it can be used as part of a C string 1254ca08ab68Smrg literal. (Escapes backslash and double-quotes.) 1255a6844aabSmrg 1256ca08ab68Smrg xmlescape 1257a6844aabSmrg 1258ca08ab68Smrg Escapes text such that it can be used in XML and HTML. (Escapes 1259ca08ab68Smrg less-than, greater-than, and ampersand.) 1260a6844aabSmrg 1261ca08ab68Smrg delete(chars) 1262a6844aabSmrg 1263ca08ab68Smrg Deletes all occurrences of each of the characters in chars from 1264ca08ab68Smrg the text. FIXME: This converter is not UTF-8 aware yet. 1265a6844aabSmrg 1266ca08ab68Smrg escape(chars) 1267a6844aabSmrg 1268ca08ab68Smrg Escapes all occurrences of each of the characters in chars by 1269ca08ab68Smrg prepending it by the first character in chars. FIXME: This 1270ca08ab68Smrg converter is not UTF-8 aware yet. 1271a6844aabSmrg 1272ca08ab68Smrg translate(from,to) 1273ca08ab68Smrg 1274ca08ab68Smrg Translates all occurrences of each of the characters in from by 1275ca08ab68Smrg replacing them with their corresponding character in to. If to has 1276ca08ab68Smrg fewer characters than from, it will be extended by repeating its 1277ca08ab68Smrg last character. FIXME: This converter is not UTF-8 aware yet. 1278ca08ab68Smrg 1279ca08ab68Smrg For example, the format "%{family|downcase|delete( )}\n" will expand to 1280ca08ab68Smrg the values of the family element in pattern, lower-cased and with spaces 1281ca08ab68Smrg removed. 12822c393a42Smrg 1283b09479dcSmrgSince 12842c393a42Smrg 1285b09479dcSmrg version 2.9.0 1286ca08ab68Smrg 1287ca08ab68Smrg -------------------------------------------------------------------------- 1288ca08ab68Smrg 1289ca08ab68Smrg FcFontSet 1290ca08ab68Smrg 1291ca08ab68Smrg Table of Contents 1292ca08ab68Smrg 1293ca08ab68Smrg [33]FcFontSetCreate -- Create a font set 1294ca08ab68Smrg 1295ca08ab68Smrg [34]FcFontSetDestroy -- Destroy a font set 1296ca08ab68Smrg 1297ca08ab68Smrg [35]FcFontSetAdd -- Add to a font set 1298ca08ab68Smrg 1299ca08ab68Smrg [36]FcFontSetList -- List fonts from a set of font sets 1300a6844aabSmrg 1301ca08ab68Smrg [37]FcFontSetMatch -- Return the best font from a set of font sets 13022c393a42Smrg 1303ca08ab68Smrg [38]FcFontSetPrint -- Print a set of patterns to stdout 13042c393a42Smrg 1305ca08ab68Smrg [39]FcFontSetSort -- Add to a font set 13062c393a42Smrg 1307ca08ab68Smrg [40]FcFontSetSortDestroy -- DEPRECATED destroy a font set 13082c393a42Smrg 1309ca08ab68Smrg An FcFontSet simply holds a list of patterns; these are used to return the 1310ca08ab68Smrg results of listing available fonts. 1311ca08ab68Smrg 1312ca08ab68Smrg FcFontSetCreate 13132c393a42Smrg 13142c393a42SmrgName 13152c393a42Smrg 1316ca08ab68Smrg FcFontSetCreate -- Create a font set 13172c393a42Smrg 13182c393a42SmrgSynopsis 13192c393a42Smrg 1320c9710b42Smrg #include <fontconfig/fontconfig.h> 13212c393a42Smrg 1322a6844aabSmrg 1323ca08ab68Smrg FcFontSet * FcFontSetCreate(void); 13242c393a42Smrg 13252c393a42SmrgDescription 13262c393a42Smrg 1327ca08ab68Smrg Creates an empty font set. 13282c393a42Smrg 1329ca08ab68Smrg FcFontSetDestroy 13302c393a42Smrg 13312c393a42SmrgName 13322c393a42Smrg 1333ca08ab68Smrg FcFontSetDestroy -- Destroy a font set 13342c393a42Smrg 13352c393a42SmrgSynopsis 13362c393a42Smrg 1337c9710b42Smrg #include <fontconfig/fontconfig.h> 13382c393a42Smrg 1339a6844aabSmrg 1340ca08ab68Smrg void FcFontSetDestroy(FcFontSet *s); 13412c393a42Smrg 13422c393a42SmrgDescription 13432c393a42Smrg 1344ca08ab68Smrg Destroys a font set. Note that this destroys any referenced patterns as 1345ca08ab68Smrg well. 13462c393a42Smrg 1347ca08ab68Smrg FcFontSetAdd 13482c393a42Smrg 13492c393a42SmrgName 13502c393a42Smrg 1351ca08ab68Smrg FcFontSetAdd -- Add to a font set 13522c393a42Smrg 13532c393a42SmrgSynopsis 13542c393a42Smrg 1355c9710b42Smrg #include <fontconfig/fontconfig.h> 13562c393a42Smrg 1357a6844aabSmrg 1358ca08ab68Smrg FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font); 13592c393a42Smrg 13602c393a42SmrgDescription 13612c393a42Smrg 1362ca08ab68Smrg Adds a pattern to a font set. Note that the pattern is not copied before 1363ca08ab68Smrg being inserted into the set. Returns FcFalse if the pattern cannot be 1364ca08ab68Smrg inserted into the set (due to allocation failure). Otherwise returns 1365ca08ab68Smrg FcTrue. 13662c393a42Smrg 1367ca08ab68Smrg FcFontSetList 13682c393a42Smrg 13692c393a42SmrgName 13702c393a42Smrg 1371ca08ab68Smrg FcFontSetList -- List fonts from a set of font sets 13722c393a42Smrg 13732c393a42SmrgSynopsis 13742c393a42Smrg 1375c9710b42Smrg #include <fontconfig/fontconfig.h> 13762c393a42Smrg 1377a6844aabSmrg 1378ca08ab68Smrg FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets, intnsets, 1379ca08ab68Smrg FcPattern *pattern, FcObjectSet *object_set); 13802c393a42Smrg 13812c393a42SmrgDescription 13822c393a42Smrg 1383ca08ab68Smrg Selects fonts matching pattern from sets, creates patterns from those 1384ca08ab68Smrg fonts containing only the objects in object_set and returns the set of 1385ca08ab68Smrg unique such patterns. If config is NULL, the default configuration is 1386ca08ab68Smrg checked to be up to date, and used. 13872c393a42Smrg 1388ca08ab68Smrg FcFontSetMatch 13892c393a42Smrg 13902c393a42SmrgName 13912c393a42Smrg 1392ca08ab68Smrg FcFontSetMatch -- Return the best font from a set of font sets 13932c393a42Smrg 13942c393a42SmrgSynopsis 13952c393a42Smrg 1396c9710b42Smrg #include <fontconfig/fontconfig.h> 13972c393a42Smrg 1398a6844aabSmrg 1399ca08ab68Smrg FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets, intnsets, 1400ca08ab68Smrg FcPattern *pattern, FcResult *result); 14012c393a42Smrg 14022c393a42SmrgDescription 14032c393a42Smrg 1404ca08ab68Smrg Finds the font in sets most closely matching pattern and returns the 1405ca08ab68Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 1406ca08ab68Smrg function should be called only after FcConfigSubstitute and 1407ca08ab68Smrg FcDefaultSubstitute have been called for pattern; otherwise the results 1408ca08ab68Smrg will not be correct. If config is NULL, the current configuration is used. 1409ca08ab68Smrg Returns NULL if an error occurs during this process. 14102c393a42Smrg 1411ca08ab68Smrg FcFontSetPrint 14122c393a42Smrg 14132c393a42SmrgName 14142c393a42Smrg 1415ca08ab68Smrg FcFontSetPrint -- Print a set of patterns to stdout 14162c393a42Smrg 14172c393a42SmrgSynopsis 14182c393a42Smrg 1419c9710b42Smrg #include <fontconfig/fontconfig.h> 14202c393a42Smrg 1421a6844aabSmrg 1422ca08ab68Smrg void FcFontSetPrint(FcFontSet *set); 14232c393a42Smrg 14242c393a42SmrgDescription 14252c393a42Smrg 1426ca08ab68Smrg This function is useful for diagnosing font related issues, printing the 1427ca08ab68Smrg complete contents of every pattern in set. The format of the output is 1428ca08ab68Smrg designed to be of help to users and developers, and may change at any 1429ca08ab68Smrg time. 14302c393a42Smrg 1431ca08ab68Smrg FcFontSetSort 14322c393a42Smrg 14332c393a42SmrgName 14342c393a42Smrg 1435ca08ab68Smrg FcFontSetSort -- Add to a font set 14362c393a42Smrg 14372c393a42SmrgSynopsis 14382c393a42Smrg 1439c9710b42Smrg #include <fontconfig/fontconfig.h> 14402c393a42Smrg 1441a6844aabSmrg 1442ca08ab68Smrg FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets, FcPattern 1443ca08ab68Smrg *pattern, FcBool trim, FcCharSet **csp, FcResult *result); 14442c393a42Smrg 14452c393a42SmrgDescription 14462c393a42Smrg 1447ca08ab68Smrg Returns the list of fonts from sets sorted by closeness to pattern. If 1448ca08ab68Smrg trim is FcTrue, elements in the list which don't include Unicode coverage 1449ca08ab68Smrg not provided by earlier elements in the list are elided. The union of 1450ca08ab68Smrg Unicode coverage of all of the fonts is returned in csp, if csp is not 1451ca08ab68Smrg NULL. This function should be called only after FcConfigSubstitute and 1452ca08ab68Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 1453ca08ab68Smrg be correct. 14542c393a42Smrg 1455ca08ab68Smrg The returned FcFontSet references FcPattern structures which may be shared 1456ca08ab68Smrg by the return value from multiple FcFontSort calls, applications cannot 1457ca08ab68Smrg modify these patterns. Instead, they should be passed, along with pattern 1458ca08ab68Smrg to FcFontRenderPrepare which combines them into a complete pattern. 14592c393a42Smrg 1460ca08ab68Smrg The FcFontSet returned by FcFontSetSort is destroyed by calling 1461ca08ab68Smrg FcFontSetDestroy. 14622c393a42Smrg 1463ca08ab68Smrg FcFontSetSortDestroy 14642c393a42Smrg 14652c393a42SmrgName 14662c393a42Smrg 1467ca08ab68Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font set 14682c393a42Smrg 14692c393a42SmrgSynopsis 14702c393a42Smrg 1471c9710b42Smrg #include <fontconfig/fontconfig.h> 14722c393a42Smrg 1473a6844aabSmrg 1474ca08ab68Smrg FcFontSetSortDestroy(FcFontSet *set); 14752c393a42Smrg 14762c393a42SmrgDescription 14772c393a42Smrg 1478ca08ab68Smrg This function is DEPRECATED. FcFontSetSortDestroy destroys set by calling 1479ca08ab68Smrg FcFontSetDestroy. Applications should use FcFontSetDestroy directly 1480ca08ab68Smrg instead. 14812c393a42Smrg 1482ca08ab68Smrg -------------------------------------------------------------------------- 1483ca08ab68Smrg 1484ca08ab68Smrg FcObjectSet 1485ca08ab68Smrg 1486ca08ab68Smrg Table of Contents 1487ca08ab68Smrg 1488ca08ab68Smrg [41]FcObjectSetCreate -- Create an object set 1489a6844aabSmrg 1490ca08ab68Smrg [42]FcObjectSetAdd -- Add to an object set 14912c393a42Smrg 1492ca08ab68Smrg [43]FcObjectSetDestroy -- Destroy an object set 14932c393a42Smrg 1494ca08ab68Smrg [44]FcObjectSetBuild -- Build object set from args 14952c393a42Smrg 1496ca08ab68Smrg An FcObjectSet holds a list of pattern property names; it is used to 1497ca08ab68Smrg indicate which properties are to be returned in the patterns from 1498ca08ab68Smrg FcFontList. 14992c393a42Smrg 1500ca08ab68Smrg FcObjectSetCreate 15012c393a42Smrg 15022c393a42SmrgName 15032c393a42Smrg 1504ca08ab68Smrg FcObjectSetCreate -- Create an object set 15052c393a42Smrg 15062c393a42SmrgSynopsis 15072c393a42Smrg 1508c9710b42Smrg #include <fontconfig/fontconfig.h> 15092c393a42Smrg 1510a6844aabSmrg 1511ca08ab68Smrg FcObjectSet * FcObjectSetCreate(void); 15122c393a42Smrg 15132c393a42SmrgDescription 15142c393a42Smrg 1515ca08ab68Smrg Creates an empty set. 15162c393a42Smrg 1517ca08ab68Smrg FcObjectSetAdd 15182c393a42Smrg 15192c393a42SmrgName 15202c393a42Smrg 1521ca08ab68Smrg FcObjectSetAdd -- Add to an object set 15222c393a42Smrg 15232c393a42SmrgSynopsis 15242c393a42Smrg 1525c9710b42Smrg #include <fontconfig/fontconfig.h> 15262c393a42Smrg 1527a6844aabSmrg 1528ca08ab68Smrg FcBool FcObjectSetAdd(FcObjectSet *os, const char *object); 15292c393a42Smrg 15302c393a42SmrgDescription 15312c393a42Smrg 1532ca08ab68Smrg Adds a property name to the set. Returns FcFalse if the property name 1533ca08ab68Smrg cannot be inserted into the set (due to allocation failure). Otherwise 1534ca08ab68Smrg returns FcTrue. 15352c393a42Smrg 1536ca08ab68Smrg FcObjectSetDestroy 15372c393a42Smrg 15382c393a42SmrgName 15392c393a42Smrg 1540ca08ab68Smrg FcObjectSetDestroy -- Destroy an object set 15412c393a42Smrg 15422c393a42SmrgSynopsis 15432c393a42Smrg 1544c9710b42Smrg #include <fontconfig/fontconfig.h> 15452c393a42Smrg 1546a6844aabSmrg 1547ca08ab68Smrg void FcObjectSetDestroy(FcObjectSet *os); 15482c393a42Smrg 15492c393a42SmrgDescription 15502c393a42Smrg 1551ca08ab68Smrg Destroys an object set. 15522c393a42Smrg 1553ca08ab68Smrg FcObjectSetBuild 15542c393a42Smrg 15552c393a42SmrgName 15562c393a42Smrg 1557ca08ab68Smrg FcObjectSetBuild, FcObjectSetVaBuild, FcObjectSetVapBuild -- Build object 1558ca08ab68Smrg set from args 15592c393a42Smrg 15602c393a42SmrgSynopsis 15612c393a42Smrg 1562c9710b42Smrg #include <fontconfig/fontconfig.h> 15632c393a42Smrg 15642c393a42Smrg 1565ca08ab68Smrg FcObjectSet * FcObjectSetBuild(const char *first, ...); 15662c393a42Smrg 1567ca08ab68Smrg FcObjectSet * FcObjectSetVaBuild(const char *first, va_list va); 1568a6844aabSmrg 1569ca08ab68Smrg void FcObjectSetVapBuild(FcObjectSet *result, const char *first, va_list 1570ca08ab68Smrg va); 15712c393a42Smrg 15722c393a42SmrgDescription 15732c393a42Smrg 1574ca08ab68Smrg These build an object set from a null-terminated list of property names. 1575ca08ab68Smrg FcObjectSetVapBuild is a macro version of FcObjectSetVaBuild which returns 1576ca08ab68Smrg the result in the result variable directly. 15772c393a42Smrg 1578ca08ab68Smrg -------------------------------------------------------------------------- 1579ca08ab68Smrg 1580ca08ab68Smrg FreeType specific functions 1581ca08ab68Smrg 1582ca08ab68Smrg Table of Contents 1583ca08ab68Smrg 1584ca08ab68Smrg [45]FcFreeTypeCharIndex -- map Unicode to glyph id 15852c393a42Smrg 1586ca08ab68Smrg [46]FcFreeTypeCharSet -- compute Unicode coverage 15872c393a42Smrg 1588ca08ab68Smrg [47]FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing 1589ca08ab68Smrg type 15902c393a42Smrg 1591ca08ab68Smrg [48]FcFreeTypeQuery -- compute pattern from font file (and index) 15922c393a42Smrg 1593ca08ab68Smrg [49]FcFreeTypeQueryFace -- compute pattern from FT_Face 15942c393a42Smrg 1595ca08ab68Smrg While the fontconfig library doesn't insist that FreeType be used as the 1596ca08ab68Smrg rasterization mechanism for fonts, it does provide some convenience 1597ca08ab68Smrg functions. 1598ca08ab68Smrg 1599ca08ab68Smrg FcFreeTypeCharIndex 16002c393a42Smrg 16012c393a42SmrgName 16022c393a42Smrg 1603ca08ab68Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 16042c393a42Smrg 16052c393a42SmrgSynopsis 16062c393a42Smrg 1607ca08ab68Smrg #include <fontconfig.h> 1608ca08ab68Smrg #include <fcfreetype.h> 16092c393a42Smrg 1610a6844aabSmrg 1611ca08ab68Smrg FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4); 16122c393a42Smrg 16132c393a42SmrgDescription 16142c393a42Smrg 1615ca08ab68Smrg Maps a Unicode char to a glyph index. This function uses information from 1616ca08ab68Smrg several possible underlying encoding tables to work around broken fonts. 1617ca08ab68Smrg As a result, this function isn't designed to be used in performance 1618ca08ab68Smrg sensitive areas; results from this function are intended to be cached by 1619ca08ab68Smrg higher level functions. 16202c393a42Smrg 1621ca08ab68Smrg FcFreeTypeCharSet 16222c393a42Smrg 16232c393a42SmrgName 16242c393a42Smrg 1625ca08ab68Smrg FcFreeTypeCharSet -- compute Unicode coverage 16262c393a42Smrg 16272c393a42SmrgSynopsis 16282c393a42Smrg 1629ca08ab68Smrg #include <fontconfig.h> 1630ca08ab68Smrg #include <fcfreetype.h> 16312c393a42Smrg 1632a6844aabSmrg 1633ca08ab68Smrg FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks); 16342c393a42Smrg 16352c393a42SmrgDescription 16362c393a42Smrg 1637ca08ab68Smrg Scans a FreeType face and returns the set of encoded Unicode chars. This 1638ca08ab68Smrg scans several encoding tables to build as complete a list as possible. If 1639ca08ab68Smrg 'blanks' is not 0, the glyphs in the font are examined and any blank 1640ca08ab68Smrg glyphs not in 'blanks' are not placed in the returned FcCharSet. 16412c393a42Smrg 1642ca08ab68Smrg FcFreeTypeCharSetAndSpacing 16432c393a42Smrg 16442c393a42SmrgName 16452c393a42Smrg 1646ca08ab68Smrg FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing type 16472c393a42Smrg 16482c393a42SmrgSynopsis 16492c393a42Smrg 1650ca08ab68Smrg #include <fontconfig.h> 1651ca08ab68Smrg #include <fcfreetype.h> 16522c393a42Smrg 1653a6844aabSmrg 1654ca08ab68Smrg FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks *blanks, 1655ca08ab68Smrg int *spacing); 16562c393a42Smrg 16572c393a42SmrgDescription 16582c393a42Smrg 1659ca08ab68Smrg Scans a FreeType face and returns the set of encoded Unicode chars. This 1660ca08ab68Smrg scans several encoding tables to build as complete a list as possible. If 1661ca08ab68Smrg 'blanks' is not 0, the glyphs in the font are examined and any blank 1662ca08ab68Smrg glyphs not in 'blanks' are not placed in the returned FcCharSet. spacing 1663ca08ab68Smrg receives the computed spacing type of the font, one of FC_MONO for a font 1664ca08ab68Smrg where all glyphs have the same width, FC_DUAL, where the font has glyphs 1665ca08ab68Smrg in precisely two widths, one twice as wide as the other, or 1666ca08ab68Smrg FC_PROPORTIONAL where the font has glyphs of many widths. 16672c393a42Smrg 1668ca08ab68Smrg FcFreeTypeQuery 16692c393a42Smrg 16702c393a42SmrgName 16712c393a42Smrg 1672ca08ab68Smrg FcFreeTypeQuery -- compute pattern from font file (and index) 16732c393a42Smrg 16742c393a42SmrgSynopsis 16752c393a42Smrg 1676ca08ab68Smrg #include <fontconfig.h> 1677ca08ab68Smrg #include <fcfreetype.h> 16782c393a42Smrg 1679a6844aabSmrg 1680ca08ab68Smrg FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id, FcBlanks *blanks, 1681ca08ab68Smrg int *count); 16822c393a42Smrg 16832c393a42SmrgDescription 16842c393a42Smrg 1685ca08ab68Smrg Constructs a pattern representing the 'id'th font in 'file'. The number of 1686ca08ab68Smrg fonts in 'file' is returned in 'count'. 16872c393a42Smrg 1688ca08ab68Smrg FcFreeTypeQueryFace 16892c393a42Smrg 16902c393a42SmrgName 16912c393a42Smrg 1692ca08ab68Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 16932c393a42Smrg 16942c393a42SmrgSynopsis 16952c393a42Smrg 1696ca08ab68Smrg #include <fontconfig.h> 1697ca08ab68Smrg #include <fcfreetype.h> 16982c393a42Smrg 1699a6844aabSmrg 1700ca08ab68Smrg FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file, 1701ca08ab68Smrg int id, FcBlanks *blanks); 17022c393a42Smrg 17032c393a42SmrgDescription 17042c393a42Smrg 1705ca08ab68Smrg Constructs a pattern representing 'face'. 'file' and 'id' are used solely 1706ca08ab68Smrg as data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY). 17072c393a42Smrg 1708ca08ab68Smrg -------------------------------------------------------------------------- 1709ca08ab68Smrg 1710ca08ab68Smrg FcValue 1711ca08ab68Smrg 1712ca08ab68Smrg Table of Contents 1713ca08ab68Smrg 1714ca08ab68Smrg [50]FcValueDestroy -- Free a value 1715a6844aabSmrg 1716ca08ab68Smrg [51]FcValueSave -- Copy a value 17172c393a42Smrg 1718ca08ab68Smrg [52]FcValuePrint -- Print a value to stdout 17192c393a42Smrg 1720ca08ab68Smrg [53]FcValueEqual -- Test two values for equality 17212c393a42Smrg 1722ca08ab68Smrg FcValue is a structure containing a type tag and a union of all possible 1723ca08ab68Smrg datatypes. The tag is an enum of type FcType and is intended to provide a 1724ca08ab68Smrg measure of run-time typechecking, although that depends on careful 1725ca08ab68Smrg programming. 17262c393a42Smrg 1727ca08ab68Smrg FcValueDestroy 17282c393a42Smrg 17292c393a42SmrgName 17302c393a42Smrg 1731ca08ab68Smrg FcValueDestroy -- Free a value 17322c393a42Smrg 17332c393a42SmrgSynopsis 17342c393a42Smrg 1735c9710b42Smrg #include <fontconfig/fontconfig.h> 17362c393a42Smrg 1737a6844aabSmrg 1738ca08ab68Smrg void FcValueDestroy(FcValue v); 17392c393a42Smrg 17402c393a42SmrgDescription 17412c393a42Smrg 1742ca08ab68Smrg Frees any memory referenced by v. Values of type FcTypeString, 1743ca08ab68Smrg FcTypeMatrix and FcTypeCharSet reference memory, the other types do not. 17442c393a42Smrg 1745ca08ab68Smrg FcValueSave 17462c393a42Smrg 17472c393a42SmrgName 17482c393a42Smrg 1749ca08ab68Smrg FcValueSave -- Copy a value 17502c393a42Smrg 17512c393a42SmrgSynopsis 17522c393a42Smrg 1753c9710b42Smrg #include <fontconfig/fontconfig.h> 17542c393a42Smrg 1755a6844aabSmrg 1756ca08ab68Smrg FcValue FcValueSave(FcValue v); 17572c393a42Smrg 17582c393a42SmrgDescription 17592c393a42Smrg 1760ca08ab68Smrg Returns a copy of v duplicating any object referenced by it so that v may 1761ca08ab68Smrg be safely destroyed without harming the new value. 17622c393a42Smrg 1763ca08ab68Smrg FcValuePrint 17642c393a42Smrg 17652c393a42SmrgName 17662c393a42Smrg 1767ca08ab68Smrg FcValuePrint -- Print a value to stdout 17682c393a42Smrg 17692c393a42SmrgSynopsis 17702c393a42Smrg 1771c9710b42Smrg #include <fontconfig/fontconfig.h> 17722c393a42Smrg 1773a6844aabSmrg 1774ca08ab68Smrg void FcValuePrint(FcValue v); 17752c393a42Smrg 17762c393a42SmrgDescription 17772c393a42Smrg 1778ca08ab68Smrg Prints a human-readable representation of v to stdout. The format should 1779ca08ab68Smrg not be considered part of the library specification as it may change in 1780ca08ab68Smrg the future. 17812c393a42Smrg 1782ca08ab68Smrg FcValueEqual 17832c393a42Smrg 17842c393a42SmrgName 17852c393a42Smrg 1786ca08ab68Smrg FcValueEqual -- Test two values for equality 17872c393a42Smrg 17882c393a42SmrgSynopsis 17892c393a42Smrg 1790c9710b42Smrg #include <fontconfig/fontconfig.h> 17912c393a42Smrg 1792a6844aabSmrg 1793ca08ab68Smrg FcBool FcValueEqual(FcValue v_a, FcValue v_b); 17942c393a42Smrg 17952c393a42SmrgDescription 17962c393a42Smrg 1797ca08ab68Smrg Compares two values. Integers and Doubles are compared as numbers; 1798ca08ab68Smrg otherwise the two values have to be the same type to be considered equal. 1799ca08ab68Smrg Strings are compared ignoring case. 18002c393a42Smrg 1801ca08ab68Smrg -------------------------------------------------------------------------- 1802ca08ab68Smrg 1803ca08ab68Smrg FcCharSet 1804ca08ab68Smrg 1805ca08ab68Smrg Table of Contents 1806ca08ab68Smrg 1807ca08ab68Smrg [54]FcCharSetCreate -- Create an empty character set 1808ca08ab68Smrg 1809ca08ab68Smrg [55]FcCharSetDestroy -- Destroy a character set 1810ca08ab68Smrg 1811ca08ab68Smrg [56]FcCharSetAddChar -- Add a character to a charset 1812ca08ab68Smrg 1813ca08ab68Smrg [57]FcCharSetDelChar -- Add a character to a charset 1814ca08ab68Smrg 1815ca08ab68Smrg [58]FcCharSetCopy -- Copy a charset 1816ca08ab68Smrg 1817ca08ab68Smrg [59]FcCharSetEqual -- Compare two charsets 1818ca08ab68Smrg 1819ca08ab68Smrg [60]FcCharSetIntersect -- Intersect charsets 1820ca08ab68Smrg 1821ca08ab68Smrg [61]FcCharSetUnion -- Add charsets 1822ca08ab68Smrg 1823ca08ab68Smrg [62]FcCharSetSubtract -- Subtract charsets 1824ca08ab68Smrg 1825ca08ab68Smrg [63]FcCharSetMerge -- Merge charsets 18262c393a42Smrg 1827ca08ab68Smrg [64]FcCharSetHasChar -- Check a charset for a char 18282c393a42Smrg 1829ca08ab68Smrg [65]FcCharSetCount -- Count entries in a charset 18302c393a42Smrg 1831ca08ab68Smrg [66]FcCharSetIntersectCount -- Intersect and count charsets 18322c393a42Smrg 1833ca08ab68Smrg [67]FcCharSetSubtractCount -- Subtract and count charsets 18342c393a42Smrg 1835ca08ab68Smrg [68]FcCharSetIsSubset -- Test for charset inclusion 1836ca08ab68Smrg 1837ca08ab68Smrg [69]FcCharSetFirstPage -- Start enumerating charset contents 1838ca08ab68Smrg 1839ca08ab68Smrg [70]FcCharSetNextPage -- Continue enumerating charset contents 1840ca08ab68Smrg 1841ca08ab68Smrg [71]FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 1842ca08ab68Smrg 1843ca08ab68Smrg [72]FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 1844ca08ab68Smrg 1845ca08ab68Smrg An FcCharSet is a boolean array indicating a set of Unicode chars. Those 1846ca08ab68Smrg associated with a font are marked constant and cannot be edited. 1847ca08ab68Smrg FcCharSets may be reference counted internally to reduce memory 1848ca08ab68Smrg consumption; this may be visible to applications as the result of 1849ca08ab68Smrg FcCharSetCopy may return it's argument, and that CharSet may remain 1850ca08ab68Smrg unmodifiable. 1851ca08ab68Smrg 1852ca08ab68Smrg FcCharSetCreate 1853ca08ab68Smrg 1854ca08ab68SmrgName 1855ca08ab68Smrg 1856ca08ab68Smrg FcCharSetCreate -- Create an empty character set 1857ca08ab68Smrg 1858ca08ab68SmrgSynopsis 1859ca08ab68Smrg 1860c9710b42Smrg #include <fontconfig/fontconfig.h> 1861ca08ab68Smrg 1862ca08ab68Smrg 1863ca08ab68Smrg FcCharSet * FcCharSetCreate(void); 1864ca08ab68Smrg 1865ca08ab68SmrgDescription 1866ca08ab68Smrg 1867ca08ab68Smrg FcCharSetCreate allocates and initializes a new empty character set 1868ca08ab68Smrg object. 1869ca08ab68Smrg 1870ca08ab68Smrg FcCharSetDestroy 18712c393a42Smrg 18722c393a42SmrgName 18732c393a42Smrg 1874ca08ab68Smrg FcCharSetDestroy -- Destroy a character set 18752c393a42Smrg 18762c393a42SmrgSynopsis 18772c393a42Smrg 1878c9710b42Smrg #include <fontconfig/fontconfig.h> 18792c393a42Smrg 1880a6844aabSmrg 1881ca08ab68Smrg void FcCharSetDestroy(FcCharSet *fcs); 18822c393a42Smrg 18832c393a42SmrgDescription 18842c393a42Smrg 1885ca08ab68Smrg FcCharSetDestroy decrements the reference count fcs. If the reference 1886ca08ab68Smrg count becomes zero, all memory referenced is freed. 18872c393a42Smrg 1888ca08ab68Smrg FcCharSetAddChar 18892c393a42Smrg 18902c393a42SmrgName 18912c393a42Smrg 1892ca08ab68Smrg FcCharSetAddChar -- Add a character to a charset 18932c393a42Smrg 18942c393a42SmrgSynopsis 18952c393a42Smrg 1896c9710b42Smrg #include <fontconfig/fontconfig.h> 18972c393a42Smrg 1898a6844aabSmrg 1899ca08ab68Smrg FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4); 19002c393a42Smrg 19012c393a42SmrgDescription 19022c393a42Smrg 1903ca08ab68Smrg FcCharSetAddChar adds a single Unicode char to the set, returning FcFalse 1904ca08ab68Smrg on failure, either as a result of a constant set or from running out of 1905ca08ab68Smrg memory. 19062c393a42Smrg 1907ca08ab68Smrg FcCharSetDelChar 19082c393a42Smrg 19092c393a42SmrgName 19102c393a42Smrg 1911ca08ab68Smrg FcCharSetDelChar -- Add a character to a charset 19122c393a42Smrg 19132c393a42SmrgSynopsis 19142c393a42Smrg 1915c9710b42Smrg #include <fontconfig/fontconfig.h> 19162c393a42Smrg 1917a6844aabSmrg 1918ca08ab68Smrg FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4); 19192c393a42Smrg 19202c393a42SmrgDescription 19212c393a42Smrg 1922ca08ab68Smrg FcCharSetDelChar deletes a single Unicode char from the set, returning 1923ca08ab68Smrg FcFalse on failure, either as a result of a constant set or from running 1924ca08ab68Smrg out of memory. 19252c393a42Smrg 1926b09479dcSmrgSince 19272c393a42Smrg 1928b09479dcSmrg version 2.9.0 19292c393a42Smrg 1930ca08ab68Smrg FcCharSetCopy 19312c393a42Smrg 19322c393a42SmrgName 19332c393a42Smrg 1934ca08ab68Smrg FcCharSetCopy -- Copy a charset 19352c393a42Smrg 19362c393a42SmrgSynopsis 19372c393a42Smrg 1938c9710b42Smrg #include <fontconfig/fontconfig.h> 19392c393a42Smrg 1940a6844aabSmrg 1941ca08ab68Smrg FcCharSet * FcCharSetCopy(FcCharSet *src); 19422c393a42Smrg 19432c393a42SmrgDescription 19442c393a42Smrg 1945ca08ab68Smrg Makes a copy of src; note that this may not actually do anything more than 1946ca08ab68Smrg increment the reference count on src. 19472c393a42Smrg 1948ca08ab68Smrg FcCharSetEqual 19492c393a42Smrg 19502c393a42SmrgName 19512c393a42Smrg 1952ca08ab68Smrg FcCharSetEqual -- Compare two charsets 19532c393a42Smrg 19542c393a42SmrgSynopsis 19552c393a42Smrg 1956c9710b42Smrg #include <fontconfig/fontconfig.h> 19572c393a42Smrg 1958a6844aabSmrg 1959ca08ab68Smrg FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b); 19602c393a42Smrg 19612c393a42SmrgDescription 19622c393a42Smrg 1963ca08ab68Smrg Returns whether a and b contain the same set of Unicode chars. 19642c393a42Smrg 1965ca08ab68Smrg FcCharSetIntersect 19662c393a42Smrg 19672c393a42SmrgName 19682c393a42Smrg 1969ca08ab68Smrg FcCharSetIntersect -- Intersect charsets 19702c393a42Smrg 19712c393a42SmrgSynopsis 19722c393a42Smrg 1973c9710b42Smrg #include <fontconfig/fontconfig.h> 19742c393a42Smrg 1975a6844aabSmrg 1976ca08ab68Smrg FcCharSet * FcCharSetIntersect(const FcCharSet *a, const FcCharSet *b); 19772c393a42Smrg 19782c393a42SmrgDescription 19792c393a42Smrg 1980ca08ab68Smrg Returns a set including only those chars found in both a and b. 19812c393a42Smrg 1982ca08ab68Smrg FcCharSetUnion 19832c393a42Smrg 19842c393a42SmrgName 19852c393a42Smrg 1986ca08ab68Smrg FcCharSetUnion -- Add charsets 19872c393a42Smrg 19882c393a42SmrgSynopsis 19892c393a42Smrg 1990c9710b42Smrg #include <fontconfig/fontconfig.h> 19912c393a42Smrg 1992a6844aabSmrg 1993ca08ab68Smrg FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet *b); 19942c393a42Smrg 19952c393a42SmrgDescription 19962c393a42Smrg 1997ca08ab68Smrg Returns a set including only those chars found in either a or b. 19982c393a42Smrg 1999ca08ab68Smrg FcCharSetSubtract 20002c393a42Smrg 20012c393a42SmrgName 20022c393a42Smrg 2003ca08ab68Smrg FcCharSetSubtract -- Subtract charsets 20042c393a42Smrg 20052c393a42SmrgSynopsis 20062c393a42Smrg 2007c9710b42Smrg #include <fontconfig/fontconfig.h> 20082c393a42Smrg 2009a6844aabSmrg 2010ca08ab68Smrg FcCharSet * FcCharSetSubtract(const FcCharSet *a, const FcCharSet *b); 20112c393a42Smrg 20122c393a42SmrgDescription 20132c393a42Smrg 2014ca08ab68Smrg Returns a set including only those chars found in a but not b. 20152c393a42Smrg 2016ca08ab68Smrg FcCharSetMerge 2017a6844aabSmrg 2018a6844aabSmrgName 2019a6844aabSmrg 2020ca08ab68Smrg FcCharSetMerge -- Merge charsets 2021a6844aabSmrg 2022a6844aabSmrgSynopsis 2023a6844aabSmrg 2024c9710b42Smrg #include <fontconfig/fontconfig.h> 2025a6844aabSmrg 2026a6844aabSmrg 2027ca08ab68Smrg FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool *changed); 2028a6844aabSmrg 2029a6844aabSmrgDescription 2030a6844aabSmrg 2031ca08ab68Smrg Adds all chars in b to a. In other words, this is an in-place version of 2032ca08ab68Smrg FcCharSetUnion. If changed is not NULL, then it returns whether any new 2033ca08ab68Smrg chars from b were added to a. Returns FcFalse on failure, either when a is 2034ca08ab68Smrg a constant set or from running out of memory. 2035a6844aabSmrg 2036ca08ab68Smrg FcCharSetHasChar 20372c393a42Smrg 20382c393a42SmrgName 20392c393a42Smrg 2040ca08ab68Smrg FcCharSetHasChar -- Check a charset for a char 20412c393a42Smrg 20422c393a42SmrgSynopsis 20432c393a42Smrg 2044c9710b42Smrg #include <fontconfig/fontconfig.h> 20452c393a42Smrg 2046a6844aabSmrg 2047ca08ab68Smrg FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4); 20482c393a42Smrg 20492c393a42SmrgDescription 20502c393a42Smrg 2051ca08ab68Smrg Returns whether fcs contains the char ucs4. 20522c393a42Smrg 2053ca08ab68Smrg FcCharSetCount 20542c393a42Smrg 20552c393a42SmrgName 20562c393a42Smrg 2057ca08ab68Smrg FcCharSetCount -- Count entries in a charset 20582c393a42Smrg 20592c393a42SmrgSynopsis 20602c393a42Smrg 2061c9710b42Smrg #include <fontconfig/fontconfig.h> 20622c393a42Smrg 2063a6844aabSmrg 2064ca08ab68Smrg FcChar32 FcCharSetCount(const FcCharSet *a); 20652c393a42Smrg 20662c393a42SmrgDescription 20672c393a42Smrg 2068ca08ab68Smrg Returns the total number of Unicode chars in a. 20692c393a42Smrg 2070ca08ab68Smrg FcCharSetIntersectCount 20712c393a42Smrg 20722c393a42SmrgName 20732c393a42Smrg 2074ca08ab68Smrg FcCharSetIntersectCount -- Intersect and count charsets 20752c393a42Smrg 20762c393a42SmrgSynopsis 20772c393a42Smrg 2078c9710b42Smrg #include <fontconfig/fontconfig.h> 20792c393a42Smrg 2080a6844aabSmrg 2081ca08ab68Smrg FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const FcCharSet *b); 20822c393a42Smrg 20832c393a42SmrgDescription 20842c393a42Smrg 2085ca08ab68Smrg Returns the number of chars that are in both a and b. 20862c393a42Smrg 2087ca08ab68Smrg FcCharSetSubtractCount 20882c393a42Smrg 20892c393a42SmrgName 20902c393a42Smrg 2091ca08ab68Smrg FcCharSetSubtractCount -- Subtract and count charsets 20922c393a42Smrg 20932c393a42SmrgSynopsis 20942c393a42Smrg 2095c9710b42Smrg #include <fontconfig/fontconfig.h> 20962c393a42Smrg 2097a6844aabSmrg 2098ca08ab68Smrg FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const FcCharSet *b); 20992c393a42Smrg 21002c393a42SmrgDescription 21012c393a42Smrg 2102ca08ab68Smrg Returns the number of chars that are in a but not in b. 21032c393a42Smrg 2104ca08ab68Smrg FcCharSetIsSubset 21052c393a42Smrg 21062c393a42SmrgName 21072c393a42Smrg 2108ca08ab68Smrg FcCharSetIsSubset -- Test for charset inclusion 21092c393a42Smrg 21102c393a42SmrgSynopsis 21112c393a42Smrg 2112c9710b42Smrg #include <fontconfig/fontconfig.h> 21132c393a42Smrg 2114a6844aabSmrg 2115ca08ab68Smrg FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet *b); 21162c393a42Smrg 21172c393a42SmrgDescription 21182c393a42Smrg 2119ca08ab68Smrg Returns whether a is a subset of b. 21202c393a42Smrg 2121ca08ab68Smrg FcCharSetFirstPage 21222c393a42Smrg 21232c393a42SmrgName 21242c393a42Smrg 2125ca08ab68Smrg FcCharSetFirstPage -- Start enumerating charset contents 21262c393a42Smrg 21272c393a42SmrgSynopsis 21282c393a42Smrg 2129c9710b42Smrg #include <fontconfig/fontconfig.h> 21302c393a42Smrg 2131a6844aabSmrg 2132ca08ab68Smrg FcChar32 FcCharSetFirstPage(const FcCharSet *a, 2133ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 21342c393a42Smrg 21352c393a42SmrgDescription 21362c393a42Smrg 21376fc018e4Smrg Builds an array of bits in map marking the first page of Unicode coverage 21386fc018e4Smrg of a. *next is set to contains the base code point for the next page in a. 21396fc018e4Smrg Returns the base code point for the page, or FC_CHARSET_DONE if a contains 21406fc018e4Smrg no pages. As an example, if FcCharSetFirstPage returns 0x300 and fills map 21416fc018e4Smrg with 21426fc018e4Smrg 21436fc018e4Smrg0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003 21446fc018e4Smrg 21456fc018e4Smrg Then the page contains code points 0x300 through 0x33f (the first 64 code 21466fc018e4Smrg points on the page) because map[0] and map[1] both have all their bits 21476fc018e4Smrg set. It also contains code points 0x343 (0x300 + 32*2 + (4-1)) and 0x35e 21486fc018e4Smrg (0x300 + 32*2 + (31-1)) because map[2] has the 4th and 31st bits set. The 21496fc018e4Smrg code points represented by map[3] and later are left as an excercise for 21506fc018e4Smrg the reader ;). 21512c393a42Smrg 2152ca08ab68Smrg FcCharSetNextPage 21532c393a42Smrg 21542c393a42SmrgName 21552c393a42Smrg 2156ca08ab68Smrg FcCharSetNextPage -- Continue enumerating charset contents 21572c393a42Smrg 21582c393a42SmrgSynopsis 21592c393a42Smrg 2160c9710b42Smrg #include <fontconfig/fontconfig.h> 21612c393a42Smrg 2162a6844aabSmrg 2163ca08ab68Smrg FcChar32 FcCharSetNextPage(const FcCharSet *a, 2164ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 21652c393a42Smrg 21662c393a42SmrgDescription 21672c393a42Smrg 21686fc018e4Smrg Builds an array of bits in map marking the Unicode coverage of a for page 21696fc018e4Smrg containing *next (see the FcCharSetFirstPage description for details). 21706fc018e4Smrg *next is set to contains the base code point for the next page in a. 21716fc018e4Smrg Returns the base of code point for the page, or FC_CHARSET_DONE if a does 21726fc018e4Smrg not contain *next. 21732c393a42Smrg 2174ca08ab68Smrg FcCharSetCoverage 21752c393a42Smrg 21762c393a42SmrgName 21772c393a42Smrg 2178ca08ab68Smrg FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 21792c393a42Smrg 21802c393a42SmrgSynopsis 21812c393a42Smrg 2182c9710b42Smrg #include <fontconfig/fontconfig.h> 21832c393a42Smrg 2184a6844aabSmrg 2185ca08ab68Smrg FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page, 2186ca08ab68Smrg FcChar32[8]result); 21872c393a42Smrg 21882c393a42SmrgDescription 21892c393a42Smrg 2190ca08ab68Smrg DEPRECATED This function returns a bitmask in result which indicates which 2191ca08ab68Smrg code points in page are included in a. FcCharSetCoverage returns the next 2192ca08ab68Smrg page in the charset which has any coverage. 21932c393a42Smrg 2194ca08ab68Smrg FcCharSetNew 21952c393a42Smrg 21962c393a42SmrgName 21972c393a42Smrg 2198ca08ab68Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 21992c393a42Smrg 22002c393a42SmrgSynopsis 22012c393a42Smrg 2202c9710b42Smrg #include <fontconfig/fontconfig.h> 22032c393a42Smrg 2204a6844aabSmrg 2205ca08ab68Smrg FcCharSet * FcCharSetNew(void); 22062c393a42Smrg 22072c393a42SmrgDescription 22082c393a42Smrg 2209ca08ab68Smrg FcCharSetNew is a DEPRECATED alias for FcCharSetCreate. 22102c393a42Smrg 2211ca08ab68Smrg -------------------------------------------------------------------------- 2212ca08ab68Smrg 2213ca08ab68Smrg FcLangSet 2214ca08ab68Smrg 2215ca08ab68Smrg Table of Contents 2216ca08ab68Smrg 2217ca08ab68Smrg [73]FcLangSetCreate -- create a langset object 2218ca08ab68Smrg 2219ca08ab68Smrg [74]FcLangSetDestroy -- destroy a langset object 2220ca08ab68Smrg 2221ca08ab68Smrg [75]FcLangSetCopy -- copy a langset object 2222ca08ab68Smrg 2223ca08ab68Smrg [76]FcLangSetAdd -- add a language to a langset 2224ca08ab68Smrg 2225ca08ab68Smrg [77]FcLangSetDel -- delete a language from a langset 2226ca08ab68Smrg 2227ca08ab68Smrg [78]FcLangSetUnion -- Add langsets 2228ca08ab68Smrg 2229ca08ab68Smrg [79]FcLangSetSubtract -- Subtract langsets 2230ca08ab68Smrg 2231ca08ab68Smrg [80]FcLangSetCompare -- compare language sets 2232ca08ab68Smrg 2233ca08ab68Smrg [81]FcLangSetContains -- check langset subset relation 2234ca08ab68Smrg 2235ca08ab68Smrg [82]FcLangSetEqual -- test for matching langsets 2236ca08ab68Smrg 2237ca08ab68Smrg [83]FcLangSetHash -- return a hash value for a langset 2238ca08ab68Smrg 2239ca08ab68Smrg [84]FcLangSetHasLang -- test langset for language support 2240ca08ab68Smrg 2241ca08ab68Smrg [85]FcGetDefaultLangs -- Get the default languages list 2242ca08ab68Smrg 2243b09479dcSmrg [86]FcLangSetGetLangs -- get the list of languages in the langset 2244b09479dcSmrg 2245b09479dcSmrg [87]FcGetLangs -- Get list of languages 2246ca08ab68Smrg 2247b09479dcSmrg [88]FcLangNormalize -- Normalize the language string 2248c9710b42Smrg 2249b09479dcSmrg [89]FcLangGetCharSet -- Get character map for a language 2250ca08ab68Smrg 2251ca08ab68Smrg An FcLangSet is a set of language names (each of which include language 2252ca08ab68Smrg and an optional territory). They are used when selecting fonts to indicate 2253ca08ab68Smrg which languages the fonts need to support. Each font is marked, using 2254ca08ab68Smrg language orthography information built into fontconfig, with the set of 2255ca08ab68Smrg supported languages. 2256ca08ab68Smrg 2257ca08ab68Smrg FcLangSetCreate 2258ca08ab68Smrg 2259ca08ab68SmrgName 2260ca08ab68Smrg 2261ca08ab68Smrg FcLangSetCreate -- create a langset object 2262ca08ab68Smrg 2263ca08ab68SmrgSynopsis 2264ca08ab68Smrg 2265c9710b42Smrg #include <fontconfig/fontconfig.h> 2266ca08ab68Smrg 2267ca08ab68Smrg 2268ca08ab68Smrg FcLangSet * FcLangSetCreate(void); 2269ca08ab68Smrg 2270ca08ab68SmrgDescription 2271ca08ab68Smrg 2272ca08ab68Smrg FcLangSetCreate creates a new FcLangSet object. 2273ca08ab68Smrg 2274ca08ab68Smrg FcLangSetDestroy 2275ca08ab68Smrg 2276ca08ab68SmrgName 2277ca08ab68Smrg 2278ca08ab68Smrg FcLangSetDestroy -- destroy a langset object 2279ca08ab68Smrg 2280ca08ab68SmrgSynopsis 2281ca08ab68Smrg 2282c9710b42Smrg #include <fontconfig/fontconfig.h> 2283ca08ab68Smrg 2284ca08ab68Smrg 2285ca08ab68Smrg void FcLangSetDestroy(FcLangSet *ls); 2286ca08ab68Smrg 2287ca08ab68SmrgDescription 2288ca08ab68Smrg 2289ca08ab68Smrg FcLangSetDestroy destroys a FcLangSet object, freeing all memory 2290ca08ab68Smrg associated with it. 2291ca08ab68Smrg 2292ca08ab68Smrg FcLangSetCopy 2293a6844aabSmrg 2294ca08ab68SmrgName 2295ca08ab68Smrg 2296ca08ab68Smrg FcLangSetCopy -- copy a langset object 2297ca08ab68Smrg 2298ca08ab68SmrgSynopsis 2299ca08ab68Smrg 2300c9710b42Smrg #include <fontconfig/fontconfig.h> 2301ca08ab68Smrg 2302ca08ab68Smrg 2303ca08ab68Smrg FcLangSet * FcLangSetCopy(const FcLangSet *ls); 2304ca08ab68Smrg 2305ca08ab68SmrgDescription 23062c393a42Smrg 2307ca08ab68Smrg FcLangSetCopy creates a new FcLangSet object and populates it with the 2308ca08ab68Smrg contents of ls. 23092c393a42Smrg 2310ca08ab68Smrg FcLangSetAdd 23112c393a42Smrg 23122c393a42SmrgName 23132c393a42Smrg 2314ca08ab68Smrg FcLangSetAdd -- add a language to a langset 23152c393a42Smrg 23162c393a42SmrgSynopsis 23172c393a42Smrg 2318c9710b42Smrg #include <fontconfig/fontconfig.h> 23192c393a42Smrg 2320a6844aabSmrg 2321ca08ab68Smrg FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang); 23222c393a42Smrg 23232c393a42SmrgDescription 23242c393a42Smrg 2325ca08ab68Smrg lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or 2326ca08ab68Smrg three letter language from ISO 639 and Tt is a territory from ISO 3166. 23272c393a42Smrg 2328ca08ab68Smrg FcLangSetDel 23292c393a42Smrg 23302c393a42SmrgName 23312c393a42Smrg 2332ca08ab68Smrg FcLangSetDel -- delete a language from a langset 23332c393a42Smrg 23342c393a42SmrgSynopsis 23352c393a42Smrg 2336c9710b42Smrg #include <fontconfig/fontconfig.h> 23372c393a42Smrg 2338a6844aabSmrg 2339ca08ab68Smrg FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang); 23402c393a42Smrg 23412c393a42SmrgDescription 23422c393a42Smrg 2343ca08ab68Smrg lang is removed from ls. lang should be of the form Ll-Tt where Ll is a 2344ca08ab68Smrg two or three letter language from ISO 639 and Tt is a territory from ISO 2345ca08ab68Smrg 3166. 23462c393a42Smrg 2347b09479dcSmrgSince 23482c393a42Smrg 2349b09479dcSmrg version 2.9.0 23502c393a42Smrg 2351ca08ab68Smrg FcLangSetUnion 23522c393a42Smrg 23532c393a42SmrgName 23542c393a42Smrg 2355ca08ab68Smrg FcLangSetUnion -- Add langsets 23562c393a42Smrg 23572c393a42SmrgSynopsis 23582c393a42Smrg 2359c9710b42Smrg #include <fontconfig/fontconfig.h> 23602c393a42Smrg 2361a6844aabSmrg 2362ca08ab68Smrg FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const FcLangSet *ls_b); 23632c393a42Smrg 23642c393a42SmrgDescription 23652c393a42Smrg 2366ca08ab68Smrg Returns a set including only those languages found in either ls_a or ls_b. 23672c393a42Smrg 2368b09479dcSmrgSince 23692c393a42Smrg 2370b09479dcSmrg version 2.9.0 23712c393a42Smrg 2372ca08ab68Smrg FcLangSetSubtract 23732c393a42Smrg 23742c393a42SmrgName 23752c393a42Smrg 2376ca08ab68Smrg FcLangSetSubtract -- Subtract langsets 23772c393a42Smrg 23782c393a42SmrgSynopsis 23792c393a42Smrg 2380c9710b42Smrg #include <fontconfig/fontconfig.h> 23812c393a42Smrg 2382a6844aabSmrg 2383ca08ab68Smrg FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const FcLangSet 2384ca08ab68Smrg *ls_b); 23852c393a42Smrg 23862c393a42SmrgDescription 23872c393a42Smrg 2388ca08ab68Smrg Returns a set including only those languages found in ls_a but not in 2389ca08ab68Smrg ls_b. 23902c393a42Smrg 2391b09479dcSmrgSince 23922c393a42Smrg 2393b09479dcSmrg version 2.9.0 23942c393a42Smrg 2395ca08ab68Smrg FcLangSetCompare 23962c393a42Smrg 23972c393a42SmrgName 23982c393a42Smrg 2399ca08ab68Smrg FcLangSetCompare -- compare language sets 24002c393a42Smrg 24012c393a42SmrgSynopsis 24022c393a42Smrg 2403c9710b42Smrg #include <fontconfig/fontconfig.h> 24042c393a42Smrg 2405a6844aabSmrg 2406ca08ab68Smrg FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const FcLangSet 2407ca08ab68Smrg *ls_b); 24082c393a42Smrg 24092c393a42SmrgDescription 24102c393a42Smrg 2411ca08ab68Smrg FcLangSetCompare compares language coverage for ls_a and ls_b. If they 2412ca08ab68Smrg share any language and territory pair, this function returns FcLangEqual. 2413ca08ab68Smrg If they share a language but differ in which territory that language is 2414ca08ab68Smrg for, this function returns FcLangDifferentTerritory. If they share no 2415ca08ab68Smrg languages in common, this function returns FcLangDifferentLang. 24162c393a42Smrg 2417ca08ab68Smrg FcLangSetContains 24182c393a42Smrg 24192c393a42SmrgName 24202c393a42Smrg 2421ca08ab68Smrg FcLangSetContains -- check langset subset relation 24222c393a42Smrg 24232c393a42SmrgSynopsis 24242c393a42Smrg 2425c9710b42Smrg #include <fontconfig/fontconfig.h> 24262c393a42Smrg 2427a6844aabSmrg 2428ca08ab68Smrg FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet *ls_b); 24292c393a42Smrg 24302c393a42SmrgDescription 24312c393a42Smrg 2432ca08ab68Smrg FcLangSetContains returns FcTrue if ls_a contains every language in ls_b. 2433ca08ab68Smrg ls_a will 'contain' a language from ls_b if ls_a has exactly the language, 2434ca08ab68Smrg or either the language or ls_a has no territory. 24352c393a42Smrg 2436ca08ab68Smrg FcLangSetEqual 24372c393a42Smrg 24382c393a42SmrgName 24392c393a42Smrg 2440ca08ab68Smrg FcLangSetEqual -- test for matching langsets 24412c393a42Smrg 24422c393a42SmrgSynopsis 24432c393a42Smrg 2444c9710b42Smrg #include <fontconfig/fontconfig.h> 24452c393a42Smrg 2446a6844aabSmrg 2447ca08ab68Smrg FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet *ls_b); 24482c393a42Smrg 24492c393a42SmrgDescription 24502c393a42Smrg 2451ca08ab68Smrg Returns FcTrue if and only if ls_a supports precisely the same language 2452ca08ab68Smrg and territory combinations as ls_b. 24532c393a42Smrg 2454ca08ab68Smrg FcLangSetHash 24552c393a42Smrg 24562c393a42SmrgName 24572c393a42Smrg 2458ca08ab68Smrg FcLangSetHash -- return a hash value for a langset 24592c393a42Smrg 24602c393a42SmrgSynopsis 24612c393a42Smrg 2462c9710b42Smrg #include <fontconfig/fontconfig.h> 24632c393a42Smrg 2464a6844aabSmrg 2465ca08ab68Smrg FcChar32 FcLangSetHash(const FcLangSet *ls); 24662c393a42Smrg 24672c393a42SmrgDescription 24682c393a42Smrg 2469ca08ab68Smrg This function returns a value which depends solely on the languages 2470ca08ab68Smrg supported by ls. Any language which equals ls will have the same result 2471ca08ab68Smrg from FcLangSetHash. However, two langsets with the same hash value may not 2472ca08ab68Smrg be equal. 24732c393a42Smrg 2474ca08ab68Smrg FcLangSetHasLang 24752c393a42Smrg 24762c393a42SmrgName 24772c393a42Smrg 2478ca08ab68Smrg FcLangSetHasLang -- test langset for language support 2479a6844aabSmrg 2480a6844aabSmrgSynopsis 2481a6844aabSmrg 2482c9710b42Smrg #include <fontconfig/fontconfig.h> 2483a6844aabSmrg 2484a6844aabSmrg 2485ca08ab68Smrg FcLangResult FcLangSetHasLang(const FcLangSet *ls, const FcChar8 *lang); 2486a6844aabSmrg 2487a6844aabSmrgDescription 2488a6844aabSmrg 2489ca08ab68Smrg FcLangSetHasLang checks whether ls supports lang. If ls has a matching 2490ca08ab68Smrg language and territory pair, this function returns FcLangEqual. If ls has 2491ca08ab68Smrg a matching language but differs in which territory that language is for, 2492ca08ab68Smrg this function returns FcLangDifferentTerritory. If ls has no matching 2493ca08ab68Smrg language, this function returns FcLangDifferentLang. 2494a6844aabSmrg 2495ca08ab68Smrg FcGetDefaultLangs 2496a6844aabSmrg 2497a6844aabSmrgName 2498a6844aabSmrg 2499ca08ab68Smrg FcGetDefaultLangs -- Get the default languages list 25002c393a42Smrg 25012c393a42SmrgSynopsis 25022c393a42Smrg 2503c9710b42Smrg #include <fontconfig/fontconfig.h> 25042c393a42Smrg 2505a6844aabSmrg 2506b09479dcSmrg FcStrSet * FcGetDefaultLangs(void); 25072c393a42Smrg 25082c393a42SmrgDescription 25092c393a42Smrg 2510ca08ab68Smrg Returns a string set of the default languages according to the environment 2511ca08ab68Smrg variables on the system. This function looks for them in order of FC_LANG, 2512ca08ab68Smrg LC_ALL, LC_CTYPE and LANG then. If there are no valid values in those 2513ca08ab68Smrg environment variables, "en" will be set as fallback. 25142c393a42Smrg 2515b09479dcSmrgSince 2516b09479dcSmrg 2517b09479dcSmrg version 2.9.91 2518b09479dcSmrg 2519b09479dcSmrg FcLangSetGetLangs 2520b09479dcSmrg 2521b09479dcSmrgName 2522b09479dcSmrg 2523b09479dcSmrg FcLangSetGetLangs -- get the list of languages in the langset 2524b09479dcSmrg 2525b09479dcSmrgSynopsis 2526b09479dcSmrg 2527b09479dcSmrg #include <fontconfig/fontconfig.h> 25282c393a42Smrg 2529b09479dcSmrg 2530b09479dcSmrg FcStrSet * FcLangSetGetLangs(const FcLangSet *ls); 2531b09479dcSmrg 2532b09479dcSmrgDescription 2533b09479dcSmrg 2534b09479dcSmrg Returns a string set of all languages in langset. 25352c393a42Smrg 2536ca08ab68Smrg FcGetLangs 25372c393a42Smrg 25382c393a42SmrgName 25392c393a42Smrg 2540ca08ab68Smrg FcGetLangs -- Get list of languages 25412c393a42Smrg 25422c393a42SmrgSynopsis 25432c393a42Smrg 2544c9710b42Smrg #include <fontconfig/fontconfig.h> 25452c393a42Smrg 2546a6844aabSmrg 2547ca08ab68Smrg FcStrSet * FcGetLangs(void); 25482c393a42Smrg 25492c393a42SmrgDescription 25502c393a42Smrg 2551ca08ab68Smrg Returns a string set of all known languages. 25522c393a42Smrg 2553c9710b42Smrg FcLangNormalize 2554c9710b42Smrg 2555c9710b42SmrgName 2556c9710b42Smrg 2557c9710b42Smrg FcLangNormalize -- Normalize the language string 2558c9710b42Smrg 2559c9710b42SmrgSynopsis 2560c9710b42Smrg 2561c9710b42Smrg #include <fontconfig/fontconfig.h> 2562c9710b42Smrg 2563c9710b42Smrg 2564c9710b42Smrg FcChar8 * FcLangNormalize(const FcChar8 *lang); 2565c9710b42Smrg 2566c9710b42SmrgDescription 2567c9710b42Smrg 2568c9710b42Smrg Returns a string to make lang suitable on fontconfig. 2569c9710b42Smrg 2570b09479dcSmrgSince 2571c9710b42Smrg 2572b09479dcSmrg version 2.10.91 25732c393a42Smrg 2574ca08ab68Smrg FcLangGetCharSet 25752c393a42Smrg 25762c393a42SmrgName 25772c393a42Smrg 2578ca08ab68Smrg FcLangGetCharSet -- Get character map for a language 25792c393a42Smrg 25802c393a42SmrgSynopsis 25812c393a42Smrg 2582c9710b42Smrg #include <fontconfig/fontconfig.h> 25832c393a42Smrg 2584a6844aabSmrg 2585ca08ab68Smrg const FcCharSet * FcLangGetCharSet(const FcChar8 *lang); 25862c393a42Smrg 25872c393a42SmrgDescription 25882c393a42Smrg 2589ca08ab68Smrg Returns the FcCharMap for a language. 25902c393a42Smrg 2591ca08ab68Smrg -------------------------------------------------------------------------- 2592ca08ab68Smrg 2593ca08ab68Smrg FcMatrix 2594ca08ab68Smrg 2595ca08ab68Smrg Table of Contents 2596ca08ab68Smrg 2597b09479dcSmrg [90]FcMatrixInit -- initialize an FcMatrix structure 2598a6844aabSmrg 2599b09479dcSmrg [91]FcMatrixCopy -- Copy a matrix 26002c393a42Smrg 2601b09479dcSmrg [92]FcMatrixEqual -- Compare two matrices 26022c393a42Smrg 2603b09479dcSmrg [93]FcMatrixMultiply -- Multiply matrices 26042c393a42Smrg 2605b09479dcSmrg [94]FcMatrixRotate -- Rotate a matrix 26062c393a42Smrg 2607b09479dcSmrg [95]FcMatrixScale -- Scale a matrix 2608ca08ab68Smrg 2609b09479dcSmrg [96]FcMatrixShear -- Shear a matrix 2610ca08ab68Smrg 2611ca08ab68Smrg FcMatrix structures hold an affine transformation in matrix form. 2612ca08ab68Smrg 2613ca08ab68Smrg FcMatrixInit 26142c393a42Smrg 26152c393a42SmrgName 26162c393a42Smrg 2617ca08ab68Smrg FcMatrixInit -- initialize an FcMatrix structure 26182c393a42Smrg 26192c393a42SmrgSynopsis 26202c393a42Smrg 2621c9710b42Smrg #include <fontconfig/fontconfig.h> 26222c393a42Smrg 2623a6844aabSmrg 2624ca08ab68Smrg void FcMatrixInit(FcMatrix *matrix); 26252c393a42Smrg 26262c393a42SmrgDescription 26272c393a42Smrg 2628ca08ab68Smrg FcMatrixInit initializes matrix to the identity matrix. 26292c393a42Smrg 2630ca08ab68Smrg FcMatrixCopy 26312c393a42Smrg 26322c393a42SmrgName 26332c393a42Smrg 2634ca08ab68Smrg FcMatrixCopy -- Copy a matrix 26352c393a42Smrg 26362c393a42SmrgSynopsis 26372c393a42Smrg 2638c9710b42Smrg #include <fontconfig/fontconfig.h> 26392c393a42Smrg 2640a6844aabSmrg 2641ca08ab68Smrg void FcMatrixCopy(const FcMatrix *matrix); 26422c393a42Smrg 26432c393a42SmrgDescription 26442c393a42Smrg 2645ca08ab68Smrg FcMatrixCopy allocates a new FcMatrix and copies mat into it. 26462c393a42Smrg 2647ca08ab68Smrg FcMatrixEqual 26482c393a42Smrg 26492c393a42SmrgName 26502c393a42Smrg 2651ca08ab68Smrg FcMatrixEqual -- Compare two matrices 26522c393a42Smrg 26532c393a42SmrgSynopsis 26542c393a42Smrg 2655c9710b42Smrg #include <fontconfig/fontconfig.h> 26562c393a42Smrg 2657a6844aabSmrg 2658ca08ab68Smrg void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix *matrix2); 26592c393a42Smrg 26602c393a42SmrgDescription 26612c393a42Smrg 2662ca08ab68Smrg FcMatrixEqual compares matrix1 and matrix2 returning FcTrue when they are 2663ca08ab68Smrg equal and FcFalse when they are not. 26642c393a42Smrg 2665ca08ab68Smrg FcMatrixMultiply 26662c393a42Smrg 26672c393a42SmrgName 26682c393a42Smrg 2669ca08ab68Smrg FcMatrixMultiply -- Multiply matrices 26702c393a42Smrg 26712c393a42SmrgSynopsis 26722c393a42Smrg 2673c9710b42Smrg #include <fontconfig/fontconfig.h> 26742c393a42Smrg 2675a6844aabSmrg 2676ca08ab68Smrg void FcMatrixMultiply(FcMatrix *result, const FcMatrix *matrix1, const 2677ca08ab68Smrg FcMatrix *matrix2); 26782c393a42Smrg 26792c393a42SmrgDescription 26802c393a42Smrg 2681ca08ab68Smrg FcMatrixMultiply multiplies matrix1 and matrix2 storing the result in 2682ca08ab68Smrg result. 26832c393a42Smrg 2684ca08ab68Smrg FcMatrixRotate 26852c393a42Smrg 26862c393a42SmrgName 26872c393a42Smrg 2688ca08ab68Smrg FcMatrixRotate -- Rotate a matrix 26892c393a42Smrg 26902c393a42SmrgSynopsis 26912c393a42Smrg 2692c9710b42Smrg #include <fontconfig/fontconfig.h> 26932c393a42Smrg 2694a6844aabSmrg 2695ca08ab68Smrg void FcMatrixRotate(FcMatrix *matrix, double cos, double sin); 26962c393a42Smrg 26972c393a42SmrgDescription 26982c393a42Smrg 2699ca08ab68Smrg FcMatrixRotate rotates matrix by the angle who's sine is sin and cosine is 2700ca08ab68Smrg cos. This is done by multiplying by the matrix: 2701a6844aabSmrg 2702ca08ab68Smrg cos -sin 2703ca08ab68Smrg sin cos 27042c393a42Smrg 2705ca08ab68Smrg FcMatrixScale 27062c393a42Smrg 27072c393a42SmrgName 27082c393a42Smrg 2709ca08ab68Smrg FcMatrixScale -- Scale a matrix 27102c393a42Smrg 27112c393a42SmrgSynopsis 27122c393a42Smrg 2713c9710b42Smrg #include <fontconfig/fontconfig.h> 27142c393a42Smrg 2715a6844aabSmrg 2716ca08ab68Smrg void FcMatrixScale(FcMatrix *matrix, double sx, double dy); 27172c393a42Smrg 27182c393a42SmrgDescription 27192c393a42Smrg 2720ca08ab68Smrg FcMatrixScale multiplies matrix x values by sx and y values by dy. This is 2721ca08ab68Smrg done by multiplying by the matrix: 2722a6844aabSmrg 2723ca08ab68Smrg sx 0 2724ca08ab68Smrg 0 dy 27252c393a42Smrg 2726ca08ab68Smrg FcMatrixShear 27272c393a42Smrg 27282c393a42SmrgName 27292c393a42Smrg 2730ca08ab68Smrg FcMatrixShear -- Shear a matrix 27312c393a42Smrg 27322c393a42SmrgSynopsis 27332c393a42Smrg 2734c9710b42Smrg #include <fontconfig/fontconfig.h> 27352c393a42Smrg 2736a6844aabSmrg 2737ca08ab68Smrg void FcMatrixShear(FcMatrix *matrix, double sh, double sv); 27382c393a42Smrg 27392c393a42SmrgDescription 27402c393a42Smrg 2741ca08ab68Smrg FcMatrixShare shears matrix horizontally by sh and vertically by sv. This 2742ca08ab68Smrg is done by multiplying by the matrix: 2743a6844aabSmrg 2744ca08ab68Smrg 1 sh 2745ca08ab68Smrg sv 1 27462c393a42Smrg 2747ca08ab68Smrg -------------------------------------------------------------------------- 2748ca08ab68Smrg 2749ca08ab68Smrg FcConfig 2750ca08ab68Smrg 2751ca08ab68Smrg Table of Contents 2752ca08ab68Smrg 2753b09479dcSmrg [97]FcConfigCreate -- Create a configuration 2754ca08ab68Smrg 2755b09479dcSmrg [98]FcConfigReference -- Increment config reference count 2756ca08ab68Smrg 2757b09479dcSmrg [99]FcConfigDestroy -- Destroy a configuration 2758ca08ab68Smrg 2759b09479dcSmrg [100]FcConfigSetCurrent -- Set configuration as default 2760ca08ab68Smrg 2761b09479dcSmrg [101]FcConfigGetCurrent -- Return current configuration 2762ca08ab68Smrg 2763b09479dcSmrg [102]FcConfigUptoDate -- Check timestamps on config files 2764ca08ab68Smrg 2765b09479dcSmrg [103]FcConfigHome -- return the current home directory. 2766ca08ab68Smrg 2767b09479dcSmrg [104]FcConfigEnableHome -- controls use of the home directory. 2768ca08ab68Smrg 2769b09479dcSmrg [105]FcConfigBuildFonts -- Build font database 2770ca08ab68Smrg 2771b09479dcSmrg [106]FcConfigGetConfigDirs -- Get config directories 2772ca08ab68Smrg 2773b09479dcSmrg [107]FcConfigGetFontDirs -- Get font directories 2774ca08ab68Smrg 2775b09479dcSmrg [108]FcConfigGetConfigFiles -- Get config files 2776ca08ab68Smrg 2777b09479dcSmrg [109]FcConfigGetCache -- DEPRECATED used to return per-user cache filename 2778ca08ab68Smrg 2779b09479dcSmrg [110]FcConfigGetCacheDirs -- return the list of directories searched for 2780ca08ab68Smrg cache files 2781ca08ab68Smrg 2782b09479dcSmrg [111]FcConfigGetFonts -- Get config font set 2783ca08ab68Smrg 2784b09479dcSmrg [112]FcConfigGetBlanks -- Get config blanks 2785a6844aabSmrg 2786b09479dcSmrg [113]FcConfigGetRescanInterval -- Get config rescan interval 2787a6844aabSmrg 2788b09479dcSmrg [114]FcConfigSetRescanInterval -- Set config rescan interval 2789a6844aabSmrg 2790b09479dcSmrg [115]FcConfigAppFontAddFile -- Add font file to font database 2791a6844aabSmrg 2792b09479dcSmrg [116]FcConfigAppFontAddDir -- Add fonts from directory to font database 27932c393a42Smrg 2794b09479dcSmrg [117]FcConfigAppFontClear -- Remove all app fonts from font database 2795ca08ab68Smrg 2796b09479dcSmrg [118]FcConfigSubstituteWithPat -- Execute substitutions 2797ca08ab68Smrg 2798b09479dcSmrg [119]FcConfigSubstitute -- Execute substitutions 2799ca08ab68Smrg 2800b09479dcSmrg [120]FcFontMatch -- Return best font 2801ca08ab68Smrg 2802b09479dcSmrg [121]FcFontSort -- Return list of matching fonts 2803ca08ab68Smrg 2804b09479dcSmrg [122]FcFontRenderPrepare -- Prepare pattern for loading font file 2805ca08ab68Smrg 2806b09479dcSmrg [123]FcFontList -- List fonts 2807ca08ab68Smrg 2808b09479dcSmrg [124]FcConfigFilename -- Find a config file 2809ca08ab68Smrg 2810b09479dcSmrg [125]FcConfigParseAndLoad -- load a configuration file 2811c9710b42Smrg 2812b09479dcSmrg [126]FcConfigGetSysRoot -- Obtain the system root directory 2813c9710b42Smrg 2814b09479dcSmrg [127]FcConfigSetSysRoot -- Set the system root directory 2815ca08ab68Smrg 2816ca08ab68Smrg An FcConfig object holds the internal representation of a configuration. 2817ca08ab68Smrg There is a default configuration which applications may use by passing 0 2818ca08ab68Smrg to any function using the data within an FcConfig. 2819ca08ab68Smrg 2820ca08ab68Smrg FcConfigCreate 28212c393a42Smrg 28222c393a42SmrgName 28232c393a42Smrg 2824ca08ab68Smrg FcConfigCreate -- Create a configuration 28252c393a42Smrg 28262c393a42SmrgSynopsis 28272c393a42Smrg 2828c9710b42Smrg #include <fontconfig/fontconfig.h> 28292c393a42Smrg 2830a6844aabSmrg 2831ca08ab68Smrg FcConfig * FcConfigCreate(void); 28322c393a42Smrg 28332c393a42SmrgDescription 28342c393a42Smrg 2835ca08ab68Smrg Creates an empty configuration. 28362c393a42Smrg 2837ca08ab68Smrg FcConfigReference 2838a6844aabSmrg 2839a6844aabSmrgName 2840a6844aabSmrg 2841ca08ab68Smrg FcConfigReference -- Increment config reference count 2842a6844aabSmrg 2843a6844aabSmrgSynopsis 2844a6844aabSmrg 2845c9710b42Smrg #include <fontconfig/fontconfig.h> 2846a6844aabSmrg 2847a6844aabSmrg 2848ca08ab68Smrg FcConfig * FcConfigReference(FcConfig *config); 2849a6844aabSmrg 2850a6844aabSmrgDescription 2851a6844aabSmrg 2852ca08ab68Smrg Add another reference to config. Configs are freed only when the reference 2853ca08ab68Smrg count reaches zero. If config is NULL, the current configuration is used. 2854ca08ab68Smrg In that case this function will be similar to FcConfigGetCurrent() except 2855ca08ab68Smrg that it increments the reference count before returning and the user is 2856ca08ab68Smrg responsible for destroying the configuration when not needed anymore. 2857a6844aabSmrg 2858ca08ab68Smrg FcConfigDestroy 28592c393a42Smrg 28602c393a42SmrgName 28612c393a42Smrg 2862ca08ab68Smrg FcConfigDestroy -- Destroy a configuration 28632c393a42Smrg 28642c393a42SmrgSynopsis 28652c393a42Smrg 2866c9710b42Smrg #include <fontconfig/fontconfig.h> 28672c393a42Smrg 2868a6844aabSmrg 2869ca08ab68Smrg void FcConfigDestroy(FcConfig *config); 28702c393a42Smrg 28712c393a42SmrgDescription 28722c393a42Smrg 2873ca08ab68Smrg Decrements the config reference count. If all references are gone, 2874ca08ab68Smrg destroys the configuration and any data associated with it. Note that 2875ca08ab68Smrg calling this function with the return from FcConfigGetCurrent will cause a 2876ca08ab68Smrg new configuration to be created for use as current configuration. 28772c393a42Smrg 2878ca08ab68Smrg FcConfigSetCurrent 28792c393a42Smrg 28802c393a42SmrgName 28812c393a42Smrg 2882ca08ab68Smrg FcConfigSetCurrent -- Set configuration as default 28832c393a42Smrg 28842c393a42SmrgSynopsis 28852c393a42Smrg 2886c9710b42Smrg #include <fontconfig/fontconfig.h> 28872c393a42Smrg 2888a6844aabSmrg 2889ca08ab68Smrg FcBool FcConfigSetCurrent(FcConfig *config); 28902c393a42Smrg 28912c393a42SmrgDescription 28922c393a42Smrg 2893ca08ab68Smrg Sets the current default configuration to config. Implicitly calls 2894ca08ab68Smrg FcConfigBuildFonts if necessary, returning FcFalse if that call fails. 28952c393a42Smrg 2896ca08ab68Smrg FcConfigGetCurrent 28972c393a42Smrg 28982c393a42SmrgName 28992c393a42Smrg 2900ca08ab68Smrg FcConfigGetCurrent -- Return current configuration 29012c393a42Smrg 29022c393a42SmrgSynopsis 29032c393a42Smrg 2904c9710b42Smrg #include <fontconfig/fontconfig.h> 29052c393a42Smrg 2906a6844aabSmrg 2907ca08ab68Smrg FcConfig * FcConfigGetCurrent(void); 29082c393a42Smrg 29092c393a42SmrgDescription 29102c393a42Smrg 2911ca08ab68Smrg Returns the current default configuration. 29122c393a42Smrg 2913ca08ab68Smrg FcConfigUptoDate 29142c393a42Smrg 29152c393a42SmrgName 29162c393a42Smrg 2917ca08ab68Smrg FcConfigUptoDate -- Check timestamps on config files 29182c393a42Smrg 29192c393a42SmrgSynopsis 29202c393a42Smrg 2921c9710b42Smrg #include <fontconfig/fontconfig.h> 29222c393a42Smrg 2923a6844aabSmrg 2924ca08ab68Smrg FcBool FcConfigUptoDate(FcConfig *config); 29252c393a42Smrg 29262c393a42SmrgDescription 29272c393a42Smrg 2928ca08ab68Smrg Checks all of the files related to config and returns whether any of them 2929ca08ab68Smrg has been modified since the configuration was created. If config is NULL, 2930ca08ab68Smrg the current configuration is used. 29312c393a42Smrg 2932ca08ab68Smrg FcConfigHome 29332c393a42Smrg 29342c393a42SmrgName 29352c393a42Smrg 2936ca08ab68Smrg FcConfigHome -- return the current home directory. 29372c393a42Smrg 29382c393a42SmrgSynopsis 29392c393a42Smrg 2940c9710b42Smrg #include <fontconfig/fontconfig.h> 29412c393a42Smrg 2942a6844aabSmrg 2943ca08ab68Smrg FcChar8 * FcConfigHome(void); 29442c393a42Smrg 29452c393a42SmrgDescription 29462c393a42Smrg 2947ca08ab68Smrg Return the current user's home directory, if it is available, and if using 2948ca08ab68Smrg it is enabled, and NULL otherwise. See also FcConfigEnableHome). 29492c393a42Smrg 2950ca08ab68Smrg FcConfigEnableHome 29512c393a42Smrg 29522c393a42SmrgName 29532c393a42Smrg 2954ca08ab68Smrg FcConfigEnableHome -- controls use of the home directory. 29552c393a42Smrg 29562c393a42SmrgSynopsis 29572c393a42Smrg 2958c9710b42Smrg #include <fontconfig/fontconfig.h> 29592c393a42Smrg 2960a6844aabSmrg 2961ca08ab68Smrg FcBool FcConfigEnableHome(FcBool enable); 29622c393a42Smrg 29632c393a42SmrgDescription 29642c393a42Smrg 2965ca08ab68Smrg If enable is FcTrue, then Fontconfig will use various files which are 2966ca08ab68Smrg specified relative to the user's home directory (using the ~ notation in 2967ca08ab68Smrg the configuration). When enable is FcFalse, then all use of the home 2968ca08ab68Smrg directory in these contexts will be disabled. The previous setting of the 2969ca08ab68Smrg value is returned. 29702c393a42Smrg 2971ca08ab68Smrg FcConfigBuildFonts 29722c393a42Smrg 29732c393a42SmrgName 29742c393a42Smrg 2975ca08ab68Smrg FcConfigBuildFonts -- Build font database 29762c393a42Smrg 29772c393a42SmrgSynopsis 29782c393a42Smrg 2979c9710b42Smrg #include <fontconfig/fontconfig.h> 29802c393a42Smrg 2981a6844aabSmrg 2982ca08ab68Smrg FcBool FcConfigBuildFonts(FcConfig *config); 29832c393a42Smrg 29842c393a42SmrgDescription 29852c393a42Smrg 2986ca08ab68Smrg Builds the set of available fonts for the given configuration. Note that 2987ca08ab68Smrg any changes to the configuration after this call have indeterminate 2988ca08ab68Smrg effects. Returns FcFalse if this operation runs out of memory. If config 2989ca08ab68Smrg is NULL, the current configuration is used. 29902c393a42Smrg 2991ca08ab68Smrg FcConfigGetConfigDirs 29922c393a42Smrg 29932c393a42SmrgName 29942c393a42Smrg 2995ca08ab68Smrg FcConfigGetConfigDirs -- Get config directories 29962c393a42Smrg 29972c393a42SmrgSynopsis 29982c393a42Smrg 2999c9710b42Smrg #include <fontconfig/fontconfig.h> 30002c393a42Smrg 3001a6844aabSmrg 3002ca08ab68Smrg FcStrList * FcConfigGetConfigDirs(FcConfig *config); 30032c393a42Smrg 30042c393a42SmrgDescription 30052c393a42Smrg 3006ca08ab68Smrg Returns the list of font directories specified in the configuration files 3007ca08ab68Smrg for config. Does not include any subdirectories. If config is NULL, the 3008ca08ab68Smrg current configuration is used. 30092c393a42Smrg 3010ca08ab68Smrg FcConfigGetFontDirs 30112c393a42Smrg 30122c393a42SmrgName 30132c393a42Smrg 3014ca08ab68Smrg FcConfigGetFontDirs -- Get font directories 30152c393a42Smrg 30162c393a42SmrgSynopsis 30172c393a42Smrg 3018c9710b42Smrg #include <fontconfig/fontconfig.h> 30192c393a42Smrg 3020a6844aabSmrg 3021ca08ab68Smrg FcStrList * FcConfigGetFontDirs(FcConfig *config); 30222c393a42Smrg 30232c393a42SmrgDescription 30242c393a42Smrg 3025ca08ab68Smrg Returns the list of font directories in config. This includes the 3026ca08ab68Smrg configured font directories along with any directories below those in the 3027ca08ab68Smrg filesystem. If config is NULL, the current configuration is used. 30282c393a42Smrg 3029ca08ab68Smrg FcConfigGetConfigFiles 30302c393a42Smrg 30312c393a42SmrgName 30322c393a42Smrg 3033ca08ab68Smrg FcConfigGetConfigFiles -- Get config files 30342c393a42Smrg 30352c393a42SmrgSynopsis 30362c393a42Smrg 3037c9710b42Smrg #include <fontconfig/fontconfig.h> 30382c393a42Smrg 3039a6844aabSmrg 3040ca08ab68Smrg FcStrList * FcConfigGetConfigFiles(FcConfig *config); 30412c393a42Smrg 30422c393a42SmrgDescription 30432c393a42Smrg 3044ca08ab68Smrg Returns the list of known configuration files used to generate config. If 3045ca08ab68Smrg config is NULL, the current configuration is used. 30462c393a42Smrg 3047ca08ab68Smrg FcConfigGetCache 30482c393a42Smrg 30492c393a42SmrgName 30502c393a42Smrg 3051ca08ab68Smrg FcConfigGetCache -- DEPRECATED used to return per-user cache filename 30522c393a42Smrg 30532c393a42SmrgSynopsis 30542c393a42Smrg 3055c9710b42Smrg #include <fontconfig/fontconfig.h> 30562c393a42Smrg 3057a6844aabSmrg 3058ca08ab68Smrg FcChar8 * FcConfigGetCache(FcConfig *config); 30592c393a42Smrg 30602c393a42SmrgDescription 30612c393a42Smrg 3062ca08ab68Smrg With fontconfig no longer using per-user cache files, this function now 3063ca08ab68Smrg simply returns NULL to indicate that no per-user file exists. 30642c393a42Smrg 3065ca08ab68Smrg FcConfigGetCacheDirs 30662c393a42Smrg 30672c393a42SmrgName 30682c393a42Smrg 3069ca08ab68Smrg FcConfigGetCacheDirs -- return the list of directories searched for cache 3070ca08ab68Smrg files 30712c393a42Smrg 30722c393a42SmrgSynopsis 30732c393a42Smrg 3074c9710b42Smrg #include <fontconfig/fontconfig.h> 30752c393a42Smrg 3076a6844aabSmrg 3077ca08ab68Smrg FcStrList * FcConfigGetCacheDirs(const FcConfig *config); 30782c393a42Smrg 30792c393a42SmrgDescription 30802c393a42Smrg 3081ca08ab68Smrg FcConfigGetCacheDirs returns a string list containing all of the 3082ca08ab68Smrg directories that fontconfig will search when attempting to load a cache 3083ca08ab68Smrg file for a font directory. If config is NULL, the current configuration is 3084ca08ab68Smrg used. 30852c393a42Smrg 3086ca08ab68Smrg FcConfigGetFonts 30872c393a42Smrg 30882c393a42SmrgName 30892c393a42Smrg 3090ca08ab68Smrg FcConfigGetFonts -- Get config font set 30912c393a42Smrg 30922c393a42SmrgSynopsis 30932c393a42Smrg 3094c9710b42Smrg #include <fontconfig/fontconfig.h> 30952c393a42Smrg 3096a6844aabSmrg 3097ca08ab68Smrg FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set); 30982c393a42Smrg 30992c393a42SmrgDescription 31002c393a42Smrg 3101ca08ab68Smrg Returns one of the two sets of fonts from the configuration as specified 3102ca08ab68Smrg by set. This font set is owned by the library and must not be modified or 3103ca08ab68Smrg freed. If config is NULL, the current configuration is used. 31042c393a42Smrg 3105ca08ab68Smrg FcConfigGetBlanks 31062c393a42Smrg 31072c393a42SmrgName 31082c393a42Smrg 3109ca08ab68Smrg FcConfigGetBlanks -- Get config blanks 31102c393a42Smrg 31112c393a42SmrgSynopsis 31122c393a42Smrg 3113c9710b42Smrg #include <fontconfig/fontconfig.h> 31142c393a42Smrg 3115a6844aabSmrg 3116ca08ab68Smrg FcBlanks * FcConfigGetBlanks(FcConfig *config); 31172c393a42Smrg 31182c393a42SmrgDescription 31192c393a42Smrg 3120ca08ab68Smrg Returns the FcBlanks object associated with the given configuration, if no 3121ca08ab68Smrg blanks were present in the configuration, this function will return 0. The 3122ca08ab68Smrg returned FcBlanks object if not NULL, is valid as long as the owning 3123ca08ab68Smrg FcConfig is alive. If config is NULL, the current configuration is used. 31242c393a42Smrg 3125ca08ab68Smrg FcConfigGetRescanInterval 31262c393a42Smrg 31272c393a42SmrgName 31282c393a42Smrg 3129ca08ab68Smrg FcConfigGetRescanInterval -- Get config rescan interval 31302c393a42Smrg 31312c393a42SmrgSynopsis 31322c393a42Smrg 3133c9710b42Smrg #include <fontconfig/fontconfig.h> 31342c393a42Smrg 3135a6844aabSmrg 3136ca08ab68Smrg int FcConfigGetRescanInterval(FcConfig *config); 31372c393a42Smrg 31382c393a42SmrgDescription 31392c393a42Smrg 3140ca08ab68Smrg Returns the interval between automatic checks of the configuration (in 3141ca08ab68Smrg seconds) specified in config. The configuration is checked during a call 3142ca08ab68Smrg to FcFontList when this interval has passed since the last check. An 3143ca08ab68Smrg interval setting of zero disables automatic checks. If config is NULL, the 3144ca08ab68Smrg current configuration is used. 31452c393a42Smrg 3146ca08ab68Smrg FcConfigSetRescanInterval 31472c393a42Smrg 31482c393a42SmrgName 31492c393a42Smrg 3150ca08ab68Smrg FcConfigSetRescanInterval -- Set config rescan interval 31512c393a42Smrg 31522c393a42SmrgSynopsis 31532c393a42Smrg 3154c9710b42Smrg #include <fontconfig/fontconfig.h> 31552c393a42Smrg 3156a6844aabSmrg 3157ca08ab68Smrg FcBool FcConfigSetRescanInterval(FcConfig *config, int rescanInterval); 31582c393a42Smrg 31592c393a42SmrgDescription 31602c393a42Smrg 3161ca08ab68Smrg Sets the rescan interval. Returns FcFalse if the interval cannot be set 3162ca08ab68Smrg (due to allocation failure). Otherwise returns FcTrue. An interval setting 3163ca08ab68Smrg of zero disables automatic checks. If config is NULL, the current 3164ca08ab68Smrg configuration is used. 31652c393a42Smrg 3166ca08ab68Smrg FcConfigAppFontAddFile 31672c393a42Smrg 31682c393a42SmrgName 31692c393a42Smrg 3170ca08ab68Smrg FcConfigAppFontAddFile -- Add font file to font database 31712c393a42Smrg 31722c393a42SmrgSynopsis 31732c393a42Smrg 3174c9710b42Smrg #include <fontconfig/fontconfig.h> 31752c393a42Smrg 3176a6844aabSmrg 3177ca08ab68Smrg FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 *file); 31782c393a42Smrg 31792c393a42SmrgDescription 31802c393a42Smrg 3181ca08ab68Smrg Adds an application-specific font to the configuration. Returns FcFalse if 3182ca08ab68Smrg the fonts cannot be added (due to allocation failure). Otherwise returns 3183ca08ab68Smrg FcTrue. If config is NULL, the current configuration is used. 31842c393a42Smrg 3185ca08ab68Smrg FcConfigAppFontAddDir 31862c393a42Smrg 31872c393a42SmrgName 31882c393a42Smrg 3189ca08ab68Smrg FcConfigAppFontAddDir -- Add fonts from directory to font database 31902c393a42Smrg 31912c393a42SmrgSynopsis 31922c393a42Smrg 3193c9710b42Smrg #include <fontconfig/fontconfig.h> 31942c393a42Smrg 3195a6844aabSmrg 3196ca08ab68Smrg FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 *dir); 31972c393a42Smrg 31982c393a42SmrgDescription 31992c393a42Smrg 3200ca08ab68Smrg Scans the specified directory for fonts, adding each one found to the 3201ca08ab68Smrg application-specific set of fonts. Returns FcFalse if the fonts cannot be 3202ca08ab68Smrg added (due to allocation failure). Otherwise returns FcTrue. If config is 3203ca08ab68Smrg NULL, the current configuration is used. 32042c393a42Smrg 3205ca08ab68Smrg FcConfigAppFontClear 32062c393a42Smrg 32072c393a42SmrgName 32082c393a42Smrg 3209ca08ab68Smrg FcConfigAppFontClear -- Remove all app fonts from font database 32102c393a42Smrg 32112c393a42SmrgSynopsis 32122c393a42Smrg 3213c9710b42Smrg #include <fontconfig/fontconfig.h> 32142c393a42Smrg 3215a6844aabSmrg 3216ca08ab68Smrg void FcConfigAppFontClear(FcConfig *config); 32172c393a42Smrg 32182c393a42SmrgDescription 32192c393a42Smrg 3220ca08ab68Smrg Clears the set of application-specific fonts. If config is NULL, the 3221ca08ab68Smrg current configuration is used. 32222c393a42Smrg 3223ca08ab68Smrg FcConfigSubstituteWithPat 32242c393a42Smrg 32252c393a42SmrgName 32262c393a42Smrg 3227ca08ab68Smrg FcConfigSubstituteWithPat -- Execute substitutions 32282c393a42Smrg 32292c393a42SmrgSynopsis 32302c393a42Smrg 3231c9710b42Smrg #include <fontconfig/fontconfig.h> 32322c393a42Smrg 3233a6844aabSmrg 3234ca08ab68Smrg FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern *p, FcPattern 3235ca08ab68Smrg *p_pat, FcMatchKind kind); 32362c393a42Smrg 32372c393a42SmrgDescription 32382c393a42Smrg 3239ca08ab68Smrg Performs the sequence of pattern modification operations, if kind is 3240ca08ab68Smrg FcMatchPattern, then those tagged as pattern operations are applied, else 3241ca08ab68Smrg if kind is FcMatchFont, those tagged as font operations are applied and 3242ca08ab68Smrg p_pat is used for <test> elements with target=pattern. Returns FcFalse if 3243ca08ab68Smrg the substitution cannot be performed (due to allocation failure). 3244ca08ab68Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3245ca08ab68Smrg used. 32462c393a42Smrg 3247ca08ab68Smrg FcConfigSubstitute 32482c393a42Smrg 32492c393a42SmrgName 32502c393a42Smrg 3251ca08ab68Smrg FcConfigSubstitute -- Execute substitutions 32522c393a42Smrg 32532c393a42SmrgSynopsis 32542c393a42Smrg 3255c9710b42Smrg #include <fontconfig/fontconfig.h> 32562c393a42Smrg 3257a6844aabSmrg 3258ca08ab68Smrg FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, FcMatchKind 3259ca08ab68Smrg kind); 32602c393a42Smrg 32612c393a42SmrgDescription 32622c393a42Smrg 3263ca08ab68Smrg Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse if 3264ca08ab68Smrg the substitution cannot be performed (due to allocation failure). 3265ca08ab68Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3266ca08ab68Smrg used. 32672c393a42Smrg 3268ca08ab68Smrg FcFontMatch 32692c393a42Smrg 32702c393a42SmrgName 32712c393a42Smrg 3272ca08ab68Smrg FcFontMatch -- Return best font 32732c393a42Smrg 32742c393a42SmrgSynopsis 32752c393a42Smrg 3276c9710b42Smrg #include <fontconfig/fontconfig.h> 32772c393a42Smrg 3278a6844aabSmrg 3279ca08ab68Smrg FcPattern * FcFontMatch(FcConfig *config, FcPattern *p, FcResult *result); 32802c393a42Smrg 32812c393a42SmrgDescription 32822c393a42Smrg 3283ca08ab68Smrg Finds the font in sets most closely matching pattern and returns the 3284ca08ab68Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 3285ca08ab68Smrg function should be called only after FcConfigSubstitute and 3286ca08ab68Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 3287ca08ab68Smrg be correct. If config is NULL, the current configuration is used. 32882c393a42Smrg 3289ca08ab68Smrg FcFontSort 32902c393a42Smrg 32912c393a42SmrgName 32922c393a42Smrg 3293ca08ab68Smrg FcFontSort -- Return list of matching fonts 32942c393a42Smrg 32952c393a42SmrgSynopsis 32962c393a42Smrg 3297c9710b42Smrg #include <fontconfig/fontconfig.h> 32982c393a42Smrg 3299a6844aabSmrg 3300ca08ab68Smrg FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool trim, 3301ca08ab68Smrg FcCharSet **csp, FcResult *result); 33022c393a42Smrg 33032c393a42SmrgDescription 33042c393a42Smrg 3305ca08ab68Smrg Returns the list of fonts sorted by closeness to p. If trim is FcTrue, 3306ca08ab68Smrg elements in the list which don't include Unicode coverage not provided by 3307ca08ab68Smrg earlier elements in the list are elided. The union of Unicode coverage of 3308ca08ab68Smrg all of the fonts is returned in csp, if csp is not NULL. This function 3309ca08ab68Smrg should be called only after FcConfigSubstitute and FcDefaultSubstitute 3310ca08ab68Smrg have been called for p; otherwise the results will not be correct. 33112c393a42Smrg 3312ca08ab68Smrg The returned FcFontSet references FcPattern structures which may be shared 3313ca08ab68Smrg by the return value from multiple FcFontSort calls, applications must not 3314ca08ab68Smrg modify these patterns. Instead, they should be passed, along with p to 3315ca08ab68Smrg FcFontRenderPrepare which combines them into a complete pattern. 33162c393a42Smrg 3317ca08ab68Smrg The FcFontSet returned by FcFontSort is destroyed by calling 3318ca08ab68Smrg FcFontSetDestroy. If config is NULL, the current configuration is used. 33192c393a42Smrg 3320ca08ab68Smrg FcFontRenderPrepare 33212c393a42Smrg 33222c393a42SmrgName 33232c393a42Smrg 3324ca08ab68Smrg FcFontRenderPrepare -- Prepare pattern for loading font file 33252c393a42Smrg 33262c393a42SmrgSynopsis 33272c393a42Smrg 3328c9710b42Smrg #include <fontconfig/fontconfig.h> 33292c393a42Smrg 3330a6844aabSmrg 3331ca08ab68Smrg FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern *pat, 3332ca08ab68Smrg FcPattern *font); 33332c393a42Smrg 33342c393a42SmrgDescription 33352c393a42Smrg 3336ca08ab68Smrg Creates a new pattern consisting of elements of font not appearing in pat, 3337ca08ab68Smrg elements of pat not appearing in font and the best matching value from pat 3338ca08ab68Smrg for elements appearing in both. The result is passed to 3339ca08ab68Smrg FcConfigSubstituteWithPat with kind FcMatchFont and then returned. 33402c393a42Smrg 3341ca08ab68Smrg FcFontList 33422c393a42Smrg 33432c393a42SmrgName 33442c393a42Smrg 3345ca08ab68Smrg FcFontList -- List fonts 33462c393a42Smrg 33472c393a42SmrgSynopsis 33482c393a42Smrg 3349c9710b42Smrg #include <fontconfig/fontconfig.h> 33502c393a42Smrg 3351a6844aabSmrg 3352ca08ab68Smrg FcFontSet * FcFontList(FcConfig *config, FcPattern *p, FcObjectSet *os); 33532c393a42Smrg 33542c393a42SmrgDescription 33552c393a42Smrg 3356ca08ab68Smrg Selects fonts matching p, creates patterns from those fonts containing 3357ca08ab68Smrg only the objects in os and returns the set of unique such patterns. If 3358ca08ab68Smrg config is NULL, the default configuration is checked to be up to date, and 3359ca08ab68Smrg used. 33602c393a42Smrg 3361ca08ab68Smrg FcConfigFilename 33622c393a42Smrg 33632c393a42SmrgName 33642c393a42Smrg 3365ca08ab68Smrg FcConfigFilename -- Find a config file 33662c393a42Smrg 33672c393a42SmrgSynopsis 33682c393a42Smrg 3369c9710b42Smrg #include <fontconfig/fontconfig.h> 33702c393a42Smrg 3371a6844aabSmrg 3372ca08ab68Smrg FcChar8 * FcConfigFilename(const FcChar8 *name); 33732c393a42Smrg 33742c393a42SmrgDescription 33752c393a42Smrg 3376ca08ab68Smrg Given the specified external entity name, return the associated filename. 3377ca08ab68Smrg This provides applications a way to convert various configuration file 3378ca08ab68Smrg references into filename form. 33792c393a42Smrg 3380ca08ab68Smrg A null or empty name indicates that the default configuration file should 3381ca08ab68Smrg be used; which file this references can be overridden with the 3382ca08ab68Smrg FONTCONFIG_FILE environment variable. Next, if the name starts with ~, it 3383ca08ab68Smrg refers to a file in the current users home directory. Otherwise if the 3384ca08ab68Smrg name doesn't start with '/', it refers to a file in the default 3385ca08ab68Smrg configuration directory; the built-in default directory can be overridden 3386ca08ab68Smrg with the FONTCONFIG_PATH environment variable. 33872c393a42Smrg 3388ca08ab68Smrg FcConfigParseAndLoad 33892c393a42Smrg 33902c393a42SmrgName 33912c393a42Smrg 3392ca08ab68Smrg FcConfigParseAndLoad -- load a configuration file 33932c393a42Smrg 33942c393a42SmrgSynopsis 33952c393a42Smrg 3396c9710b42Smrg #include <fontconfig/fontconfig.h> 33972c393a42Smrg 3398a6844aabSmrg 3399ca08ab68Smrg FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8 *file, FcBool 3400ca08ab68Smrg complain); 34012c393a42Smrg 34022c393a42SmrgDescription 34032c393a42Smrg 3404ca08ab68Smrg Walks the configuration in 'file' and constructs the internal 3405ca08ab68Smrg representation in 'config'. Any include files referenced from within 3406ca08ab68Smrg 'file' will be loaded and parsed. If 'complain' is FcFalse, no warning 3407ca08ab68Smrg will be displayed if 'file' does not exist. Error and warning messages 3408ca08ab68Smrg will be output to stderr. Returns FcFalse if some error occurred while 3409ca08ab68Smrg loading the file, either a parse error, semantic error or allocation 3410ca08ab68Smrg failure. Otherwise returns FcTrue. 34112c393a42Smrg 3412c9710b42Smrg FcConfigGetSysRoot 3413c9710b42Smrg 3414c9710b42SmrgName 3415c9710b42Smrg 3416c9710b42Smrg FcConfigGetSysRoot -- Obtain the system root directory 3417c9710b42Smrg 3418c9710b42SmrgSynopsis 3419c9710b42Smrg 3420c9710b42Smrg #include <fontconfig/fontconfig.h> 3421c9710b42Smrg 3422c9710b42Smrg 3423c9710b42Smrg const FcChar8 * FcConfigGetSysRoot(const FcConfig *config); 3424c9710b42Smrg 3425c9710b42SmrgDescription 3426c9710b42Smrg 3427c9710b42Smrg Obtrains the system root directory in 'config' if available. 3428c9710b42Smrg 3429b09479dcSmrgSince 3430c9710b42Smrg 3431b09479dcSmrg version 2.10.92 3432c9710b42Smrg 3433c9710b42Smrg FcConfigSetSysRoot 3434c9710b42Smrg 3435c9710b42SmrgName 3436c9710b42Smrg 3437c9710b42Smrg FcConfigSetSysRoot -- Set the system root directory 3438c9710b42Smrg 3439c9710b42SmrgSynopsis 3440c9710b42Smrg 3441c9710b42Smrg #include <fontconfig/fontconfig.h> 3442c9710b42Smrg 3443c9710b42Smrg 3444c9710b42Smrg void FcConfigSetSysRoot(FcConfig *config, const FcChar8 *sysroot); 3445c9710b42Smrg 3446c9710b42SmrgDescription 3447c9710b42Smrg 3448c9710b42Smrg Set 'sysroot' as the system root directory. fontconfig prepend 'sysroot' 3449c9710b42Smrg to the cache directories in order to allow people to generate caches at 3450c9710b42Smrg the build time. Note that this causes changing current config. i.e. this 3451c9710b42Smrg function calls FcConfigSetCurrent() internally. 3452c9710b42Smrg 3453b09479dcSmrgSince 3454c9710b42Smrg 3455b09479dcSmrg version 2.10.92 3456ca08ab68Smrg 3457ca08ab68Smrg -------------------------------------------------------------------------- 3458ca08ab68Smrg 3459ca08ab68Smrg FcObjectType 34602c393a42Smrg 3461ca08ab68Smrg Table of Contents 34622c393a42Smrg 3463b09479dcSmrg [128]FcNameRegisterObjectTypes -- Register object types 34642c393a42Smrg 3465b09479dcSmrg [129]FcNameUnregisterObjectTypes -- Unregister object types 3466a6844aabSmrg 3467b09479dcSmrg [130]FcNameGetObjectType -- Lookup an object type 34682c393a42Smrg 3469ca08ab68Smrg Provides for application-specified font name object types so that new 3470ca08ab68Smrg pattern elements can be generated from font names. 3471ca08ab68Smrg 3472ca08ab68Smrg FcNameRegisterObjectTypes 34732c393a42Smrg 34742c393a42SmrgName 34752c393a42Smrg 3476ca08ab68Smrg FcNameRegisterObjectTypes -- Register object types 34772c393a42Smrg 34782c393a42SmrgSynopsis 34792c393a42Smrg 3480c9710b42Smrg #include <fontconfig/fontconfig.h> 34812c393a42Smrg 3482a6844aabSmrg 3483ca08ab68Smrg FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int ntype); 34842c393a42Smrg 34852c393a42SmrgDescription 34862c393a42Smrg 3487c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 34882c393a42Smrg 3489ca08ab68Smrg FcNameUnregisterObjectTypes 34902c393a42Smrg 34912c393a42SmrgName 34922c393a42Smrg 3493ca08ab68Smrg FcNameUnregisterObjectTypes -- Unregister object types 34942c393a42Smrg 34952c393a42SmrgSynopsis 34962c393a42Smrg 3497c9710b42Smrg #include <fontconfig/fontconfig.h> 34982c393a42Smrg 3499a6844aabSmrg 3500ca08ab68Smrg FcBool FcNameUnregisterObjectTypes(const FcObjectType *types, int ntype); 35012c393a42Smrg 35022c393a42SmrgDescription 35032c393a42Smrg 3504c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 35052c393a42Smrg 3506ca08ab68Smrg FcNameGetObjectType 35072c393a42Smrg 35082c393a42SmrgName 35092c393a42Smrg 3510ca08ab68Smrg FcNameGetObjectType -- Lookup an object type 35112c393a42Smrg 35122c393a42SmrgSynopsis 35132c393a42Smrg 3514c9710b42Smrg #include <fontconfig/fontconfig.h> 35152c393a42Smrg 3516a6844aabSmrg 3517ca08ab68Smrg const FcObjectType * FcNameGetObjectType(const char *object); 35182c393a42Smrg 35192c393a42SmrgDescription 35202c393a42Smrg 3521ca08ab68Smrg Return the object type for the pattern element named object. 35222c393a42Smrg 3523ca08ab68Smrg -------------------------------------------------------------------------- 3524a6844aabSmrg 3525ca08ab68Smrg FcConstant 35262c393a42Smrg 3527ca08ab68Smrg Table of Contents 35282c393a42Smrg 3529b09479dcSmrg [131]FcNameRegisterConstants -- Register symbolic constants 35302c393a42Smrg 3531b09479dcSmrg [132]FcNameUnregisterConstants -- Unregister symbolic constants 35322c393a42Smrg 3533b09479dcSmrg [133]FcNameGetConstant -- Lookup symbolic constant 3534ca08ab68Smrg 3535b09479dcSmrg [134]FcNameConstant -- Get the value for a symbolic constant 3536ca08ab68Smrg 3537ca08ab68Smrg Provides for application-specified symbolic constants for font names. 3538ca08ab68Smrg 3539ca08ab68Smrg FcNameRegisterConstants 35402c393a42Smrg 35412c393a42SmrgName 35422c393a42Smrg 3543ca08ab68Smrg FcNameRegisterConstants -- Register symbolic constants 35442c393a42Smrg 35452c393a42SmrgSynopsis 35462c393a42Smrg 3547c9710b42Smrg #include <fontconfig/fontconfig.h> 35482c393a42Smrg 3549a6844aabSmrg 3550ca08ab68Smrg FcBool FcNameRegisterConstants(const FcConstant *consts, int nconsts); 35512c393a42Smrg 35522c393a42SmrgDescription 35532c393a42Smrg 3554c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 35552c393a42Smrg 3556ca08ab68Smrg FcNameUnregisterConstants 35572c393a42Smrg 35582c393a42SmrgName 35592c393a42Smrg 3560ca08ab68Smrg FcNameUnregisterConstants -- Unregister symbolic constants 35612c393a42Smrg 35622c393a42SmrgSynopsis 35632c393a42Smrg 3564c9710b42Smrg #include <fontconfig/fontconfig.h> 35652c393a42Smrg 3566a6844aabSmrg 3567ca08ab68Smrg FcBool FcNameUnregisterConstants(const FcConstant *consts, int nconsts); 35682c393a42Smrg 35692c393a42SmrgDescription 35702c393a42Smrg 3571c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 35722c393a42Smrg 3573ca08ab68Smrg FcNameGetConstant 35742c393a42Smrg 35752c393a42SmrgName 35762c393a42Smrg 3577ca08ab68Smrg FcNameGetConstant -- Lookup symbolic constant 35782c393a42Smrg 35792c393a42SmrgSynopsis 35802c393a42Smrg 3581c9710b42Smrg #include <fontconfig/fontconfig.h> 35822c393a42Smrg 3583a6844aabSmrg 3584ca08ab68Smrg const FcConstant * FcNameGetConstant(FcChar8 *string); 35852c393a42Smrg 35862c393a42SmrgDescription 35872c393a42Smrg 3588ca08ab68Smrg Return the FcConstant structure related to symbolic constant string. 35892c393a42Smrg 3590ca08ab68Smrg FcNameConstant 35912c393a42Smrg 35922c393a42SmrgName 35932c393a42Smrg 3594ca08ab68Smrg FcNameConstant -- Get the value for a symbolic constant 35952c393a42Smrg 35962c393a42SmrgSynopsis 35972c393a42Smrg 3598c9710b42Smrg #include <fontconfig/fontconfig.h> 35992c393a42Smrg 3600a6844aabSmrg 3601ca08ab68Smrg FcBool FcNameConstant(FcChar8 *string, int *result); 36022c393a42Smrg 36032c393a42SmrgDescription 36042c393a42Smrg 3605ca08ab68Smrg Returns whether a symbolic constant with name string is registered, 3606ca08ab68Smrg placing the value of the constant in result if present. 36072c393a42Smrg 3608ca08ab68Smrg -------------------------------------------------------------------------- 3609a6844aabSmrg 3610ca08ab68Smrg FcBlanks 36112c393a42Smrg 3612ca08ab68Smrg Table of Contents 36132c393a42Smrg 3614b09479dcSmrg [135]FcBlanksCreate -- Create an FcBlanks 36152c393a42Smrg 3616b09479dcSmrg [136]FcBlanksDestroy -- Destroy and FcBlanks 36172c393a42Smrg 3618b09479dcSmrg [137]FcBlanksAdd -- Add a character to an FcBlanks 3619ca08ab68Smrg 3620b09479dcSmrg [138]FcBlanksIsMember -- Query membership in an FcBlanks 3621ca08ab68Smrg 3622ca08ab68Smrg An FcBlanks object holds a list of Unicode chars which are expected to be 3623ca08ab68Smrg blank when drawn. When scanning new fonts, any glyphs which are empty and 3624ca08ab68Smrg not in this list will be assumed to be broken and not placed in the 3625ca08ab68Smrg FcCharSet associated with the font. This provides a significantly more 3626ca08ab68Smrg accurate CharSet for applications. 3627ca08ab68Smrg 3628ca08ab68Smrg FcBlanksCreate 36292c393a42Smrg 36302c393a42SmrgName 36312c393a42Smrg 3632ca08ab68Smrg FcBlanksCreate -- Create an FcBlanks 36332c393a42Smrg 36342c393a42SmrgSynopsis 36352c393a42Smrg 3636c9710b42Smrg #include <fontconfig/fontconfig.h> 36372c393a42Smrg 3638a6844aabSmrg 3639ca08ab68Smrg FcBlanks * FcBlanksCreate(void); 36402c393a42Smrg 36412c393a42SmrgDescription 36422c393a42Smrg 3643ca08ab68Smrg Creates an empty FcBlanks object. 36442c393a42Smrg 3645ca08ab68Smrg FcBlanksDestroy 36462c393a42Smrg 36472c393a42SmrgName 36482c393a42Smrg 3649ca08ab68Smrg FcBlanksDestroy -- Destroy and FcBlanks 36502c393a42Smrg 36512c393a42SmrgSynopsis 36522c393a42Smrg 3653c9710b42Smrg #include <fontconfig/fontconfig.h> 36542c393a42Smrg 3655a6844aabSmrg 3656ca08ab68Smrg void FcBlanksDestroy(FcBlanks *b); 36572c393a42Smrg 36582c393a42SmrgDescription 36592c393a42Smrg 3660ca08ab68Smrg Destroys an FcBlanks object, freeing any associated memory. 36612c393a42Smrg 3662ca08ab68Smrg FcBlanksAdd 36632c393a42Smrg 36642c393a42SmrgName 36652c393a42Smrg 3666ca08ab68Smrg FcBlanksAdd -- Add a character to an FcBlanks 36672c393a42Smrg 36682c393a42SmrgSynopsis 36692c393a42Smrg 3670c9710b42Smrg #include <fontconfig/fontconfig.h> 36712c393a42Smrg 3672a6844aabSmrg 3673ca08ab68Smrg FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4); 36742c393a42Smrg 36752c393a42SmrgDescription 36762c393a42Smrg 3677ca08ab68Smrg Adds a single character to an FcBlanks object, returning FcFalse if this 3678ca08ab68Smrg process ran out of memory. 36792c393a42Smrg 3680ca08ab68Smrg FcBlanksIsMember 36812c393a42Smrg 36822c393a42SmrgName 36832c393a42Smrg 3684ca08ab68Smrg FcBlanksIsMember -- Query membership in an FcBlanks 36852c393a42Smrg 36862c393a42SmrgSynopsis 36872c393a42Smrg 3688c9710b42Smrg #include <fontconfig/fontconfig.h> 36892c393a42Smrg 3690a6844aabSmrg 3691ca08ab68Smrg FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4); 36922c393a42Smrg 36932c393a42SmrgDescription 36942c393a42Smrg 3695ca08ab68Smrg Returns whether the specified FcBlanks object contains the indicated 3696ca08ab68Smrg Unicode value. 36972c393a42Smrg 3698ca08ab68Smrg -------------------------------------------------------------------------- 3699ca08ab68Smrg 3700ca08ab68Smrg FcAtomic 3701ca08ab68Smrg 3702ca08ab68Smrg Table of Contents 3703ca08ab68Smrg 3704b09479dcSmrg [139]FcAtomicCreate -- create an FcAtomic object 3705ca08ab68Smrg 3706b09479dcSmrg [140]FcAtomicLock -- lock a file 3707ca08ab68Smrg 3708b09479dcSmrg [141]FcAtomicNewFile -- return new temporary file name 3709a6844aabSmrg 3710b09479dcSmrg [142]FcAtomicOrigFile -- return original file name 37112c393a42Smrg 3712b09479dcSmrg [143]FcAtomicReplaceOrig -- replace original with new 37132c393a42Smrg 3714b09479dcSmrg [144]FcAtomicDeleteNew -- delete new file 37152c393a42Smrg 3716b09479dcSmrg [145]FcAtomicUnlock -- unlock a file 37172c393a42Smrg 3718b09479dcSmrg [146]FcAtomicDestroy -- destroy an FcAtomic object 3719ca08ab68Smrg 3720ca08ab68Smrg These functions provide a safe way to update configuration files, allowing 3721ca08ab68Smrg ongoing reading of the old configuration file while locked for writing and 3722ca08ab68Smrg ensuring that a consistent and complete version of the configuration file 3723ca08ab68Smrg is always available. 3724ca08ab68Smrg 3725ca08ab68Smrg FcAtomicCreate 37262c393a42Smrg 37272c393a42SmrgName 37282c393a42Smrg 3729ca08ab68Smrg FcAtomicCreate -- create an FcAtomic object 37302c393a42Smrg 37312c393a42SmrgSynopsis 37322c393a42Smrg 3733c9710b42Smrg #include <fontconfig/fontconfig.h> 37342c393a42Smrg 3735a6844aabSmrg 3736ca08ab68Smrg FcAtomic * FcAtomicCreate(const FcChar8 *file); 37372c393a42Smrg 37382c393a42SmrgDescription 37392c393a42Smrg 3740ca08ab68Smrg Creates a data structure containing data needed to control access to file. 3741ca08ab68Smrg Writing is done to a separate file. Once that file is complete, the 3742ca08ab68Smrg original configuration file is atomically replaced so that reading process 3743ca08ab68Smrg always see a consistent and complete file without the need to lock for 3744ca08ab68Smrg reading. 37452c393a42Smrg 3746ca08ab68Smrg FcAtomicLock 37472c393a42Smrg 37482c393a42SmrgName 37492c393a42Smrg 3750ca08ab68Smrg FcAtomicLock -- lock a file 37512c393a42Smrg 37522c393a42SmrgSynopsis 37532c393a42Smrg 3754c9710b42Smrg #include <fontconfig/fontconfig.h> 37552c393a42Smrg 3756a6844aabSmrg 3757ca08ab68Smrg FcBool FcAtomicLock(FcAtomic *atomic); 37582c393a42Smrg 37592c393a42SmrgDescription 37602c393a42Smrg 3761ca08ab68Smrg Attempts to lock the file referenced by atomic. Returns FcFalse if the 3762ca08ab68Smrg file is already locked, else returns FcTrue and leaves the file locked. 37632c393a42Smrg 3764ca08ab68Smrg FcAtomicNewFile 37652c393a42Smrg 37662c393a42SmrgName 37672c393a42Smrg 3768ca08ab68Smrg FcAtomicNewFile -- return new temporary file name 37692c393a42Smrg 37702c393a42SmrgSynopsis 37712c393a42Smrg 3772c9710b42Smrg #include <fontconfig/fontconfig.h> 37732c393a42Smrg 3774a6844aabSmrg 3775ca08ab68Smrg FcChar8 * FcAtomicNewFile(FcAtomic *atomic); 37762c393a42Smrg 37772c393a42SmrgDescription 37782c393a42Smrg 3779ca08ab68Smrg Returns the filename for writing a new version of the file referenced by 3780ca08ab68Smrg atomic. 37812c393a42Smrg 3782ca08ab68Smrg FcAtomicOrigFile 37832c393a42Smrg 37842c393a42SmrgName 37852c393a42Smrg 3786ca08ab68Smrg FcAtomicOrigFile -- return original file name 37872c393a42Smrg 37882c393a42SmrgSynopsis 37892c393a42Smrg 3790c9710b42Smrg #include <fontconfig/fontconfig.h> 37912c393a42Smrg 3792a6844aabSmrg 3793ca08ab68Smrg FcChar8 * FcAtomicOrigFile(FcAtomic *atomic); 37942c393a42Smrg 37952c393a42SmrgDescription 37962c393a42Smrg 3797ca08ab68Smrg Returns the file referenced by atomic. 37982c393a42Smrg 3799ca08ab68Smrg FcAtomicReplaceOrig 38002c393a42Smrg 38012c393a42SmrgName 38022c393a42Smrg 3803ca08ab68Smrg FcAtomicReplaceOrig -- replace original with new 38042c393a42Smrg 38052c393a42SmrgSynopsis 38062c393a42Smrg 3807c9710b42Smrg #include <fontconfig/fontconfig.h> 38082c393a42Smrg 3809a6844aabSmrg 3810ca08ab68Smrg FcBool FcAtomicReplaceOrig(FcAtomic *atomic); 38112c393a42Smrg 38122c393a42SmrgDescription 38132c393a42Smrg 3814ca08ab68Smrg Replaces the original file referenced by atomic with the new file. Returns 3815ca08ab68Smrg FcFalse if the file cannot be replaced due to permission issues in the 3816ca08ab68Smrg filesystem. Otherwise returns FcTrue. 38172c393a42Smrg 3818ca08ab68Smrg FcAtomicDeleteNew 38192c393a42Smrg 38202c393a42SmrgName 38212c393a42Smrg 3822ca08ab68Smrg FcAtomicDeleteNew -- delete new file 38232c393a42Smrg 38242c393a42SmrgSynopsis 38252c393a42Smrg 3826c9710b42Smrg #include <fontconfig/fontconfig.h> 38272c393a42Smrg 3828a6844aabSmrg 3829ca08ab68Smrg void FcAtomicDeleteNew(FcAtomic *atomic); 38302c393a42Smrg 38312c393a42SmrgDescription 38322c393a42Smrg 3833ca08ab68Smrg Deletes the new file. Used in error recovery to back out changes. 38342c393a42Smrg 3835ca08ab68Smrg FcAtomicUnlock 38362c393a42Smrg 38372c393a42SmrgName 38382c393a42Smrg 3839ca08ab68Smrg FcAtomicUnlock -- unlock a file 38402c393a42Smrg 38412c393a42SmrgSynopsis 38422c393a42Smrg 3843c9710b42Smrg #include <fontconfig/fontconfig.h> 38442c393a42Smrg 3845a6844aabSmrg 3846ca08ab68Smrg void FcAtomicUnlock(FcAtomic *atomic); 38472c393a42Smrg 38482c393a42SmrgDescription 38492c393a42Smrg 3850ca08ab68Smrg Unlocks the file. 38512c393a42Smrg 3852ca08ab68Smrg FcAtomicDestroy 38532c393a42Smrg 38542c393a42SmrgName 38552c393a42Smrg 3856ca08ab68Smrg FcAtomicDestroy -- destroy an FcAtomic object 38572c393a42Smrg 38582c393a42SmrgSynopsis 38592c393a42Smrg 3860c9710b42Smrg #include <fontconfig/fontconfig.h> 38612c393a42Smrg 3862a6844aabSmrg 3863ca08ab68Smrg void FcAtomicDestroy(FcAtomic *atomic); 38642c393a42Smrg 38652c393a42SmrgDescription 38662c393a42Smrg 3867ca08ab68Smrg Destroys atomic. 38682c393a42Smrg 3869ca08ab68Smrg -------------------------------------------------------------------------- 3870ca08ab68Smrg 3871ca08ab68Smrg File and Directory routines 3872ca08ab68Smrg 3873ca08ab68Smrg Table of Contents 3874ca08ab68Smrg 3875b09479dcSmrg [147]FcFileScan -- scan a font file 3876b09479dcSmrg 3877b09479dcSmrg [148]FcFileIsDir -- check whether a file is a directory 3878ca08ab68Smrg 3879b09479dcSmrg [149]FcDirScan -- scan a font directory without caching it 3880ca08ab68Smrg 3881b09479dcSmrg [150]FcDirSave -- DEPRECATED: formerly used to save a directory cache 3882ca08ab68Smrg 3883b09479dcSmrg [151]FcDirCacheUnlink -- Remove all caches related to dir 38842c393a42Smrg 3885b09479dcSmrg [152]FcDirCacheValid -- check directory cache 38862c393a42Smrg 3887b09479dcSmrg [153]FcDirCacheLoad -- load a directory cache 38882c393a42Smrg 3889b09479dcSmrg [154]FcDirCacheRescan -- Re-scan a directory cache 38902c393a42Smrg 3891b09479dcSmrg [155]FcDirCacheRead -- read or construct a directory cache 38922c393a42Smrg 3893b09479dcSmrg [156]FcDirCacheLoadFile -- load a cache file 3894ca08ab68Smrg 3895b09479dcSmrg [157]FcDirCacheUnload -- unload a cache file 3896ca08ab68Smrg 3897ca08ab68Smrg These routines work with font files and directories, including font 3898ca08ab68Smrg directory cache files. 3899ca08ab68Smrg 3900ca08ab68Smrg FcFileScan 39012c393a42Smrg 39022c393a42SmrgName 39032c393a42Smrg 3904ca08ab68Smrg FcFileScan -- scan a font file 39052c393a42Smrg 39062c393a42SmrgSynopsis 39072c393a42Smrg 3908c9710b42Smrg #include <fontconfig/fontconfig.h> 39092c393a42Smrg 3910a6844aabSmrg 3911ca08ab68Smrg FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 3912ca08ab68Smrg FcBlanks *blanks, const FcChar8 *file, FcBool force); 39132c393a42Smrg 39142c393a42SmrgDescription 39152c393a42Smrg 3916ca08ab68Smrg Scans a single file and adds all fonts found to set. If force is FcTrue, 3917ca08ab68Smrg then the file is scanned even if associated information is found in cache. 3918ca08ab68Smrg If file is a directory, it is added to dirs. Whether fonts are found 3919ca08ab68Smrg depends on fontconfig policy as well as the current configuration. 3920ca08ab68Smrg Internally, fontconfig will ignore BDF and PCF fonts which are not in 3921ca08ab68Smrg Unicode (or the effectively equivalent ISO Latin-1) encoding as those are 3922ca08ab68Smrg not usable by Unicode-based applications. The configuration can ignore 3923ca08ab68Smrg fonts based on filename or contents of the font file itself. Returns 3924ca08ab68Smrg FcFalse if any of the fonts cannot be added (due to allocation failure). 3925ca08ab68Smrg Otherwise returns FcTrue. 39262c393a42Smrg 3927ca08ab68Smrg FcFileIsDir 39282c393a42Smrg 39292c393a42SmrgName 39302c393a42Smrg 3931ca08ab68Smrg FcFileIsDir -- check whether a file is a directory 39322c393a42Smrg 39332c393a42SmrgSynopsis 39342c393a42Smrg 3935c9710b42Smrg #include <fontconfig/fontconfig.h> 39362c393a42Smrg 3937a6844aabSmrg 3938ca08ab68Smrg FcBool FcFileIsDir(const FcChar8 *file); 39392c393a42Smrg 39402c393a42SmrgDescription 39412c393a42Smrg 3942ca08ab68Smrg Returns FcTrue if file is a directory, otherwise returns FcFalse. 39432c393a42Smrg 3944ca08ab68Smrg FcDirScan 39452c393a42Smrg 39462c393a42SmrgName 39472c393a42Smrg 3948ca08ab68Smrg FcDirScan -- scan a font directory without caching it 39492c393a42Smrg 39502c393a42SmrgSynopsis 39512c393a42Smrg 3952c9710b42Smrg #include <fontconfig/fontconfig.h> 39532c393a42Smrg 3954a6844aabSmrg 3955ca08ab68Smrg FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 3956ca08ab68Smrg FcBlanks *blanks, const FcChar8 *dir, FcBool force); 39572c393a42Smrg 39582c393a42SmrgDescription 39592c393a42Smrg 3960ca08ab68Smrg If cache is not zero or if force is FcFalse, this function currently 3961ca08ab68Smrg returns FcFalse. Otherwise, it scans an entire directory and adds all 3962ca08ab68Smrg fonts found to set. Any subdirectories found are added to dirs. Calling 3963ca08ab68Smrg this function does not create any cache files. Use FcDirCacheRead() if 3964ca08ab68Smrg caching is desired. 39652c393a42Smrg 3966ca08ab68Smrg FcDirSave 39672c393a42Smrg 39682c393a42SmrgName 39692c393a42Smrg 3970ca08ab68Smrg FcDirSave -- DEPRECATED: formerly used to save a directory cache 39712c393a42Smrg 39722c393a42SmrgSynopsis 39732c393a42Smrg 3974c9710b42Smrg #include <fontconfig/fontconfig.h> 39752c393a42Smrg 3976a6844aabSmrg 3977ca08ab68Smrg FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); 39782c393a42Smrg 39792c393a42SmrgDescription 39802c393a42Smrg 3981ca08ab68Smrg This function now does nothing aside from returning FcFalse. It used to 3982ca08ab68Smrg creates the per-directory cache file for dir and populates it with the 3983ca08ab68Smrg fonts in set and subdirectories in dirs. All of this functionality is now 3984ca08ab68Smrg automatically managed by FcDirCacheLoad and FcDirCacheRead. 39852c393a42Smrg 3986ca08ab68Smrg FcDirCacheUnlink 39872c393a42Smrg 39882c393a42SmrgName 39892c393a42Smrg 3990ca08ab68Smrg FcDirCacheUnlink -- Remove all caches related to dir 39912c393a42Smrg 39922c393a42SmrgSynopsis 39932c393a42Smrg 3994c9710b42Smrg #include <fontconfig/fontconfig.h> 39952c393a42Smrg 3996a6844aabSmrg 3997ca08ab68Smrg FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config); 39982c393a42Smrg 39992c393a42SmrgDescription 40002c393a42Smrg 4001ca08ab68Smrg Scans the cache directories in config, removing any instances of the cache 4002ca08ab68Smrg file for dir. Returns FcFalse when some internal error occurs (out of 4003ca08ab68Smrg memory, etc). Errors actually unlinking any files are ignored. 40042c393a42Smrg 4005ca08ab68Smrg FcDirCacheValid 40062c393a42Smrg 40072c393a42SmrgName 40082c393a42Smrg 4009ca08ab68Smrg FcDirCacheValid -- check directory cache 40102c393a42Smrg 40112c393a42SmrgSynopsis 40122c393a42Smrg 4013c9710b42Smrg #include <fontconfig/fontconfig.h> 40142c393a42Smrg 4015a6844aabSmrg 4016ca08ab68Smrg FcBool FcDirCacheValid(const FcChar8 *dir); 40172c393a42Smrg 40182c393a42SmrgDescription 40192c393a42Smrg 4020ca08ab68Smrg Returns FcTrue if dir has an associated valid cache file, else returns 4021ca08ab68Smrg FcFalse 40222c393a42Smrg 4023ca08ab68Smrg FcDirCacheLoad 40242c393a42Smrg 40252c393a42SmrgName 40262c393a42Smrg 4027ca08ab68Smrg FcDirCacheLoad -- load a directory cache 40282c393a42Smrg 40292c393a42SmrgSynopsis 40302c393a42Smrg 4031c9710b42Smrg #include <fontconfig/fontconfig.h> 40322c393a42Smrg 4033a6844aabSmrg 4034ca08ab68Smrg FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, FcChar8 4035ca08ab68Smrg **cache_file); 40362c393a42Smrg 40372c393a42SmrgDescription 40382c393a42Smrg 4039ca08ab68Smrg Loads the cache related to dir. If no cache file exists, returns NULL. The 4040ca08ab68Smrg name of the cache file is returned in cache_file, unless that is NULL. See 4041ca08ab68Smrg also FcDirCacheRead. 40422c393a42Smrg 4043b09479dcSmrg FcDirCacheRescan 4044b09479dcSmrg 4045b09479dcSmrgName 4046b09479dcSmrg 4047b09479dcSmrg FcDirCacheRescan -- Re-scan a directory cache 4048b09479dcSmrg 4049b09479dcSmrgSynopsis 4050b09479dcSmrg 4051b09479dcSmrg #include <fontconfig/fontconfig.h> 4052b09479dcSmrg 4053b09479dcSmrg 4054b09479dcSmrg FcCache * FcDirCacheRescan(const FcChar8 *dir, FcConfig *config); 4055b09479dcSmrg 4056b09479dcSmrgDescription 4057b09479dcSmrg 4058b09479dcSmrg Re-scan directories only at dir and update the cache. returns NULL if 4059b09479dcSmrg failed. 4060b09479dcSmrg 4061b09479dcSmrgSince 40622c393a42Smrg 4063b09479dcSmrg version 2.11.1 40642c393a42Smrg 4065ca08ab68Smrg FcDirCacheRead 40662c393a42Smrg 40672c393a42SmrgName 40682c393a42Smrg 4069ca08ab68Smrg FcDirCacheRead -- read or construct a directory cache 40702c393a42Smrg 40712c393a42SmrgSynopsis 40722c393a42Smrg 4073c9710b42Smrg #include <fontconfig/fontconfig.h> 40742c393a42Smrg 4075a6844aabSmrg 4076ca08ab68Smrg FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force, FcConfig 4077ca08ab68Smrg *config); 40782c393a42Smrg 40792c393a42SmrgDescription 40802c393a42Smrg 4081ca08ab68Smrg This returns a cache for dir. If force is FcFalse, then an existing, valid 4082ca08ab68Smrg cache file will be used. Otherwise, a new cache will be created by 4083ca08ab68Smrg scanning the directory and that returned. 40842c393a42Smrg 4085ca08ab68Smrg FcDirCacheLoadFile 40862c393a42Smrg 40872c393a42SmrgName 40882c393a42Smrg 4089ca08ab68Smrg FcDirCacheLoadFile -- load a cache file 40902c393a42Smrg 40912c393a42SmrgSynopsis 40922c393a42Smrg 4093c9710b42Smrg #include <fontconfig/fontconfig.h> 40942c393a42Smrg 4095a6844aabSmrg 4096ca08ab68Smrg FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct stat 4097ca08ab68Smrg *file_stat); 40982c393a42Smrg 40992c393a42SmrgDescription 41002c393a42Smrg 4101ca08ab68Smrg This function loads a directory cache from cache_file. If file_stat is 4102ca08ab68Smrg non-NULL, it will be filled with the results of stat(2) on the cache file. 41032c393a42Smrg 4104ca08ab68Smrg FcDirCacheUnload 41052c393a42Smrg 41062c393a42SmrgName 41072c393a42Smrg 4108ca08ab68Smrg FcDirCacheUnload -- unload a cache file 41092c393a42Smrg 41102c393a42SmrgSynopsis 41112c393a42Smrg 4112c9710b42Smrg #include <fontconfig/fontconfig.h> 41132c393a42Smrg 4114a6844aabSmrg 4115ca08ab68Smrg void FcDirCacheUnload(FcCache *cache); 41162c393a42Smrg 41172c393a42SmrgDescription 41182c393a42Smrg 4119ca08ab68Smrg This function dereferences cache. When no other references to it remain, 4120ca08ab68Smrg all memory associated with the cache will be freed. 41212c393a42Smrg 4122ca08ab68Smrg -------------------------------------------------------------------------- 4123ca08ab68Smrg 4124ca08ab68Smrg FcCache routines 4125ca08ab68Smrg 4126ca08ab68Smrg Table of Contents 4127ca08ab68Smrg 4128b09479dcSmrg [158]FcCacheDir -- Return directory of cache 4129ca08ab68Smrg 4130b09479dcSmrg [159]FcCacheCopySet -- Returns a copy of the fontset from cache 4131ca08ab68Smrg 4132b09479dcSmrg [160]FcCacheSubdir -- Return the i'th subdirectory. 41332c393a42Smrg 4134b09479dcSmrg [161]FcCacheNumSubdir -- Return the number of subdirectories in cache. 41352c393a42Smrg 4136b09479dcSmrg [162]FcCacheNumFont -- Returns the number of fonts in cache. 41372c393a42Smrg 4138b09479dcSmrg [163]FcDirCacheClean -- This tries to clean up the cache directory of 4139ca08ab68Smrg cache_dir. This returns FcTrue if the operation is successfully complete. 4140ca08ab68Smrg otherwise FcFalse. 41412c393a42Smrg 4142b09479dcSmrg [164]FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 41432c393a42Smrg 4144ca08ab68Smrg These routines work with font directory caches, accessing their contents 4145ca08ab68Smrg in limited ways. It is not expected that normal applications will need to 4146ca08ab68Smrg use these functions. 4147ca08ab68Smrg 4148ca08ab68Smrg FcCacheDir 41492c393a42Smrg 41502c393a42SmrgName 41512c393a42Smrg 4152ca08ab68Smrg FcCacheDir -- Return directory of cache 41532c393a42Smrg 41542c393a42SmrgSynopsis 41552c393a42Smrg 4156c9710b42Smrg #include <fontconfig/fontconfig.h> 41572c393a42Smrg 4158a6844aabSmrg 4159ca08ab68Smrg const FcChar8 * FcCacheDir(const FcCache *cache); 41602c393a42Smrg 41612c393a42SmrgDescription 41622c393a42Smrg 4163ca08ab68Smrg This function returns the directory from which the cache was constructed. 41642c393a42Smrg 4165ca08ab68Smrg FcCacheCopySet 41662c393a42Smrg 41672c393a42SmrgName 41682c393a42Smrg 4169ca08ab68Smrg FcCacheCopySet -- Returns a copy of the fontset from cache 41702c393a42Smrg 41712c393a42SmrgSynopsis 41722c393a42Smrg 4173c9710b42Smrg #include <fontconfig/fontconfig.h> 41742c393a42Smrg 4175a6844aabSmrg 4176ca08ab68Smrg FcFontSet * FcCacheCopySet(const FcCache *cache); 41772c393a42Smrg 41782c393a42SmrgDescription 41792c393a42Smrg 4180ca08ab68Smrg The returned fontset contains each of the font patterns from cache. This 4181ca08ab68Smrg fontset may be modified, but the patterns from the cache are read-only. 41822c393a42Smrg 4183ca08ab68Smrg FcCacheSubdir 41842c393a42Smrg 41852c393a42SmrgName 41862c393a42Smrg 4187ca08ab68Smrg FcCacheSubdir -- Return the i'th subdirectory. 41882c393a42Smrg 41892c393a42SmrgSynopsis 41902c393a42Smrg 4191c9710b42Smrg #include <fontconfig/fontconfig.h> 41922c393a42Smrg 4193a6844aabSmrg 4194ca08ab68Smrg const FcChar8 * FcCacheSubdir(const FcCache *cache, inti); 41952c393a42Smrg 41962c393a42SmrgDescription 41972c393a42Smrg 4198ca08ab68Smrg The set of subdirectories stored in a cache file are indexed by this 4199ca08ab68Smrg function, i should range from 0 to n-1, where n is the return value from 4200ca08ab68Smrg FcCacheNumSubdir. 42012c393a42Smrg 4202ca08ab68Smrg FcCacheNumSubdir 42032c393a42Smrg 42042c393a42SmrgName 42052c393a42Smrg 4206ca08ab68Smrg FcCacheNumSubdir -- Return the number of subdirectories in cache. 42072c393a42Smrg 42082c393a42SmrgSynopsis 42092c393a42Smrg 4210c9710b42Smrg #include <fontconfig/fontconfig.h> 42112c393a42Smrg 4212a6844aabSmrg 4213ca08ab68Smrg int FcCacheNumSubdir(const FcCache *cache); 42142c393a42Smrg 42152c393a42SmrgDescription 42162c393a42Smrg 4217ca08ab68Smrg This returns the total number of subdirectories in the cache. 42182c393a42Smrg 4219ca08ab68Smrg FcCacheNumFont 42202c393a42Smrg 42212c393a42SmrgName 42222c393a42Smrg 4223ca08ab68Smrg FcCacheNumFont -- Returns the number of fonts in cache. 42242c393a42Smrg 42252c393a42SmrgSynopsis 42262c393a42Smrg 4227c9710b42Smrg #include <fontconfig/fontconfig.h> 42282c393a42Smrg 4229a6844aabSmrg 4230ca08ab68Smrg int FcCacheNumFont(const FcCache *cache); 42312c393a42Smrg 42322c393a42SmrgDescription 42332c393a42Smrg 4234ca08ab68Smrg This returns the number of fonts which would be included in the return 4235ca08ab68Smrg from FcCacheCopySet. 42362c393a42Smrg 4237ca08ab68Smrg FcDirCacheClean 4238ca08ab68Smrg 4239ca08ab68SmrgName 4240ca08ab68Smrg 4241ca08ab68Smrg FcDirCacheClean -- This tries to clean up the cache directory of 4242ca08ab68Smrg cache_dir. This returns FcTrue if the operation is successfully complete. 4243ca08ab68Smrg otherwise FcFalse. 4244ca08ab68Smrg 4245ca08ab68SmrgSynopsis 4246ca08ab68Smrg 4247c9710b42Smrg #include <fontconfig/fontconfig.h> 4248ca08ab68Smrg 4249a6844aabSmrg 4250ca08ab68Smrg FcBool FcDirCacheClean(const FcChar8 *cache_dir, FcBoolverbose); 4251ca08ab68Smrg 4252ca08ab68SmrgDescription 42532c393a42Smrg 42542c393a42Smrg 42552c393a42Smrg 4256b09479dcSmrgSince 42572c393a42Smrg 4258b09479dcSmrg version 2.9.91 4259ca08ab68Smrg 4260ca08ab68Smrg FcCacheCreateTagFile 42612c393a42Smrg 42622c393a42SmrgName 42632c393a42Smrg 4264ca08ab68Smrg FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 42652c393a42Smrg 42662c393a42SmrgSynopsis 42672c393a42Smrg 4268c9710b42Smrg #include <fontconfig/fontconfig.h> 42692c393a42Smrg 4270a6844aabSmrg 4271ca08ab68Smrg void FcCacheCreateTagFile(const FcConfig *config); 42722c393a42Smrg 42732c393a42SmrgDescription 42742c393a42Smrg 4275ca08ab68Smrg This tries to create CACHEDIR.TAG file at the cache directory registered 4276ca08ab68Smrg to config. 42772c393a42Smrg 4278b09479dcSmrgSince 42792c393a42Smrg 4280b09479dcSmrg version 2.9.91 4281ca08ab68Smrg 4282ca08ab68Smrg -------------------------------------------------------------------------- 4283ca08ab68Smrg 4284ca08ab68Smrg FcStrSet and FcStrList 4285ca08ab68Smrg 4286ca08ab68Smrg Table of Contents 4287ca08ab68Smrg 4288b09479dcSmrg [165]FcStrSetCreate -- create a string set 4289ca08ab68Smrg 4290b09479dcSmrg [166]FcStrSetMember -- check set for membership 4291ca08ab68Smrg 4292b09479dcSmrg [167]FcStrSetEqual -- check sets for equality 4293ca08ab68Smrg 4294b09479dcSmrg [168]FcStrSetAdd -- add to a string set 4295ca08ab68Smrg 4296b09479dcSmrg [169]FcStrSetAddFilename -- add a filename to a string set 4297ca08ab68Smrg 4298b09479dcSmrg [170]FcStrSetDel -- delete from a string set 4299ca08ab68Smrg 4300b09479dcSmrg [171]FcStrSetDestroy -- destroy a string set 4301ca08ab68Smrg 4302b09479dcSmrg [172]FcStrListCreate -- create a string iterator 4303ca08ab68Smrg 4304b09479dcSmrg [173]FcStrListFirst -- get first string in iteration 43056fc018e4Smrg 4306b09479dcSmrg [174]FcStrListNext -- get next string in iteration 4307ca08ab68Smrg 4308b09479dcSmrg [175]FcStrListDone -- destroy a string iterator 4309ca08ab68Smrg 4310ca08ab68Smrg A data structure for enumerating strings, used to list directories while 4311ca08ab68Smrg scanning the configuration as directories are added while scanning. 43122c393a42Smrg 4313ca08ab68Smrg FcStrSetCreate 43142c393a42Smrg 43152c393a42SmrgName 43162c393a42Smrg 4317ca08ab68Smrg FcStrSetCreate -- create a string set 43182c393a42Smrg 43192c393a42SmrgSynopsis 43202c393a42Smrg 4321c9710b42Smrg #include <fontconfig/fontconfig.h> 43222c393a42Smrg 4323a6844aabSmrg 4324ca08ab68Smrg FcStrSet * FcStrSetCreate(void); 43252c393a42Smrg 43262c393a42SmrgDescription 43272c393a42Smrg 4328ca08ab68Smrg Create an empty set. 43292c393a42Smrg 4330ca08ab68Smrg FcStrSetMember 43312c393a42Smrg 43322c393a42SmrgName 43332c393a42Smrg 4334ca08ab68Smrg FcStrSetMember -- check set for membership 43352c393a42Smrg 43362c393a42SmrgSynopsis 43372c393a42Smrg 4338c9710b42Smrg #include <fontconfig/fontconfig.h> 43392c393a42Smrg 4340a6844aabSmrg 4341ca08ab68Smrg FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s); 43422c393a42Smrg 43432c393a42SmrgDescription 43442c393a42Smrg 4345ca08ab68Smrg Returns whether s is a member of set. 43462c393a42Smrg 4347ca08ab68Smrg FcStrSetEqual 43482c393a42Smrg 43492c393a42SmrgName 43502c393a42Smrg 4351ca08ab68Smrg FcStrSetEqual -- check sets for equality 43522c393a42Smrg 43532c393a42SmrgSynopsis 43542c393a42Smrg 4355c9710b42Smrg #include <fontconfig/fontconfig.h> 43562c393a42Smrg 4357a6844aabSmrg 4358ca08ab68Smrg FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b); 43592c393a42Smrg 43602c393a42SmrgDescription 43612c393a42Smrg 4362ca08ab68Smrg Returns whether set_a contains precisely the same strings as set_b. 4363ca08ab68Smrg Ordering of strings within the two sets is not considered. 43642c393a42Smrg 4365ca08ab68Smrg FcStrSetAdd 43662c393a42Smrg 43672c393a42SmrgName 43682c393a42Smrg 4369ca08ab68Smrg FcStrSetAdd -- add to a string set 43702c393a42Smrg 43712c393a42SmrgSynopsis 43722c393a42Smrg 4373c9710b42Smrg #include <fontconfig/fontconfig.h> 43742c393a42Smrg 4375a6844aabSmrg 4376ca08ab68Smrg FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s); 43772c393a42Smrg 43782c393a42SmrgDescription 43792c393a42Smrg 4380ca08ab68Smrg Adds a copy of s to set. 43812c393a42Smrg 4382ca08ab68Smrg FcStrSetAddFilename 43832c393a42Smrg 43842c393a42SmrgName 43852c393a42Smrg 4386ca08ab68Smrg FcStrSetAddFilename -- add a filename to a string set 43872c393a42Smrg 43882c393a42SmrgSynopsis 43892c393a42Smrg 4390c9710b42Smrg #include <fontconfig/fontconfig.h> 43912c393a42Smrg 4392a6844aabSmrg 4393ca08ab68Smrg FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s); 43942c393a42Smrg 43952c393a42SmrgDescription 43962c393a42Smrg 4397ca08ab68Smrg Adds a copy s to set, The copy is created with FcStrCopyFilename so that 4398ca08ab68Smrg leading '~' values are replaced with the value of the HOME environment 4399ca08ab68Smrg variable. 44002c393a42Smrg 4401ca08ab68Smrg FcStrSetDel 44022c393a42Smrg 44032c393a42SmrgName 44042c393a42Smrg 4405ca08ab68Smrg FcStrSetDel -- delete from a string set 44062c393a42Smrg 44072c393a42SmrgSynopsis 44082c393a42Smrg 4409c9710b42Smrg #include <fontconfig/fontconfig.h> 44102c393a42Smrg 4411a6844aabSmrg 4412ca08ab68Smrg FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s); 44132c393a42Smrg 44142c393a42SmrgDescription 44152c393a42Smrg 4416ca08ab68Smrg Removes s from set, returning FcTrue if s was a member else FcFalse. 44172c393a42Smrg 4418ca08ab68Smrg FcStrSetDestroy 44192c393a42Smrg 44202c393a42SmrgName 44212c393a42Smrg 4422ca08ab68Smrg FcStrSetDestroy -- destroy a string set 44232c393a42Smrg 44242c393a42SmrgSynopsis 44252c393a42Smrg 4426c9710b42Smrg #include <fontconfig/fontconfig.h> 44272c393a42Smrg 4428a6844aabSmrg 4429ca08ab68Smrg void FcStrSetDestroy(FcStrSet *set); 44302c393a42Smrg 44312c393a42SmrgDescription 44322c393a42Smrg 4433ca08ab68Smrg Destroys set. 44342c393a42Smrg 4435ca08ab68Smrg FcStrListCreate 44362c393a42Smrg 44372c393a42SmrgName 44382c393a42Smrg 4439ca08ab68Smrg FcStrListCreate -- create a string iterator 44402c393a42Smrg 44412c393a42SmrgSynopsis 44422c393a42Smrg 4443c9710b42Smrg #include <fontconfig/fontconfig.h> 44442c393a42Smrg 4445a6844aabSmrg 4446ca08ab68Smrg FcStrList * FcStrListCreate(FcStrSet *set); 44472c393a42Smrg 44482c393a42SmrgDescription 44492c393a42Smrg 4450ca08ab68Smrg Creates an iterator to list the strings in set. 44512c393a42Smrg 44526fc018e4Smrg FcStrListFirst 44536fc018e4Smrg 44546fc018e4SmrgName 44556fc018e4Smrg 44566fc018e4Smrg FcStrListFirst -- get first string in iteration 44576fc018e4Smrg 44586fc018e4SmrgSynopsis 44596fc018e4Smrg 44606fc018e4Smrg #include <fontconfig/fontconfig.h> 44616fc018e4Smrg 44626fc018e4Smrg 44636fc018e4Smrg void FcStrListFirst(FcStrList *list); 44646fc018e4Smrg 44656fc018e4SmrgDescription 44666fc018e4Smrg 44676fc018e4Smrg Returns the first string in list. 44686fc018e4Smrg 4469b09479dcSmrgSince 44706fc018e4Smrg 4471b09479dcSmrg version 2.11.0 44722c393a42Smrg 4473ca08ab68Smrg FcStrListNext 44742c393a42Smrg 44752c393a42SmrgName 44762c393a42Smrg 4477ca08ab68Smrg FcStrListNext -- get next string in iteration 44782c393a42Smrg 44792c393a42SmrgSynopsis 44802c393a42Smrg 4481c9710b42Smrg #include <fontconfig/fontconfig.h> 44822c393a42Smrg 4483a6844aabSmrg 4484ca08ab68Smrg FcChar8 * FcStrListNext(FcStrList *list); 44852c393a42Smrg 44862c393a42SmrgDescription 44872c393a42Smrg 44886fc018e4Smrg Returns the next string in list. 44892c393a42Smrg 4490ca08ab68Smrg FcStrListDone 44912c393a42Smrg 4492ca08ab68SmrgName 4493ca08ab68Smrg 4494ca08ab68Smrg FcStrListDone -- destroy a string iterator 4495ca08ab68Smrg 4496ca08ab68SmrgSynopsis 4497ca08ab68Smrg 4498c9710b42Smrg #include <fontconfig/fontconfig.h> 4499ca08ab68Smrg 4500ca08ab68Smrg 4501ca08ab68Smrg void FcStrListDone(FcStrList *list); 4502ca08ab68Smrg 4503ca08ab68SmrgDescription 4504ca08ab68Smrg 4505ca08ab68Smrg Destroys the enumerator list. 4506ca08ab68Smrg 4507ca08ab68Smrg -------------------------------------------------------------------------- 4508ca08ab68Smrg 4509ca08ab68Smrg String utilities 4510ca08ab68Smrg 4511ca08ab68Smrg Table of Contents 4512ca08ab68Smrg 4513b09479dcSmrg [176]FcUtf8ToUcs4 -- convert UTF-8 to UCS4 4514ca08ab68Smrg 4515b09479dcSmrg [177]FcUcs4ToUtf8 -- convert UCS4 to UTF-8 45162c393a42Smrg 4517b09479dcSmrg [178]FcUtf8Len -- count UTF-8 encoded chars 45182c393a42Smrg 4519b09479dcSmrg [179]FcUtf16ToUcs4 -- convert UTF-16 to UCS4 45202c393a42Smrg 4521b09479dcSmrg [180]FcUtf16Len -- count UTF-16 encoded chars 4522ca08ab68Smrg 4523b09479dcSmrg [181]FcIsLower -- check for lower case ASCII character 4524ca08ab68Smrg 4525b09479dcSmrg [182]FcIsUpper -- check for upper case ASCII character 4526ca08ab68Smrg 4527b09479dcSmrg [183]FcToLower -- convert upper case ASCII to lower case 4528ca08ab68Smrg 4529b09479dcSmrg [184]FcStrCopy -- duplicate a string 4530ca08ab68Smrg 4531b09479dcSmrg [185]FcStrDowncase -- create a lower case translation of a string 4532ca08ab68Smrg 4533b09479dcSmrg [186]FcStrCopyFilename -- create a complete path from a filename 4534ca08ab68Smrg 4535b09479dcSmrg [187]FcStrCmp -- compare UTF-8 strings 4536ca08ab68Smrg 4537b09479dcSmrg [188]FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 4538ca08ab68Smrg 4539b09479dcSmrg [189]FcStrStr -- locate UTF-8 substring 4540ca08ab68Smrg 4541b09479dcSmrg [190]FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 4542ca08ab68Smrg 4543b09479dcSmrg [191]FcStrPlus -- concatenate two strings 4544ca08ab68Smrg 4545b09479dcSmrg [192]FcStrFree -- free a string 4546ca08ab68Smrg 4547b09479dcSmrg [193]FcStrDirname -- directory part of filename 4548ca08ab68Smrg 4549b09479dcSmrg [194]FcStrBasename -- last component of filename 4550ca08ab68Smrg 4551ca08ab68Smrg Fontconfig manipulates many UTF-8 strings represented with the FcChar8 4552ca08ab68Smrg type. These functions are exposed to help applications deal with these 4553ca08ab68Smrg UTF-8 strings in a locale-insensitive manner. 4554ca08ab68Smrg 4555ca08ab68Smrg FcUtf8ToUcs4 45562c393a42Smrg 45572c393a42SmrgName 45582c393a42Smrg 4559ca08ab68Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 45602c393a42Smrg 45612c393a42SmrgSynopsis 45622c393a42Smrg 4563c9710b42Smrg #include <fontconfig/fontconfig.h> 45642c393a42Smrg 4565a6844aabSmrg 4566ca08ab68Smrg int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len); 45672c393a42Smrg 45682c393a42SmrgDescription 45692c393a42Smrg 4570ca08ab68Smrg Converts the next Unicode char from src into dst and returns the number of 4571ca08ab68Smrg bytes containing the char. src must be at least len bytes long. 45722c393a42Smrg 4573ca08ab68Smrg FcUcs4ToUtf8 45742c393a42Smrg 45752c393a42SmrgName 45762c393a42Smrg 4577ca08ab68Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 45782c393a42Smrg 45792c393a42SmrgSynopsis 45802c393a42Smrg 4581c9710b42Smrg #include <fontconfig/fontconfig.h> 45822c393a42Smrg 4583a6844aabSmrg 4584ca08ab68Smrg int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]); 45852c393a42Smrg 45862c393a42SmrgDescription 45872c393a42Smrg 4588ca08ab68Smrg Converts the Unicode char from src into dst and returns the number of 4589ca08ab68Smrg bytes needed to encode the char. 45902c393a42Smrg 4591ca08ab68Smrg FcUtf8Len 45922c393a42Smrg 45932c393a42SmrgName 45942c393a42Smrg 4595ca08ab68Smrg FcUtf8Len -- count UTF-8 encoded chars 45962c393a42Smrg 45972c393a42SmrgSynopsis 45982c393a42Smrg 4599c9710b42Smrg #include <fontconfig/fontconfig.h> 46002c393a42Smrg 4601a6844aabSmrg 4602ca08ab68Smrg FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int *wchar); 46032c393a42Smrg 46042c393a42SmrgDescription 46052c393a42Smrg 4606ca08ab68Smrg Counts the number of Unicode chars in len bytes of src. Places that count 4607ca08ab68Smrg in nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed 4608ca08ab68Smrg to hold the largest Unicode char counted. The return value indicates 4609ca08ab68Smrg whether src is a well-formed UTF8 string. 46102c393a42Smrg 4611ca08ab68Smrg FcUtf16ToUcs4 46122c393a42Smrg 46132c393a42SmrgName 46142c393a42Smrg 4615ca08ab68Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 46162c393a42Smrg 46172c393a42SmrgSynopsis 46182c393a42Smrg 4619c9710b42Smrg #include <fontconfig/fontconfig.h> 46202c393a42Smrg 4621a6844aabSmrg 4622ca08ab68Smrg int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst, int len); 46232c393a42Smrg 46242c393a42SmrgDescription 46252c393a42Smrg 4626ca08ab68Smrg Converts the next Unicode char from src into dst and returns the number of 4627ca08ab68Smrg bytes containing the char. src must be at least len bytes long. Bytes of 4628ca08ab68Smrg src are combined into 16-bit units according to endian. 46292c393a42Smrg 4630ca08ab68Smrg FcUtf16Len 46312c393a42Smrg 46322c393a42SmrgName 46332c393a42Smrg 4634ca08ab68Smrg FcUtf16Len -- count UTF-16 encoded chars 46352c393a42Smrg 46362c393a42SmrgSynopsis 46372c393a42Smrg 4638c9710b42Smrg #include <fontconfig/fontconfig.h> 46392c393a42Smrg 4640a6844aabSmrg 4641ca08ab68Smrg FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int *nchar, int 4642ca08ab68Smrg *wchar); 46432c393a42Smrg 46442c393a42SmrgDescription 46452c393a42Smrg 4646ca08ab68Smrg Counts the number of Unicode chars in len bytes of src. Bytes of src are 4647ca08ab68Smrg combined into 16-bit units according to endian. Places that count in 4648ca08ab68Smrg nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed to 4649ca08ab68Smrg hold the largest Unicode char counted. The return value indicates whether 4650ca08ab68Smrg string is a well-formed UTF16 string. 46512c393a42Smrg 4652ca08ab68Smrg FcIsLower 46532c393a42Smrg 46542c393a42SmrgName 46552c393a42Smrg 4656ca08ab68Smrg FcIsLower -- check for lower case ASCII character 46572c393a42Smrg 46582c393a42SmrgSynopsis 46592c393a42Smrg 4660c9710b42Smrg #include <fontconfig/fontconfig.h> 46612c393a42Smrg 4662a6844aabSmrg 4663ca08ab68Smrg FcBool FcIsLower(FcChar8c); 46642c393a42Smrg 46652c393a42SmrgDescription 46662c393a42Smrg 4667ca08ab68Smrg This macro checks whether c is an lower case ASCII letter. 46682c393a42Smrg 4669ca08ab68Smrg FcIsUpper 46702c393a42Smrg 46712c393a42SmrgName 46722c393a42Smrg 4673ca08ab68Smrg FcIsUpper -- check for upper case ASCII character 46742c393a42Smrg 46752c393a42SmrgSynopsis 46762c393a42Smrg 4677c9710b42Smrg #include <fontconfig/fontconfig.h> 46782c393a42Smrg 4679a6844aabSmrg 4680ca08ab68Smrg FcBool FcIsUpper(FcChar8c); 46812c393a42Smrg 46822c393a42SmrgDescription 46832c393a42Smrg 4684ca08ab68Smrg This macro checks whether c is a upper case ASCII letter. 46852c393a42Smrg 4686ca08ab68Smrg FcToLower 46872c393a42Smrg 46882c393a42SmrgName 46892c393a42Smrg 4690ca08ab68Smrg FcToLower -- convert upper case ASCII to lower case 46912c393a42Smrg 46922c393a42SmrgSynopsis 46932c393a42Smrg 4694c9710b42Smrg #include <fontconfig/fontconfig.h> 46952c393a42Smrg 4696a6844aabSmrg 4697ca08ab68Smrg FcChar8 FcToLower(FcChar8c); 46982c393a42Smrg 46992c393a42SmrgDescription 47002c393a42Smrg 4701ca08ab68Smrg This macro converts upper case ASCII c to the equivalent lower case 4702ca08ab68Smrg letter. 47032c393a42Smrg 4704ca08ab68Smrg FcStrCopy 47052c393a42Smrg 47062c393a42SmrgName 47072c393a42Smrg 4708ca08ab68Smrg FcStrCopy -- duplicate a string 47092c393a42Smrg 47102c393a42SmrgSynopsis 47112c393a42Smrg 4712c9710b42Smrg #include <fontconfig/fontconfig.h> 47132c393a42Smrg 4714a6844aabSmrg 4715ca08ab68Smrg FcChar8 * FcStrCopy(const FcChar8 *s); 47162c393a42Smrg 47172c393a42SmrgDescription 47182c393a42Smrg 4719ca08ab68Smrg Allocates memory, copies s and returns the resulting buffer. Yes, this is 4720ca08ab68Smrg strdup, but that function isn't available on every platform. 47212c393a42Smrg 4722ca08ab68Smrg FcStrDowncase 47232c393a42Smrg 47242c393a42SmrgName 47252c393a42Smrg 4726ca08ab68Smrg FcStrDowncase -- create a lower case translation of a string 47272c393a42Smrg 47282c393a42SmrgSynopsis 47292c393a42Smrg 4730c9710b42Smrg #include <fontconfig/fontconfig.h> 47312c393a42Smrg 4732a6844aabSmrg 4733ca08ab68Smrg FcChar8 * FcStrDowncase(const FcChar8 *s); 47342c393a42Smrg 47352c393a42SmrgDescription 47362c393a42Smrg 4737ca08ab68Smrg Allocates memory, copies s, converting upper case letters to lower case 4738ca08ab68Smrg and returns the allocated buffer. 47392c393a42Smrg 4740ca08ab68Smrg FcStrCopyFilename 47412c393a42Smrg 47422c393a42SmrgName 47432c393a42Smrg 4744ca08ab68Smrg FcStrCopyFilename -- create a complete path from a filename 47452c393a42Smrg 47462c393a42SmrgSynopsis 47472c393a42Smrg 4748c9710b42Smrg #include <fontconfig/fontconfig.h> 47492c393a42Smrg 4750a6844aabSmrg 4751ca08ab68Smrg FcChar8 * FcStrCopyFilename(const FcChar8 *s); 47522c393a42Smrg 47532c393a42SmrgDescription 47542c393a42Smrg 4755ca08ab68Smrg FcStrCopyFilename constructs an absolute pathname from s. It converts any 4756ca08ab68Smrg leading '~' characters in to the value of the HOME environment variable, 4757ca08ab68Smrg and any relative paths are converted to absolute paths using the current 4758ca08ab68Smrg working directory. Sequences of '/' characters are converted to a single 4759ca08ab68Smrg '/', and names containing the current directory '.' or parent directory 4760ca08ab68Smrg '..' are correctly reconstructed. Returns NULL if '~' is the leading 4761ca08ab68Smrg character and HOME is unset or disabled (see FcConfigEnableHome). 47622c393a42Smrg 4763ca08ab68Smrg FcStrCmp 47642c393a42Smrg 47652c393a42SmrgName 47662c393a42Smrg 4767ca08ab68Smrg FcStrCmp -- compare UTF-8 strings 47682c393a42Smrg 47692c393a42SmrgSynopsis 47702c393a42Smrg 4771c9710b42Smrg #include <fontconfig/fontconfig.h> 47722c393a42Smrg 4773a6844aabSmrg 4774ca08ab68Smrg int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2); 47752c393a42Smrg 47762c393a42SmrgDescription 47772c393a42Smrg 4778ca08ab68Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. 47792c393a42Smrg 4780ca08ab68Smrg FcStrCmpIgnoreCase 47812c393a42Smrg 47822c393a42SmrgName 47832c393a42Smrg 4784ca08ab68Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 47852c393a42Smrg 47862c393a42SmrgSynopsis 47872c393a42Smrg 4788c9710b42Smrg #include <fontconfig/fontconfig.h> 47892c393a42Smrg 4790a6844aabSmrg 4791ca08ab68Smrg int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 47922c393a42Smrg 47932c393a42SmrgDescription 47942c393a42Smrg 4795ca08ab68Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. This test is 4796ca08ab68Smrg case-insensitive for all proper UTF-8 encoded strings. 47972c393a42Smrg 4798ca08ab68Smrg FcStrStr 47992c393a42Smrg 48002c393a42SmrgName 48012c393a42Smrg 4802ca08ab68Smrg FcStrStr -- locate UTF-8 substring 48032c393a42Smrg 48042c393a42SmrgSynopsis 48052c393a42Smrg 4806c9710b42Smrg #include <fontconfig/fontconfig.h> 48072c393a42Smrg 4808a6844aabSmrg 4809ca08ab68Smrg FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2); 48102c393a42Smrg 48112c393a42SmrgDescription 48122c393a42Smrg 4813ca08ab68Smrg Returns the location of s2 in s1. Returns NULL if s2 is not present in s1. 4814ca08ab68Smrg This test will operate properly with UTF8 encoded strings. 48152c393a42Smrg 4816ca08ab68Smrg FcStrStrIgnoreCase 48172c393a42Smrg 48182c393a42SmrgName 48192c393a42Smrg 4820ca08ab68Smrg FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 48212c393a42Smrg 48222c393a42SmrgSynopsis 48232c393a42Smrg 4824c9710b42Smrg #include <fontconfig/fontconfig.h> 48252c393a42Smrg 4826a6844aabSmrg 4827ca08ab68Smrg FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 48282c393a42Smrg 48292c393a42SmrgDescription 48302c393a42Smrg 4831ca08ab68Smrg Returns the location of s2 in s1, ignoring case. Returns NULL if s2 is not 4832ca08ab68Smrg present in s1. This test is case-insensitive for all proper UTF-8 encoded 4833ca08ab68Smrg strings. 48342c393a42Smrg 4835ca08ab68Smrg FcStrPlus 48362c393a42Smrg 48372c393a42SmrgName 48382c393a42Smrg 4839ca08ab68Smrg FcStrPlus -- concatenate two strings 48402c393a42Smrg 48412c393a42SmrgSynopsis 48422c393a42Smrg 4843c9710b42Smrg #include <fontconfig/fontconfig.h> 48442c393a42Smrg 4845a6844aabSmrg 4846ca08ab68Smrg FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2); 48472c393a42Smrg 48482c393a42SmrgDescription 48492c393a42Smrg 4850ca08ab68Smrg This function allocates new storage and places the concatenation of s1 and 4851ca08ab68Smrg s2 there, returning the new string. 48522c393a42Smrg 4853ca08ab68Smrg FcStrFree 48542c393a42Smrg 48552c393a42SmrgName 48562c393a42Smrg 4857ca08ab68Smrg FcStrFree -- free a string 48582c393a42Smrg 48592c393a42SmrgSynopsis 48602c393a42Smrg 4861c9710b42Smrg #include <fontconfig/fontconfig.h> 48622c393a42Smrg 4863a6844aabSmrg 4864ca08ab68Smrg void FcStrFree(FcChar8 *s); 48652c393a42Smrg 48662c393a42SmrgDescription 48672c393a42Smrg 4868ca08ab68Smrg This is just a wrapper around free(3) which helps track memory usage of 4869ca08ab68Smrg strings within the fontconfig library. 48702c393a42Smrg 4871ca08ab68Smrg FcStrDirname 48722c393a42Smrg 48732c393a42SmrgName 48742c393a42Smrg 4875ca08ab68Smrg FcStrDirname -- directory part of filename 48762c393a42Smrg 48772c393a42SmrgSynopsis 48782c393a42Smrg 4879c9710b42Smrg #include <fontconfig/fontconfig.h> 48802c393a42Smrg 4881a6844aabSmrg 4882ca08ab68Smrg FcChar8 * FcStrDirname(const FcChar8 *file); 48832c393a42Smrg 48842c393a42SmrgDescription 48852c393a42Smrg 4886ca08ab68Smrg Returns the directory containing file. This is returned in newly allocated 4887ca08ab68Smrg storage which should be freed when no longer needed. 48882c393a42Smrg 4889ca08ab68Smrg FcStrBasename 48902c393a42Smrg 48912c393a42SmrgName 48922c393a42Smrg 4893ca08ab68Smrg FcStrBasename -- last component of filename 48942c393a42Smrg 48952c393a42SmrgSynopsis 48962c393a42Smrg 4897c9710b42Smrg #include <fontconfig/fontconfig.h> 48982c393a42Smrg 4899a6844aabSmrg 4900ca08ab68Smrg FcChar8 * FcStrBasename(const FcChar8 *file); 49012c393a42Smrg 49022c393a42SmrgDescription 49032c393a42Smrg 4904ca08ab68Smrg Returns the filename of file stripped of any leading directory names. This 4905ca08ab68Smrg is returned in newly allocated storage which should be freed when no 4906ca08ab68Smrg longer needed. 49072c393a42Smrg 4908ca08ab68SmrgReferences 4909a6844aabSmrg 4910ca08ab68Smrg Visible links 4911b09479dcSmrg 1. file:///tmp/html-rhkMLA#AEN16 4912b09479dcSmrg 2. file:///tmp/html-rhkMLA#AEN19 4913b09479dcSmrg 3. file:///tmp/html-rhkMLA#AEN31 4914b09479dcSmrg 4. file:///tmp/html-rhkMLA#AEN102 4915b09479dcSmrg 5. file:///tmp/html-rhkMLA#FCINITLOADCONFIG 4916b09479dcSmrg 6. file:///tmp/html-rhkMLA#FCINITLOADCONFIGANDFONTS 4917b09479dcSmrg 7. file:///tmp/html-rhkMLA#FCINIT 4918b09479dcSmrg 8. file:///tmp/html-rhkMLA#FCFINI 4919b09479dcSmrg 9. file:///tmp/html-rhkMLA#FCGETVERSION 4920b09479dcSmrg 10. file:///tmp/html-rhkMLA#FCINITREINITIALIZE 4921b09479dcSmrg 11. file:///tmp/html-rhkMLA#FCINITBRINGUPTODATE 4922b09479dcSmrg 12. file:///tmp/html-rhkMLA#FCPATTERNCREATE 4923b09479dcSmrg 13. file:///tmp/html-rhkMLA#FCPATTERNDUPLICATE 4924b09479dcSmrg 14. file:///tmp/html-rhkMLA#FCPATTERNREFERENCE 4925b09479dcSmrg 15. file:///tmp/html-rhkMLA#FCPATTERNDESTROY 4926b09479dcSmrg 16. file:///tmp/html-rhkMLA#FCPATTERNEQUAL 4927b09479dcSmrg 17. file:///tmp/html-rhkMLA#FCPATTERNEQUALSUBSET 4928b09479dcSmrg 18. file:///tmp/html-rhkMLA#FCPATTERNFILTER 4929b09479dcSmrg 19. file:///tmp/html-rhkMLA#FCPATTERNHASH 4930b09479dcSmrg 20. file:///tmp/html-rhkMLA#FCPATTERNADD 4931b09479dcSmrg 21. file:///tmp/html-rhkMLA#FCPATTERNADDWEAK 4932b09479dcSmrg 22. file:///tmp/html-rhkMLA#FCPATTERNADD-TYPE 4933b09479dcSmrg 23. file:///tmp/html-rhkMLA#FCPATTERNGET 4934b09479dcSmrg 24. file:///tmp/html-rhkMLA#FCPATTERNGET-TYPE 4935b09479dcSmrg 25. file:///tmp/html-rhkMLA#FCPATTERNBUILD 4936b09479dcSmrg 26. file:///tmp/html-rhkMLA#FCPATTERNDEL 4937b09479dcSmrg 27. file:///tmp/html-rhkMLA#FCPATTERNREMOVE 4938b09479dcSmrg 28. file:///tmp/html-rhkMLA#FCPATTERNPRINT 4939b09479dcSmrg 29. file:///tmp/html-rhkMLA#FCDEFAULTSUBSTITUTE 4940b09479dcSmrg 30. file:///tmp/html-rhkMLA#FCNAMEPARSE 4941b09479dcSmrg 31. file:///tmp/html-rhkMLA#FCNAMEUNPARSE 4942b09479dcSmrg 32. file:///tmp/html-rhkMLA#FCPATTERNFORMAT 4943b09479dcSmrg 33. file:///tmp/html-rhkMLA#FCFONTSETCREATE 4944b09479dcSmrg 34. file:///tmp/html-rhkMLA#FCFONTSETDESTROY 4945b09479dcSmrg 35. file:///tmp/html-rhkMLA#FCFONTSETADD 4946b09479dcSmrg 36. file:///tmp/html-rhkMLA#FCFONTSETLIST 4947b09479dcSmrg 37. file:///tmp/html-rhkMLA#FCFONTSETMATCH 4948b09479dcSmrg 38. file:///tmp/html-rhkMLA#FCFONTSETPRINT 4949b09479dcSmrg 39. file:///tmp/html-rhkMLA#FCFONTSETSORT 4950b09479dcSmrg 40. file:///tmp/html-rhkMLA#FCFONTSETSORTDESTROY 4951b09479dcSmrg 41. file:///tmp/html-rhkMLA#FCOBJECTSETCREATE 4952b09479dcSmrg 42. file:///tmp/html-rhkMLA#FCOBJECTSETADD 4953b09479dcSmrg 43. file:///tmp/html-rhkMLA#FCOBJECTSETDESTROY 4954b09479dcSmrg 44. file:///tmp/html-rhkMLA#FCOBJECTSETBUILD 4955b09479dcSmrg 45. file:///tmp/html-rhkMLA#FCFREETYPECHARINDEX 4956b09479dcSmrg 46. file:///tmp/html-rhkMLA#FCFREETYPECHARSET 4957b09479dcSmrg 47. file:///tmp/html-rhkMLA#FCFREETYPECHARSETANDSPACING 4958b09479dcSmrg 48. file:///tmp/html-rhkMLA#FCFREETYPEQUERY 4959b09479dcSmrg 49. file:///tmp/html-rhkMLA#FCFREETYPEQUERYFACE 4960b09479dcSmrg 50. file:///tmp/html-rhkMLA#FCVALUEDESTROY 4961b09479dcSmrg 51. file:///tmp/html-rhkMLA#FCVALUESAVE 4962b09479dcSmrg 52. file:///tmp/html-rhkMLA#FCVALUEPRINT 4963b09479dcSmrg 53. file:///tmp/html-rhkMLA#FCVALUEEQUAL 4964b09479dcSmrg 54. file:///tmp/html-rhkMLA#FCCHARSETCREATE 4965b09479dcSmrg 55. file:///tmp/html-rhkMLA#FCCHARSETDESTROY 4966b09479dcSmrg 56. file:///tmp/html-rhkMLA#FCCHARSETADDCHAR 4967b09479dcSmrg 57. file:///tmp/html-rhkMLA#FCCHARSETDELCHAR 4968b09479dcSmrg 58. file:///tmp/html-rhkMLA#FCCHARSETCOPY 4969b09479dcSmrg 59. file:///tmp/html-rhkMLA#FCCHARSETEQUAL 4970b09479dcSmrg 60. file:///tmp/html-rhkMLA#FCCHARSETINTERSECT 4971b09479dcSmrg 61. file:///tmp/html-rhkMLA#FCCHARSETUNION 4972b09479dcSmrg 62. file:///tmp/html-rhkMLA#FCCHARSETSUBTRACT 4973b09479dcSmrg 63. file:///tmp/html-rhkMLA#FCCHARSETMERGE 4974b09479dcSmrg 64. file:///tmp/html-rhkMLA#FCCHARSETHASCHAR 4975b09479dcSmrg 65. file:///tmp/html-rhkMLA#FCCHARSETCOUNT 4976b09479dcSmrg 66. file:///tmp/html-rhkMLA#FCCHARSETINTERSECTCOUNT 4977b09479dcSmrg 67. file:///tmp/html-rhkMLA#FCCHARSETSUBTRACTCOUNT 4978b09479dcSmrg 68. file:///tmp/html-rhkMLA#FCCHARSETISSUBSET 4979b09479dcSmrg 69. file:///tmp/html-rhkMLA#FCCHARSETFIRSTPAGE 4980b09479dcSmrg 70. file:///tmp/html-rhkMLA#FCCHARSETNEXTPAGE 4981b09479dcSmrg 71. file:///tmp/html-rhkMLA#FCCHARSETCOVERAGE 4982b09479dcSmrg 72. file:///tmp/html-rhkMLA#FCCHARSETNEW 4983b09479dcSmrg 73. file:///tmp/html-rhkMLA#FCLANGSETCREATE 4984b09479dcSmrg 74. file:///tmp/html-rhkMLA#FCLANGSETDESTROY 4985b09479dcSmrg 75. file:///tmp/html-rhkMLA#FCLANGSETCOPY 4986b09479dcSmrg 76. file:///tmp/html-rhkMLA#FCLANGSETADD 4987b09479dcSmrg 77. file:///tmp/html-rhkMLA#FCLANGSETDEL 4988b09479dcSmrg 78. file:///tmp/html-rhkMLA#FCLANGSETUNION 4989b09479dcSmrg 79. file:///tmp/html-rhkMLA#FCLANGSETSUBTRACT 4990b09479dcSmrg 80. file:///tmp/html-rhkMLA#FCLANGSETCOMPARE 4991b09479dcSmrg 81. file:///tmp/html-rhkMLA#FCLANGSETCONTAINS 4992b09479dcSmrg 82. file:///tmp/html-rhkMLA#FCLANGSETEQUAL 4993b09479dcSmrg 83. file:///tmp/html-rhkMLA#FCLANGSETHASH 4994b09479dcSmrg 84. file:///tmp/html-rhkMLA#FCLANGSETHASLANG 4995b09479dcSmrg 85. file:///tmp/html-rhkMLA#FCGETDEFAULTLANGS 4996b09479dcSmrg 86. file:///tmp/html-rhkMLA#FCLANGSETGETLANGS 4997b09479dcSmrg 87. file:///tmp/html-rhkMLA#FCGETLANGS 4998b09479dcSmrg 88. file:///tmp/html-rhkMLA#FCLANGNORMALIZE 4999b09479dcSmrg 89. file:///tmp/html-rhkMLA#FCLANGGETCHARSET 5000b09479dcSmrg 90. file:///tmp/html-rhkMLA#FCMATRIXINIT 5001b09479dcSmrg 91. file:///tmp/html-rhkMLA#FCMATRIXCOPY 5002b09479dcSmrg 92. file:///tmp/html-rhkMLA#FCMATRIXEQUAL 5003b09479dcSmrg 93. file:///tmp/html-rhkMLA#FCMATRIXMULTIPLY 5004b09479dcSmrg 94. file:///tmp/html-rhkMLA#FCMATRIXROTATE 5005b09479dcSmrg 95. file:///tmp/html-rhkMLA#FCMATRIXSCALE 5006b09479dcSmrg 96. file:///tmp/html-rhkMLA#FCMATRIXSHEAR 5007b09479dcSmrg 97. file:///tmp/html-rhkMLA#FCCONFIGCREATE 5008b09479dcSmrg 98. file:///tmp/html-rhkMLA#FCCONFIGREFERENCE 5009b09479dcSmrg 99. file:///tmp/html-rhkMLA#FCCONFIGDESTROY 5010b09479dcSmrg 100. file:///tmp/html-rhkMLA#FCCONFIGSETCURRENT 5011b09479dcSmrg 101. file:///tmp/html-rhkMLA#FCCONFIGGETCURRENT 5012b09479dcSmrg 102. file:///tmp/html-rhkMLA#FCCONFIGUPTODATE 5013b09479dcSmrg 103. file:///tmp/html-rhkMLA#FCCONFIGHOME 5014b09479dcSmrg 104. file:///tmp/html-rhkMLA#FCCONFIGENABLEHOME 5015b09479dcSmrg 105. file:///tmp/html-rhkMLA#FCCONFIGBUILDFONTS 5016b09479dcSmrg 106. file:///tmp/html-rhkMLA#FCCONFIGGETCONFIGDIRS 5017b09479dcSmrg 107. file:///tmp/html-rhkMLA#FCCONFIGGETFONTDIRS 5018b09479dcSmrg 108. file:///tmp/html-rhkMLA#FCCONFIGGETCONFIGFILES 5019b09479dcSmrg 109. file:///tmp/html-rhkMLA#FCCONFIGGETCACHE 5020b09479dcSmrg 110. file:///tmp/html-rhkMLA#FCCONFIGGETCACHEDIRS 5021b09479dcSmrg 111. file:///tmp/html-rhkMLA#FCCONFIGGETFONTS 5022b09479dcSmrg 112. file:///tmp/html-rhkMLA#FCCONFIGGETBLANKS 5023b09479dcSmrg 113. file:///tmp/html-rhkMLA#FCCONFIGGETRESCANINTERVAL 5024b09479dcSmrg 114. file:///tmp/html-rhkMLA#FCCONFIGSETRESCANINTERVAL 5025b09479dcSmrg 115. file:///tmp/html-rhkMLA#FCCONFIGAPPFONTADDFILE 5026b09479dcSmrg 116. file:///tmp/html-rhkMLA#FCCONFIGAPPFONTADDDIR 5027b09479dcSmrg 117. file:///tmp/html-rhkMLA#FCCONFIGAPPFONTCLEAR 5028b09479dcSmrg 118. file:///tmp/html-rhkMLA#FCCONFIGSUBSTITUTEWITHPAT 5029b09479dcSmrg 119. file:///tmp/html-rhkMLA#FCCONFIGSUBSTITUTE 5030b09479dcSmrg 120. file:///tmp/html-rhkMLA#FCFONTMATCH 5031b09479dcSmrg 121. file:///tmp/html-rhkMLA#FCFONTSORT 5032b09479dcSmrg 122. file:///tmp/html-rhkMLA#FCFONTRENDERPREPARE 5033b09479dcSmrg 123. file:///tmp/html-rhkMLA#FCFONTLIST 5034b09479dcSmrg 124. file:///tmp/html-rhkMLA#FCCONFIGFILENAME 5035b09479dcSmrg 125. file:///tmp/html-rhkMLA#FCCONFIGPARSEANDLOAD 5036b09479dcSmrg 126. file:///tmp/html-rhkMLA#FCCONFIGGETSYSROOT 5037b09479dcSmrg 127. file:///tmp/html-rhkMLA#FCCONFIGSETSYSROOT 5038b09479dcSmrg 128. file:///tmp/html-rhkMLA#FCNAMEREGISTEROBJECTTYPES 5039b09479dcSmrg 129. file:///tmp/html-rhkMLA#FCNAMEUNREGISTEROBJECTTYPES 5040b09479dcSmrg 130. file:///tmp/html-rhkMLA#FCNAMEGETOBJECTTYPE 5041b09479dcSmrg 131. file:///tmp/html-rhkMLA#FCNAMEREGISTERCONSTANTS 5042b09479dcSmrg 132. file:///tmp/html-rhkMLA#FCNAMEUNREGISTERCONSTANTS 5043b09479dcSmrg 133. file:///tmp/html-rhkMLA#FCNAMEGETCONSTANT 5044b09479dcSmrg 134. file:///tmp/html-rhkMLA#FCNAMECONSTANT 5045b09479dcSmrg 135. file:///tmp/html-rhkMLA#FCBLANKSCREATE 5046b09479dcSmrg 136. file:///tmp/html-rhkMLA#FCBLANKSDESTROY 5047b09479dcSmrg 137. file:///tmp/html-rhkMLA#FCBLANKSADD 5048b09479dcSmrg 138. file:///tmp/html-rhkMLA#FCBLANKSISMEMBER 5049b09479dcSmrg 139. file:///tmp/html-rhkMLA#FCATOMICCREATE 5050b09479dcSmrg 140. file:///tmp/html-rhkMLA#FCATOMICLOCK 5051b09479dcSmrg 141. file:///tmp/html-rhkMLA#FCATOMICNEWFILE 5052b09479dcSmrg 142. file:///tmp/html-rhkMLA#FCATOMICORIGFILE 5053b09479dcSmrg 143. file:///tmp/html-rhkMLA#FCATOMICREPLACEORIG 5054b09479dcSmrg 144. file:///tmp/html-rhkMLA#FCATOMICDELETENEW 5055b09479dcSmrg 145. file:///tmp/html-rhkMLA#FCATOMICUNLOCK 5056b09479dcSmrg 146. file:///tmp/html-rhkMLA#FCATOMICDESTROY 5057b09479dcSmrg 147. file:///tmp/html-rhkMLA#FCFILESCAN 5058b09479dcSmrg 148. file:///tmp/html-rhkMLA#FCFILEISDIR 5059b09479dcSmrg 149. file:///tmp/html-rhkMLA#FCDIRSCAN 5060b09479dcSmrg 150. file:///tmp/html-rhkMLA#FCDIRSAVE 5061b09479dcSmrg 151. file:///tmp/html-rhkMLA#FCDIRCACHEUNLINK 5062b09479dcSmrg 152. file:///tmp/html-rhkMLA#FCDIRCACHEVALID 5063b09479dcSmrg 153. file:///tmp/html-rhkMLA#FCDIRCACHELOAD 5064b09479dcSmrg 154. file:///tmp/html-rhkMLA#FCDIRCACHERESCAN 5065b09479dcSmrg 155. file:///tmp/html-rhkMLA#FCDIRCACHEREAD 5066b09479dcSmrg 156. file:///tmp/html-rhkMLA#FCDIRCACHELOADFILE 5067b09479dcSmrg 157. file:///tmp/html-rhkMLA#FCDIRCACHEUNLOAD 5068b09479dcSmrg 158. file:///tmp/html-rhkMLA#FCCACHEDIR 5069b09479dcSmrg 159. file:///tmp/html-rhkMLA#FCCACHECOPYSET 5070b09479dcSmrg 160. file:///tmp/html-rhkMLA#FCCACHESUBDIR 5071b09479dcSmrg 161. file:///tmp/html-rhkMLA#FCCACHENUMSUBDIR 5072b09479dcSmrg 162. file:///tmp/html-rhkMLA#FCCACHENUMFONT 5073b09479dcSmrg 163. file:///tmp/html-rhkMLA#FCDIRCACHECLEAN 5074b09479dcSmrg 164. file:///tmp/html-rhkMLA#FCCACHECREATETAGFILE 5075b09479dcSmrg 165. file:///tmp/html-rhkMLA#FCSTRSETCREATE 5076b09479dcSmrg 166. file:///tmp/html-rhkMLA#FCSTRSETMEMBER 5077b09479dcSmrg 167. file:///tmp/html-rhkMLA#FCSTRSETEQUAL 5078b09479dcSmrg 168. file:///tmp/html-rhkMLA#FCSTRSETADD 5079b09479dcSmrg 169. file:///tmp/html-rhkMLA#FCSTRSETADDFILENAME 5080b09479dcSmrg 170. file:///tmp/html-rhkMLA#FCSTRSETDEL 5081b09479dcSmrg 171. file:///tmp/html-rhkMLA#FCSTRSETDESTROY 5082b09479dcSmrg 172. file:///tmp/html-rhkMLA#FCSTRLISTCREATE 5083b09479dcSmrg 173. file:///tmp/html-rhkMLA#FCSTRLISTFIRST 5084b09479dcSmrg 174. file:///tmp/html-rhkMLA#FCSTRLISTNEXT 5085b09479dcSmrg 175. file:///tmp/html-rhkMLA#FCSTRLISTDONE 5086b09479dcSmrg 176. file:///tmp/html-rhkMLA#FCUTF8TOUCS4 5087b09479dcSmrg 177. file:///tmp/html-rhkMLA#FCUCS4TOUTF8 5088b09479dcSmrg 178. file:///tmp/html-rhkMLA#FCUTF8LEN 5089b09479dcSmrg 179. file:///tmp/html-rhkMLA#FCUTF16TOUCS4 5090b09479dcSmrg 180. file:///tmp/html-rhkMLA#FCUTF16LEN 5091b09479dcSmrg 181. file:///tmp/html-rhkMLA#FCISLOWER 5092b09479dcSmrg 182. file:///tmp/html-rhkMLA#FCISUPPER 5093b09479dcSmrg 183. file:///tmp/html-rhkMLA#FCTOLOWER 5094b09479dcSmrg 184. file:///tmp/html-rhkMLA#FCSTRCOPY 5095b09479dcSmrg 185. file:///tmp/html-rhkMLA#FCSTRDOWNCASE 5096b09479dcSmrg 186. file:///tmp/html-rhkMLA#FCSTRCOPYFILENAME 5097b09479dcSmrg 187. file:///tmp/html-rhkMLA#FCSTRCMP 5098b09479dcSmrg 188. file:///tmp/html-rhkMLA#FCSTRCMPIGNORECASE 5099b09479dcSmrg 189. file:///tmp/html-rhkMLA#FCSTRSTR 5100b09479dcSmrg 190. file:///tmp/html-rhkMLA#FCSTRSTRIGNORECASE 5101b09479dcSmrg 191. file:///tmp/html-rhkMLA#FCSTRPLUS 5102b09479dcSmrg 192. file:///tmp/html-rhkMLA#FCSTRFREE 5103b09479dcSmrg 193. file:///tmp/html-rhkMLA#FCSTRDIRNAME 5104b09479dcSmrg 194. file:///tmp/html-rhkMLA#FCSTRBASENAME 5105