fontconfig-devel.txt revision a32e9e42
1a32e9e42Smrg Fontconfig Developers Reference, Version 2.13.1 22c393a42Smrg 3ca08ab68Smrg Copyright © 2002 Keith Packard 42c393a42Smrg 5a32e9e42Smrg Permission to use, copy, modify, distribute, and sell this software and 6a32e9e42Smrg its documentation for any purpose is hereby granted without fee, provided 7a32e9e42Smrg that the above copyright notice appear in all copies and that both that 8a32e9e42Smrg copyright notice and this permission notice appear in supporting 9a32e9e42Smrg documentation, and that the name of the author(s) not be used in 10a32e9e42Smrg advertising or publicity pertaining to distribution of the software 11a32e9e42Smrg without specific, written prior permission. The authors make no 12a32e9e42Smrg representations about the suitability of this software for any purpose. It 13a32e9e42Smrg is provided "as is" without express or implied warranty. 14a32e9e42Smrg 15a32e9e42Smrg THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16a32e9e42Smrg INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 17a32e9e42Smrg EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 18a32e9e42Smrg CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 19a32e9e42Smrg USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 20a32e9e42Smrg OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 21a32e9e42Smrg PERFORMANCE OF THIS SOFTWARE. 22a32e9e42Smrg 23a32e9e42Smrg ------------------------------------------------------- 242c393a42Smrg 25ca08ab68Smrg Table of Contents 26a32e9e42Smrg 27a32e9e42Smrg [1]DESCRIPTION 28a32e9e42Smrg 29a32e9e42Smrg [2]FUNCTIONAL OVERVIEW 30a32e9e42Smrg 31a32e9e42Smrg [3]Datatypes 32a32e9e42Smrg 33a32e9e42Smrg [4]FUNCTIONS 342c393a42Smrg 35a6844aabSmrgDESCRIPTION 362c393a42Smrg 37ca08ab68Smrg Fontconfig is a library designed to provide system-wide font 38ca08ab68Smrg configuration, customization and application access. 39a32e9e42Smrg 40a32e9e42Smrg -------------------------------------------------------------------------- 412c393a42Smrg 42a6844aabSmrgFUNCTIONAL OVERVIEW 43a6844aabSmrg 44a32e9e42Smrg Fontconfig contains two essential modules, the configuration module which 45a32e9e42Smrg builds an internal configuration from XML files and the matching module 46a32e9e42Smrg which accepts font patterns and returns the nearest matching font. 47a32e9e42Smrg 48a32e9e42Smrg -------------------------------------------------------------------------- 49a32e9e42Smrg 50a32e9e42Smrg FONT CONFIGURATION 51a32e9e42Smrg 52a32e9e42Smrg The configuration module consists of the FcConfig datatype, libexpat and 53a32e9e42Smrg FcConfigParse which walks over an XML tree and amends a configuration with 54a32e9e42Smrg data found within. From an external perspective, configuration of the 55a32e9e42Smrg library consists of generating a valid XML tree and feeding that to 56a32e9e42Smrg FcConfigParse. The only other mechanism provided to applications for 57a32e9e42Smrg changing the running configuration is to add fonts and directories to the 58a32e9e42Smrg list of application-provided font files. 59a32e9e42Smrg 60a32e9e42Smrg The intent is to make font configurations relatively static, and shared by 61a32e9e42Smrg as many applications as possible. It is hoped that this will lead to more 62a32e9e42Smrg stable font selection when passing names from one application to another. 63a32e9e42Smrg XML was chosen as a configuration file format because it provides a format 64a32e9e42Smrg which is easy for external agents to edit while retaining the correct 65ca08ab68Smrg structure and syntax. 66a6844aabSmrg 67a32e9e42Smrg Font configuration is separate from font matching; applications needing to 68a32e9e42Smrg do their own matching can access the available fonts from the library and 69a32e9e42Smrg perform private matching. The intent is to permit applications to pick and 70a32e9e42Smrg choose appropriate functionality from the library instead of forcing them 71a32e9e42Smrg to choose between this library and a private configuration mechanism. The 72a32e9e42Smrg hope is that this will ensure that configuration of fonts for all 73a32e9e42Smrg applications can be centralized in one place. Centralizing font 74a32e9e42Smrg configuration will simplify and regularize font installation and 75a32e9e42Smrg customization. 76a32e9e42Smrg 77a32e9e42Smrg -------------------------------------------------------------------------- 78a32e9e42Smrg 79a32e9e42Smrg FONT PROPERTIES 80a32e9e42Smrg 81a32e9e42Smrg While font patterns may contain essentially any properties, there are some 82a32e9e42Smrg well known properties with associated types. Fontconfig uses some of these 83a32e9e42Smrg properties for font matching and font completion. Others are provided as a 84a32e9e42Smrg convenience for the application's rendering mechanism. 85a32e9e42Smrg 862c393a42Smrg Property Definitions 872c393a42Smrg 88ca08ab68Smrg Property C Preprocessor Symbol Type Description 892c393a42Smrg ---------------------------------------------------- 90ca08ab68Smrg family FC_FAMILY String Font family names 91a32e9e42Smrg familylang FC_FAMILYLANG String Language corresponding to 92ca08ab68Smrg each family name 93a32e9e42Smrg style FC_STYLE String Font style. Overrides weight 94ca08ab68Smrg and slant 95a32e9e42Smrg stylelang FC_STYLELANG String Language corresponding to 96ca08ab68Smrg each style name 97a32e9e42Smrg fullname FC_FULLNAME String Font face full name where 98a32e9e42Smrg different from family and 99ca08ab68Smrg family + style 100a32e9e42Smrg fullnamelang FC_FULLNAMELANG String Language corresponding to 101ca08ab68Smrg each fullname 102a32e9e42Smrg slant FC_SLANT Int Italic, oblique or roman 103a32e9e42Smrg weight FC_WEIGHT Int Light, medium, demibold, 104ca08ab68Smrg bold or black 105ca08ab68Smrg size FC_SIZE Double Point size 106a32e9e42Smrg width FC_WIDTH Int Condensed, normal or expanded 107a32e9e42Smrg aspect FC_ASPECT Double Stretches glyphs horizontally 108ca08ab68Smrg before hinting 109ca08ab68Smrg pixelsize FC_PIXEL_SIZE Double Pixel size 110a32e9e42Smrg 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 115a32e9e42Smrg hinting FC_HINTING Bool Whether the rasterizer should 116ca08ab68Smrg use hinting 117a32e9e42Smrg hintstyle FC_HINT_STYLE Int Automatic hinting style 118ca08ab68Smrg verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout 119a32e9e42Smrg autohint FC_AUTOHINT Bool Use autohinter instead of 120ca08ab68Smrg normal hinter 121a32e9e42Smrg globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) 122a32e9e42Smrg file FC_FILE String The filename holding the font 123a32e9e42Smrg index FC_INDEX Int The index of the font within 124ca08ab68Smrg the file 125a32e9e42Smrg ftface FC_FT_FACE FT_Face Use the specified FreeType 126ca08ab68Smrg face object 127a32e9e42Smrg rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated) 128a32e9e42Smrg outline FC_OUTLINE Bool Whether the glyphs are outlines 129a32e9e42Smrg scalable FC_SCALABLE Bool Whether glyphs can be scaled 130a32e9e42Smrg scale FC_SCALE Double Scale factor for point->pixel 131a32e9e42Smrg conversions (deprecated) 132a32e9e42Smrg symbol FC_SYMBOL Bool Whether font uses MS symbol-font encoding 133a32e9e42Smrg color FC_COLOR Bool Whether any glyphs have color 134ca08ab68Smrg dpi FC_DPI Double Target dots per inch 135a32e9e42Smrg rgba FC_RGBA Int unknown, rgb, bgr, vrgb, 136a32e9e42Smrg vbgr, none - subpixel geometry 137ca08ab68Smrg lcdfilter FC_LCD_FILTER Int Type of LCD filter 138a32e9e42Smrg minspace FC_MINSPACE Bool Eliminate leading from line 139ca08ab68Smrg spacing 140a32e9e42Smrg charset FC_CHARSET CharSet Unicode chars encoded by 141ca08ab68Smrg the font 142ca08ab68Smrg lang FC_LANG LangSet Set of RFC-3066-style 143a32e9e42Smrg languages this font supports 144a32e9e42Smrg fontversion FC_FONTVERSION Int Version number of the font 145a32e9e42Smrg capability FC_CAPABILITY String List of layout capabilities in 146ca08ab68Smrg the font 147a32e9e42Smrg fontformat FC_FONTFORMAT String String name of the font format 148ca08ab68Smrg embolden FC_EMBOLDEN Bool Rasterizer should 149a32e9e42Smrg synthetically embolden the font 150a32e9e42Smrg embeddedbitmap FC_EMBEDDED_BITMAP Bool Use the embedded bitmap instead 151953daebaSmrg of the outline 152a32e9e42Smrg decorative FC_DECORATIVE Bool Whether the style is a decorative 153953daebaSmrg variant 154a32e9e42Smrg fontfeatures FC_FONT_FEATURES String List of extra feature tags in 155c9710b42Smrg OpenType to be enabled 156a32e9e42Smrg namelang FC_NAMELANG String Language name to be used for the 157a32e9e42Smrg default value of familylang, 158a32e9e42Smrg stylelang and fullnamelang 159a32e9e42Smrg prgname FC_PRGNAME String Name of the running program 160a32e9e42Smrg hash FC_HASH String SHA256 hash value of the font data 161a32e9e42Smrg with "sha256:" prefix (deprecated) 162a32e9e42Smrg postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript 163a32e9e42Smrg 164a32e9e42Smrg 165a32e9e42Smrg -------------------------------------------------------------------------- 166a6844aabSmrg 167a6844aabSmrgDatatypes 1682c393a42Smrg 169a32e9e42Smrg Fontconfig uses abstract data types to hide internal implementation 170a32e9e42Smrg details for most data structures. A few structures are exposed where 171a32e9e42Smrg appropriate. 172a32e9e42Smrg 173a32e9e42Smrg -------------------------------------------------------------------------- 174a32e9e42Smrg 175a32e9e42Smrg FcChar8, FcChar16, FcChar32, FcBool 176a32e9e42Smrg 177a32e9e42Smrg These are primitive data types; the FcChar* types hold precisely the 178a32e9e42Smrg number of bits stated (if supported by the C implementation). FcBool holds 179a32e9e42Smrg one of two C preprocessor symbols: FcFalse or FcTrue. 180a32e9e42Smrg 181a32e9e42Smrg -------------------------------------------------------------------------- 182a6844aabSmrg 183a32e9e42Smrg FcMatrix 1842c393a42Smrg 185a32e9e42Smrg An FcMatrix holds an affine transformation, usually used to reshape 186a32e9e42Smrg glyphs. A small set of matrix operations are provided to manipulate these. 1872c393a42Smrg 188a32e9e42Smrg typedef struct _FcMatrix { 189a32e9e42Smrg double xx, xy, yx, yy; 190a32e9e42Smrg } FcMatrix; 1912c393a42Smrg 192a6844aabSmrg 193a32e9e42Smrg -------------------------------------------------------------------------- 194a6844aabSmrg 195a32e9e42Smrg FcCharSet 196a6844aabSmrg 197a32e9e42Smrg An FcCharSet is an abstract type that holds the set of encoded Unicode 198a32e9e42Smrg chars in a font. Operations to build and compare these sets are provided. 199a6844aabSmrg 200a32e9e42Smrg -------------------------------------------------------------------------- 2012c393a42Smrg 202a32e9e42Smrg FcLangSet 2032c393a42Smrg 204a32e9e42Smrg An FcLangSet is an abstract type that holds the set of languages supported 205a32e9e42Smrg by a font. Operations to build and compare these sets are provided. These 206a32e9e42Smrg are computed for a font based on orthographic information built into the 207a32e9e42Smrg fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 208a32e9e42Smrg languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If 209a32e9e42Smrg you have orthographic information for any of these languages, please 210a32e9e42Smrg submit them. 2112c393a42Smrg 212a32e9e42Smrg -------------------------------------------------------------------------- 213a32e9e42Smrg 214a32e9e42Smrg FcLangResult 215a32e9e42Smrg 216a32e9e42Smrg An FcLangResult is an enumeration used to return the results of comparing 217a32e9e42Smrg two language strings or FcLangSet objects. FcLangEqual means the objects 218a32e9e42Smrg match language and territory. FcLangDifferentTerritory means the objects 219a32e9e42Smrg match in language but differ in territory. FcLangDifferentLang means the 220a32e9e42Smrg objects differ in language. 221a32e9e42Smrg 222a32e9e42Smrg -------------------------------------------------------------------------- 223a32e9e42Smrg 224a32e9e42Smrg FcType 2252c393a42Smrg 226ca08ab68Smrg Tags the kind of data stored in an FcValue. 227a32e9e42Smrg 228a32e9e42Smrg -------------------------------------------------------------------------- 229a32e9e42Smrg 230a32e9e42Smrg FcValue 231a32e9e42Smrg 232a32e9e42Smrg An FcValue object holds a single value with one of a number of different 233a32e9e42Smrg types. The 'type' tag indicates which member is valid. 234a32e9e42Smrg 235a32e9e42Smrg typedef struct _FcValue { 236a32e9e42Smrg FcType type; 237a32e9e42Smrg union { 238a32e9e42Smrg const FcChar8 *s; 239a32e9e42Smrg int i; 240a32e9e42Smrg FcBool b; 241a32e9e42Smrg double d; 242a32e9e42Smrg const FcMatrix *m; 243a32e9e42Smrg const FcCharSet *c; 244a32e9e42Smrg void *f; 245a32e9e42Smrg const FcLangSet *l; 246a32e9e42Smrg } u; 247a32e9e42Smrg } FcValue; 248a32e9e42Smrg 249a32e9e42Smrg 250a32e9e42Smrg FcValue Members 251a32e9e42Smrg 252a32e9e42Smrg Type Union member Datatype 253a32e9e42Smrg -------------------------------- 254a32e9e42Smrg FcTypeVoid (none) (none) 255a32e9e42Smrg FcTypeInteger i int 256a32e9e42Smrg FcTypeDouble d double 257a32e9e42Smrg FcTypeString s FcChar8 * 258a32e9e42Smrg FcTypeBool b b 259a32e9e42Smrg FcTypeMatrix m FcMatrix * 260a32e9e42Smrg FcTypeCharSet c FcCharSet * 261a32e9e42Smrg FcTypeFTFace f void * (FT_Face) 262a32e9e42Smrg FcTypeLangSet l FcLangSet * 263a32e9e42Smrg 264a32e9e42Smrg 265a32e9e42Smrg -------------------------------------------------------------------------- 266a32e9e42Smrg 267a32e9e42Smrg FcPattern 268a32e9e42Smrg 269a32e9e42Smrg holds a set of names with associated value lists; each name refers to a 270a32e9e42Smrg property of a font. FcPatterns are used as inputs to the matching code as 271a32e9e42Smrg well as holding information about specific fonts. Each property can hold 272a32e9e42Smrg one or more values; conventionally all of the same type, although the 273a32e9e42Smrg interface doesn't demand that. 274a32e9e42Smrg 275a32e9e42Smrg -------------------------------------------------------------------------- 276a32e9e42Smrg 277a32e9e42Smrg FcFontSet 278a32e9e42Smrg 279a32e9e42Smrg typedef struct _FcFontSet { 280a32e9e42Smrg int nfont; 281a32e9e42Smrg int sfont; 282a32e9e42Smrg FcPattern **fonts; 283a32e9e42Smrg } FcFontSet; 284a32e9e42Smrg 285a32e9e42Smrg 286a32e9e42Smrg An FcFontSet contains a list of FcPatterns. Internally fontconfig uses 287a32e9e42Smrg this data structure to hold sets of fonts. Externally, fontconfig returns 288a32e9e42Smrg the results of listing fonts in this format. 'nfont' holds the number of 289a32e9e42Smrg patterns in the 'fonts' array; 'sfont' is used to indicate the size of 290a32e9e42Smrg that array. 291a32e9e42Smrg 292a32e9e42Smrg -------------------------------------------------------------------------- 293a32e9e42Smrg 294a32e9e42Smrg FcStrSet, FcStrList 295a32e9e42Smrg 296a32e9e42Smrg FcStrSet holds a list of strings that can be appended to and enumerated. 297a32e9e42Smrg Its unique characteristic is that the enumeration works even while strings 298a32e9e42Smrg are appended during enumeration. FcStrList is used during enumeration to 299a32e9e42Smrg safely and correctly walk the list of strings even while that list is 300a32e9e42Smrg edited in the middle of enumeration. 301a32e9e42Smrg 302a32e9e42Smrg -------------------------------------------------------------------------- 303a32e9e42Smrg 304a32e9e42Smrg FcObjectSet 305a32e9e42Smrg 306a32e9e42Smrg typedef struct _FcObjectSet { 307a32e9e42Smrg int nobject; 308a32e9e42Smrg int sobject; 309a32e9e42Smrg const char **objects; 310a32e9e42Smrg } FcObjectSet; 311a32e9e42Smrg 312a32e9e42Smrg 313a32e9e42Smrg holds a set of names and is used to specify which fields from fonts are 314a32e9e42Smrg placed in the the list of returned patterns when listing fonts. 315a32e9e42Smrg 316a32e9e42Smrg -------------------------------------------------------------------------- 317a32e9e42Smrg 318a32e9e42Smrg FcObjectType 319a32e9e42Smrg 320a32e9e42Smrg typedef struct _FcObjectType { 321a32e9e42Smrg const char *object; 322a32e9e42Smrg FcType type; 323a32e9e42Smrg } FcObjectType; 324a32e9e42Smrg 325a32e9e42Smrg 326a32e9e42Smrg marks the type of a pattern element generated when parsing font names. 327a32e9e42Smrg Applications can add new object types so that font names may contain the 328a32e9e42Smrg new elements. 329a32e9e42Smrg 330a32e9e42Smrg -------------------------------------------------------------------------- 331a32e9e42Smrg 332a32e9e42Smrg FcConstant 333a32e9e42Smrg 334a32e9e42Smrg typedef struct _FcConstant { 335a32e9e42Smrg const FcChar8 *name; 336a32e9e42Smrg const char *object; 337a32e9e42Smrg int value; 338a32e9e42Smrg } FcConstant; 339a32e9e42Smrg 340a32e9e42Smrg 341a32e9e42Smrg Provides for symbolic constants for new pattern elements. When 'name' is 342a32e9e42Smrg seen in a font name, an 'object' element is created with value 'value'. 343a32e9e42Smrg 344a32e9e42Smrg -------------------------------------------------------------------------- 345a32e9e42Smrg 346a32e9e42Smrg FcBlanks 347a32e9e42Smrg 348a32e9e42Smrg holds a list of Unicode chars which are expected to be blank; unexpectedly 349a32e9e42Smrg blank chars are assumed to be invalid and are elided from the charset 350a32e9e42Smrg associated with the font. 351a32e9e42Smrg 352a32e9e42Smrg FcBlanks is deprecated and should not be used in newly written code. It is 353a32e9e42Smrg still accepted by some functions for compatibility with older code but 354a32e9e42Smrg will be removed in the future. 355a32e9e42Smrg 356a32e9e42Smrg -------------------------------------------------------------------------- 357a32e9e42Smrg 358a32e9e42Smrg FcFileCache 359a32e9e42Smrg 360a32e9e42Smrg holds the per-user cache information for use while loading the font 361a32e9e42Smrg database. This is built automatically for the current configuration when 362a32e9e42Smrg that is loaded. Applications must always pass '0' when one is requested. 363a32e9e42Smrg 364a32e9e42Smrg -------------------------------------------------------------------------- 365a32e9e42Smrg 366a32e9e42Smrg FcConfig 367a32e9e42Smrg 368a32e9e42Smrg holds a complete configuration of the library; there is one default 369a32e9e42Smrg configuration, other can be constructed from XML data structures. All 370a32e9e42Smrg public entry points that need global data can take an optional FcConfig* 371a32e9e42Smrg argument; passing 0 uses the default configuration. FcConfig objects hold 372a32e9e42Smrg two sets of fonts, the first contains those specified by the 373a32e9e42Smrg configuration, the second set holds those added by the application at 374a32e9e42Smrg run-time. Interfaces that need to reference a particular set use one of 375ca08ab68Smrg the FcSetName enumerated values. 376a32e9e42Smrg 377a32e9e42Smrg -------------------------------------------------------------------------- 378a32e9e42Smrg 379a32e9e42Smrg FcSetName 380a32e9e42Smrg 381a32e9e42Smrg Specifies one of the two sets of fonts available in a configuration; 382a32e9e42Smrg FcSetSystem for those fonts specified in the configuration and 383a32e9e42Smrg FcSetApplication which holds fonts provided by the application. 384a32e9e42Smrg 385a32e9e42Smrg -------------------------------------------------------------------------- 386a32e9e42Smrg 387a32e9e42Smrg FcResult 388a32e9e42Smrg 389a32e9e42Smrg Used as a return type for functions manipulating FcPattern objects. 390a32e9e42Smrg 391a32e9e42Smrg FcResult Values 392a32e9e42Smrg Result Code Meaning 393a32e9e42Smrg ----------------------------------------------------------- 394a32e9e42Smrg FcResultMatch Object exists with the specified ID 395a32e9e42Smrg FcResultNoMatch Object doesn't exist at all 396a32e9e42Smrg FcResultTypeMismatch Object exists, but the type doesn't match 397a32e9e42Smrg FcResultNoId Object exists, but has fewer values 398a32e9e42Smrg than specified 399a32e9e42Smrg FcResultOutOfMemory malloc failed 400a32e9e42Smrg 401a32e9e42Smrg 402a32e9e42Smrg -------------------------------------------------------------------------- 403a32e9e42Smrg 404a32e9e42Smrg FcAtomic 405a32e9e42Smrg 406a32e9e42Smrg Used for locking access to configuration files. Provides a safe way to 407a32e9e42Smrg update configuration files. 408a32e9e42Smrg 409a32e9e42Smrg -------------------------------------------------------------------------- 410a32e9e42Smrg 411a32e9e42Smrg FcCache 412a32e9e42Smrg 413a32e9e42Smrg Holds information about the fonts contained in a single directory. Normal 414a32e9e42Smrg applications need not worry about this as caches for font access are 415a32e9e42Smrg automatically managed by the library. Applications dealing with cache 416a32e9e42Smrg management may want to use some of these objects in their work, however 417a32e9e42Smrg the included 'fc-cache' program generally suffices for all of that. 418a32e9e42Smrg 419a32e9e42Smrg -------------------------------------------------------------------------- 4202c393a42Smrg 421a6844aabSmrgFUNCTIONS 4222c393a42Smrg 423a32e9e42Smrg These are grouped by functionality, often using the main data type being 424a32e9e42Smrg manipulated. 425a32e9e42Smrg 426a32e9e42Smrg -------------------------------------------------------------------------- 4272c393a42Smrg 428a32e9e42Smrg Initialization 429a6844aabSmrg 430ca08ab68Smrg Table of Contents 431a6844aabSmrg 432a32e9e42Smrg [5]FcInitLoadConfig -- load configuration 433a32e9e42Smrg 434a32e9e42Smrg [6]FcInitLoadConfigAndFonts -- load configuration and font data 435a32e9e42Smrg 436a32e9e42Smrg [7]FcInit -- initialize fontconfig library 437a32e9e42Smrg 438a32e9e42Smrg [8]FcFini -- finalize fontconfig library 439a32e9e42Smrg 440a32e9e42Smrg [9]FcGetVersion -- library version number 441ca08ab68Smrg 442a32e9e42Smrg [10]FcInitReinitialize -- re-initialize library 443a32e9e42Smrg 444a32e9e42Smrg [11]FcInitBringUptoDate -- reload configuration files if needed 445a32e9e42Smrg 446a32e9e42Smrg These functions provide some control over how the library is initialized. 447a32e9e42Smrg 448a32e9e42Smrg FcInitLoadConfig 4492c393a42Smrg 4502c393a42SmrgName 4512c393a42Smrg 452a32e9e42Smrg FcInitLoadConfig -- load configuration 4532c393a42Smrg 4542c393a42SmrgSynopsis 4552c393a42Smrg 456a32e9e42Smrg #include <fontconfig/fontconfig.h> 457a32e9e42Smrg 458a6844aabSmrg 459ca08ab68Smrg FcConfig * FcInitLoadConfig(void); 4602c393a42Smrg 4612c393a42SmrgDescription 4622c393a42Smrg 463ca08ab68Smrg Loads the default configuration file and returns the resulting 464ca08ab68Smrg configuration. Does not load any font information. 4652c393a42Smrg 466a32e9e42Smrg FcInitLoadConfigAndFonts 4672c393a42Smrg 4682c393a42SmrgName 4692c393a42Smrg 470a32e9e42Smrg FcInitLoadConfigAndFonts -- load configuration and font data 4712c393a42Smrg 4722c393a42SmrgSynopsis 4732c393a42Smrg 474a32e9e42Smrg #include <fontconfig/fontconfig.h> 475a32e9e42Smrg 476a6844aabSmrg 477ca08ab68Smrg FcConfig * FcInitLoadConfigAndFonts(void); 4782c393a42Smrg 4792c393a42SmrgDescription 4802c393a42Smrg 481a32e9e42Smrg Loads the default configuration file and builds information about the 482a32e9e42Smrg available fonts. Returns the resulting configuration. 4832c393a42Smrg 484a32e9e42Smrg FcInit 4852c393a42Smrg 4862c393a42SmrgName 4872c393a42Smrg 488a32e9e42Smrg FcInit -- initialize fontconfig library 4892c393a42Smrg 4902c393a42SmrgSynopsis 4912c393a42Smrg 492a32e9e42Smrg #include <fontconfig/fontconfig.h> 493a32e9e42Smrg 494a6844aabSmrg 495ca08ab68Smrg FcBool FcInit(void); 4962c393a42Smrg 4972c393a42SmrgDescription 4982c393a42Smrg 499a32e9e42Smrg Loads the default configuration file and the fonts referenced therein and 500a32e9e42Smrg sets the default configuration to that result. Returns whether this 501a32e9e42Smrg process succeeded or not. If the default configuration has already been 502a32e9e42Smrg loaded, this routine does nothing and returns FcTrue. 5032c393a42Smrg 504a32e9e42Smrg FcFini 5052c393a42Smrg 5062c393a42SmrgName 5072c393a42Smrg 508a32e9e42Smrg FcFini -- finalize fontconfig library 5092c393a42Smrg 5102c393a42SmrgSynopsis 5112c393a42Smrg 512a32e9e42Smrg #include <fontconfig/fontconfig.h> 513a32e9e42Smrg 514a6844aabSmrg 515ca08ab68Smrg void FcFini(void); 5162c393a42Smrg 5172c393a42SmrgDescription 5182c393a42Smrg 519a32e9e42Smrg Frees all data structures allocated by previous calls to fontconfig 520a32e9e42Smrg functions. Fontconfig returns to an uninitialized state, requiring a new 521a32e9e42Smrg call to one of the FcInit functions before any other fontconfig function 522a32e9e42Smrg may be called. 5232c393a42Smrg 524a32e9e42Smrg FcGetVersion 5252c393a42Smrg 5262c393a42SmrgName 5272c393a42Smrg 528a32e9e42Smrg FcGetVersion -- library version number 5292c393a42Smrg 5302c393a42SmrgSynopsis 5312c393a42Smrg 532a32e9e42Smrg #include <fontconfig/fontconfig.h> 533a32e9e42Smrg 534a6844aabSmrg 535ca08ab68Smrg int FcGetVersion(void); 5362c393a42Smrg 5372c393a42SmrgDescription 5382c393a42Smrg 539ca08ab68Smrg Returns the version number of the library. 5402c393a42Smrg 541a32e9e42Smrg FcInitReinitialize 5422c393a42Smrg 5432c393a42SmrgName 5442c393a42Smrg 545a32e9e42Smrg FcInitReinitialize -- re-initialize library 5462c393a42Smrg 5472c393a42SmrgSynopsis 5482c393a42Smrg 549a32e9e42Smrg #include <fontconfig/fontconfig.h> 550a32e9e42Smrg 551a6844aabSmrg 552ca08ab68Smrg FcBool FcInitReinitialize(void); 5532c393a42Smrg 5542c393a42SmrgDescription 5552c393a42Smrg 556a32e9e42Smrg Forces the default configuration file to be reloaded and resets the 557a32e9e42Smrg default configuration. Returns FcFalse if the configuration cannot be 558a32e9e42Smrg reloaded (due to configuration file errors, allocation failures or other 559a32e9e42Smrg issues) and leaves the existing configuration unchanged. Otherwise returns 560a32e9e42Smrg FcTrue. 5612c393a42Smrg 562a32e9e42Smrg FcInitBringUptoDate 5632c393a42Smrg 5642c393a42SmrgName 5652c393a42Smrg 566a32e9e42Smrg FcInitBringUptoDate -- reload configuration files if needed 5672c393a42Smrg 5682c393a42SmrgSynopsis 5692c393a42Smrg 570a32e9e42Smrg #include <fontconfig/fontconfig.h> 571a32e9e42Smrg 572a6844aabSmrg 573ca08ab68Smrg FcBool FcInitBringUptoDate(void); 5742c393a42Smrg 5752c393a42SmrgDescription 5762c393a42Smrg 577a32e9e42Smrg Checks the rescan interval in the default configuration, checking the 578a32e9e42Smrg configuration if the interval has passed and reloading the configuration 579a32e9e42Smrg if when any changes are detected. Returns FcFalse if the configuration 580a32e9e42Smrg cannot be reloaded (see FcInitReinitialize). Otherwise returns FcTrue. 581a32e9e42Smrg 582a32e9e42Smrg -------------------------------------------------------------------------- 583ca08ab68Smrg 584a32e9e42Smrg FcPattern 585ca08ab68Smrg 586ca08ab68Smrg Table of Contents 587ca08ab68Smrg 588a32e9e42Smrg [12]FcPatternCreate -- Create a pattern 589ca08ab68Smrg 590a32e9e42Smrg [13]FcPatternDuplicate -- Copy a pattern 591ca08ab68Smrg 592a32e9e42Smrg [14]FcPatternReference -- Increment pattern reference count 593ca08ab68Smrg 594a32e9e42Smrg [15]FcPatternDestroy -- Destroy a pattern 595ca08ab68Smrg 596a32e9e42Smrg [16]FcPatternObjectCount -- Returns the number of the object 597a32e9e42Smrg 598a32e9e42Smrg [17]FcPatternEqual -- Compare patterns 599a32e9e42Smrg 600a32e9e42Smrg [18]FcPatternEqualSubset -- Compare portions of patterns 601a32e9e42Smrg 602a32e9e42Smrg [19]FcPatternFilter -- Filter the objects of pattern 603a32e9e42Smrg 604a32e9e42Smrg [20]FcPatternHash -- Compute a pattern hash value 605a32e9e42Smrg 606a32e9e42Smrg [21]FcPatternAdd -- Add a value to a pattern 607a32e9e42Smrg 608a32e9e42Smrg [22]FcPatternAddWeak -- Add a value to a pattern with weak binding 609a32e9e42Smrg 610a32e9e42Smrg [23]FcPatternAdd-Type -- Add a typed value to a pattern 611a32e9e42Smrg 612a32e9e42Smrg [24]FcPatternGetWithBinding -- Return a value with binding from a pattern 613a32e9e42Smrg 614a32e9e42Smrg [25]FcPatternGet -- Return a value from a pattern 615a32e9e42Smrg 616a32e9e42Smrg [26]FcPatternGet-Type -- Return a typed value from a pattern 617a32e9e42Smrg 618a32e9e42Smrg [27]FcPatternBuild -- Create patterns from arguments 619a32e9e42Smrg 620a32e9e42Smrg [28]FcPatternDel -- Delete a property from a pattern 621a32e9e42Smrg 622a32e9e42Smrg [29]FcPatternRemove -- Remove one object of the specified type from the 623a32e9e42Smrg pattern 624a32e9e42Smrg 625a32e9e42Smrg [30]FcPatternIterStart -- Initialize the iterator with the first iterator 626a32e9e42Smrg in the pattern 627a32e9e42Smrg 628a32e9e42Smrg [31]FcPatternIterNext -- 629a32e9e42Smrg 630a32e9e42Smrg [32]FcPatternIterEqual -- Compare iterators 631a32e9e42Smrg 632a32e9e42Smrg [33]FcPatternFindIter -- Set the iterator to point to the object in the 633a32e9e42Smrg pattern 634a32e9e42Smrg 635a32e9e42Smrg [34]FcPatternIterIsValid -- Check whether the iterator is valid or not 636a32e9e42Smrg 637a32e9e42Smrg [35]FcPatternIterGetObject -- Returns an object name which the iterator 638a32e9e42Smrg point to 639a32e9e42Smrg 640a32e9e42Smrg [36]FcPatternIterValueCount -- Returns the number of the values which the 641a32e9e42Smrg iterator point to 642a32e9e42Smrg 643a32e9e42Smrg [37]FcPatternIterGetValue -- Returns a value which the iterator point to 644a32e9e42Smrg 645a32e9e42Smrg [38]FcPatternPrint -- Print a pattern for debugging 646a32e9e42Smrg 647a32e9e42Smrg [39]FcDefaultSubstitute -- Perform default substitutions in a pattern 648a32e9e42Smrg 649a32e9e42Smrg [40]FcNameParse -- Parse a pattern string 650a32e9e42Smrg 651a32e9e42Smrg [41]FcNameUnparse -- Convert a pattern back into a string that can be 652a32e9e42Smrg parsed 653a32e9e42Smrg 654a32e9e42Smrg [42]FcPatternFormat -- Format a pattern into a string according to a 655a32e9e42Smrg format specifier 656a32e9e42Smrg 657a32e9e42Smrg An FcPattern is an opaque type that holds both patterns to match against 658a32e9e42Smrg the available fonts, as well as the information about each font. 659a32e9e42Smrg 660a32e9e42Smrg FcPatternCreate 6612c393a42Smrg 6622c393a42SmrgName 6632c393a42Smrg 664a32e9e42Smrg FcPatternCreate -- Create a pattern 6652c393a42Smrg 6662c393a42SmrgSynopsis 6672c393a42Smrg 668a32e9e42Smrg #include <fontconfig/fontconfig.h> 669a32e9e42Smrg 670a6844aabSmrg 671ca08ab68Smrg FcPattern * FcPatternCreate(void); 6722c393a42Smrg 6732c393a42SmrgDescription 6742c393a42Smrg 675a32e9e42Smrg Creates a pattern with no properties; used to build patterns from scratch. 6762c393a42Smrg 677a32e9e42Smrg FcPatternDuplicate 6782c393a42Smrg 6792c393a42SmrgName 6802c393a42Smrg 681a32e9e42Smrg FcPatternDuplicate -- Copy a pattern 6822c393a42Smrg 6832c393a42SmrgSynopsis 6842c393a42Smrg 685a32e9e42Smrg #include <fontconfig/fontconfig.h> 686a32e9e42Smrg 687a6844aabSmrg 688ca08ab68Smrg FcPattern * FcPatternDuplicate(const FcPattern *p); 6892c393a42Smrg 6902c393a42SmrgDescription 6912c393a42Smrg 692a32e9e42Smrg Copy a pattern, returning a new pattern that matches p. Each pattern may 693a32e9e42Smrg be modified without affecting the other. 6942c393a42Smrg 695a32e9e42Smrg FcPatternReference 6962c393a42Smrg 6972c393a42SmrgName 6982c393a42Smrg 699a32e9e42Smrg FcPatternReference -- Increment pattern reference count 7002c393a42Smrg 7012c393a42SmrgSynopsis 7022c393a42Smrg 703a32e9e42Smrg #include <fontconfig/fontconfig.h> 704a32e9e42Smrg 705a6844aabSmrg 706ca08ab68Smrg void FcPatternReference(FcPattern *p); 7072c393a42Smrg 7082c393a42SmrgDescription 7092c393a42Smrg 710a32e9e42Smrg Add another reference to p. Patterns are freed only when the reference 711a32e9e42Smrg count reaches zero. 7122c393a42Smrg 713a32e9e42Smrg FcPatternDestroy 7142c393a42Smrg 7152c393a42SmrgName 7162c393a42Smrg 717a32e9e42Smrg FcPatternDestroy -- Destroy a pattern 7182c393a42Smrg 7192c393a42SmrgSynopsis 7202c393a42Smrg 721a32e9e42Smrg #include <fontconfig/fontconfig.h> 722a32e9e42Smrg 723a6844aabSmrg 724ca08ab68Smrg void FcPatternDestroy(FcPattern *p); 7252c393a42Smrg 7262c393a42SmrgDescription 7272c393a42Smrg 728a32e9e42Smrg Decrement the pattern reference count. If all references are gone, 729a32e9e42Smrg destroys the pattern, in the process destroying all related values. 730a32e9e42Smrg 731a32e9e42Smrg FcPatternObjectCount 732a32e9e42Smrg 733a32e9e42SmrgName 734a32e9e42Smrg 735a32e9e42Smrg FcPatternObjectCount -- Returns the number of the object 736a32e9e42Smrg 737a32e9e42SmrgSynopsis 738a32e9e42Smrg 739a32e9e42Smrg #include <fontconfig/fontconfig.h> 740a32e9e42Smrg 741a32e9e42Smrg 742a32e9e42Smrg int FcPatternObjectCount(const FcPattern *p); 743a32e9e42Smrg 744a32e9e42SmrgDescription 745a32e9e42Smrg 746a32e9e42Smrg Returns the number of the object p has. 747a32e9e42Smrg 748a32e9e42SmrgSince 749a32e9e42Smrg 750a32e9e42Smrg version 2.13.1 7512c393a42Smrg 752a32e9e42Smrg FcPatternEqual 7532c393a42Smrg 7542c393a42SmrgName 7552c393a42Smrg 756a32e9e42Smrg FcPatternEqual -- Compare patterns 7572c393a42Smrg 7582c393a42SmrgSynopsis 7592c393a42Smrg 760a32e9e42Smrg #include <fontconfig/fontconfig.h> 761a6844aabSmrg 762a32e9e42Smrg 763a32e9e42Smrg FcBool FcPatternEqual(const FcPattern *pa, const FcPattern *pb); 7642c393a42Smrg 7652c393a42SmrgDescription 7662c393a42Smrg 767ca08ab68Smrg Returns whether pa and pb are exactly alike. 7682c393a42Smrg 769a32e9e42Smrg FcPatternEqualSubset 7702c393a42Smrg 7712c393a42SmrgName 7722c393a42Smrg 773a32e9e42Smrg FcPatternEqualSubset -- Compare portions of patterns 7742c393a42Smrg 7752c393a42SmrgSynopsis 7762c393a42Smrg 777a32e9e42Smrg #include <fontconfig/fontconfig.h> 778a32e9e42Smrg 779a6844aabSmrg 780a32e9e42Smrg FcBool FcPatternEqualSubset(const FcPattern *pa, const FcPattern *pb, 781a32e9e42Smrg const FcObjectSet *os); 7822c393a42Smrg 7832c393a42SmrgDescription 7842c393a42Smrg 785a32e9e42Smrg Returns whether pa and pb have exactly the same values for all of the 786a32e9e42Smrg objects in os. 7872c393a42Smrg 788a32e9e42Smrg FcPatternFilter 789a6844aabSmrg 790a6844aabSmrgName 791a6844aabSmrg 792a32e9e42Smrg FcPatternFilter -- Filter the objects of pattern 793a6844aabSmrg 794a6844aabSmrgSynopsis 795a6844aabSmrg 796a32e9e42Smrg #include <fontconfig/fontconfig.h> 797a32e9e42Smrg 798a6844aabSmrg 799ca08ab68Smrg FcPattern * FcPatternFilter(FcPattern *p, const FcObjectSet *); 800a6844aabSmrg 801a6844aabSmrgDescription 802a6844aabSmrg 803a32e9e42Smrg Returns a new pattern that only has those objects from p that are in os. 804a32e9e42Smrg If os is NULL, a duplicate of p is returned. 805a6844aabSmrg 806a32e9e42Smrg FcPatternHash 8072c393a42Smrg 8082c393a42SmrgName 8092c393a42Smrg 810a32e9e42Smrg FcPatternHash -- Compute a pattern hash value 8112c393a42Smrg 8122c393a42SmrgSynopsis 8132c393a42Smrg 814a32e9e42Smrg #include <fontconfig/fontconfig.h> 815a32e9e42Smrg 816a6844aabSmrg 817ca08ab68Smrg FcChar32 FcPatternHash(const FcPattern *p); 8182c393a42Smrg 8192c393a42SmrgDescription 8202c393a42Smrg 821a32e9e42Smrg Returns a 32-bit number which is the same for any two patterns which are 822a32e9e42Smrg equal. 8232c393a42Smrg 824a32e9e42Smrg FcPatternAdd 8252c393a42Smrg 8262c393a42SmrgName 8272c393a42Smrg 828a32e9e42Smrg FcPatternAdd -- Add a value to a pattern 8292c393a42Smrg 8302c393a42SmrgSynopsis 8312c393a42Smrg 832a32e9e42Smrg #include <fontconfig/fontconfig.h> 8332c393a42Smrg 834a32e9e42Smrg 835a32e9e42Smrg FcBool FcPatternAdd(FcPattern *p, const char *object, FcValue value, 836a32e9e42Smrg FcBool append); 8372c393a42Smrg 8382c393a42SmrgDescription 8392c393a42Smrg 840a32e9e42Smrg Adds a single value to the list of values associated with the property 841a32e9e42Smrg named `object. If `append is FcTrue, the value is added at the end of any 842a32e9e42Smrg existing list, otherwise it is inserted at the beginning. `value' is saved 843a32e9e42Smrg (with FcValueSave) when inserted into the pattern so that the library 844a32e9e42Smrg retains no reference to any application-supplied data structure. 8452c393a42Smrg 846a32e9e42Smrg FcPatternAddWeak 8472c393a42Smrg 8482c393a42SmrgName 8492c393a42Smrg 850a32e9e42Smrg FcPatternAddWeak -- Add a value to a pattern with weak binding 8512c393a42Smrg 8522c393a42SmrgSynopsis 8532c393a42Smrg 854a32e9e42Smrg #include <fontconfig/fontconfig.h> 855a32e9e42Smrg 856a6844aabSmrg 857a32e9e42Smrg FcBool FcPatternAddWeak(FcPattern *p, const char *object, FcValue value, 858a32e9e42Smrg FcBool append); 8592c393a42Smrg 8602c393a42SmrgDescription 8612c393a42Smrg 862a32e9e42Smrg FcPatternAddWeak is essentially the same as FcPatternAdd except that any 863a32e9e42Smrg values added to the list have binding weak instead of strong. 8642c393a42Smrg 865a32e9e42Smrg FcPatternAdd-Type 8662c393a42Smrg 8672c393a42SmrgName 8682c393a42Smrg 869ca08ab68Smrg FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString, 870ca08ab68Smrg FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool, 871a32e9e42Smrg FcPatternAddFTFace, FcPatternAddLangSet, FcPatternAddRange -- Add a typed 872a32e9e42Smrg value to a pattern 8732c393a42Smrg 8742c393a42SmrgSynopsis 8752c393a42Smrg 876a32e9e42Smrg #include <fontconfig/fontconfig.h> 877a32e9e42Smrg 8782c393a42Smrg 879a32e9e42Smrg FcBool FcPatternAddInteger(FcPattern *p, const char *object, int i); 8802c393a42Smrg 881a32e9e42Smrg FcBool FcPatternAddDouble(FcPattern *p, const char *object, double d); 882a6844aabSmrg 883a32e9e42Smrg FcBool FcPatternAddString(FcPattern *p, const char *object, const FcChar8 884a32e9e42Smrg *s); 8852c393a42Smrg 886a32e9e42Smrg FcBool FcPatternAddMatrix(FcPattern *p, const char *object, const FcMatrix 887a32e9e42Smrg *m); 8882c393a42Smrg 889a32e9e42Smrg FcBool FcPatternAddCharSet(FcPattern *p, const char *object, const 890a32e9e42Smrg FcCharSet *c); 8912c393a42Smrg 892a32e9e42Smrg FcBool FcPatternAddBool(FcPattern *p, const char *object, FcBool b); 8932c393a42Smrg 894a32e9e42Smrg FcBool FcPatternAddFTFace(FcPattern *p, const char *object, const 895a32e9e42Smrg FT_Facef); 8962c393a42Smrg 897a32e9e42Smrg FcBool FcPatternAddLangSet(FcPattern *p, const char *object, const 898a32e9e42Smrg FcLangSet *l); 8992c393a42Smrg 900a32e9e42Smrg FcBool FcPatternAddRange(FcPattern *p, const char *object, const FcRange 901a32e9e42Smrg *r); 9022c393a42Smrg 9032c393a42SmrgDescription 9042c393a42Smrg 905a32e9e42Smrg These are all convenience functions that insert objects of the specified 906a32e9e42Smrg type into the pattern. Use these in preference to FcPatternAdd as they 907a32e9e42Smrg will provide compile-time typechecking. These all append values to any 908a32e9e42Smrg existing list of values. FcPatternAddRange are available since 2.11.91. 9092c393a42Smrg 910a32e9e42Smrg FcPatternGetWithBinding 9112c393a42Smrg 9122c393a42SmrgName 9132c393a42Smrg 914a32e9e42Smrg FcPatternGetWithBinding -- Return a value with binding from a pattern 9152c393a42Smrg 9162c393a42SmrgSynopsis 9172c393a42Smrg 918a32e9e42Smrg #include <fontconfig/fontconfig.h> 919a6844aabSmrg 920a32e9e42Smrg 921a32e9e42Smrg FcResult FcPatternGetWithBinding(FcPattern *p, const char *object, int id, 922a32e9e42Smrg FcValue *v, FcValueBinding *b); 9232c393a42Smrg 9242c393a42SmrgDescription 9252c393a42Smrg 926a32e9e42Smrg Returns in v the id'th value and b binding for that associated with the 927a32e9e42Smrg property object. The Value returned is not a copy, but rather refers to 928a32e9e42Smrg the data stored within the pattern directly. Applications must not free 929a32e9e42Smrg this value. 930a32e9e42Smrg 931a32e9e42SmrgSince 932a32e9e42Smrg 933a32e9e42Smrg version 2.12.5 9342c393a42Smrg 935a32e9e42Smrg FcPatternGet 936a32e9e42Smrg 937a32e9e42SmrgName 938a32e9e42Smrg 939a32e9e42Smrg FcPatternGet -- Return a value from a pattern 940a32e9e42Smrg 941a32e9e42SmrgSynopsis 942a32e9e42Smrg 943a32e9e42Smrg #include <fontconfig/fontconfig.h> 944a32e9e42Smrg 945a32e9e42Smrg 946a32e9e42Smrg FcResult FcPatternGet(FcPattern *p, const char *object, int id, FcValue 947a32e9e42Smrg *v); 948a32e9e42Smrg 949a32e9e42SmrgDescription 950a32e9e42Smrg 951a32e9e42Smrg Returns in v the id'th value associated with the property object. The 952a32e9e42Smrg value returned is not a copy, but rather refers to the data stored within 953a32e9e42Smrg the pattern directly. Applications must not free this value. 954a32e9e42Smrg 955a32e9e42Smrg FcPatternGet-Type 9562c393a42Smrg 9572c393a42SmrgName 9582c393a42Smrg 959ca08ab68Smrg FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString, 960ca08ab68Smrg FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool, 961a32e9e42Smrg FcPatternGetFTFace, FcPatternGetLangSet, FcPatternGetRange -- Return a 962a32e9e42Smrg typed value from a pattern 9632c393a42Smrg 9642c393a42SmrgSynopsis 9652c393a42Smrg 966a32e9e42Smrg #include <fontconfig/fontconfig.h> 967a32e9e42Smrg 9682c393a42Smrg 969a32e9e42Smrg FcResult FcPatternGetInteger(FcPattern *p, const char *object, int n, int 970a32e9e42Smrg *i); 9712c393a42Smrg 972a32e9e42Smrg FcResult FcPatternGetDouble(FcPattern *p, const char *object, int n, 973a32e9e42Smrg double *d); 974a6844aabSmrg 975a32e9e42Smrg FcResult FcPatternGetString(FcPattern *p, const char *object, int n, 976a32e9e42Smrg FcChar8 **s); 9772c393a42Smrg 978a32e9e42Smrg FcResult FcPatternGetMatrix(FcPattern *p, const char *object, int n, 979a32e9e42Smrg FcMatrix **s); 9802c393a42Smrg 981a32e9e42Smrg FcResult FcPatternGetCharSet(FcPattern *p, const char *object, int n, 982a32e9e42Smrg FcCharSet **c); 9832c393a42Smrg 984a32e9e42Smrg FcResult FcPatternGetBool(FcPattern *p, const char *object, int n, FcBool 985a32e9e42Smrg *b); 9862c393a42Smrg 987a32e9e42Smrg FcResult FcPatternGetFTFace(FcPattern *p, const char *object, int n, 988a32e9e42Smrg FT_Face *f); 9892c393a42Smrg 990a32e9e42Smrg FcResult FcPatternGetLangSet(FcPattern *p, const char *object, int n, 991a32e9e42Smrg FcLangSet **l); 9922c393a42Smrg 993a32e9e42Smrg FcResult FcPatternGetRange(FcPattern *p, const char *object, int n, 994a32e9e42Smrg FcRange **r); 9952c393a42Smrg 9962c393a42SmrgDescription 9972c393a42Smrg 998a32e9e42Smrg These are convenience functions that call FcPatternGet and verify that the 999a32e9e42Smrg returned data is of the expected type. They return FcResultTypeMismatch if 1000a32e9e42Smrg this is not the case. Note that these (like FcPatternGet) do not make a 1001a32e9e42Smrg copy of any data structure referenced by the return value. Use these in 1002a32e9e42Smrg preference to FcPatternGet to provide compile-time typechecking. 1003a32e9e42Smrg FcPatternGetRange are available since 2.11.91. 10042c393a42Smrg 1005a32e9e42Smrg FcPatternBuild 10062c393a42Smrg 10072c393a42SmrgName 10082c393a42Smrg 1009a32e9e42Smrg FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create patterns 1010a32e9e42Smrg from arguments 10112c393a42Smrg 10122c393a42SmrgSynopsis 10132c393a42Smrg 1014a32e9e42Smrg #include <fontconfig/fontconfig.h> 1015a32e9e42Smrg 10162c393a42Smrg 1017ca08ab68Smrg FcPattern * FcPatternBuild(FcPattern *pattern, ...); 10182c393a42Smrg 1019ca08ab68Smrg FcPattern * FcPatternVaBuild(FcPattern *pattern, va_list va); 1020a6844aabSmrg 1021a32e9e42Smrg void FcPatternVapBuild(FcPattern *result, FcPattern *pattern, va_list va); 10222c393a42Smrg 10232c393a42SmrgDescription 10242c393a42Smrg 1025a32e9e42Smrg Builds a pattern using a list of objects, types and values. Each value to 1026a32e9e42Smrg be entered in the pattern is specified with three arguments: 1027a32e9e42Smrg 1028a32e9e42Smrg 1. Object name, a string describing the property to be added. 1029a32e9e42Smrg 1030a32e9e42Smrg 2. Object type, one of the FcType enumerated values 10312c393a42Smrg 1032a32e9e42Smrg 3. Value, not an FcValue, but the raw type as passed to any of the 1033a32e9e42Smrg FcPatternAdd<type> functions. Must match the type of the second 1034a32e9e42Smrg argument. 10352c393a42Smrg 1036a32e9e42Smrg The argument list is terminated by a null object name, no object type nor 1037a32e9e42Smrg value need be passed for this. The values are added to `pattern', if 1038a32e9e42Smrg `pattern' is null, a new pattern is created. In either case, the pattern 1039a32e9e42Smrg is returned. Example 10402c393a42Smrg 1041a32e9e42Smrg pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0); 1042a6844aabSmrg 1043a32e9e42Smrg FcPatternVaBuild is used when the arguments are already in the form of a 1044a32e9e42Smrg varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild 1045a32e9e42Smrg which returns its result directly in the result variable. 1046a32e9e42Smrg 1047a32e9e42Smrg FcPatternDel 10482c393a42Smrg 10492c393a42SmrgName 10502c393a42Smrg 1051a32e9e42Smrg FcPatternDel -- Delete a property from a pattern 10522c393a42Smrg 10532c393a42SmrgSynopsis 10542c393a42Smrg 1055a32e9e42Smrg #include <fontconfig/fontconfig.h> 1056a32e9e42Smrg 1057a6844aabSmrg 1058ca08ab68Smrg FcBool FcPatternDel(FcPattern *p, const char *object); 10592c393a42Smrg 10602c393a42SmrgDescription 10612c393a42Smrg 1062a32e9e42Smrg Deletes all values associated with the property `object', returning 1063a32e9e42Smrg whether the property existed or not. 1064a32e9e42Smrg 1065a32e9e42Smrg FcPatternRemove 1066a32e9e42Smrg 1067a32e9e42SmrgName 1068a32e9e42Smrg 1069a32e9e42Smrg FcPatternRemove -- Remove one object of the specified type from the 1070a32e9e42Smrg pattern 1071a32e9e42Smrg 1072a32e9e42SmrgSynopsis 1073a32e9e42Smrg 1074a32e9e42Smrg #include <fontconfig/fontconfig.h> 1075a32e9e42Smrg 1076a32e9e42Smrg 1077a32e9e42Smrg FcBool FcPatternRemove(FcPattern *p, const char *object, int id); 1078a32e9e42Smrg 1079a32e9e42SmrgDescription 1080a32e9e42Smrg 1081a32e9e42Smrg Removes the value associated with the property `object' at position `id', 1082a32e9e42Smrg returning whether the property existed and had a value at that position or 1083a32e9e42Smrg not. 10842c393a42Smrg 1085a32e9e42Smrg FcPatternIterStart 10862c393a42Smrg 10872c393a42SmrgName 10882c393a42Smrg 1089a32e9e42Smrg FcPatternIterStart -- Initialize the iterator with the first iterator in 1090953daebaSmrg the pattern 10912c393a42Smrg 10922c393a42SmrgSynopsis 10932c393a42Smrg 1094a32e9e42Smrg #include <fontconfig/fontconfig.h> 1095a6844aabSmrg 1096a32e9e42Smrg 1097a32e9e42Smrg void FcPatternIterStart(const FcPattern *p, FcPatternIter *iter); 10982c393a42Smrg 10992c393a42SmrgDescription 11002c393a42Smrg 1101a32e9e42Smrg Initialize iter with the first iterator in p. If there are no objects in 1102a32e9e42Smrg p, iter will not have any valid data. 1103a32e9e42Smrg 1104a32e9e42SmrgSince 1105a32e9e42Smrg 1106a32e9e42Smrg version 2.13.1 11072c393a42Smrg 1108a32e9e42Smrg FcPatternIterNext 11092c393a42Smrg 11102c393a42SmrgName 11112c393a42Smrg 1112a32e9e42Smrg FcPatternIterNext -- 11132c393a42Smrg 11142c393a42SmrgSynopsis 11152c393a42Smrg 1116a32e9e42Smrg #include <fontconfig/fontconfig.h> 1117a6844aabSmrg 1118a32e9e42Smrg 1119a32e9e42Smrg FcBool FcPatternIterNext(const FcPattern *p, FcPatternIter *iter); 11202c393a42Smrg 11212c393a42SmrgDescription 11222c393a42Smrg 1123a32e9e42Smrg Set iter to point to the next object in p and returns FcTrue if iter has 1124a32e9e42Smrg been changed to the next object. returns FcFalse otherwise. 11252c393a42Smrg 1126a32e9e42SmrgSince 1127a32e9e42Smrg 1128a32e9e42Smrg version 2.13.1 1129a32e9e42Smrg 1130a32e9e42Smrg FcPatternIterEqual 11312c393a42Smrg 11322c393a42SmrgName 11332c393a42Smrg 1134a32e9e42Smrg FcPatternIterEqual -- Compare iterators 1135a32e9e42Smrg 1136a32e9e42SmrgSynopsis 1137a32e9e42Smrg 1138a32e9e42Smrg #include <fontconfig/fontconfig.h> 1139a32e9e42Smrg 1140a32e9e42Smrg 1141a32e9e42Smrg FcBool FcPatternIterEqual(const FcPattern *p1, FcPatternIter *i1, const 1142a32e9e42Smrg FcPattern *p2, FcPatternIter *i2); 1143a32e9e42Smrg 1144a32e9e42SmrgDescription 1145a32e9e42Smrg 1146a32e9e42Smrg Return FcTrue if both i1 and i2 point to same object and contains same 1147a32e9e42Smrg values. return FcFalse otherwise. 1148a32e9e42Smrg 1149a32e9e42SmrgSince 1150a32e9e42Smrg 1151a32e9e42Smrg version 2.13.1 1152a32e9e42Smrg 1153a32e9e42Smrg FcPatternFindIter 1154a32e9e42Smrg 1155a32e9e42SmrgName 1156a32e9e42Smrg 1157a32e9e42Smrg FcPatternFindIter -- Set the iterator to point to the object in the 1158953daebaSmrg pattern 11592c393a42Smrg 11602c393a42SmrgSynopsis 11612c393a42Smrg 1162a32e9e42Smrg #include <fontconfig/fontconfig.h> 1163a32e9e42Smrg 1164a32e9e42Smrg 1165a32e9e42Smrg FcBool FcPatternFindIter(const FcPattern *p, FcPatternIter *iter, const 1166a32e9e42Smrg char *object); 1167a32e9e42Smrg 1168a32e9e42SmrgDescription 1169a32e9e42Smrg 1170a32e9e42Smrg Set iter to point to object in p if any and returns FcTrue. returns 1171a32e9e42Smrg FcFalse otherwise. 1172a32e9e42Smrg 1173a32e9e42SmrgSince 1174a32e9e42Smrg 1175a32e9e42Smrg version 2.13.1 1176a32e9e42Smrg 1177a32e9e42Smrg FcPatternIterIsValid 1178a32e9e42Smrg 1179a32e9e42SmrgName 1180a32e9e42Smrg 1181a32e9e42Smrg FcPatternIterIsValid -- Check whether the iterator is valid or not 1182a32e9e42Smrg 1183a32e9e42SmrgSynopsis 1184a32e9e42Smrg 1185a32e9e42Smrg #include <fontconfig/fontconfig.h> 1186a32e9e42Smrg 1187a32e9e42Smrg 1188a32e9e42Smrg FcBool FcPatternIterIsValid(const FcPattern *p, FcPatternIter :iter); 1189a32e9e42Smrg 1190a32e9e42SmrgDescription 1191a32e9e42Smrg 1192a32e9e42Smrg Returns FcTrue if iter point to the valid entry in p. returns FcFalse 1193a32e9e42Smrg otherwise. 1194a32e9e42Smrg 1195a32e9e42SmrgSince 1196a32e9e42Smrg 1197a32e9e42Smrg version 2.13.1 1198a32e9e42Smrg 1199a32e9e42Smrg FcPatternIterGetObject 1200a32e9e42Smrg 1201a32e9e42SmrgName 1202a32e9e42Smrg 1203a32e9e42Smrg FcPatternIterGetObject -- Returns an object name which the iterator point 1204a32e9e42Smrg to 1205a32e9e42Smrg 1206a32e9e42SmrgSynopsis 1207a32e9e42Smrg 1208a32e9e42Smrg #include <fontconfig/fontconfig.h> 1209a32e9e42Smrg 1210a32e9e42Smrg 1211a32e9e42Smrg const char * FcPatternIterGetObject(const FcPattern *p, FcPatternIter 1212a32e9e42Smrg *iter); 1213a32e9e42Smrg 1214a32e9e42SmrgDescription 1215a32e9e42Smrg 1216a32e9e42Smrg Returns an object name in p which iter point to. returns NULL if iter 1217a32e9e42Smrg isn't valid. 1218a32e9e42Smrg 1219a32e9e42SmrgSince 1220a32e9e42Smrg 1221a32e9e42Smrg version 2.13.1 1222a32e9e42Smrg 1223a32e9e42Smrg FcPatternIterValueCount 1224a32e9e42Smrg 1225a32e9e42SmrgName 1226a32e9e42Smrg 1227a32e9e42Smrg FcPatternIterValueCount -- Returns the number of the values which the 1228a32e9e42Smrg iterator point to 1229a32e9e42Smrg 1230a32e9e42SmrgSynopsis 1231a32e9e42Smrg 1232a32e9e42Smrg #include <fontconfig/fontconfig.h> 1233a32e9e42Smrg 1234a32e9e42Smrg 1235a32e9e42Smrg int FcPatternIterValueCount(const FcPattern *p, FcPatternIter *iter); 1236a32e9e42Smrg 1237a32e9e42SmrgDescription 1238a32e9e42Smrg 1239a32e9e42Smrg Returns the number of the values in the object which iter point to. if 1240a32e9e42Smrg iter isn't valid, returns 0. 1241a32e9e42Smrg 1242a32e9e42SmrgSince 1243a32e9e42Smrg 1244a32e9e42Smrg version 2.13.1 1245a32e9e42Smrg 1246a32e9e42Smrg FcPatternIterGetValue 1247a32e9e42Smrg 1248a32e9e42SmrgName 1249a32e9e42Smrg 1250a32e9e42Smrg FcPatternIterGetValue -- Returns a value which the iterator point to 1251a32e9e42Smrg 1252a32e9e42SmrgSynopsis 1253a32e9e42Smrg 1254a32e9e42Smrg #include <fontconfig/fontconfig.h> 1255a32e9e42Smrg 1256a32e9e42Smrg 1257a32e9e42Smrg FcResult FcPatternIterGetValue(const FcPattern *p, FcPatternIter *iter, 1258a32e9e42Smrg intid, FcValue *v, FcValueBinding *b); 1259a32e9e42Smrg 1260a32e9e42SmrgDescription 1261a32e9e42Smrg 1262a32e9e42Smrg Returns in v the id'th value which iter point to. also binding to b if 1263a32e9e42Smrg given. The value returned is not a copy, but rather refers to the data 1264a32e9e42Smrg stored within the pattern directly. Applications must not free this value. 1265a32e9e42Smrg 1266a32e9e42SmrgSince 1267a32e9e42Smrg 1268a32e9e42Smrg version 2.13.1 1269a32e9e42Smrg 1270a32e9e42Smrg FcPatternPrint 1271a32e9e42Smrg 1272a32e9e42SmrgName 1273a32e9e42Smrg 1274a32e9e42Smrg FcPatternPrint -- Print a pattern for debugging 1275a32e9e42Smrg 1276a32e9e42SmrgSynopsis 1277a32e9e42Smrg 1278a32e9e42Smrg #include <fontconfig/fontconfig.h> 1279a32e9e42Smrg 1280a32e9e42Smrg 1281a32e9e42Smrg void FcPatternPrint(const FcPattern *p); 1282a32e9e42Smrg 1283a32e9e42SmrgDescription 1284a32e9e42Smrg 1285a32e9e42Smrg Prints an easily readable version of the pattern to stdout. There is no 1286a32e9e42Smrg provision for reparsing data in this format, it's just for diagnostics and 1287a32e9e42Smrg debugging. 1288a32e9e42Smrg 1289a32e9e42Smrg FcDefaultSubstitute 1290a32e9e42Smrg 1291a32e9e42SmrgName 1292a32e9e42Smrg 1293a32e9e42Smrg FcDefaultSubstitute -- Perform default substitutions in a pattern 1294a32e9e42Smrg 1295a32e9e42SmrgSynopsis 1296a32e9e42Smrg 1297a32e9e42Smrg #include <fontconfig/fontconfig.h> 1298a32e9e42Smrg 1299a6844aabSmrg 1300ca08ab68Smrg void FcDefaultSubstitute(FcPattern *pattern); 13012c393a42Smrg 13022c393a42SmrgDescription 13032c393a42Smrg 1304ca08ab68Smrg Supplies default values for underspecified font patterns: 1305a6844aabSmrg 1306a32e9e42Smrg * Patterns without a specified style or weight are set to Medium 1307a32e9e42Smrg 1308a32e9e42Smrg * Patterns without a specified style or slant are set to Roman 1309a32e9e42Smrg 1310a32e9e42Smrg * Patterns without a specified pixel size are given one computed from 1311a32e9e42Smrg any specified point size (default 12), dpi (default 75) and scale 1312a32e9e42Smrg (default 1). 13132c393a42Smrg 1314a32e9e42Smrg FcNameParse 13152c393a42Smrg 13162c393a42SmrgName 13172c393a42Smrg 1318a32e9e42Smrg FcNameParse -- Parse a pattern string 13192c393a42Smrg 13202c393a42SmrgSynopsis 13212c393a42Smrg 1322a32e9e42Smrg #include <fontconfig/fontconfig.h> 1323a32e9e42Smrg 1324a6844aabSmrg 1325ca08ab68Smrg FcPattern * FcNameParse(const FcChar8 *name); 13262c393a42Smrg 13272c393a42SmrgDescription 13282c393a42Smrg 1329a32e9e42Smrg Converts name from the standard text format described above into a 1330a32e9e42Smrg pattern. 13312c393a42Smrg 1332a32e9e42Smrg FcNameUnparse 13332c393a42Smrg 13342c393a42SmrgName 13352c393a42Smrg 1336a32e9e42Smrg FcNameUnparse -- Convert a pattern back into a string that can be parsed 13372c393a42Smrg 13382c393a42SmrgSynopsis 13392c393a42Smrg 1340a32e9e42Smrg #include <fontconfig/fontconfig.h> 1341a32e9e42Smrg 1342a6844aabSmrg 1343ca08ab68Smrg FcChar8 * FcNameUnparse(FcPattern *pat); 13442c393a42Smrg 13452c393a42SmrgDescription 13462c393a42Smrg 1347a32e9e42Smrg Converts the given pattern into the standard text format described above. 1348a32e9e42Smrg The return value is not static, but instead refers to newly allocated 1349a32e9e42Smrg memory which should be freed by the caller using free(). 1350a32e9e42Smrg 1351a32e9e42Smrg FcPatternFormat 1352a32e9e42Smrg 1353a32e9e42SmrgName 1354a32e9e42Smrg 1355a32e9e42Smrg FcPatternFormat -- Format a pattern into a string according to a format 1356a32e9e42Smrg specifier 1357a32e9e42Smrg 1358a32e9e42SmrgSynopsis 1359a32e9e42Smrg 1360a32e9e42Smrg #include <fontconfig/fontconfig.h> 1361a32e9e42Smrg 1362a32e9e42Smrg 1363a32e9e42Smrg FcChar8 * FcPatternFormat(FcPattern *pat, const FcChar8 *format); 1364a32e9e42Smrg 1365a32e9e42SmrgDescription 1366a32e9e42Smrg 1367a32e9e42Smrg Converts given pattern pat into text described by the format specifier 1368a32e9e42Smrg format. The return value refers to newly allocated memory which should be 1369a32e9e42Smrg freed by the caller using free(), or NULL if format is invalid. 1370a32e9e42Smrg 1371a32e9e42Smrg The format is loosely modeled after printf-style format string. The 1372a32e9e42Smrg format string is composed of zero or more directives: ordinary characters 1373a32e9e42Smrg (not "%"), which are copied unchanged to the output stream; and tags which 1374a32e9e42Smrg are interpreted to construct text from the pattern in a variety of ways 1375a32e9e42Smrg (explained below). Special characters can be escaped using backslash. 1376a32e9e42Smrg C-string style special characters like \n and \r are also supported (this 1377a32e9e42Smrg is useful when the format string is not a C string literal). It is 1378a32e9e42Smrg advisable to always escape curly braces that are meant to be copied to the 1379a32e9e42Smrg output as ordinary characters. 1380a32e9e42Smrg 1381a32e9e42Smrg Each tag is introduced by the character "%", followed by an optional 1382a32e9e42Smrg minimum field width, followed by tag contents in curly braces ({}). If the 1383a32e9e42Smrg minimum field width value is provided the tag will be expanded and the 1384a32e9e42Smrg result padded to achieve the minimum width. If the minimum field width is 1385a32e9e42Smrg positive, the padding will right-align the text. Negative field width will 1386a32e9e42Smrg left-align. The rest of this section describes various supported tag 1387a32e9e42Smrg contents and their expansion. 1388a32e9e42Smrg 1389a32e9e42Smrg A simple tag is one where the content is an identifier. When simple tags 1390a32e9e42Smrg are expanded, the named identifier will be looked up in pattern and the 1391a32e9e42Smrg resulting list of values returned, joined together using comma. For 1392a32e9e42Smrg example, to print the family name and style of the pattern, use the format 1393a32e9e42Smrg "%{family} %{style}\n". To extend the family column to forty characters 1394a32e9e42Smrg use "%-40{family}%{style}\n". 1395a32e9e42Smrg 1396a32e9e42Smrg Simple tags expand to list of all values for an element. To only choose 1397a32e9e42Smrg one of the values, one can index using the syntax "%{elt[idx]}". For 1398a32e9e42Smrg example, to get the first family name only, use "%{family[0]}". 1399a32e9e42Smrg 1400a32e9e42Smrg If a simple tag ends with "=" and the element is found in the pattern, 1401a32e9e42Smrg the name of the element followed by "=" will be output before the list of 1402a32e9e42Smrg values. For example, "%{weight=}" may expand to the string "weight=80". Or 1403a32e9e42Smrg to the empty string if pattern does not have weight set. 1404a32e9e42Smrg 1405a32e9e42Smrg If a simple tag starts with ":" and the element is found in the pattern, 1406a32e9e42Smrg ":" will be printed first. For example, combining this with the =, the 1407a32e9e42Smrg format "%{:weight=}" may expand to ":weight=80" or to the empty string if 1408a32e9e42Smrg pattern does not have weight set. 1409a32e9e42Smrg 1410a32e9e42Smrg If a simple tag contains the string ":-", the rest of the the tag 1411a32e9e42Smrg contents will be used as a default string. The default string is output if 1412a32e9e42Smrg the element is not found in the pattern. For example, the format 1413a32e9e42Smrg "%{:weight=:-123}" may expand to ":weight=80" or to the string 1414a32e9e42Smrg ":weight=123" if pattern does not have weight set. 1415a32e9e42Smrg 1416a32e9e42Smrg A count tag is one that starts with the character "#" followed by an 1417a32e9e42Smrg element name, and expands to the number of values for the element in the 1418a32e9e42Smrg pattern. For example, "%{#family}" expands to the number of family names 1419a32e9e42Smrg pattern has set, which may be zero. 1420a32e9e42Smrg 1421a32e9e42Smrg A sub-expression tag is one that expands a sub-expression. The tag 1422a32e9e42Smrg contents are the sub-expression to expand placed inside another set of 1423a32e9e42Smrg curly braces. Sub-expression tags are useful for aligning an entire 1424a32e9e42Smrg sub-expression, or to apply converters (explained later) to the entire 1425a32e9e42Smrg sub-expression output. For example, the format "%40{{%{family} %{style}}}" 1426a32e9e42Smrg expands the sub-expression to construct the family name followed by the 1427a32e9e42Smrg style, then takes the entire string and pads it on the left to be at least 1428a32e9e42Smrg forty characters. 1429a32e9e42Smrg 1430a32e9e42Smrg A filter-out tag is one starting with the character "-" followed by a 1431a32e9e42Smrg comma-separated list of element names, followed by a sub-expression 1432a32e9e42Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1433a32e9e42Smrg pattern that has the listed elements removed from it. For example, the 1434a32e9e42Smrg format "%{-size,pixelsize{sub-expr}}" will expand "sub-expr" with pattern 1435a32e9e42Smrg sans the size and pixelsize elements. 1436a32e9e42Smrg 1437a32e9e42Smrg A filter-in tag is one starting with the character "+" followed by a 1438a32e9e42Smrg comma-separated list of element names, followed by a sub-expression 1439a32e9e42Smrg enclosed in curly braces. The sub-expression will be expanded but with a 1440a32e9e42Smrg pattern that only has the listed elements from the surrounding pattern. 1441a32e9e42Smrg For example, the format "%{+family,familylang{sub-expr}}" will expand 1442a32e9e42Smrg "sub-expr" with a sub-pattern consisting only the family and family lang 1443a32e9e42Smrg elements of pattern. 1444a32e9e42Smrg 1445a32e9e42Smrg A conditional tag is one starting with the character "?" followed by a 1446a32e9e42Smrg comma-separated list of element conditions, followed by two sub-expression 1447a32e9e42Smrg enclosed in curly braces. An element condition can be an element name, in 1448a32e9e42Smrg which case it tests whether the element is defined in pattern, or the 1449a32e9e42Smrg character "!" followed by an element name, in which case the test is 1450a32e9e42Smrg negated. The conditional passes if all the element conditions pass. The 1451a32e9e42Smrg tag expands the first sub-expression if the conditional passes, and 1452a32e9e42Smrg expands the second sub-expression otherwise. For example, the format 1453a32e9e42Smrg "%{?size,dpi,!pixelsize{pass}{fail}}" will expand to "pass" if pattern has 1454a32e9e42Smrg size and dpi elements but no pixelsize element, and to "fail" otherwise. 1455a32e9e42Smrg 1456a32e9e42Smrg An enumerate tag is one starting with the string "[]" followed by a 1457a32e9e42Smrg comma-separated list of element names, followed by a sub-expression 1458a32e9e42Smrg enclosed in curly braces. The list of values for the named elements are 1459a32e9e42Smrg walked in parallel and the sub-expression expanded each time with a 1460a32e9e42Smrg pattern just having a single value for those elements, starting from the 1461a32e9e42Smrg first value and continuing as long as any of those elements has a value. 1462ca08ab68Smrg For example, the format "%{[]family,familylang{%{family} 1463a32e9e42Smrg (%{familylang})\n}}" will expand the pattern "%{family} (%{familylang})\n" 1464a32e9e42Smrg with a pattern having only the first value of the family and familylang 1465a32e9e42Smrg elements, then expands it with the second values, then the third, etc. 1466a6844aabSmrg 1467a32e9e42Smrg As a special case, if an enumerate tag has only one element, and that 1468a32e9e42Smrg element has only one value in the pattern, and that value is of type 1469a32e9e42Smrg FcLangSet, the individual languages in the language set are enumerated. 1470a6844aabSmrg 1471a32e9e42Smrg A builtin tag is one starting with the character "=" followed by a 1472a32e9e42Smrg builtin name. The following builtins are defined: 1473a6844aabSmrg 1474ca08ab68Smrg unparse 1475a32e9e42Smrg 1476a32e9e42Smrg Expands to the result of calling FcNameUnparse() on the pattern. 1477a6844aabSmrg 1478ca08ab68Smrg fcmatch 1479a32e9e42Smrg 1480a32e9e42Smrg Expands to the output of the default output format of the fc-match 1481a32e9e42Smrg command on the pattern, without the final newline. 1482a6844aabSmrg 1483ca08ab68Smrg fclist 1484a32e9e42Smrg 1485a32e9e42Smrg Expands to the output of the default output format of the fc-list 1486a32e9e42Smrg command on the pattern, without the final newline. 1487a6844aabSmrg 1488ca08ab68Smrg fccat 1489a32e9e42Smrg 1490a32e9e42Smrg Expands to the output of the default output format of the fc-cat 1491a32e9e42Smrg command on the pattern, without the final newline. 1492a6844aabSmrg 1493ca08ab68Smrg pkgkit 1494a32e9e42Smrg 1495a32e9e42Smrg Expands to the list of PackageKit font() tags for the pattern. 1496a32e9e42Smrg Currently this includes tags for each family name, and each 1497a32e9e42Smrg language from the pattern, enumerated and sanitized into a set of 1498a32e9e42Smrg tags terminated by newline. Package management systems can use 1499a32e9e42Smrg these tags to tag their packages accordingly. 1500a32e9e42Smrg 1501a32e9e42Smrg For example, the format "%{+family,style{%{=unparse}}}\n" will expand to 1502a32e9e42Smrg an unparsed name containing only the family and style element values from 1503a32e9e42Smrg pattern. 1504a32e9e42Smrg 1505a32e9e42Smrg The contents of any tag can be followed by a set of zero or more 1506a32e9e42Smrg converters. A converter is specified by the character "|" followed by the 1507a32e9e42Smrg converter name and arguments. The following converters are defined: 1508a6844aabSmrg 1509ca08ab68Smrg basename 1510a32e9e42Smrg 1511a32e9e42Smrg Replaces text with the results of calling FcStrBasename() on it. 1512a6844aabSmrg 1513ca08ab68Smrg dirname 1514a32e9e42Smrg 1515a32e9e42Smrg Replaces text with the results of calling FcStrDirname() on it. 1516a6844aabSmrg 1517ca08ab68Smrg downcase 1518a32e9e42Smrg 1519a32e9e42Smrg Replaces text with the results of calling FcStrDowncase() on it. 1520a6844aabSmrg 1521ca08ab68Smrg shescape 1522a32e9e42Smrg 1523a32e9e42Smrg Escapes text for one level of shell expansion. (Escapes 1524a32e9e42Smrg single-quotes, also encloses text in single-quotes.) 1525a6844aabSmrg 1526ca08ab68Smrg cescape 1527a32e9e42Smrg 1528a32e9e42Smrg Escapes text such that it can be used as part of a C string 1529a32e9e42Smrg literal. (Escapes backslash and double-quotes.) 1530a6844aabSmrg 1531ca08ab68Smrg xmlescape 1532a32e9e42Smrg 1533a32e9e42Smrg Escapes text such that it can be used in XML and HTML. (Escapes 1534a32e9e42Smrg less-than, greater-than, and ampersand.) 1535a6844aabSmrg 1536ca08ab68Smrg delete(chars) 1537a32e9e42Smrg 1538a32e9e42Smrg Deletes all occurrences of each of the characters in chars from 1539a32e9e42Smrg the text. FIXME: This converter is not UTF-8 aware yet. 1540a6844aabSmrg 1541ca08ab68Smrg escape(chars) 1542a32e9e42Smrg 1543a32e9e42Smrg Escapes all occurrences of each of the characters in chars by 1544a32e9e42Smrg prepending it by the first character in chars. FIXME: This 1545a32e9e42Smrg converter is not UTF-8 aware yet. 1546a6844aabSmrg 1547ca08ab68Smrg translate(from,to) 1548ca08ab68Smrg 1549a32e9e42Smrg Translates all occurrences of each of the characters in from by 1550a32e9e42Smrg replacing them with their corresponding character in to. If to has 1551a32e9e42Smrg fewer characters than from, it will be extended by repeating its 1552a32e9e42Smrg last character. FIXME: This converter is not UTF-8 aware yet. 1553a32e9e42Smrg 1554a32e9e42Smrg For example, the format "%{family|downcase|delete( )}\n" will expand to 1555a32e9e42Smrg the values of the family element in pattern, lower-cased and with spaces 1556a32e9e42Smrg removed. 15572c393a42Smrg 1558b09479dcSmrgSince 15592c393a42Smrg 1560b09479dcSmrg version 2.9.0 1561ca08ab68Smrg 1562a32e9e42Smrg -------------------------------------------------------------------------- 1563a32e9e42Smrg 1564a32e9e42Smrg FcFontSet 1565ca08ab68Smrg 1566ca08ab68Smrg Table of Contents 1567ca08ab68Smrg 1568a32e9e42Smrg [43]FcFontSetCreate -- Create a font set 1569a32e9e42Smrg 1570a32e9e42Smrg [44]FcFontSetDestroy -- Destroy a font set 1571a32e9e42Smrg 1572a32e9e42Smrg [45]FcFontSetAdd -- Add to a font set 1573a6844aabSmrg 1574a32e9e42Smrg [46]FcFontSetList -- List fonts from a set of font sets 1575a32e9e42Smrg 1576a32e9e42Smrg [47]FcFontSetMatch -- Return the best font from a set of font sets 1577a32e9e42Smrg 1578a32e9e42Smrg [48]FcFontSetPrint -- Print a set of patterns to stdout 1579a32e9e42Smrg 1580a32e9e42Smrg [49]FcFontSetSort -- Add to a font set 1581a32e9e42Smrg 1582a32e9e42Smrg [50]FcFontSetSortDestroy -- DEPRECATED destroy a font set 1583a32e9e42Smrg 1584a32e9e42Smrg An FcFontSet simply holds a list of patterns; these are used to return the 1585a32e9e42Smrg results of listing available fonts. 1586a32e9e42Smrg 1587a32e9e42Smrg FcFontSetCreate 15882c393a42Smrg 15892c393a42SmrgName 15902c393a42Smrg 1591a32e9e42Smrg FcFontSetCreate -- Create a font set 15922c393a42Smrg 15932c393a42SmrgSynopsis 15942c393a42Smrg 1595a32e9e42Smrg #include <fontconfig/fontconfig.h> 1596a32e9e42Smrg 1597a6844aabSmrg 1598ca08ab68Smrg FcFontSet * FcFontSetCreate(void); 15992c393a42Smrg 16002c393a42SmrgDescription 16012c393a42Smrg 1602ca08ab68Smrg Creates an empty font set. 16032c393a42Smrg 1604a32e9e42Smrg FcFontSetDestroy 16052c393a42Smrg 16062c393a42SmrgName 16072c393a42Smrg 1608a32e9e42Smrg FcFontSetDestroy -- Destroy a font set 16092c393a42Smrg 16102c393a42SmrgSynopsis 16112c393a42Smrg 1612a32e9e42Smrg #include <fontconfig/fontconfig.h> 1613a32e9e42Smrg 1614a6844aabSmrg 1615ca08ab68Smrg void FcFontSetDestroy(FcFontSet *s); 16162c393a42Smrg 16172c393a42SmrgDescription 16182c393a42Smrg 1619a32e9e42Smrg Destroys a font set. Note that this destroys any referenced patterns as 1620a32e9e42Smrg well. 16212c393a42Smrg 1622a32e9e42Smrg FcFontSetAdd 16232c393a42Smrg 16242c393a42SmrgName 16252c393a42Smrg 1626a32e9e42Smrg FcFontSetAdd -- Add to a font set 16272c393a42Smrg 16282c393a42SmrgSynopsis 16292c393a42Smrg 1630a32e9e42Smrg #include <fontconfig/fontconfig.h> 1631a32e9e42Smrg 1632a6844aabSmrg 1633ca08ab68Smrg FcBool FcFontSetAdd(FcFontSet *s, FcPattern *font); 16342c393a42Smrg 16352c393a42SmrgDescription 16362c393a42Smrg 1637a32e9e42Smrg Adds a pattern to a font set. Note that the pattern is not copied before 1638a32e9e42Smrg being inserted into the set. Returns FcFalse if the pattern cannot be 1639a32e9e42Smrg inserted into the set (due to allocation failure). Otherwise returns 1640a32e9e42Smrg FcTrue. 16412c393a42Smrg 1642a32e9e42Smrg FcFontSetList 16432c393a42Smrg 16442c393a42SmrgName 16452c393a42Smrg 1646a32e9e42Smrg FcFontSetList -- List fonts from a set of font sets 16472c393a42Smrg 16482c393a42SmrgSynopsis 16492c393a42Smrg 1650a32e9e42Smrg #include <fontconfig/fontconfig.h> 1651a32e9e42Smrg 1652a6844aabSmrg 1653a32e9e42Smrg FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets, intnsets, 1654a32e9e42Smrg FcPattern *pattern, FcObjectSet *object_set); 16552c393a42Smrg 16562c393a42SmrgDescription 16572c393a42Smrg 1658a32e9e42Smrg Selects fonts matching pattern from sets, creates patterns from those 1659a32e9e42Smrg fonts containing only the objects in object_set and returns the set of 1660a32e9e42Smrg unique such patterns. If config is NULL, the default configuration is 1661a32e9e42Smrg checked to be up to date, and used. 16622c393a42Smrg 1663a32e9e42Smrg FcFontSetMatch 16642c393a42Smrg 16652c393a42SmrgName 16662c393a42Smrg 1667a32e9e42Smrg FcFontSetMatch -- Return the best font from a set of font sets 16682c393a42Smrg 16692c393a42SmrgSynopsis 16702c393a42Smrg 1671a32e9e42Smrg #include <fontconfig/fontconfig.h> 1672a6844aabSmrg 1673a32e9e42Smrg 1674a32e9e42Smrg FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets, intnsets, 1675a32e9e42Smrg FcPattern *pattern, FcResult *result); 16762c393a42Smrg 16772c393a42SmrgDescription 16782c393a42Smrg 1679a32e9e42Smrg Finds the font in sets most closely matching pattern and returns the 1680a32e9e42Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 1681a32e9e42Smrg function should be called only after FcConfigSubstitute and 1682a32e9e42Smrg FcDefaultSubstitute have been called for pattern; otherwise the results 1683a32e9e42Smrg will not be correct. If config is NULL, the current configuration is used. 1684a32e9e42Smrg Returns NULL if an error occurs during this process. 16852c393a42Smrg 1686a32e9e42Smrg FcFontSetPrint 16872c393a42Smrg 16882c393a42SmrgName 16892c393a42Smrg 1690a32e9e42Smrg FcFontSetPrint -- Print a set of patterns to stdout 16912c393a42Smrg 16922c393a42SmrgSynopsis 16932c393a42Smrg 1694a32e9e42Smrg #include <fontconfig/fontconfig.h> 1695a32e9e42Smrg 1696a6844aabSmrg 1697ca08ab68Smrg void FcFontSetPrint(FcFontSet *set); 16982c393a42Smrg 16992c393a42SmrgDescription 17002c393a42Smrg 1701a32e9e42Smrg This function is useful for diagnosing font related issues, printing the 1702a32e9e42Smrg complete contents of every pattern in set. The format of the output is 1703a32e9e42Smrg designed to be of help to users and developers, and may change at any 1704a32e9e42Smrg time. 17052c393a42Smrg 1706a32e9e42Smrg FcFontSetSort 17072c393a42Smrg 17082c393a42SmrgName 17092c393a42Smrg 1710a32e9e42Smrg FcFontSetSort -- Add to a font set 17112c393a42Smrg 17122c393a42SmrgSynopsis 17132c393a42Smrg 1714a32e9e42Smrg #include <fontconfig/fontconfig.h> 17152c393a42Smrg 1716a32e9e42Smrg 1717a32e9e42Smrg FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets, FcPattern 1718a32e9e42Smrg *pattern, FcBool trim, FcCharSet **csp, FcResult *result); 17192c393a42Smrg 17202c393a42SmrgDescription 17212c393a42Smrg 1722a32e9e42Smrg Returns the list of fonts from sets sorted by closeness to pattern. If 1723a32e9e42Smrg trim is FcTrue, elements in the list which don't include Unicode coverage 1724a32e9e42Smrg not provided by earlier elements in the list are elided. The union of 1725a32e9e42Smrg Unicode coverage of all of the fonts is returned in csp, if csp is not 1726a32e9e42Smrg NULL. This function should be called only after FcConfigSubstitute and 1727a32e9e42Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 1728a32e9e42Smrg be correct. 17292c393a42Smrg 1730a32e9e42Smrg The returned FcFontSet references FcPattern structures which may be shared 1731a32e9e42Smrg by the return value from multiple FcFontSort calls, applications cannot 1732a32e9e42Smrg modify these patterns. Instead, they should be passed, along with pattern 1733a32e9e42Smrg to FcFontRenderPrepare which combines them into a complete pattern. 17342c393a42Smrg 1735ca08ab68Smrg The FcFontSet returned by FcFontSetSort is destroyed by calling 1736ca08ab68Smrg FcFontSetDestroy. 17372c393a42Smrg 1738a32e9e42Smrg FcFontSetSortDestroy 17392c393a42Smrg 17402c393a42SmrgName 17412c393a42Smrg 1742a32e9e42Smrg FcFontSetSortDestroy -- DEPRECATED destroy a font set 17432c393a42Smrg 17442c393a42SmrgSynopsis 17452c393a42Smrg 1746a32e9e42Smrg #include <fontconfig/fontconfig.h> 1747a32e9e42Smrg 1748a6844aabSmrg 1749ca08ab68Smrg FcFontSetSortDestroy(FcFontSet *set); 17502c393a42Smrg 17512c393a42SmrgDescription 17522c393a42Smrg 1753a32e9e42Smrg This function is DEPRECATED. FcFontSetSortDestroy destroys set by calling 1754a32e9e42Smrg FcFontSetDestroy. Applications should use FcFontSetDestroy directly 1755a32e9e42Smrg instead. 17562c393a42Smrg 1757a32e9e42Smrg -------------------------------------------------------------------------- 1758a32e9e42Smrg 1759a32e9e42Smrg FcObjectSet 1760ca08ab68Smrg 1761ca08ab68Smrg Table of Contents 1762ca08ab68Smrg 1763a32e9e42Smrg [51]FcObjectSetCreate -- Create an object set 1764a32e9e42Smrg 1765a32e9e42Smrg [52]FcObjectSetAdd -- Add to an object set 1766a32e9e42Smrg 1767a32e9e42Smrg [53]FcObjectSetDestroy -- Destroy an object set 17682c393a42Smrg 1769a32e9e42Smrg [54]FcObjectSetBuild -- Build object set from args 1770a32e9e42Smrg 1771a32e9e42Smrg An FcObjectSet holds a list of pattern property names; it is used to 1772a32e9e42Smrg indicate which properties are to be returned in the patterns from 1773a32e9e42Smrg FcFontList. 1774a32e9e42Smrg 1775a32e9e42Smrg FcObjectSetCreate 17762c393a42Smrg 17772c393a42SmrgName 17782c393a42Smrg 1779a32e9e42Smrg FcObjectSetCreate -- Create an object set 17802c393a42Smrg 17812c393a42SmrgSynopsis 17822c393a42Smrg 1783a32e9e42Smrg #include <fontconfig/fontconfig.h> 1784a32e9e42Smrg 1785a6844aabSmrg 1786ca08ab68Smrg FcObjectSet * FcObjectSetCreate(void); 17872c393a42Smrg 17882c393a42SmrgDescription 17892c393a42Smrg 1790ca08ab68Smrg Creates an empty set. 17912c393a42Smrg 1792a32e9e42Smrg FcObjectSetAdd 17932c393a42Smrg 17942c393a42SmrgName 17952c393a42Smrg 1796a32e9e42Smrg FcObjectSetAdd -- Add to an object set 17972c393a42Smrg 17982c393a42SmrgSynopsis 17992c393a42Smrg 1800a32e9e42Smrg #include <fontconfig/fontconfig.h> 1801a32e9e42Smrg 1802a6844aabSmrg 1803ca08ab68Smrg FcBool FcObjectSetAdd(FcObjectSet *os, const char *object); 18042c393a42Smrg 18052c393a42SmrgDescription 18062c393a42Smrg 1807a32e9e42Smrg Adds a property name to the set. Returns FcFalse if the property name 1808a32e9e42Smrg cannot be inserted into the set (due to allocation failure). Otherwise 1809a32e9e42Smrg returns FcTrue. 18102c393a42Smrg 1811a32e9e42Smrg FcObjectSetDestroy 18122c393a42Smrg 18132c393a42SmrgName 18142c393a42Smrg 1815a32e9e42Smrg FcObjectSetDestroy -- Destroy an object set 18162c393a42Smrg 18172c393a42SmrgSynopsis 18182c393a42Smrg 1819a32e9e42Smrg #include <fontconfig/fontconfig.h> 1820a32e9e42Smrg 1821a6844aabSmrg 1822ca08ab68Smrg void FcObjectSetDestroy(FcObjectSet *os); 18232c393a42Smrg 18242c393a42SmrgDescription 18252c393a42Smrg 1826ca08ab68Smrg Destroys an object set. 18272c393a42Smrg 1828a32e9e42Smrg FcObjectSetBuild 18292c393a42Smrg 18302c393a42SmrgName 18312c393a42Smrg 1832a32e9e42Smrg FcObjectSetBuild, FcObjectSetVaBuild, FcObjectSetVapBuild -- Build object 1833a32e9e42Smrg set from args 18342c393a42Smrg 18352c393a42SmrgSynopsis 18362c393a42Smrg 1837a32e9e42Smrg #include <fontconfig/fontconfig.h> 1838a32e9e42Smrg 18392c393a42Smrg 1840ca08ab68Smrg FcObjectSet * FcObjectSetBuild(const char *first, ...); 18412c393a42Smrg 1842a32e9e42Smrg FcObjectSet * FcObjectSetVaBuild(const char *first, va_list va); 18432c393a42Smrg 1844a32e9e42Smrg void FcObjectSetVapBuild(FcObjectSet *result, const char *first, va_list 1845a32e9e42Smrg va); 18462c393a42Smrg 1847953daebaSmrgDescription 18482c393a42Smrg 1849a32e9e42Smrg These build an object set from a null-terminated list of property names. 1850a32e9e42Smrg FcObjectSetVapBuild is a macro version of FcObjectSetVaBuild which returns 1851a32e9e42Smrg the result in the result variable directly. 1852ca08ab68Smrg 1853a32e9e42Smrg -------------------------------------------------------------------------- 1854a32e9e42Smrg 1855a32e9e42Smrg FreeType specific functions 1856ca08ab68Smrg 1857ca08ab68Smrg Table of Contents 1858ca08ab68Smrg 1859a32e9e42Smrg [55]FcFreeTypeCharIndex -- map Unicode to glyph id 1860a32e9e42Smrg 1861a32e9e42Smrg [56]FcFreeTypeCharSet -- compute Unicode coverage 1862a32e9e42Smrg 1863a32e9e42Smrg [57]FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing 1864a32e9e42Smrg type 18652c393a42Smrg 1866a32e9e42Smrg [58]FcFreeTypeQuery -- compute pattern from font file (and index) 18672c393a42Smrg 1868a32e9e42Smrg [59]FcFreeTypeQueryAll -- compute all patterns from font file (and index) 1869a32e9e42Smrg 1870a32e9e42Smrg [60]FcFreeTypeQueryFace -- compute pattern from FT_Face 1871a32e9e42Smrg 1872a32e9e42Smrg While the fontconfig library doesn't insist that FreeType be used as the 1873a32e9e42Smrg rasterization mechanism for fonts, it does provide some convenience 1874a32e9e42Smrg functions. 1875a32e9e42Smrg 1876a32e9e42Smrg FcFreeTypeCharIndex 18772c393a42Smrg 18782c393a42SmrgName 18792c393a42Smrg 1880a32e9e42Smrg FcFreeTypeCharIndex -- map Unicode to glyph id 18812c393a42Smrg 18822c393a42SmrgSynopsis 18832c393a42Smrg 1884a32e9e42Smrg #include <fontconfig.h> 1885a32e9e42Smrg #include <fcfreetype.h> 1886a32e9e42Smrg 1887a6844aabSmrg 1888ca08ab68Smrg FT_UInt FcFreeTypeCharIndex(FT_Face face, FcChar32 ucs4); 18892c393a42Smrg 18902c393a42SmrgDescription 18912c393a42Smrg 1892a32e9e42Smrg Maps a Unicode char to a glyph index. This function uses information from 1893a32e9e42Smrg several possible underlying encoding tables to work around broken fonts. 1894a32e9e42Smrg As a result, this function isn't designed to be used in performance 1895a32e9e42Smrg sensitive areas; results from this function are intended to be cached by 1896a32e9e42Smrg higher level functions. 18972c393a42Smrg 1898a32e9e42Smrg FcFreeTypeCharSet 18992c393a42Smrg 19002c393a42SmrgName 19012c393a42Smrg 1902a32e9e42Smrg FcFreeTypeCharSet -- compute Unicode coverage 19032c393a42Smrg 19042c393a42SmrgSynopsis 19052c393a42Smrg 1906a32e9e42Smrg #include <fontconfig.h> 1907a32e9e42Smrg #include <fcfreetype.h> 1908a32e9e42Smrg 1909a6844aabSmrg 1910ca08ab68Smrg FcCharSet * FcFreeTypeCharSet(FT_Face face, FcBlanks *blanks); 19112c393a42Smrg 19122c393a42SmrgDescription 19132c393a42Smrg 1914a32e9e42Smrg Scans a FreeType face and returns the set of encoded Unicode chars. 1915a32e9e42Smrg FcBlanks is deprecated, blanks is ignored and accepted only for 1916a32e9e42Smrg compatibility with older code. 1917a32e9e42Smrg 1918a32e9e42Smrg FcFreeTypeCharSetAndSpacing 1919a32e9e42Smrg 1920a32e9e42SmrgName 1921a32e9e42Smrg 1922a32e9e42Smrg FcFreeTypeCharSetAndSpacing -- compute Unicode coverage and spacing type 1923a32e9e42Smrg 1924a32e9e42SmrgSynopsis 1925a32e9e42Smrg 1926a32e9e42Smrg #include <fontconfig.h> 1927a32e9e42Smrg #include <fcfreetype.h> 1928a32e9e42Smrg 1929a32e9e42Smrg 1930a32e9e42Smrg FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks *blanks, 1931a32e9e42Smrg int *spacing); 1932a32e9e42Smrg 1933a32e9e42SmrgDescription 1934a32e9e42Smrg 1935a32e9e42Smrg Scans a FreeType face and returns the set of encoded Unicode chars. 1936a32e9e42Smrg FcBlanks is deprecated, blanks is ignored and accepted only for 1937a32e9e42Smrg compatibility with older code. spacing receives the computed spacing type 1938a32e9e42Smrg of the font, one of FC_MONO for a font where all glyphs have the same 1939a32e9e42Smrg width, FC_DUAL, where the font has glyphs in precisely two widths, one 1940a32e9e42Smrg twice as wide as the other, or FC_PROPORTIONAL where the font has glyphs 1941a32e9e42Smrg of many widths. 19422c393a42Smrg 1943a32e9e42Smrg FcFreeTypeQuery 19442c393a42Smrg 19452c393a42SmrgName 19462c393a42Smrg 1947a32e9e42Smrg FcFreeTypeQuery -- compute pattern from font file (and index) 19482c393a42Smrg 19492c393a42SmrgSynopsis 19502c393a42Smrg 1951a32e9e42Smrg #include <fontconfig.h> 1952a32e9e42Smrg #include <fcfreetype.h> 1953a32e9e42Smrg 1954a6844aabSmrg 1955a32e9e42Smrg FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id, FcBlanks *blanks, 1956a32e9e42Smrg int *count); 19572c393a42Smrg 19582c393a42SmrgDescription 19592c393a42Smrg 1960a32e9e42Smrg Constructs a pattern representing the 'id'th face in 'file'. The number of 1961a32e9e42Smrg faces in 'file' is returned in 'count'. FcBlanks is deprecated, blanks is 1962a32e9e42Smrg ignored and accepted only for compatibility with older code. 19632c393a42Smrg 1964a32e9e42Smrg FcFreeTypeQueryAll 19652c393a42Smrg 19662c393a42SmrgName 19672c393a42Smrg 1968a32e9e42Smrg FcFreeTypeQueryAll -- compute all patterns from font file (and index) 19692c393a42Smrg 19702c393a42SmrgSynopsis 19712c393a42Smrg 1972a32e9e42Smrg #include <fontconfig.h> 1973a32e9e42Smrg #include <fcfreetype.h> 1974a32e9e42Smrg 1975a6844aabSmrg 1976a32e9e42Smrg unsigned int FcFreeTypeQueryAll(const FcChar8 *file, int id, FcBlanks 1977a32e9e42Smrg *blanks, int *count, FcFontSet *set); 19782c393a42Smrg 19792c393a42SmrgDescription 19802c393a42Smrg 1981a32e9e42Smrg Constructs patterns found in 'file'. If id is -1, then all patterns found 1982a32e9e42Smrg in 'file' are added to 'set'. Otherwise, this function works exactly like 1983a32e9e42Smrg FcFreeTypeQuery(). The number of faces in 'file' is returned in 'count'. 1984a32e9e42Smrg The number of patterns added to 'set' is returned. FcBlanks is deprecated, 1985a32e9e42Smrg blanks is ignored and accepted only for compatibility with older code. 1986a32e9e42Smrg 1987a32e9e42SmrgSince 1988a32e9e42Smrg 1989a32e9e42Smrg version 2.12.91 19902c393a42Smrg 1991a32e9e42Smrg FcFreeTypeQueryFace 19922c393a42Smrg 19932c393a42SmrgName 19942c393a42Smrg 1995a32e9e42Smrg FcFreeTypeQueryFace -- compute pattern from FT_Face 19962c393a42Smrg 19972c393a42SmrgSynopsis 19982c393a42Smrg 1999a32e9e42Smrg #include <fontconfig.h> 2000a32e9e42Smrg #include <fcfreetype.h> 20012c393a42Smrg 2002a32e9e42Smrg 2003a32e9e42Smrg FcPattern * FcFreeTypeQueryFace(const FT_Face face, const FcChar8 *file, 2004a32e9e42Smrg int id, FcBlanks *blanks); 20052c393a42Smrg 20062c393a42SmrgDescription 20072c393a42Smrg 2008a32e9e42Smrg Constructs a pattern representing 'face'. 'file' and 'id' are used solely 2009a32e9e42Smrg as data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY). 2010a32e9e42Smrg FcBlanks is deprecated, blanks is ignored and accepted only for 2011a32e9e42Smrg compatibility with older code. 2012a32e9e42Smrg 2013a32e9e42Smrg -------------------------------------------------------------------------- 2014ca08ab68Smrg 2015a32e9e42Smrg FcValue 2016ca08ab68Smrg 2017ca08ab68Smrg Table of Contents 2018ca08ab68Smrg 2019a32e9e42Smrg [61]FcValueDestroy -- Free a value 2020a32e9e42Smrg 2021a32e9e42Smrg [62]FcValueSave -- Copy a value 2022a32e9e42Smrg 2023a32e9e42Smrg [63]FcValuePrint -- Print a value to stdout 2024a32e9e42Smrg 2025a32e9e42Smrg [64]FcValueEqual -- Test two values for equality 2026a32e9e42Smrg 2027a32e9e42Smrg FcValue is a structure containing a type tag and a union of all possible 2028a32e9e42Smrg datatypes. The tag is an enum of type FcType and is intended to provide a 2029a32e9e42Smrg measure of run-time typechecking, although that depends on careful 2030a32e9e42Smrg programming. 2031a6844aabSmrg 2032a32e9e42Smrg FcValueDestroy 20332c393a42Smrg 20342c393a42SmrgName 20352c393a42Smrg 2036a32e9e42Smrg FcValueDestroy -- Free a value 20372c393a42Smrg 20382c393a42SmrgSynopsis 20392c393a42Smrg 2040a32e9e42Smrg #include <fontconfig/fontconfig.h> 2041a32e9e42Smrg 2042a6844aabSmrg 2043ca08ab68Smrg void FcValueDestroy(FcValue v); 20442c393a42Smrg 20452c393a42SmrgDescription 20462c393a42Smrg 2047ca08ab68Smrg Frees any memory referenced by v. Values of type FcTypeString, 2048a32e9e42Smrg FcTypeMatrix and FcTypeCharSet reference memory, the other types do not. 20492c393a42Smrg 2050a32e9e42Smrg FcValueSave 20512c393a42Smrg 20522c393a42SmrgName 20532c393a42Smrg 2054a32e9e42Smrg FcValueSave -- Copy a value 20552c393a42Smrg 20562c393a42SmrgSynopsis 20572c393a42Smrg 2058a32e9e42Smrg #include <fontconfig/fontconfig.h> 2059a32e9e42Smrg 2060a6844aabSmrg 2061ca08ab68Smrg FcValue FcValueSave(FcValue v); 20622c393a42Smrg 20632c393a42SmrgDescription 20642c393a42Smrg 2065a32e9e42Smrg Returns a copy of v duplicating any object referenced by it so that v may 2066a32e9e42Smrg be safely destroyed without harming the new value. 20672c393a42Smrg 2068a32e9e42Smrg FcValuePrint 20692c393a42Smrg 20702c393a42SmrgName 20712c393a42Smrg 2072a32e9e42Smrg FcValuePrint -- Print a value to stdout 20732c393a42Smrg 20742c393a42SmrgSynopsis 20752c393a42Smrg 2076a32e9e42Smrg #include <fontconfig/fontconfig.h> 2077a32e9e42Smrg 2078a6844aabSmrg 2079ca08ab68Smrg void FcValuePrint(FcValue v); 20802c393a42Smrg 20812c393a42SmrgDescription 20822c393a42Smrg 2083a32e9e42Smrg Prints a human-readable representation of v to stdout. The format should 2084a32e9e42Smrg not be considered part of the library specification as it may change in 2085a32e9e42Smrg the future. 20862c393a42Smrg 2087a32e9e42Smrg FcValueEqual 20882c393a42Smrg 20892c393a42SmrgName 20902c393a42Smrg 2091a32e9e42Smrg FcValueEqual -- Test two values for equality 20922c393a42Smrg 20932c393a42SmrgSynopsis 20942c393a42Smrg 2095a32e9e42Smrg #include <fontconfig/fontconfig.h> 2096a32e9e42Smrg 2097a6844aabSmrg 2098ca08ab68Smrg FcBool FcValueEqual(FcValue v_a, FcValue v_b); 20992c393a42Smrg 21002c393a42SmrgDescription 21012c393a42Smrg 2102a32e9e42Smrg Compares two values. Integers and Doubles are compared as numbers; 2103a32e9e42Smrg otherwise the two values have to be the same type to be considered equal. 2104a32e9e42Smrg Strings are compared ignoring case. 21052c393a42Smrg 2106a32e9e42Smrg -------------------------------------------------------------------------- 2107a32e9e42Smrg 2108a32e9e42Smrg FcCharSet 2109ca08ab68Smrg 2110ca08ab68Smrg Table of Contents 2111ca08ab68Smrg 2112a32e9e42Smrg [65]FcCharSetCreate -- Create an empty character set 2113a32e9e42Smrg 2114a32e9e42Smrg [66]FcCharSetDestroy -- Destroy a character set 2115a32e9e42Smrg 2116a32e9e42Smrg [67]FcCharSetAddChar -- Add a character to a charset 2117a32e9e42Smrg 2118a32e9e42Smrg [68]FcCharSetDelChar -- Add a character to a charset 2119a32e9e42Smrg 2120a32e9e42Smrg [69]FcCharSetCopy -- Copy a charset 2121a32e9e42Smrg 2122a32e9e42Smrg [70]FcCharSetEqual -- Compare two charsets 2123a32e9e42Smrg 2124a32e9e42Smrg [71]FcCharSetIntersect -- Intersect charsets 2125a32e9e42Smrg 2126a32e9e42Smrg [72]FcCharSetUnion -- Add charsets 2127a32e9e42Smrg 2128a32e9e42Smrg [73]FcCharSetSubtract -- Subtract charsets 2129a32e9e42Smrg 2130a32e9e42Smrg [74]FcCharSetMerge -- Merge charsets 2131a32e9e42Smrg 2132a32e9e42Smrg [75]FcCharSetHasChar -- Check a charset for a char 2133a32e9e42Smrg 2134a32e9e42Smrg [76]FcCharSetCount -- Count entries in a charset 2135ca08ab68Smrg 2136a32e9e42Smrg [77]FcCharSetIntersectCount -- Intersect and count charsets 2137ca08ab68Smrg 2138a32e9e42Smrg [78]FcCharSetSubtractCount -- Subtract and count charsets 2139a32e9e42Smrg 2140a32e9e42Smrg [79]FcCharSetIsSubset -- Test for charset inclusion 2141a32e9e42Smrg 2142a32e9e42Smrg [80]FcCharSetFirstPage -- Start enumerating charset contents 2143a32e9e42Smrg 2144a32e9e42Smrg [81]FcCharSetNextPage -- Continue enumerating charset contents 2145a32e9e42Smrg 2146a32e9e42Smrg [82]FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 2147a32e9e42Smrg 2148a32e9e42Smrg [83]FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 2149a32e9e42Smrg 2150a32e9e42Smrg An FcCharSet is a boolean array indicating a set of Unicode chars. Those 2151a32e9e42Smrg associated with a font are marked constant and cannot be edited. 2152a32e9e42Smrg FcCharSets may be reference counted internally to reduce memory 2153a32e9e42Smrg consumption; this may be visible to applications as the result of 2154a32e9e42Smrg FcCharSetCopy may return it's argument, and that CharSet may remain 2155a32e9e42Smrg unmodifiable. 2156a32e9e42Smrg 2157a32e9e42Smrg FcCharSetCreate 2158ca08ab68Smrg 2159ca08ab68SmrgName 2160ca08ab68Smrg 2161a32e9e42Smrg FcCharSetCreate -- Create an empty character set 2162ca08ab68Smrg 2163ca08ab68SmrgSynopsis 2164ca08ab68Smrg 2165a32e9e42Smrg #include <fontconfig/fontconfig.h> 2166a32e9e42Smrg 2167ca08ab68Smrg 2168ca08ab68Smrg FcCharSet * FcCharSetCreate(void); 2169ca08ab68Smrg 2170ca08ab68SmrgDescription 2171ca08ab68Smrg 2172a32e9e42Smrg FcCharSetCreate allocates and initializes a new empty character set 2173a32e9e42Smrg object. 2174ca08ab68Smrg 2175a32e9e42Smrg FcCharSetDestroy 21762c393a42Smrg 21772c393a42SmrgName 21782c393a42Smrg 2179a32e9e42Smrg FcCharSetDestroy -- Destroy a character set 21802c393a42Smrg 21812c393a42SmrgSynopsis 21822c393a42Smrg 2183a32e9e42Smrg #include <fontconfig/fontconfig.h> 2184a32e9e42Smrg 2185a6844aabSmrg 2186ca08ab68Smrg void FcCharSetDestroy(FcCharSet *fcs); 21872c393a42Smrg 21882c393a42SmrgDescription 21892c393a42Smrg 2190a32e9e42Smrg FcCharSetDestroy decrements the reference count fcs. If the reference 2191a32e9e42Smrg count becomes zero, all memory referenced is freed. 21922c393a42Smrg 2193a32e9e42Smrg FcCharSetAddChar 21942c393a42Smrg 21952c393a42SmrgName 21962c393a42Smrg 2197a32e9e42Smrg FcCharSetAddChar -- Add a character to a charset 21982c393a42Smrg 21992c393a42SmrgSynopsis 22002c393a42Smrg 2201a32e9e42Smrg #include <fontconfig/fontconfig.h> 2202a32e9e42Smrg 2203a6844aabSmrg 2204ca08ab68Smrg FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4); 22052c393a42Smrg 22062c393a42SmrgDescription 22072c393a42Smrg 2208a32e9e42Smrg FcCharSetAddChar adds a single Unicode char to the set, returning FcFalse 2209a32e9e42Smrg on failure, either as a result of a constant set or from running out of 2210a32e9e42Smrg memory. 22112c393a42Smrg 2212a32e9e42Smrg FcCharSetDelChar 22132c393a42Smrg 22142c393a42SmrgName 22152c393a42Smrg 2216a32e9e42Smrg FcCharSetDelChar -- Add a character to a charset 22172c393a42Smrg 22182c393a42SmrgSynopsis 22192c393a42Smrg 2220a32e9e42Smrg #include <fontconfig/fontconfig.h> 2221a32e9e42Smrg 2222a6844aabSmrg 2223ca08ab68Smrg FcBool FcCharSetDelChar(FcCharSet *fcs, FcChar32 ucs4); 22242c393a42Smrg 22252c393a42SmrgDescription 22262c393a42Smrg 2227a32e9e42Smrg FcCharSetDelChar deletes a single Unicode char from the set, returning 2228a32e9e42Smrg FcFalse on failure, either as a result of a constant set or from running 2229a32e9e42Smrg out of memory. 22302c393a42Smrg 2231b09479dcSmrgSince 22322c393a42Smrg 2233b09479dcSmrg version 2.9.0 22342c393a42Smrg 2235a32e9e42Smrg FcCharSetCopy 22362c393a42Smrg 22372c393a42SmrgName 22382c393a42Smrg 2239a32e9e42Smrg FcCharSetCopy -- Copy a charset 22402c393a42Smrg 22412c393a42SmrgSynopsis 22422c393a42Smrg 2243a32e9e42Smrg #include <fontconfig/fontconfig.h> 2244a32e9e42Smrg 2245a6844aabSmrg 2246ca08ab68Smrg FcCharSet * FcCharSetCopy(FcCharSet *src); 22472c393a42Smrg 22482c393a42SmrgDescription 22492c393a42Smrg 2250a32e9e42Smrg Makes a copy of src; note that this may not actually do anything more than 2251a32e9e42Smrg increment the reference count on src. 22522c393a42Smrg 2253a32e9e42Smrg FcCharSetEqual 22542c393a42Smrg 22552c393a42SmrgName 22562c393a42Smrg 2257a32e9e42Smrg FcCharSetEqual -- Compare two charsets 22582c393a42Smrg 22592c393a42SmrgSynopsis 22602c393a42Smrg 2261a32e9e42Smrg #include <fontconfig/fontconfig.h> 2262a32e9e42Smrg 2263a6844aabSmrg 2264ca08ab68Smrg FcBool FcCharSetEqual(const FcCharSet *a, const FcCharSet *b); 22652c393a42Smrg 22662c393a42SmrgDescription 22672c393a42Smrg 2268ca08ab68Smrg Returns whether a and b contain the same set of Unicode chars. 22692c393a42Smrg 2270a32e9e42Smrg FcCharSetIntersect 22712c393a42Smrg 22722c393a42SmrgName 22732c393a42Smrg 2274a32e9e42Smrg FcCharSetIntersect -- Intersect charsets 22752c393a42Smrg 22762c393a42SmrgSynopsis 22772c393a42Smrg 2278a32e9e42Smrg #include <fontconfig/fontconfig.h> 2279a32e9e42Smrg 22802c393a42Smrg 2281a32e9e42Smrg FcCharSet * FcCharSetIntersect(const FcCharSet *a, const FcCharSet *b); 22822c393a42Smrg 22832c393a42SmrgDescription 22842c393a42Smrg 2285ca08ab68Smrg Returns a set including only those chars found in both a and b. 22862c393a42Smrg 2287a32e9e42Smrg FcCharSetUnion 22882c393a42Smrg 22892c393a42SmrgName 22902c393a42Smrg 2291a32e9e42Smrg FcCharSetUnion -- Add charsets 22922c393a42Smrg 22932c393a42SmrgSynopsis 22942c393a42Smrg 2295a32e9e42Smrg #include <fontconfig/fontconfig.h> 2296a6844aabSmrg 2297a32e9e42Smrg 2298a32e9e42Smrg FcCharSet * FcCharSetUnion(const FcCharSet *a, const FcCharSet *b); 22992c393a42Smrg 23002c393a42SmrgDescription 23012c393a42Smrg 2302a32e9e42Smrg Returns a set including only those chars found in either a or b. 23032c393a42Smrg 2304a32e9e42Smrg FcCharSetSubtract 23052c393a42Smrg 23062c393a42SmrgName 23072c393a42Smrg 2308a32e9e42Smrg FcCharSetSubtract -- Subtract charsets 23092c393a42Smrg 23102c393a42SmrgSynopsis 23112c393a42Smrg 2312a32e9e42Smrg #include <fontconfig/fontconfig.h> 2313a6844aabSmrg 2314a32e9e42Smrg 2315a32e9e42Smrg FcCharSet * FcCharSetSubtract(const FcCharSet *a, const FcCharSet *b); 23162c393a42Smrg 23172c393a42SmrgDescription 23182c393a42Smrg 2319ca08ab68Smrg Returns a set including only those chars found in a but not b. 23202c393a42Smrg 2321a32e9e42Smrg FcCharSetMerge 2322a6844aabSmrg 2323a6844aabSmrgName 2324a6844aabSmrg 2325a32e9e42Smrg FcCharSetMerge -- Merge charsets 2326a6844aabSmrg 2327a6844aabSmrgSynopsis 2328a6844aabSmrg 2329a32e9e42Smrg #include <fontconfig/fontconfig.h> 2330a32e9e42Smrg 2331a6844aabSmrg 2332a32e9e42Smrg FcBool FcCharSetMerge(FcCharSet *a, const FcCharSet *b, FcBool *changed); 2333a6844aabSmrg 2334a6844aabSmrgDescription 2335a6844aabSmrg 2336a32e9e42Smrg Adds all chars in b to a. In other words, this is an in-place version of 2337a32e9e42Smrg FcCharSetUnion. If changed is not NULL, then it returns whether any new 2338a32e9e42Smrg chars from b were added to a. Returns FcFalse on failure, either when a is 2339a32e9e42Smrg a constant set or from running out of memory. 2340a6844aabSmrg 2341a32e9e42Smrg FcCharSetHasChar 23422c393a42Smrg 23432c393a42SmrgName 23442c393a42Smrg 2345a32e9e42Smrg FcCharSetHasChar -- Check a charset for a char 23462c393a42Smrg 23472c393a42SmrgSynopsis 23482c393a42Smrg 2349a32e9e42Smrg #include <fontconfig/fontconfig.h> 2350a32e9e42Smrg 2351a6844aabSmrg 2352ca08ab68Smrg FcBool FcCharSetHasChar(const FcCharSet *fcs, FcChar32 ucs4); 23532c393a42Smrg 23542c393a42SmrgDescription 23552c393a42Smrg 2356ca08ab68Smrg Returns whether fcs contains the char ucs4. 23572c393a42Smrg 2358a32e9e42Smrg FcCharSetCount 23592c393a42Smrg 23602c393a42SmrgName 23612c393a42Smrg 2362a32e9e42Smrg FcCharSetCount -- Count entries in a charset 23632c393a42Smrg 23642c393a42SmrgSynopsis 23652c393a42Smrg 2366a32e9e42Smrg #include <fontconfig/fontconfig.h> 2367a32e9e42Smrg 2368a6844aabSmrg 2369ca08ab68Smrg FcChar32 FcCharSetCount(const FcCharSet *a); 23702c393a42Smrg 23712c393a42SmrgDescription 23722c393a42Smrg 2373ca08ab68Smrg Returns the total number of Unicode chars in a. 23742c393a42Smrg 2375a32e9e42Smrg FcCharSetIntersectCount 23762c393a42Smrg 23772c393a42SmrgName 23782c393a42Smrg 2379a32e9e42Smrg FcCharSetIntersectCount -- Intersect and count charsets 23802c393a42Smrg 23812c393a42SmrgSynopsis 23822c393a42Smrg 2383a32e9e42Smrg #include <fontconfig/fontconfig.h> 23842c393a42Smrg 2385a32e9e42Smrg 2386a32e9e42Smrg FcChar32 FcCharSetIntersectCount(const FcCharSet *a, const FcCharSet *b); 23872c393a42Smrg 23882c393a42SmrgDescription 23892c393a42Smrg 2390ca08ab68Smrg Returns the number of chars that are in both a and b. 23912c393a42Smrg 2392a32e9e42Smrg FcCharSetSubtractCount 23932c393a42Smrg 23942c393a42SmrgName 23952c393a42Smrg 2396a32e9e42Smrg FcCharSetSubtractCount -- Subtract and count charsets 23972c393a42Smrg 23982c393a42SmrgSynopsis 23992c393a42Smrg 2400a32e9e42Smrg #include <fontconfig/fontconfig.h> 2401a32e9e42Smrg 2402a6844aabSmrg 2403a32e9e42Smrg FcChar32 FcCharSetSubtractCount(const FcCharSet *a, const FcCharSet *b); 24042c393a42Smrg 24052c393a42SmrgDescription 24062c393a42Smrg 2407ca08ab68Smrg Returns the number of chars that are in a but not in b. 24082c393a42Smrg 2409a32e9e42Smrg FcCharSetIsSubset 24102c393a42Smrg 24112c393a42SmrgName 24122c393a42Smrg 2413a32e9e42Smrg FcCharSetIsSubset -- Test for charset inclusion 24142c393a42Smrg 24152c393a42SmrgSynopsis 24162c393a42Smrg 2417a32e9e42Smrg #include <fontconfig/fontconfig.h> 2418a6844aabSmrg 2419a32e9e42Smrg 2420a32e9e42Smrg FcBool FcCharSetIsSubset(const FcCharSet *a, const FcCharSet *b); 24212c393a42Smrg 24222c393a42SmrgDescription 24232c393a42Smrg 2424ca08ab68Smrg Returns whether a is a subset of b. 24252c393a42Smrg 2426a32e9e42Smrg FcCharSetFirstPage 24272c393a42Smrg 24282c393a42SmrgName 24292c393a42Smrg 2430a32e9e42Smrg FcCharSetFirstPage -- Start enumerating charset contents 24312c393a42Smrg 24322c393a42SmrgSynopsis 24332c393a42Smrg 2434a32e9e42Smrg #include <fontconfig/fontconfig.h> 2435a32e9e42Smrg 2436a6844aabSmrg 2437ca08ab68Smrg FcChar32 FcCharSetFirstPage(const FcCharSet *a, 2438ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 24392c393a42Smrg 24402c393a42SmrgDescription 24412c393a42Smrg 2442a32e9e42Smrg Builds an array of bits in map marking the first page of Unicode coverage 2443a32e9e42Smrg of a. *next is set to contains the base code point for the next page in a. 2444a32e9e42Smrg Returns the base code point for the page, or FC_CHARSET_DONE if a contains 2445a32e9e42Smrg no pages. As an example, if FcCharSetFirstPage returns 0x300 and fills map 2446a32e9e42Smrg with 2447a32e9e42Smrg 2448a32e9e42Smrg0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003 24496fc018e4Smrg 2450a32e9e42Smrg Then the page contains code points 0x300 through 0x33f (the first 64 code 2451a32e9e42Smrg points on the page) because map[0] and map[1] both have all their bits 2452a32e9e42Smrg set. It also contains code points 0x343 (0x300 + 32*2 + (4-1)) and 0x35e 2453a32e9e42Smrg (0x300 + 32*2 + (31-1)) because map[2] has the 4th and 31st bits set. The 2454a32e9e42Smrg code points represented by map[3] and later are left as an excercise for 24556fc018e4Smrg the reader ;). 24562c393a42Smrg 2457a32e9e42Smrg FcCharSetNextPage 24582c393a42Smrg 24592c393a42SmrgName 24602c393a42Smrg 2461a32e9e42Smrg FcCharSetNextPage -- Continue enumerating charset contents 24622c393a42Smrg 24632c393a42SmrgSynopsis 24642c393a42Smrg 2465a32e9e42Smrg #include <fontconfig/fontconfig.h> 2466a32e9e42Smrg 2467a6844aabSmrg 2468ca08ab68Smrg FcChar32 FcCharSetNextPage(const FcCharSet *a, 2469ca08ab68Smrg FcChar32[FC_CHARSET_MAP_SIZE] map, FcChar32 *next); 24702c393a42Smrg 24712c393a42SmrgDescription 24722c393a42Smrg 2473a32e9e42Smrg Builds an array of bits in map marking the Unicode coverage of a for page 2474a32e9e42Smrg containing *next (see the FcCharSetFirstPage description for details). 2475a32e9e42Smrg *next is set to contains the base code point for the next page in a. 2476a32e9e42Smrg Returns the base of code point for the page, or FC_CHARSET_DONE if a does 2477a32e9e42Smrg not contain *next. 24782c393a42Smrg 2479a32e9e42Smrg FcCharSetCoverage 24802c393a42Smrg 24812c393a42SmrgName 24822c393a42Smrg 2483a32e9e42Smrg FcCharSetCoverage -- DEPRECATED return coverage for a Unicode page 24842c393a42Smrg 24852c393a42SmrgSynopsis 24862c393a42Smrg 2487a32e9e42Smrg #include <fontconfig/fontconfig.h> 2488a32e9e42Smrg 2489a6844aabSmrg 2490ca08ab68Smrg FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page, 2491ca08ab68Smrg FcChar32[8]result); 24922c393a42Smrg 24932c393a42SmrgDescription 24942c393a42Smrg 2495a32e9e42Smrg DEPRECATED This function returns a bitmask in result which indicates which 2496a32e9e42Smrg code points in page are included in a. FcCharSetCoverage returns the next 2497a32e9e42Smrg page in the charset which has any coverage. 24982c393a42Smrg 2499a32e9e42Smrg FcCharSetNew 25002c393a42Smrg 25012c393a42SmrgName 25022c393a42Smrg 2503a32e9e42Smrg FcCharSetNew -- DEPRECATED alias for FcCharSetCreate 25042c393a42Smrg 25052c393a42SmrgSynopsis 25062c393a42Smrg 2507a32e9e42Smrg #include <fontconfig/fontconfig.h> 2508a32e9e42Smrg 2509a6844aabSmrg 2510ca08ab68Smrg FcCharSet * FcCharSetNew(void); 25112c393a42Smrg 25122c393a42SmrgDescription 25132c393a42Smrg 2514ca08ab68Smrg FcCharSetNew is a DEPRECATED alias for FcCharSetCreate. 25152c393a42Smrg 2516a32e9e42Smrg -------------------------------------------------------------------------- 2517a32e9e42Smrg 2518a32e9e42Smrg FcLangSet 2519ca08ab68Smrg 2520ca08ab68Smrg Table of Contents 2521ca08ab68Smrg 2522a32e9e42Smrg [84]FcLangSetCreate -- create a langset object 2523a32e9e42Smrg 2524a32e9e42Smrg [85]FcLangSetDestroy -- destroy a langset object 2525a32e9e42Smrg 2526a32e9e42Smrg [86]FcLangSetCopy -- copy a langset object 2527ca08ab68Smrg 2528a32e9e42Smrg [87]FcLangSetAdd -- add a language to a langset 2529a32e9e42Smrg 2530a32e9e42Smrg [88]FcLangSetDel -- delete a language from a langset 2531a32e9e42Smrg 2532a32e9e42Smrg [89]FcLangSetUnion -- Add langsets 2533a32e9e42Smrg 2534a32e9e42Smrg [90]FcLangSetSubtract -- Subtract langsets 2535a32e9e42Smrg 2536a32e9e42Smrg [91]FcLangSetCompare -- compare language sets 2537a32e9e42Smrg 2538a32e9e42Smrg [92]FcLangSetContains -- check langset subset relation 2539a32e9e42Smrg 2540a32e9e42Smrg [93]FcLangSetEqual -- test for matching langsets 2541a32e9e42Smrg 2542a32e9e42Smrg [94]FcLangSetHash -- return a hash value for a langset 2543a32e9e42Smrg 2544a32e9e42Smrg [95]FcLangSetHasLang -- test langset for language support 2545a32e9e42Smrg 2546a32e9e42Smrg [96]FcGetDefaultLangs -- Get the default languages list 2547a32e9e42Smrg 2548a32e9e42Smrg [97]FcLangSetGetLangs -- get the list of languages in the langset 2549a32e9e42Smrg 2550a32e9e42Smrg [98]FcGetLangs -- Get list of languages 2551a32e9e42Smrg 2552a32e9e42Smrg [99]FcLangNormalize -- Normalize the language string 2553a32e9e42Smrg 2554a32e9e42Smrg [100]FcLangGetCharSet -- Get character map for a language 2555a32e9e42Smrg 2556a32e9e42Smrg An FcLangSet is a set of language names (each of which include language 2557a32e9e42Smrg and an optional territory). They are used when selecting fonts to indicate 2558a32e9e42Smrg which languages the fonts need to support. Each font is marked, using 2559a32e9e42Smrg language orthography information built into fontconfig, with the set of 2560a32e9e42Smrg supported languages. 2561a32e9e42Smrg 2562a32e9e42Smrg FcLangSetCreate 2563ca08ab68Smrg 2564ca08ab68SmrgName 2565ca08ab68Smrg 2566a32e9e42Smrg FcLangSetCreate -- create a langset object 2567ca08ab68Smrg 2568ca08ab68SmrgSynopsis 2569ca08ab68Smrg 2570a32e9e42Smrg #include <fontconfig/fontconfig.h> 2571a32e9e42Smrg 2572ca08ab68Smrg 2573ca08ab68Smrg FcLangSet * FcLangSetCreate(void); 2574ca08ab68Smrg 2575ca08ab68SmrgDescription 2576ca08ab68Smrg 2577ca08ab68Smrg FcLangSetCreate creates a new FcLangSet object. 2578ca08ab68Smrg 2579a32e9e42Smrg FcLangSetDestroy 2580ca08ab68Smrg 2581ca08ab68SmrgName 2582ca08ab68Smrg 2583a32e9e42Smrg FcLangSetDestroy -- destroy a langset object 2584ca08ab68Smrg 2585ca08ab68SmrgSynopsis 2586ca08ab68Smrg 2587a32e9e42Smrg #include <fontconfig/fontconfig.h> 2588a32e9e42Smrg 2589ca08ab68Smrg 2590ca08ab68Smrg void FcLangSetDestroy(FcLangSet *ls); 2591ca08ab68Smrg 2592ca08ab68SmrgDescription 2593ca08ab68Smrg 2594a32e9e42Smrg FcLangSetDestroy destroys a FcLangSet object, freeing all memory 2595a32e9e42Smrg associated with it. 2596ca08ab68Smrg 2597a32e9e42Smrg FcLangSetCopy 2598a6844aabSmrg 2599ca08ab68SmrgName 2600ca08ab68Smrg 2601a32e9e42Smrg FcLangSetCopy -- copy a langset object 2602ca08ab68Smrg 2603ca08ab68SmrgSynopsis 2604ca08ab68Smrg 2605a32e9e42Smrg #include <fontconfig/fontconfig.h> 2606a32e9e42Smrg 2607ca08ab68Smrg 2608ca08ab68Smrg FcLangSet * FcLangSetCopy(const FcLangSet *ls); 2609ca08ab68Smrg 2610ca08ab68SmrgDescription 26112c393a42Smrg 2612a32e9e42Smrg FcLangSetCopy creates a new FcLangSet object and populates it with the 2613a32e9e42Smrg contents of ls. 26142c393a42Smrg 2615a32e9e42Smrg FcLangSetAdd 26162c393a42Smrg 26172c393a42SmrgName 26182c393a42Smrg 2619a32e9e42Smrg FcLangSetAdd -- add a language to a langset 26202c393a42Smrg 26212c393a42SmrgSynopsis 26222c393a42Smrg 2623a32e9e42Smrg #include <fontconfig/fontconfig.h> 2624a32e9e42Smrg 2625a6844aabSmrg 2626ca08ab68Smrg FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang); 26272c393a42Smrg 26282c393a42SmrgDescription 26292c393a42Smrg 2630a32e9e42Smrg lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or 2631a32e9e42Smrg three letter language from ISO 639 and Tt is a territory from ISO 3166. 26322c393a42Smrg 2633a32e9e42Smrg FcLangSetDel 26342c393a42Smrg 26352c393a42SmrgName 26362c393a42Smrg 2637a32e9e42Smrg FcLangSetDel -- delete a language from a langset 26382c393a42Smrg 26392c393a42SmrgSynopsis 26402c393a42Smrg 2641a32e9e42Smrg #include <fontconfig/fontconfig.h> 2642a32e9e42Smrg 2643a6844aabSmrg 2644ca08ab68Smrg FcBool FcLangSetDel(FcLangSet *ls, const FcChar8 *lang); 26452c393a42Smrg 26462c393a42SmrgDescription 26472c393a42Smrg 2648a32e9e42Smrg lang is removed from ls. lang should be of the form Ll-Tt where Ll is a 2649a32e9e42Smrg two or three letter language from ISO 639 and Tt is a territory from ISO 2650a32e9e42Smrg 3166. 26512c393a42Smrg 2652b09479dcSmrgSince 26532c393a42Smrg 2654b09479dcSmrg version 2.9.0 26552c393a42Smrg 2656a32e9e42Smrg FcLangSetUnion 26572c393a42Smrg 26582c393a42SmrgName 26592c393a42Smrg 2660a32e9e42Smrg FcLangSetUnion -- Add langsets 26612c393a42Smrg 26622c393a42SmrgSynopsis 26632c393a42Smrg 2664a32e9e42Smrg #include <fontconfig/fontconfig.h> 2665a32e9e42Smrg 26662c393a42Smrg 2667a32e9e42Smrg FcLangSet * FcLangSetUnion(const FcLangSet *ls_a, const FcLangSet *ls_b); 26682c393a42Smrg 26692c393a42SmrgDescription 26702c393a42Smrg 2671a32e9e42Smrg Returns a set including only those languages found in either ls_a or ls_b. 26722c393a42Smrg 2673b09479dcSmrgSince 26742c393a42Smrg 2675b09479dcSmrg version 2.9.0 26762c393a42Smrg 2677a32e9e42Smrg FcLangSetSubtract 26782c393a42Smrg 26792c393a42SmrgName 26802c393a42Smrg 2681a32e9e42Smrg FcLangSetSubtract -- Subtract langsets 26822c393a42Smrg 26832c393a42SmrgSynopsis 26842c393a42Smrg 2685a32e9e42Smrg #include <fontconfig/fontconfig.h> 2686a6844aabSmrg 2687a32e9e42Smrg 2688a32e9e42Smrg FcLangSet * FcLangSetSubtract(const FcLangSet *ls_a, const FcLangSet 2689a32e9e42Smrg *ls_b); 26902c393a42Smrg 26912c393a42SmrgDescription 26922c393a42Smrg 2693a32e9e42Smrg Returns a set including only those languages found in ls_a but not in 2694a32e9e42Smrg ls_b. 26952c393a42Smrg 2696b09479dcSmrgSince 26972c393a42Smrg 2698b09479dcSmrg version 2.9.0 26992c393a42Smrg 2700a32e9e42Smrg FcLangSetCompare 27012c393a42Smrg 27022c393a42SmrgName 27032c393a42Smrg 2704a32e9e42Smrg FcLangSetCompare -- compare language sets 27052c393a42Smrg 27062c393a42SmrgSynopsis 27072c393a42Smrg 2708a32e9e42Smrg #include <fontconfig/fontconfig.h> 2709a6844aabSmrg 2710a32e9e42Smrg 2711a32e9e42Smrg FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const FcLangSet 2712a32e9e42Smrg *ls_b); 27132c393a42Smrg 27142c393a42SmrgDescription 27152c393a42Smrg 2716a32e9e42Smrg FcLangSetCompare compares language coverage for ls_a and ls_b. If they 2717a32e9e42Smrg share any language and territory pair, this function returns FcLangEqual. 2718a32e9e42Smrg If they share a language but differ in which territory that language is 2719a32e9e42Smrg for, this function returns FcLangDifferentTerritory. If they share no 2720a32e9e42Smrg languages in common, this function returns FcLangDifferentLang. 27212c393a42Smrg 2722a32e9e42Smrg FcLangSetContains 27232c393a42Smrg 27242c393a42SmrgName 27252c393a42Smrg 2726a32e9e42Smrg FcLangSetContains -- check langset subset relation 27272c393a42Smrg 27282c393a42SmrgSynopsis 27292c393a42Smrg 2730a32e9e42Smrg #include <fontconfig/fontconfig.h> 27312c393a42Smrg 2732a32e9e42Smrg 2733a32e9e42Smrg FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet *ls_b); 27342c393a42Smrg 27352c393a42SmrgDescription 27362c393a42Smrg 2737a32e9e42Smrg FcLangSetContains returns FcTrue if ls_a contains every language in ls_b. 2738a32e9e42Smrg ls_a will 'contain' a language from ls_b if ls_a has exactly the language, 2739a32e9e42Smrg or either the language or ls_a has no territory. 27402c393a42Smrg 2741a32e9e42Smrg FcLangSetEqual 27422c393a42Smrg 27432c393a42SmrgName 27442c393a42Smrg 2745a32e9e42Smrg FcLangSetEqual -- test for matching langsets 27462c393a42Smrg 27472c393a42SmrgSynopsis 27482c393a42Smrg 2749a32e9e42Smrg #include <fontconfig/fontconfig.h> 27502c393a42Smrg 2751a32e9e42Smrg 2752a32e9e42Smrg FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet *ls_b); 27532c393a42Smrg 27542c393a42SmrgDescription 27552c393a42Smrg 2756a32e9e42Smrg Returns FcTrue if and only if ls_a supports precisely the same language 2757a32e9e42Smrg and territory combinations as ls_b. 27582c393a42Smrg 2759a32e9e42Smrg FcLangSetHash 27602c393a42Smrg 27612c393a42SmrgName 27622c393a42Smrg 2763a32e9e42Smrg FcLangSetHash -- return a hash value for a langset 27642c393a42Smrg 27652c393a42SmrgSynopsis 27662c393a42Smrg 2767a32e9e42Smrg #include <fontconfig/fontconfig.h> 2768a32e9e42Smrg 2769a6844aabSmrg 2770ca08ab68Smrg FcChar32 FcLangSetHash(const FcLangSet *ls); 27712c393a42Smrg 27722c393a42SmrgDescription 27732c393a42Smrg 2774a32e9e42Smrg This function returns a value which depends solely on the languages 2775a32e9e42Smrg supported by ls. Any language which equals ls will have the same result 2776a32e9e42Smrg from FcLangSetHash. However, two langsets with the same hash value may not 2777a32e9e42Smrg be equal. 27782c393a42Smrg 2779a32e9e42Smrg FcLangSetHasLang 27802c393a42Smrg 27812c393a42SmrgName 27822c393a42Smrg 2783a32e9e42Smrg FcLangSetHasLang -- test langset for language support 2784a6844aabSmrg 2785a6844aabSmrgSynopsis 2786a6844aabSmrg 2787a32e9e42Smrg #include <fontconfig/fontconfig.h> 2788a32e9e42Smrg 2789a6844aabSmrg 2790a32e9e42Smrg FcLangResult FcLangSetHasLang(const FcLangSet *ls, const FcChar8 *lang); 2791a6844aabSmrg 2792a6844aabSmrgDescription 2793a6844aabSmrg 2794a32e9e42Smrg FcLangSetHasLang checks whether ls supports lang. If ls has a matching 2795a32e9e42Smrg language and territory pair, this function returns FcLangEqual. If ls has 2796a32e9e42Smrg a matching language but differs in which territory that language is for, 2797a32e9e42Smrg this function returns FcLangDifferentTerritory. If ls has no matching 2798a32e9e42Smrg language, this function returns FcLangDifferentLang. 2799a6844aabSmrg 2800a32e9e42Smrg FcGetDefaultLangs 2801a6844aabSmrg 2802a6844aabSmrgName 2803a6844aabSmrg 2804a32e9e42Smrg FcGetDefaultLangs -- Get the default languages list 28052c393a42Smrg 28062c393a42SmrgSynopsis 28072c393a42Smrg 2808a32e9e42Smrg #include <fontconfig/fontconfig.h> 2809a32e9e42Smrg 2810a6844aabSmrg 2811b09479dcSmrg FcStrSet * FcGetDefaultLangs(void); 28122c393a42Smrg 28132c393a42SmrgDescription 28142c393a42Smrg 2815a32e9e42Smrg Returns a string set of the default languages according to the environment 2816a32e9e42Smrg variables on the system. This function looks for them in order of FC_LANG, 2817a32e9e42Smrg LC_ALL, LC_CTYPE and LANG then. If there are no valid values in those 2818a32e9e42Smrg environment variables, "en" will be set as fallback. 28192c393a42Smrg 2820b09479dcSmrgSince 2821b09479dcSmrg 2822b09479dcSmrg version 2.9.91 2823b09479dcSmrg 2824a32e9e42Smrg FcLangSetGetLangs 2825b09479dcSmrg 2826b09479dcSmrgName 2827b09479dcSmrg 2828a32e9e42Smrg FcLangSetGetLangs -- get the list of languages in the langset 2829b09479dcSmrg 2830b09479dcSmrgSynopsis 2831b09479dcSmrg 2832a32e9e42Smrg #include <fontconfig/fontconfig.h> 2833a32e9e42Smrg 2834b09479dcSmrg 2835b09479dcSmrg FcStrSet * FcLangSetGetLangs(const FcLangSet *ls); 2836b09479dcSmrg 2837b09479dcSmrgDescription 2838b09479dcSmrg 2839b09479dcSmrg Returns a string set of all languages in langset. 28402c393a42Smrg 2841a32e9e42Smrg FcGetLangs 28422c393a42Smrg 28432c393a42SmrgName 28442c393a42Smrg 2845a32e9e42Smrg FcGetLangs -- Get list of languages 28462c393a42Smrg 28472c393a42SmrgSynopsis 28482c393a42Smrg 2849a32e9e42Smrg #include <fontconfig/fontconfig.h> 2850a32e9e42Smrg 2851a6844aabSmrg 2852ca08ab68Smrg FcStrSet * FcGetLangs(void); 28532c393a42Smrg 28542c393a42SmrgDescription 28552c393a42Smrg 2856ca08ab68Smrg Returns a string set of all known languages. 28572c393a42Smrg 2858a32e9e42Smrg FcLangNormalize 2859c9710b42Smrg 2860c9710b42SmrgName 2861c9710b42Smrg 2862a32e9e42Smrg FcLangNormalize -- Normalize the language string 2863c9710b42Smrg 2864c9710b42SmrgSynopsis 2865c9710b42Smrg 2866a32e9e42Smrg #include <fontconfig/fontconfig.h> 2867a32e9e42Smrg 2868c9710b42Smrg 2869c9710b42Smrg FcChar8 * FcLangNormalize(const FcChar8 *lang); 2870c9710b42Smrg 2871c9710b42SmrgDescription 2872c9710b42Smrg 2873c9710b42Smrg Returns a string to make lang suitable on fontconfig. 2874c9710b42Smrg 2875b09479dcSmrgSince 2876c9710b42Smrg 2877b09479dcSmrg version 2.10.91 28782c393a42Smrg 2879a32e9e42Smrg FcLangGetCharSet 28802c393a42Smrg 28812c393a42SmrgName 28822c393a42Smrg 2883a32e9e42Smrg FcLangGetCharSet -- Get character map for a language 28842c393a42Smrg 28852c393a42SmrgSynopsis 28862c393a42Smrg 2887a32e9e42Smrg #include <fontconfig/fontconfig.h> 2888a32e9e42Smrg 2889a6844aabSmrg 2890ca08ab68Smrg const FcCharSet * FcLangGetCharSet(const FcChar8 *lang); 28912c393a42Smrg 28922c393a42SmrgDescription 28932c393a42Smrg 2894ca08ab68Smrg Returns the FcCharMap for a language. 28952c393a42Smrg 2896a32e9e42Smrg -------------------------------------------------------------------------- 2897a32e9e42Smrg 2898a32e9e42Smrg FcMatrix 2899ca08ab68Smrg 2900ca08ab68Smrg Table of Contents 2901ca08ab68Smrg 2902a32e9e42Smrg [101]FcMatrixInit -- initialize an FcMatrix structure 2903a32e9e42Smrg 2904a32e9e42Smrg [102]FcMatrixCopy -- Copy a matrix 2905a32e9e42Smrg 2906a32e9e42Smrg [103]FcMatrixEqual -- Compare two matrices 2907a6844aabSmrg 2908a32e9e42Smrg [104]FcMatrixMultiply -- Multiply matrices 2909a32e9e42Smrg 2910a32e9e42Smrg [105]FcMatrixRotate -- Rotate a matrix 2911a32e9e42Smrg 2912a32e9e42Smrg [106]FcMatrixScale -- Scale a matrix 2913a32e9e42Smrg 2914a32e9e42Smrg [107]FcMatrixShear -- Shear a matrix 2915a32e9e42Smrg 2916a32e9e42Smrg FcMatrix structures hold an affine transformation in matrix form. 2917a32e9e42Smrg 2918a32e9e42Smrg FcMatrixInit 29192c393a42Smrg 2920953daebaSmrgName 29212c393a42Smrg 2922a32e9e42Smrg FcMatrixInit -- initialize an FcMatrix structure 29232c393a42Smrg 2924953daebaSmrgSynopsis 29252c393a42Smrg 2926a32e9e42Smrg #include <fontconfig/fontconfig.h> 2927a32e9e42Smrg 2928ca08ab68Smrg 2929953daebaSmrg void FcMatrixInit(FcMatrix *matrix); 2930953daebaSmrg 2931953daebaSmrgDescription 2932ca08ab68Smrg 2933953daebaSmrg FcMatrixInit initializes matrix to the identity matrix. 2934ca08ab68Smrg 2935a32e9e42Smrg FcMatrixCopy 29362c393a42Smrg 29372c393a42SmrgName 29382c393a42Smrg 2939a32e9e42Smrg FcMatrixCopy -- Copy a matrix 29402c393a42Smrg 29412c393a42SmrgSynopsis 29422c393a42Smrg 2943a32e9e42Smrg #include <fontconfig/fontconfig.h> 2944a32e9e42Smrg 2945a6844aabSmrg 2946953daebaSmrg void FcMatrixCopy(const FcMatrix *matrix); 29472c393a42Smrg 29482c393a42SmrgDescription 29492c393a42Smrg 2950953daebaSmrg FcMatrixCopy allocates a new FcMatrix and copies mat into it. 29512c393a42Smrg 2952a32e9e42Smrg FcMatrixEqual 29532c393a42Smrg 29542c393a42SmrgName 29552c393a42Smrg 2956a32e9e42Smrg FcMatrixEqual -- Compare two matrices 29572c393a42Smrg 29582c393a42SmrgSynopsis 29592c393a42Smrg 2960a32e9e42Smrg #include <fontconfig/fontconfig.h> 2961a32e9e42Smrg 2962a6844aabSmrg 2963a32e9e42Smrg void FcMatrixEqual(const FcMatrix *matrix1, const FcMatrix *matrix2); 29642c393a42Smrg 29652c393a42SmrgDescription 29662c393a42Smrg 2967a32e9e42Smrg FcMatrixEqual compares matrix1 and matrix2 returning FcTrue when they are 2968a32e9e42Smrg equal and FcFalse when they are not. 29692c393a42Smrg 2970a32e9e42Smrg FcMatrixMultiply 29712c393a42Smrg 29722c393a42SmrgName 29732c393a42Smrg 2974a32e9e42Smrg FcMatrixMultiply -- Multiply matrices 29752c393a42Smrg 29762c393a42SmrgSynopsis 29772c393a42Smrg 2978a32e9e42Smrg #include <fontconfig/fontconfig.h> 2979a6844aabSmrg 2980a32e9e42Smrg 2981a32e9e42Smrg void FcMatrixMultiply(FcMatrix *result, const FcMatrix *matrix1, const 2982a32e9e42Smrg FcMatrix *matrix2); 29832c393a42Smrg 29842c393a42SmrgDescription 29852c393a42Smrg 2986a32e9e42Smrg FcMatrixMultiply multiplies matrix1 and matrix2 storing the result in 2987a32e9e42Smrg result. 29882c393a42Smrg 2989a32e9e42Smrg FcMatrixRotate 29902c393a42Smrg 29912c393a42SmrgName 29922c393a42Smrg 2993a32e9e42Smrg FcMatrixRotate -- Rotate a matrix 29942c393a42Smrg 29952c393a42SmrgSynopsis 29962c393a42Smrg 2997a32e9e42Smrg #include <fontconfig/fontconfig.h> 2998a32e9e42Smrg 29992c393a42Smrg 3000953daebaSmrg void FcMatrixRotate(FcMatrix *matrix, double cos, double sin); 30012c393a42Smrg 30022c393a42SmrgDescription 30032c393a42Smrg 3004a32e9e42Smrg FcMatrixRotate rotates matrix by the angle who's sine is sin and cosine is 3005a32e9e42Smrg cos. This is done by multiplying by the matrix: 30062c393a42Smrg 3007a32e9e42Smrg cos -sin 3008a32e9e42Smrg sin cos 3009a32e9e42Smrg 3010a32e9e42Smrg FcMatrixScale 30112c393a42Smrg 30122c393a42SmrgName 30132c393a42Smrg 3014a32e9e42Smrg FcMatrixScale -- Scale a matrix 30152c393a42Smrg 30162c393a42SmrgSynopsis 30172c393a42Smrg 3018a32e9e42Smrg #include <fontconfig/fontconfig.h> 3019a32e9e42Smrg 30202c393a42Smrg 3021953daebaSmrg void FcMatrixScale(FcMatrix *matrix, double sx, double dy); 30222c393a42Smrg 30232c393a42SmrgDescription 30242c393a42Smrg 3025a32e9e42Smrg FcMatrixScale multiplies matrix x values by sx and y values by dy. This is 3026a32e9e42Smrg done by multiplying by the matrix: 30272c393a42Smrg 3028a32e9e42Smrg sx 0 3029a32e9e42Smrg 0 dy 3030a32e9e42Smrg 3031a32e9e42Smrg FcMatrixShear 30322c393a42Smrg 30332c393a42SmrgName 30342c393a42Smrg 3035a32e9e42Smrg FcMatrixShear -- Shear a matrix 30362c393a42Smrg 30372c393a42SmrgSynopsis 30382c393a42Smrg 3039a32e9e42Smrg #include <fontconfig/fontconfig.h> 3040a32e9e42Smrg 30412c393a42Smrg 3042953daebaSmrg void FcMatrixShear(FcMatrix *matrix, double sh, double sv); 30432c393a42Smrg 30442c393a42SmrgDescription 30452c393a42Smrg 3046a32e9e42Smrg FcMatrixShare shears matrix horizontally by sh and vertically by sv. This 3047a32e9e42Smrg is done by multiplying by the matrix: 3048a32e9e42Smrg 3049a32e9e42Smrg 1 sh 3050a32e9e42Smrg sv 1 3051a32e9e42Smrg 3052a32e9e42Smrg -------------------------------------------------------------------------- 3053953daebaSmrg 3054a32e9e42Smrg FcRange 3055953daebaSmrg 3056953daebaSmrg Table of Contents 3057a32e9e42Smrg 3058a32e9e42Smrg [108]FcRangeCopy -- Copy a range object 3059a32e9e42Smrg 3060a32e9e42Smrg [109]FcRangeCreateDouble -- create a range object for double 3061a32e9e42Smrg 3062a32e9e42Smrg [110]FcRangeCreateInteger -- create a range object for integer 3063a32e9e42Smrg 3064a32e9e42Smrg [111]FcRangeDestroy -- destroy a range object 3065a32e9e42Smrg 3066a32e9e42Smrg [112]FcRangeGetDouble -- Get the range in double 3067a6844aabSmrg 3068953daebaSmrg An FcRange holds two variables to indicate a range in between. 30692c393a42Smrg 3070a32e9e42Smrg FcRangeCopy 30712c393a42Smrg 30722c393a42SmrgName 30732c393a42Smrg 3074a32e9e42Smrg FcRangeCopy -- Copy a range object 30752c393a42Smrg 30762c393a42SmrgSynopsis 30772c393a42Smrg 3078a32e9e42Smrg #include <fontconfig/fontconfig.h> 3079a32e9e42Smrg 30802c393a42Smrg 3081953daebaSmrg FcRange * FcRangeCopy(const FcRange *range); 30822c393a42Smrg 30832c393a42SmrgDescription 30842c393a42Smrg 3085a32e9e42Smrg FcRangeCopy creates a new FcRange object and populates it with the 3086a32e9e42Smrg contents of range. 3087a6844aabSmrg 3088953daebaSmrgSince 30892c393a42Smrg 3090953daebaSmrg version 2.11.91 3091ca08ab68Smrg 3092a32e9e42Smrg FcRangeCreateDouble 3093ca08ab68Smrg 3094953daebaSmrgName 3095953daebaSmrg 3096a32e9e42Smrg FcRangeCreateDouble -- create a range object for double 3097ca08ab68Smrg 3098953daebaSmrgSynopsis 3099ca08ab68Smrg 3100a32e9e42Smrg #include <fontconfig/fontconfig.h> 3101a32e9e42Smrg 3102ca08ab68Smrg 3103953daebaSmrg FcRange * FcRangeCreateDouble(doublebegin, doubleend); 3104ca08ab68Smrg 3105953daebaSmrgDescription 3106ca08ab68Smrg 3107a32e9e42Smrg FcRangeCreateDouble creates a new FcRange object with double sized value. 3108ca08ab68Smrg 3109953daebaSmrgSince 3110ca08ab68Smrg 3111953daebaSmrg version 2.11.91 3112ca08ab68Smrg 3113a32e9e42Smrg FcRangeCreateInteger 3114ca08ab68Smrg 3115953daebaSmrgName 3116ca08ab68Smrg 3117a32e9e42Smrg FcRangeCreateInteger -- create a range object for integer 3118ca08ab68Smrg 3119953daebaSmrgSynopsis 3120ca08ab68Smrg 3121a32e9e42Smrg #include <fontconfig/fontconfig.h> 3122a32e9e42Smrg 3123ca08ab68Smrg 3124953daebaSmrg FcRange * FcRangeCreateInteger(intbegin, intend); 3125ca08ab68Smrg 3126953daebaSmrgDescription 3127ca08ab68Smrg 3128a32e9e42Smrg FcRangeCreateInteger creates a new FcRange object with integer sized 3129a32e9e42Smrg value. 3130ca08ab68Smrg 3131953daebaSmrgSince 3132a6844aabSmrg 3133953daebaSmrg version 2.11.91 3134a6844aabSmrg 3135a32e9e42Smrg FcRangeDestroy 3136a6844aabSmrg 3137953daebaSmrgName 3138a6844aabSmrg 3139a32e9e42Smrg FcRangeDestroy -- destroy a range object 31402c393a42Smrg 3141953daebaSmrgSynopsis 3142ca08ab68Smrg 3143a32e9e42Smrg #include <fontconfig/fontconfig.h> 3144a32e9e42Smrg 3145ca08ab68Smrg 3146953daebaSmrg void FcRangeDestroy(FcRange *range); 3147ca08ab68Smrg 3148953daebaSmrgDescription 3149ca08ab68Smrg 3150a32e9e42Smrg FcRangeDestroy destroys a FcRange object, freeing all memory associated 3151a32e9e42Smrg with it. 3152ca08ab68Smrg 3153953daebaSmrgSince 3154ca08ab68Smrg 3155953daebaSmrg version 2.11.91 3156ca08ab68Smrg 3157a32e9e42Smrg FcRangeGetDouble 3158ca08ab68Smrg 3159953daebaSmrgName 3160c9710b42Smrg 3161a32e9e42Smrg FcRangeGetDouble -- Get the range in double 3162c9710b42Smrg 3163953daebaSmrgSynopsis 3164ca08ab68Smrg 3165a32e9e42Smrg #include <fontconfig/fontconfig.h> 3166ca08ab68Smrg 3167a32e9e42Smrg 3168a32e9e42Smrg FcBool FcRangeGetDouble(const FcRange *range, double *begin, double *end); 31692c393a42Smrg 3170953daebaSmrgDescription 31712c393a42Smrg 3172953daebaSmrg Returns in begin and end as the range. 31732c393a42Smrg 3174953daebaSmrgSince 31752c393a42Smrg 3176953daebaSmrg version 2.11.91 31772c393a42Smrg 3178a32e9e42Smrg -------------------------------------------------------------------------- 3179a32e9e42Smrg 3180a32e9e42Smrg FcConfig 3181953daebaSmrg 3182953daebaSmrg Table of Contents 3183a32e9e42Smrg 3184a32e9e42Smrg [113]FcConfigCreate -- Create a configuration 3185a32e9e42Smrg 3186a32e9e42Smrg [114]FcConfigReference -- Increment config reference count 3187a32e9e42Smrg 3188a32e9e42Smrg [115]FcConfigDestroy -- Destroy a configuration 3189a32e9e42Smrg 3190a32e9e42Smrg [116]FcConfigSetCurrent -- Set configuration as default 3191a32e9e42Smrg 3192a32e9e42Smrg [117]FcConfigGetCurrent -- Return current configuration 3193a32e9e42Smrg 3194a32e9e42Smrg [118]FcConfigUptoDate -- Check timestamps on config files 3195a32e9e42Smrg 3196a32e9e42Smrg [119]FcConfigHome -- return the current home directory. 3197a32e9e42Smrg 3198a32e9e42Smrg [120]FcConfigEnableHome -- controls use of the home directory. 3199a32e9e42Smrg 3200a32e9e42Smrg [121]FcConfigBuildFonts -- Build font database 3201a32e9e42Smrg 3202a32e9e42Smrg [122]FcConfigGetConfigDirs -- Get config directories 3203a32e9e42Smrg 3204a32e9e42Smrg [123]FcConfigGetFontDirs -- Get font directories 3205a32e9e42Smrg 3206a32e9e42Smrg [124]FcConfigGetConfigFiles -- Get config files 3207a32e9e42Smrg 3208a32e9e42Smrg [125]FcConfigGetCache -- DEPRECATED used to return per-user cache filename 3209a32e9e42Smrg 3210a32e9e42Smrg [126]FcConfigGetCacheDirs -- return the list of directories searched for 3211a32e9e42Smrg cache files 3212a32e9e42Smrg 3213a32e9e42Smrg [127]FcConfigGetFonts -- Get config font set 3214a32e9e42Smrg 3215a32e9e42Smrg [128]FcConfigGetBlanks -- Get config blanks 3216a32e9e42Smrg 3217a32e9e42Smrg [129]FcConfigGetRescanInterval -- Get config rescan interval 3218a32e9e42Smrg 3219a32e9e42Smrg [130]FcConfigSetRescanInterval -- Set config rescan interval 3220a32e9e42Smrg 3221a32e9e42Smrg [131]FcConfigAppFontAddFile -- Add font file to font database 3222a32e9e42Smrg 3223a32e9e42Smrg [132]FcConfigAppFontAddDir -- Add fonts from directory to font database 3224a32e9e42Smrg 3225a32e9e42Smrg [133]FcConfigAppFontClear -- Remove all app fonts from font database 3226a32e9e42Smrg 3227a32e9e42Smrg [134]FcConfigSubstituteWithPat -- Execute substitutions 3228a32e9e42Smrg 3229a32e9e42Smrg [135]FcConfigSubstitute -- Execute substitutions 3230a32e9e42Smrg 3231a32e9e42Smrg [136]FcFontMatch -- Return best font 3232a32e9e42Smrg 3233a32e9e42Smrg [137]FcFontSort -- Return list of matching fonts 3234a32e9e42Smrg 3235a32e9e42Smrg [138]FcFontRenderPrepare -- Prepare pattern for loading font file 3236a32e9e42Smrg 3237a32e9e42Smrg [139]FcFontList -- List fonts 3238a32e9e42Smrg 3239a32e9e42Smrg [140]FcConfigFilename -- Find a config file 3240a32e9e42Smrg 3241a32e9e42Smrg [141]FcConfigParseAndLoad -- load a configuration file 3242a32e9e42Smrg 3243a32e9e42Smrg [142]FcConfigParseAndLoadFromMemory -- load a configuration from memory 3244a32e9e42Smrg 3245a32e9e42Smrg [143]FcConfigGetSysRoot -- Obtain the system root directory 3246a32e9e42Smrg 3247a32e9e42Smrg [144]FcConfigSetSysRoot -- Set the system root directory 3248a32e9e42Smrg 3249a32e9e42Smrg [145]FcConfigFileInfoIterInit -- Initialize the iterator 3250a32e9e42Smrg 3251a32e9e42Smrg [146]FcConfigFileInfoIterNext -- Set the iterator to point to the next 3252a32e9e42Smrg list 3253a32e9e42Smrg 3254a32e9e42Smrg [147]FcConfigFileInfoIterGet -- Obtain the configuration file information 3255a32e9e42Smrg 3256a32e9e42Smrg An FcConfig object holds the internal representation of a configuration. 3257a32e9e42Smrg There is a default configuration which applications may use by passing 0 3258a32e9e42Smrg to any function using the data within an FcConfig. 3259a32e9e42Smrg 3260a32e9e42Smrg FcConfigCreate 3261a32e9e42Smrg 3262a32e9e42SmrgName 3263a32e9e42Smrg 3264a32e9e42Smrg FcConfigCreate -- Create a configuration 3265a32e9e42Smrg 3266a32e9e42SmrgSynopsis 3267a32e9e42Smrg 3268a32e9e42Smrg #include <fontconfig/fontconfig.h> 3269a32e9e42Smrg 3270a6844aabSmrg 3271ca08ab68Smrg FcConfig * FcConfigCreate(void); 32722c393a42Smrg 32732c393a42SmrgDescription 32742c393a42Smrg 3275ca08ab68Smrg Creates an empty configuration. 32762c393a42Smrg 3277a32e9e42Smrg FcConfigReference 3278a6844aabSmrg 3279a6844aabSmrgName 3280a6844aabSmrg 3281a32e9e42Smrg FcConfigReference -- Increment config reference count 3282a6844aabSmrg 3283a6844aabSmrgSynopsis 3284a6844aabSmrg 3285a32e9e42Smrg #include <fontconfig/fontconfig.h> 3286a32e9e42Smrg 3287a6844aabSmrg 3288ca08ab68Smrg FcConfig * FcConfigReference(FcConfig *config); 3289a6844aabSmrg 3290a6844aabSmrgDescription 3291a6844aabSmrg 3292a32e9e42Smrg Add another reference to config. Configs are freed only when the reference 3293a32e9e42Smrg count reaches zero. If config is NULL, the current configuration is used. 3294a32e9e42Smrg In that case this function will be similar to FcConfigGetCurrent() except 3295a32e9e42Smrg that it increments the reference count before returning and the user is 3296a32e9e42Smrg responsible for destroying the configuration when not needed anymore. 3297a6844aabSmrg 3298a32e9e42Smrg FcConfigDestroy 32992c393a42Smrg 33002c393a42SmrgName 33012c393a42Smrg 3302a32e9e42Smrg FcConfigDestroy -- Destroy a configuration 33032c393a42Smrg 33042c393a42SmrgSynopsis 33052c393a42Smrg 3306a32e9e42Smrg #include <fontconfig/fontconfig.h> 3307a32e9e42Smrg 3308a6844aabSmrg 3309ca08ab68Smrg void FcConfigDestroy(FcConfig *config); 33102c393a42Smrg 33112c393a42SmrgDescription 33122c393a42Smrg 3313a32e9e42Smrg Decrements the config reference count. If all references are gone, 3314a32e9e42Smrg destroys the configuration and any data associated with it. Note that 3315a32e9e42Smrg calling this function with the return from FcConfigGetCurrent will cause a 3316a32e9e42Smrg new configuration to be created for use as current configuration. 33172c393a42Smrg 3318a32e9e42Smrg FcConfigSetCurrent 33192c393a42Smrg 33202c393a42SmrgName 33212c393a42Smrg 3322a32e9e42Smrg FcConfigSetCurrent -- Set configuration as default 33232c393a42Smrg 33242c393a42SmrgSynopsis 33252c393a42Smrg 3326a32e9e42Smrg #include <fontconfig/fontconfig.h> 3327a32e9e42Smrg 3328a6844aabSmrg 3329ca08ab68Smrg FcBool FcConfigSetCurrent(FcConfig *config); 33302c393a42Smrg 33312c393a42SmrgDescription 33322c393a42Smrg 3333a32e9e42Smrg Sets the current default configuration to config. Implicitly calls 3334a32e9e42Smrg FcConfigBuildFonts if necessary, and FcConfigReference() to inrease the 3335a32e9e42Smrg reference count in config since 2.12.0, returning FcFalse if that call 3336a32e9e42Smrg fails. 33372c393a42Smrg 3338a32e9e42Smrg FcConfigGetCurrent 33392c393a42Smrg 33402c393a42SmrgName 33412c393a42Smrg 3342a32e9e42Smrg FcConfigGetCurrent -- Return current configuration 33432c393a42Smrg 33442c393a42SmrgSynopsis 33452c393a42Smrg 3346a32e9e42Smrg #include <fontconfig/fontconfig.h> 3347a32e9e42Smrg 3348a6844aabSmrg 3349ca08ab68Smrg FcConfig * FcConfigGetCurrent(void); 33502c393a42Smrg 33512c393a42SmrgDescription 33522c393a42Smrg 3353ca08ab68Smrg Returns the current default configuration. 33542c393a42Smrg 3355a32e9e42Smrg FcConfigUptoDate 33562c393a42Smrg 33572c393a42SmrgName 33582c393a42Smrg 3359a32e9e42Smrg FcConfigUptoDate -- Check timestamps on config files 33602c393a42Smrg 33612c393a42SmrgSynopsis 33622c393a42Smrg 3363a32e9e42Smrg #include <fontconfig/fontconfig.h> 3364a32e9e42Smrg 3365a6844aabSmrg 3366ca08ab68Smrg FcBool FcConfigUptoDate(FcConfig *config); 33672c393a42Smrg 33682c393a42SmrgDescription 33692c393a42Smrg 3370a32e9e42Smrg Checks all of the files related to config and returns whether any of them 3371a32e9e42Smrg has been modified since the configuration was created. If config is NULL, 3372a32e9e42Smrg the current configuration is used. 33732c393a42Smrg 3374a32e9e42Smrg FcConfigHome 33752c393a42Smrg 33762c393a42SmrgName 33772c393a42Smrg 3378a32e9e42Smrg FcConfigHome -- return the current home directory. 33792c393a42Smrg 33802c393a42SmrgSynopsis 33812c393a42Smrg 3382a32e9e42Smrg #include <fontconfig/fontconfig.h> 3383a32e9e42Smrg 3384a6844aabSmrg 3385ca08ab68Smrg FcChar8 * FcConfigHome(void); 33862c393a42Smrg 33872c393a42SmrgDescription 33882c393a42Smrg 3389a32e9e42Smrg Return the current user's home directory, if it is available, and if using 3390a32e9e42Smrg it is enabled, and NULL otherwise. See also FcConfigEnableHome). 33912c393a42Smrg 3392a32e9e42Smrg FcConfigEnableHome 33932c393a42Smrg 33942c393a42SmrgName 33952c393a42Smrg 3396a32e9e42Smrg FcConfigEnableHome -- controls use of the home directory. 33972c393a42Smrg 33982c393a42SmrgSynopsis 33992c393a42Smrg 3400a32e9e42Smrg #include <fontconfig/fontconfig.h> 3401a32e9e42Smrg 3402a6844aabSmrg 3403ca08ab68Smrg FcBool FcConfigEnableHome(FcBool enable); 34042c393a42Smrg 34052c393a42SmrgDescription 34062c393a42Smrg 3407a32e9e42Smrg If enable is FcTrue, then Fontconfig will use various files which are 3408a32e9e42Smrg specified relative to the user's home directory (using the ~ notation in 3409a32e9e42Smrg the configuration). When enable is FcFalse, then all use of the home 3410a32e9e42Smrg directory in these contexts will be disabled. The previous setting of the 3411a32e9e42Smrg value is returned. 34122c393a42Smrg 3413a32e9e42Smrg FcConfigBuildFonts 34142c393a42Smrg 34152c393a42SmrgName 34162c393a42Smrg 3417a32e9e42Smrg FcConfigBuildFonts -- Build font database 34182c393a42Smrg 34192c393a42SmrgSynopsis 34202c393a42Smrg 3421a32e9e42Smrg #include <fontconfig/fontconfig.h> 3422a32e9e42Smrg 3423a6844aabSmrg 3424ca08ab68Smrg FcBool FcConfigBuildFonts(FcConfig *config); 34252c393a42Smrg 34262c393a42SmrgDescription 34272c393a42Smrg 3428a32e9e42Smrg Builds the set of available fonts for the given configuration. Note that 3429a32e9e42Smrg any changes to the configuration after this call have indeterminate 3430a32e9e42Smrg effects. Returns FcFalse if this operation runs out of memory. If config 3431a32e9e42Smrg is NULL, the current configuration is used. 34322c393a42Smrg 3433a32e9e42Smrg FcConfigGetConfigDirs 34342c393a42Smrg 34352c393a42SmrgName 34362c393a42Smrg 3437a32e9e42Smrg FcConfigGetConfigDirs -- Get config directories 34382c393a42Smrg 34392c393a42SmrgSynopsis 34402c393a42Smrg 3441a32e9e42Smrg #include <fontconfig/fontconfig.h> 3442a32e9e42Smrg 3443a6844aabSmrg 3444ca08ab68Smrg FcStrList * FcConfigGetConfigDirs(FcConfig *config); 34452c393a42Smrg 34462c393a42SmrgDescription 34472c393a42Smrg 3448a32e9e42Smrg Returns the list of font directories specified in the configuration files 3449a32e9e42Smrg for config. Does not include any subdirectories. If config is NULL, the 3450a32e9e42Smrg current configuration is used. 34512c393a42Smrg 3452a32e9e42Smrg FcConfigGetFontDirs 34532c393a42Smrg 34542c393a42SmrgName 34552c393a42Smrg 3456a32e9e42Smrg FcConfigGetFontDirs -- Get font directories 34572c393a42Smrg 34582c393a42SmrgSynopsis 34592c393a42Smrg 3460a32e9e42Smrg #include <fontconfig/fontconfig.h> 3461a32e9e42Smrg 3462a6844aabSmrg 3463ca08ab68Smrg FcStrList * FcConfigGetFontDirs(FcConfig *config); 34642c393a42Smrg 34652c393a42SmrgDescription 34662c393a42Smrg 3467a32e9e42Smrg Returns the list of font directories in config. This includes the 3468a32e9e42Smrg configured font directories along with any directories below those in the 3469a32e9e42Smrg filesystem. If config is NULL, the current configuration is used. 34702c393a42Smrg 3471a32e9e42Smrg FcConfigGetConfigFiles 34722c393a42Smrg 34732c393a42SmrgName 34742c393a42Smrg 3475a32e9e42Smrg FcConfigGetConfigFiles -- Get config files 34762c393a42Smrg 34772c393a42SmrgSynopsis 34782c393a42Smrg 3479a32e9e42Smrg #include <fontconfig/fontconfig.h> 3480a32e9e42Smrg 3481a6844aabSmrg 3482ca08ab68Smrg FcStrList * FcConfigGetConfigFiles(FcConfig *config); 34832c393a42Smrg 34842c393a42SmrgDescription 34852c393a42Smrg 3486a32e9e42Smrg Returns the list of known configuration files used to generate config. If 3487a32e9e42Smrg config is NULL, the current configuration is used. 34882c393a42Smrg 3489a32e9e42Smrg FcConfigGetCache 34902c393a42Smrg 34912c393a42SmrgName 34922c393a42Smrg 3493a32e9e42Smrg FcConfigGetCache -- DEPRECATED used to return per-user cache filename 34942c393a42Smrg 34952c393a42SmrgSynopsis 34962c393a42Smrg 3497a32e9e42Smrg #include <fontconfig/fontconfig.h> 3498a32e9e42Smrg 3499a6844aabSmrg 3500ca08ab68Smrg FcChar8 * FcConfigGetCache(FcConfig *config); 35012c393a42Smrg 35022c393a42SmrgDescription 35032c393a42Smrg 3504a32e9e42Smrg With fontconfig no longer using per-user cache files, this function now 3505a32e9e42Smrg simply returns NULL to indicate that no per-user file exists. 35062c393a42Smrg 3507a32e9e42Smrg FcConfigGetCacheDirs 35082c393a42Smrg 35092c393a42SmrgName 35102c393a42Smrg 3511a32e9e42Smrg FcConfigGetCacheDirs -- return the list of directories searched for cache 3512a32e9e42Smrg files 35132c393a42Smrg 35142c393a42SmrgSynopsis 35152c393a42Smrg 3516a32e9e42Smrg #include <fontconfig/fontconfig.h> 3517a32e9e42Smrg 3518a6844aabSmrg 3519ca08ab68Smrg FcStrList * FcConfigGetCacheDirs(const FcConfig *config); 35202c393a42Smrg 35212c393a42SmrgDescription 35222c393a42Smrg 3523a32e9e42Smrg FcConfigGetCacheDirs returns a string list containing all of the 3524a32e9e42Smrg directories that fontconfig will search when attempting to load a cache 3525a32e9e42Smrg file for a font directory. If config is NULL, the current configuration is 3526a32e9e42Smrg used. 35272c393a42Smrg 3528a32e9e42Smrg FcConfigGetFonts 35292c393a42Smrg 35302c393a42SmrgName 35312c393a42Smrg 3532a32e9e42Smrg FcConfigGetFonts -- Get config font set 35332c393a42Smrg 35342c393a42SmrgSynopsis 35352c393a42Smrg 3536a32e9e42Smrg #include <fontconfig/fontconfig.h> 3537a32e9e42Smrg 3538a6844aabSmrg 3539ca08ab68Smrg FcFontSet * FcConfigGetFonts(FcConfig *config, FcSetName set); 35402c393a42Smrg 35412c393a42SmrgDescription 35422c393a42Smrg 3543a32e9e42Smrg Returns one of the two sets of fonts from the configuration as specified 3544a32e9e42Smrg by set. This font set is owned by the library and must not be modified or 3545a32e9e42Smrg freed. If config is NULL, the current configuration is used. 35462c393a42Smrg 3547a32e9e42Smrg FcConfigGetBlanks 35482c393a42Smrg 35492c393a42SmrgName 35502c393a42Smrg 3551a32e9e42Smrg FcConfigGetBlanks -- Get config blanks 35522c393a42Smrg 35532c393a42SmrgSynopsis 35542c393a42Smrg 3555a32e9e42Smrg #include <fontconfig/fontconfig.h> 3556a32e9e42Smrg 3557a6844aabSmrg 3558ca08ab68Smrg FcBlanks * FcConfigGetBlanks(FcConfig *config); 35592c393a42Smrg 35602c393a42SmrgDescription 35612c393a42Smrg 3562a32e9e42Smrg FcBlanks is deprecated. This function always returns NULL. 35632c393a42Smrg 3564a32e9e42Smrg FcConfigGetRescanInterval 35652c393a42Smrg 35662c393a42SmrgName 35672c393a42Smrg 3568a32e9e42Smrg FcConfigGetRescanInterval -- Get config rescan interval 35692c393a42Smrg 35702c393a42SmrgSynopsis 35712c393a42Smrg 3572a32e9e42Smrg #include <fontconfig/fontconfig.h> 3573a32e9e42Smrg 3574a6844aabSmrg 3575ca08ab68Smrg int FcConfigGetRescanInterval(FcConfig *config); 35762c393a42Smrg 35772c393a42SmrgDescription 35782c393a42Smrg 3579a32e9e42Smrg Returns the interval between automatic checks of the configuration (in 3580a32e9e42Smrg seconds) specified in config. The configuration is checked during a call 3581a32e9e42Smrg to FcFontList when this interval has passed since the last check. An 3582a32e9e42Smrg interval setting of zero disables automatic checks. If config is NULL, the 3583ca08ab68Smrg current configuration is used. 35842c393a42Smrg 3585a32e9e42Smrg FcConfigSetRescanInterval 35862c393a42Smrg 35872c393a42SmrgName 35882c393a42Smrg 3589a32e9e42Smrg FcConfigSetRescanInterval -- Set config rescan interval 35902c393a42Smrg 35912c393a42SmrgSynopsis 35922c393a42Smrg 3593a32e9e42Smrg #include <fontconfig/fontconfig.h> 3594a32e9e42Smrg 3595a6844aabSmrg 3596a32e9e42Smrg FcBool FcConfigSetRescanInterval(FcConfig *config, int rescanInterval); 35972c393a42Smrg 35982c393a42SmrgDescription 35992c393a42Smrg 3600a32e9e42Smrg Sets the rescan interval. Returns FcFalse if the interval cannot be set 3601a32e9e42Smrg (due to allocation failure). Otherwise returns FcTrue. An interval setting 3602a32e9e42Smrg of zero disables automatic checks. If config is NULL, the current 3603a32e9e42Smrg configuration is used. 36042c393a42Smrg 3605a32e9e42Smrg FcConfigAppFontAddFile 36062c393a42Smrg 36072c393a42SmrgName 36082c393a42Smrg 3609a32e9e42Smrg FcConfigAppFontAddFile -- Add font file to font database 36102c393a42Smrg 36112c393a42SmrgSynopsis 36122c393a42Smrg 3613a32e9e42Smrg #include <fontconfig/fontconfig.h> 3614a32e9e42Smrg 3615a6844aabSmrg 3616a32e9e42Smrg FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8 *file); 36172c393a42Smrg 36182c393a42SmrgDescription 36192c393a42Smrg 3620a32e9e42Smrg Adds an application-specific font to the configuration. Returns FcFalse if 3621a32e9e42Smrg the fonts cannot be added (due to allocation failure or no fonts found). 3622a32e9e42Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3623a32e9e42Smrg used. 36242c393a42Smrg 3625a32e9e42Smrg FcConfigAppFontAddDir 36262c393a42Smrg 36272c393a42SmrgName 36282c393a42Smrg 3629a32e9e42Smrg FcConfigAppFontAddDir -- Add fonts from directory to font database 36302c393a42Smrg 36312c393a42SmrgSynopsis 36322c393a42Smrg 3633a32e9e42Smrg #include <fontconfig/fontconfig.h> 36342c393a42Smrg 3635a32e9e42Smrg 3636a32e9e42Smrg FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8 *dir); 36372c393a42Smrg 36382c393a42SmrgDescription 36392c393a42Smrg 3640a32e9e42Smrg Scans the specified directory for fonts, adding each one found to the 3641a32e9e42Smrg application-specific set of fonts. Returns FcFalse if the fonts cannot be 3642a32e9e42Smrg added (due to allocation failure). Otherwise returns FcTrue. If config is 3643a32e9e42Smrg NULL, the current configuration is used. 36442c393a42Smrg 3645a32e9e42Smrg FcConfigAppFontClear 36462c393a42Smrg 36472c393a42SmrgName 36482c393a42Smrg 3649a32e9e42Smrg FcConfigAppFontClear -- Remove all app fonts from font database 36502c393a42Smrg 36512c393a42SmrgSynopsis 36522c393a42Smrg 3653a32e9e42Smrg #include <fontconfig/fontconfig.h> 3654a32e9e42Smrg 3655a6844aabSmrg 3656ca08ab68Smrg void FcConfigAppFontClear(FcConfig *config); 36572c393a42Smrg 36582c393a42SmrgDescription 36592c393a42Smrg 3660a32e9e42Smrg Clears the set of application-specific fonts. If config is NULL, the 3661a32e9e42Smrg current configuration is used. 36622c393a42Smrg 3663a32e9e42Smrg FcConfigSubstituteWithPat 36642c393a42Smrg 36652c393a42SmrgName 36662c393a42Smrg 3667a32e9e42Smrg FcConfigSubstituteWithPat -- Execute substitutions 36682c393a42Smrg 36692c393a42SmrgSynopsis 36702c393a42Smrg 3671a32e9e42Smrg #include <fontconfig/fontconfig.h> 36722c393a42Smrg 3673a32e9e42Smrg 3674a32e9e42Smrg FcBool FcConfigSubstituteWithPat(FcConfig *config, FcPattern *p, FcPattern 3675a32e9e42Smrg *p_pat, FcMatchKind kind); 36762c393a42Smrg 36772c393a42SmrgDescription 36782c393a42Smrg 3679a32e9e42Smrg Performs the sequence of pattern modification operations, if kind is 3680a32e9e42Smrg FcMatchPattern, then those tagged as pattern operations are applied, else 3681a32e9e42Smrg if kind is FcMatchFont, those tagged as font operations are applied and 3682a32e9e42Smrg p_pat is used for <test> elements with target=pattern. Returns FcFalse if 3683a32e9e42Smrg the substitution cannot be performed (due to allocation failure). 3684a32e9e42Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3685a32e9e42Smrg used. 36862c393a42Smrg 3687a32e9e42Smrg FcConfigSubstitute 36882c393a42Smrg 36892c393a42SmrgName 36902c393a42Smrg 3691a32e9e42Smrg FcConfigSubstitute -- Execute substitutions 36922c393a42Smrg 36932c393a42SmrgSynopsis 36942c393a42Smrg 3695a32e9e42Smrg #include <fontconfig/fontconfig.h> 3696a6844aabSmrg 3697a32e9e42Smrg 3698a32e9e42Smrg FcBool FcConfigSubstitute(FcConfig *config, FcPattern *p, FcMatchKind 3699a32e9e42Smrg kind); 37002c393a42Smrg 37012c393a42SmrgDescription 37022c393a42Smrg 3703a32e9e42Smrg Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse if 3704a32e9e42Smrg the substitution cannot be performed (due to allocation failure). 3705a32e9e42Smrg Otherwise returns FcTrue. If config is NULL, the current configuration is 3706a32e9e42Smrg used. 3707a32e9e42Smrg 3708a32e9e42Smrg FcFontMatch 3709a32e9e42Smrg 3710a32e9e42SmrgName 3711a32e9e42Smrg 3712a32e9e42Smrg FcFontMatch -- Return best font 3713a32e9e42Smrg 3714a32e9e42SmrgSynopsis 3715a32e9e42Smrg 3716a32e9e42Smrg #include <fontconfig/fontconfig.h> 3717a32e9e42Smrg 3718a32e9e42Smrg 3719a32e9e42Smrg FcPattern * FcFontMatch(FcConfig *config, FcPattern *p, FcResult *result); 3720a32e9e42Smrg 3721a32e9e42SmrgDescription 3722a32e9e42Smrg 3723a32e9e42Smrg Finds the font in sets most closely matching pattern and returns the 3724a32e9e42Smrg result of FcFontRenderPrepare for that font and the provided pattern. This 3725a32e9e42Smrg function should be called only after FcConfigSubstitute and 3726a32e9e42Smrg FcDefaultSubstitute have been called for p; otherwise the results will not 3727a32e9e42Smrg be correct. If config is NULL, the current configuration is used. 3728a32e9e42Smrg 3729a32e9e42Smrg FcFontSort 3730a32e9e42Smrg 3731a32e9e42SmrgName 3732a32e9e42Smrg 3733a32e9e42Smrg FcFontSort -- Return list of matching fonts 3734a32e9e42Smrg 3735a32e9e42SmrgSynopsis 3736a32e9e42Smrg 3737a32e9e42Smrg #include <fontconfig/fontconfig.h> 3738a32e9e42Smrg 3739a32e9e42Smrg 3740a32e9e42Smrg FcFontSet * FcFontSort(FcConfig *config, FcPattern *p, FcBool trim, 3741a32e9e42Smrg FcCharSet **csp, FcResult *result); 3742a32e9e42Smrg 3743a32e9e42SmrgDescription 37442c393a42Smrg 3745a32e9e42Smrg Returns the list of fonts sorted by closeness to p. If trim is FcTrue, 3746a32e9e42Smrg elements in the list which don't include Unicode coverage not provided by 3747a32e9e42Smrg earlier elements in the list are elided. The union of Unicode coverage of 3748a32e9e42Smrg all of the fonts is returned in csp, if csp is not NULL. This function 3749a32e9e42Smrg should be called only after FcConfigSubstitute and FcDefaultSubstitute 3750a32e9e42Smrg have been called for p; otherwise the results will not be correct. 3751a32e9e42Smrg 3752a32e9e42Smrg The returned FcFontSet references FcPattern structures which may be shared 3753a32e9e42Smrg by the return value from multiple FcFontSort calls, applications must not 3754a32e9e42Smrg modify these patterns. Instead, they should be passed, along with p to 3755a32e9e42Smrg FcFontRenderPrepare which combines them into a complete pattern. 3756a32e9e42Smrg 3757a32e9e42Smrg The FcFontSet returned by FcFontSort is destroyed by calling 3758a32e9e42Smrg FcFontSetDestroy. If config is NULL, the current configuration is used. 3759a32e9e42Smrg 3760a32e9e42Smrg FcFontRenderPrepare 3761a32e9e42Smrg 3762a32e9e42SmrgName 3763a32e9e42Smrg 3764a32e9e42Smrg FcFontRenderPrepare -- Prepare pattern for loading font file 3765a32e9e42Smrg 3766a32e9e42SmrgSynopsis 3767a32e9e42Smrg 3768a32e9e42Smrg #include <fontconfig/fontconfig.h> 3769a32e9e42Smrg 3770a32e9e42Smrg 3771a32e9e42Smrg FcPattern * FcFontRenderPrepare(FcConfig *config, FcPattern *pat, 3772a32e9e42Smrg FcPattern *font); 3773a32e9e42Smrg 3774a32e9e42SmrgDescription 3775a32e9e42Smrg 3776a32e9e42Smrg Creates a new pattern consisting of elements of font not appearing in pat, 3777a32e9e42Smrg elements of pat not appearing in font and the best matching value from pat 3778a32e9e42Smrg for elements appearing in both. The result is passed to 3779a32e9e42Smrg FcConfigSubstituteWithPat with kind FcMatchFont and then returned. 3780a32e9e42Smrg 3781a32e9e42Smrg FcFontList 37822c393a42Smrg 37832c393a42SmrgName 37842c393a42Smrg 3785a32e9e42Smrg FcFontList -- List fonts 37862c393a42Smrg 37872c393a42SmrgSynopsis 37882c393a42Smrg 3789a32e9e42Smrg #include <fontconfig/fontconfig.h> 37902c393a42Smrg 3791a32e9e42Smrg 3792a32e9e42Smrg FcFontSet * FcFontList(FcConfig *config, FcPattern *p, FcObjectSet *os); 3793a32e9e42Smrg 3794a32e9e42SmrgDescription 3795a32e9e42Smrg 3796a32e9e42Smrg Selects fonts matching p, creates patterns from those fonts containing 3797a32e9e42Smrg only the objects in os and returns the set of unique such patterns. If 3798a32e9e42Smrg config is NULL, the default configuration is checked to be up to date, and 3799a32e9e42Smrg used. 3800a32e9e42Smrg 3801a32e9e42Smrg FcConfigFilename 3802a32e9e42Smrg 3803a32e9e42SmrgName 3804a32e9e42Smrg 3805a32e9e42Smrg FcConfigFilename -- Find a config file 3806a32e9e42Smrg 3807a32e9e42SmrgSynopsis 3808a32e9e42Smrg 3809a32e9e42Smrg #include <fontconfig/fontconfig.h> 3810a32e9e42Smrg 3811a32e9e42Smrg 3812a32e9e42Smrg FcChar8 * FcConfigFilename(const FcChar8 *name); 38132c393a42Smrg 38142c393a42SmrgDescription 38152c393a42Smrg 3816a32e9e42Smrg Given the specified external entity name, return the associated filename. 3817a32e9e42Smrg This provides applications a way to convert various configuration file 3818a32e9e42Smrg references into filename form. 3819a32e9e42Smrg 3820a32e9e42Smrg A null or empty name indicates that the default configuration file should 3821a32e9e42Smrg be used; which file this references can be overridden with the 3822a32e9e42Smrg FONTCONFIG_FILE environment variable. Next, if the name starts with ~, it 3823a32e9e42Smrg refers to a file in the current users home directory. Otherwise if the 3824a32e9e42Smrg name doesn't start with '/', it refers to a file in the default 3825a32e9e42Smrg configuration directory; the built-in default directory can be overridden 3826a32e9e42Smrg with the FONTCONFIG_PATH environment variable. 38272c393a42Smrg 3828a32e9e42Smrg FcConfigParseAndLoad 38292c393a42Smrg 38302c393a42SmrgName 38312c393a42Smrg 3832a32e9e42Smrg FcConfigParseAndLoad -- load a configuration file 38332c393a42Smrg 38342c393a42SmrgSynopsis 38352c393a42Smrg 3836a32e9e42Smrg #include <fontconfig/fontconfig.h> 38372c393a42Smrg 38382c393a42Smrg 3839a32e9e42Smrg FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8 *file, FcBool 3840a32e9e42Smrg complain); 38412c393a42Smrg 3842a32e9e42SmrgDescription 38432c393a42Smrg 3844a32e9e42Smrg Walks the configuration in 'file' and constructs the internal 3845a32e9e42Smrg representation in 'config'. Any include files referenced from within 3846a32e9e42Smrg 'file' will be loaded and parsed. If 'complain' is FcFalse, no warning 3847a32e9e42Smrg will be displayed if 'file' does not exist. Error and warning messages 3848a32e9e42Smrg will be output to stderr. Returns FcFalse if some error occurred while 3849a32e9e42Smrg loading the file, either a parse error, semantic error or allocation 3850a32e9e42Smrg failure. Otherwise returns FcTrue. 38512c393a42Smrg 3852a32e9e42Smrg FcConfigParseAndLoadFromMemory 38532c393a42Smrg 38542c393a42SmrgName 38552c393a42Smrg 3856a32e9e42Smrg FcConfigParseAndLoadFromMemory -- load a configuration from memory 38572c393a42Smrg 38582c393a42SmrgSynopsis 38592c393a42Smrg 3860a32e9e42Smrg #include <fontconfig/fontconfig.h> 3861a32e9e42Smrg 3862a6844aabSmrg 3863a32e9e42Smrg FcBool FcConfigParseAndLoadFromMemory(FcConfig *config, const FcChar8 3864a32e9e42Smrg *buffer, FcBool complain); 38652c393a42Smrg 38662c393a42SmrgDescription 38672c393a42Smrg 3868a32e9e42Smrg Walks the configuration in 'memory' and constructs the internal 3869a32e9e42Smrg representation in 'config'. Any includes files referenced from within 3870a32e9e42Smrg 'memory' will be loaded and dparsed. If 'complain' is FcFalse, no warning 3871a32e9e42Smrg will be displayed if 'file' does not exist. Error and warning messages 3872a32e9e42Smrg will be output to stderr. Returns FcFalse if fsome error occurred while 3873a32e9e42Smrg loading the file, either a parse error, semantic error or allocation 3874a32e9e42Smrg failure. Otherwise returns FcTrue. 38752c393a42Smrg 3876a32e9e42SmrgSince 3877a32e9e42Smrg 3878a32e9e42Smrg version 2.12.5 3879a32e9e42Smrg 3880a32e9e42Smrg FcConfigGetSysRoot 38812c393a42Smrg 38822c393a42SmrgName 38832c393a42Smrg 3884a32e9e42Smrg FcConfigGetSysRoot -- Obtain the system root directory 38852c393a42Smrg 38862c393a42SmrgSynopsis 38872c393a42Smrg 3888a32e9e42Smrg #include <fontconfig/fontconfig.h> 3889a32e9e42Smrg 38902c393a42Smrg 3891a32e9e42Smrg const FcChar8 * FcConfigGetSysRoot(const FcConfig *config); 38922c393a42Smrg 38932c393a42SmrgDescription 38942c393a42Smrg 3895a32e9e42Smrg Obtrains the system root directory in 'config' if available. 3896a32e9e42Smrg 3897a32e9e42SmrgSince 3898a32e9e42Smrg 3899a32e9e42Smrg version 2.10.92 39002c393a42Smrg 3901a32e9e42Smrg FcConfigSetSysRoot 39022c393a42Smrg 39032c393a42SmrgName 39042c393a42Smrg 3905a32e9e42Smrg FcConfigSetSysRoot -- Set the system root directory 39062c393a42Smrg 39072c393a42SmrgSynopsis 39082c393a42Smrg 3909a32e9e42Smrg #include <fontconfig/fontconfig.h> 3910a6844aabSmrg 3911a32e9e42Smrg 3912a32e9e42Smrg void FcConfigSetSysRoot(FcConfig *config, const FcChar8 *sysroot); 39132c393a42Smrg 39142c393a42SmrgDescription 39152c393a42Smrg 3916a32e9e42Smrg Set 'sysroot' as the system root directory. fontconfig prepend 'sysroot' 3917a32e9e42Smrg to the cache directories in order to allow people to generate caches at 3918a32e9e42Smrg the build time. Note that this causes changing current config. i.e. this 3919a32e9e42Smrg function calls FcConfigSetCurrent() internally. 39202c393a42Smrg 3921a32e9e42SmrgSince 3922a32e9e42Smrg 3923a32e9e42Smrg version 2.10.92 39242c393a42Smrg 3925a32e9e42Smrg FcConfigFileInfoIterInit 39262c393a42Smrg 39272c393a42SmrgName 39282c393a42Smrg 3929a32e9e42Smrg FcConfigFileInfoIterInit -- Initialize the iterator 39302c393a42Smrg 39312c393a42SmrgSynopsis 39322c393a42Smrg 3933a32e9e42Smrg #include <fontconfig/fontconfig.h> 3934a32e9e42Smrg 39352c393a42Smrg 3936a32e9e42Smrg void FcConfigFileInfoIterInit(FcConfig *config, FcConfigFileInfoIter 3937a32e9e42Smrg *iter); 39382c393a42Smrg 39392c393a42SmrgDescription 39402c393a42Smrg 3941a32e9e42Smrg Initialize 'iter' with the first iterator in the config file information 3942a32e9e42Smrg list. 39432c393a42Smrg 3944a32e9e42SmrgSince 3945a32e9e42Smrg 3946a32e9e42Smrg version 2.12.91 3947a32e9e42Smrg 3948a32e9e42Smrg FcConfigFileInfoIterNext 3949c9710b42Smrg 3950c9710b42SmrgName 3951c9710b42Smrg 3952a32e9e42Smrg FcConfigFileInfoIterNext -- Set the iterator to point to the next list 3953c9710b42Smrg 3954c9710b42SmrgSynopsis 3955c9710b42Smrg 3956a32e9e42Smrg #include <fontconfig/fontconfig.h> 3957c9710b42Smrg 3958a32e9e42Smrg 3959a32e9e42Smrg FcBool FcConfigFileInfoIterNext(FcConfig *config, FcConfigFileInfoIter 3960a32e9e42Smrg *iter); 3961c9710b42Smrg 3962c9710b42SmrgDescription 3963c9710b42Smrg 3964a32e9e42Smrg Set 'iter' to point to the next node in the config file information list. 3965a32e9e42Smrg If there is no next node, FcFalse is returned. 3966c9710b42Smrg 3967b09479dcSmrgSince 3968c9710b42Smrg 3969a32e9e42Smrg version 2.12.91 3970c9710b42Smrg 3971a32e9e42Smrg FcConfigFileInfoIterGet 3972c9710b42Smrg 3973c9710b42SmrgName 3974c9710b42Smrg 3975a32e9e42Smrg FcConfigFileInfoIterGet -- Obtain the configuration file information 3976c9710b42Smrg 3977c9710b42SmrgSynopsis 3978c9710b42Smrg 3979a32e9e42Smrg #include <fontconfig/fontconfig.h> 3980a32e9e42Smrg 3981c9710b42Smrg 3982a32e9e42Smrg FcBool FcConfigFileInfoIterGet(FcConfig *config, FcConfigFileInfoIter 3983a32e9e42Smrg *iter, FcChar8 **name, FcChar8 **description, FcBool *enabled); 3984c9710b42Smrg 3985c9710b42SmrgDescription 3986c9710b42Smrg 3987a32e9e42Smrg Obtain the filename, the description and the flag whether it is enabled or 3988a32e9e42Smrg not for 'iter' where points to current configuration file information. If 3989a32e9e42Smrg the iterator is invalid, FcFalse is returned. 3990c9710b42Smrg 3991b09479dcSmrgSince 3992c9710b42Smrg 3993a32e9e42Smrg version 2.12.91 3994a32e9e42Smrg 3995a32e9e42Smrg -------------------------------------------------------------------------- 3996ca08ab68Smrg 3997a32e9e42Smrg FcObjectType 39982c393a42Smrg 3999ca08ab68Smrg Table of Contents 40002c393a42Smrg 4001a32e9e42Smrg [148]FcNameRegisterObjectTypes -- Register object types 4002a32e9e42Smrg 4003a32e9e42Smrg [149]FcNameUnregisterObjectTypes -- Unregister object types 4004a32e9e42Smrg 4005a32e9e42Smrg [150]FcNameGetObjectType -- Lookup an object type 4006ca08ab68Smrg 4007a32e9e42Smrg Provides for application-specified font name object types so that new 4008a32e9e42Smrg pattern elements can be generated from font names. 4009a32e9e42Smrg 4010a32e9e42Smrg FcNameRegisterObjectTypes 40112c393a42Smrg 40122c393a42SmrgName 40132c393a42Smrg 4014a32e9e42Smrg FcNameRegisterObjectTypes -- Register object types 40152c393a42Smrg 40162c393a42SmrgSynopsis 40172c393a42Smrg 4018a32e9e42Smrg #include <fontconfig/fontconfig.h> 4019a32e9e42Smrg 40202c393a42Smrg 4021a32e9e42Smrg FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int ntype); 40222c393a42Smrg 40232c393a42SmrgDescription 40242c393a42Smrg 4025c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 40262c393a42Smrg 4027a32e9e42Smrg FcNameUnregisterObjectTypes 40282c393a42Smrg 40292c393a42SmrgName 40302c393a42Smrg 4031a32e9e42Smrg FcNameUnregisterObjectTypes -- Unregister object types 40322c393a42Smrg 40332c393a42SmrgSynopsis 40342c393a42Smrg 4035a32e9e42Smrg #include <fontconfig/fontconfig.h> 4036a6844aabSmrg 4037a32e9e42Smrg 4038a32e9e42Smrg FcBool FcNameUnregisterObjectTypes(const FcObjectType *types, int ntype); 40392c393a42Smrg 40402c393a42SmrgDescription 40412c393a42Smrg 4042c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 40432c393a42Smrg 4044a32e9e42Smrg FcNameGetObjectType 40452c393a42Smrg 40462c393a42SmrgName 40472c393a42Smrg 4048a32e9e42Smrg FcNameGetObjectType -- Lookup an object type 40492c393a42Smrg 40502c393a42SmrgSynopsis 40512c393a42Smrg 4052a32e9e42Smrg #include <fontconfig/fontconfig.h> 4053a32e9e42Smrg 4054a6844aabSmrg 4055ca08ab68Smrg const FcObjectType * FcNameGetObjectType(const char *object); 40562c393a42Smrg 40572c393a42SmrgDescription 40582c393a42Smrg 4059ca08ab68Smrg Return the object type for the pattern element named object. 40602c393a42Smrg 4061a32e9e42Smrg -------------------------------------------------------------------------- 4062a32e9e42Smrg 4063a32e9e42Smrg FcConstant 40642c393a42Smrg 4065ca08ab68Smrg Table of Contents 40662c393a42Smrg 4067a32e9e42Smrg [151]FcNameRegisterConstants -- Register symbolic constants 4068a32e9e42Smrg 4069a32e9e42Smrg [152]FcNameUnregisterConstants -- Unregister symbolic constants 4070a32e9e42Smrg 4071a32e9e42Smrg [153]FcNameGetConstant -- Lookup symbolic constant 4072a32e9e42Smrg 4073a32e9e42Smrg [154]FcNameConstant -- Get the value for a symbolic constant 40742c393a42Smrg 4075a32e9e42Smrg Provides for application-specified symbolic constants for font names. 4076a32e9e42Smrg 4077a32e9e42Smrg FcNameRegisterConstants 40782c393a42Smrg 40792c393a42SmrgName 40802c393a42Smrg 4081a32e9e42Smrg FcNameRegisterConstants -- Register symbolic constants 40822c393a42Smrg 40832c393a42SmrgSynopsis 40842c393a42Smrg 4085a32e9e42Smrg #include <fontconfig/fontconfig.h> 4086a32e9e42Smrg 40872c393a42Smrg 4088a32e9e42Smrg FcBool FcNameRegisterConstants(const FcConstant *consts, int nconsts); 40892c393a42Smrg 40902c393a42SmrgDescription 40912c393a42Smrg 4092c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 40932c393a42Smrg 4094a32e9e42Smrg FcNameUnregisterConstants 40952c393a42Smrg 40962c393a42SmrgName 40972c393a42Smrg 4098a32e9e42Smrg FcNameUnregisterConstants -- Unregister symbolic constants 40992c393a42Smrg 41002c393a42SmrgSynopsis 41012c393a42Smrg 4102a32e9e42Smrg #include <fontconfig/fontconfig.h> 4103a6844aabSmrg 4104a32e9e42Smrg 4105a32e9e42Smrg FcBool FcNameUnregisterConstants(const FcConstant *consts, int nconsts); 41062c393a42Smrg 41072c393a42SmrgDescription 41082c393a42Smrg 4109c9710b42Smrg Deprecated. Does nothing. Returns FcFalse. 41102c393a42Smrg 4111a32e9e42Smrg FcNameGetConstant 41122c393a42Smrg 41132c393a42SmrgName 41142c393a42Smrg 4115a32e9e42Smrg FcNameGetConstant -- Lookup symbolic constant 41162c393a42Smrg 41172c393a42SmrgSynopsis 41182c393a42Smrg 4119a32e9e42Smrg #include <fontconfig/fontconfig.h> 4120a32e9e42Smrg 4121a6844aabSmrg 4122ca08ab68Smrg const FcConstant * FcNameGetConstant(FcChar8 *string); 41232c393a42Smrg 41242c393a42SmrgDescription 41252c393a42Smrg 4126a32e9e42Smrg Return the FcConstant structure related to symbolic constant string. 41272c393a42Smrg 4128a32e9e42Smrg FcNameConstant 41292c393a42Smrg 41302c393a42SmrgName 41312c393a42Smrg 4132a32e9e42Smrg FcNameConstant -- Get the value for a symbolic constant 41332c393a42Smrg 41342c393a42SmrgSynopsis 41352c393a42Smrg 4136a32e9e42Smrg #include <fontconfig/fontconfig.h> 4137a32e9e42Smrg 4138a6844aabSmrg 4139ca08ab68Smrg FcBool FcNameConstant(FcChar8 *string, int *result); 41402c393a42Smrg 41412c393a42SmrgDescription 41422c393a42Smrg 4143a32e9e42Smrg Returns whether a symbolic constant with name string is registered, 4144a32e9e42Smrg placing the value of the constant in result if present. 4145a32e9e42Smrg 4146a32e9e42Smrg -------------------------------------------------------------------------- 41472c393a42Smrg 4148a32e9e42Smrg FcWeight 41492c393a42Smrg 4150ca08ab68Smrg Table of Contents 4151953daebaSmrg 4152a32e9e42Smrg [155]FcWeightFromOpenTypeDouble -- Convert from OpenType weight values to 4153a32e9e42Smrg fontconfig ones 4154a32e9e42Smrg 4155a32e9e42Smrg [156]FcWeightToOpenTypeDouble -- Convert from fontconfig weight values to 4156a32e9e42Smrg OpenType ones 4157a32e9e42Smrg 4158a32e9e42Smrg [157]FcWeightFromOpenType -- Convert from OpenType weight values to 4159a32e9e42Smrg fontconfig ones 4160a32e9e42Smrg 4161a32e9e42Smrg [158]FcWeightToOpenType -- Convert from fontconfig weight values to 4162a32e9e42Smrg OpenType ones 4163953daebaSmrg 4164953daebaSmrg Maps weights to and from OpenType weights. 4165953daebaSmrg 4166a32e9e42Smrg FcWeightFromOpenTypeDouble 4167953daebaSmrg 4168953daebaSmrgName 4169953daebaSmrg 4170a32e9e42Smrg FcWeightFromOpenTypeDouble -- Convert from OpenType weight values to 4171953daebaSmrg fontconfig ones 4172953daebaSmrg 4173953daebaSmrgSynopsis 4174953daebaSmrg 4175a32e9e42Smrg #include <fontconfig/fontconfig.h> 4176a32e9e42Smrg 4177a32e9e42Smrg 4178a32e9e42Smrg double FcWeightFromOpenTypeDouble(doubleot_weight); 4179a32e9e42Smrg 4180a32e9e42SmrgDescription 4181a32e9e42Smrg 4182a32e9e42Smrg FcWeightFromOpenTypeDouble returns an double value to use with FC_WEIGHT, 4183a32e9e42Smrg from an double in the 1..1000 range, resembling the numbers from OpenType 4184a32e9e42Smrg specification's OS/2 usWeight numbers, which are also similar to CSS 4185a32e9e42Smrg font-weight numbers. If input is negative, zero, or greater than 1000, 4186a32e9e42Smrg returns -1. This function linearly doubleerpolates between various 4187a32e9e42Smrg FC_WEIGHT_* constants. As such, the returned value does not necessarily 4188a32e9e42Smrg match any of the predefined constants. 4189a32e9e42Smrg 4190a32e9e42SmrgSince 4191a32e9e42Smrg 4192a32e9e42Smrg version 2.12.92 4193a32e9e42Smrg 4194a32e9e42Smrg FcWeightToOpenTypeDouble 4195a32e9e42Smrg 4196a32e9e42SmrgName 4197a32e9e42Smrg 4198a32e9e42Smrg FcWeightToOpenTypeDouble -- Convert from fontconfig weight values to 4199a32e9e42Smrg OpenType ones 4200a32e9e42Smrg 4201a32e9e42SmrgSynopsis 4202a32e9e42Smrg 4203a32e9e42Smrg #include <fontconfig/fontconfig.h> 4204a32e9e42Smrg 4205a32e9e42Smrg 4206a32e9e42Smrg double FcWeightToOpenTypeDouble(doubleot_weight); 4207a32e9e42Smrg 4208a32e9e42SmrgDescription 4209a32e9e42Smrg 4210a32e9e42Smrg FcWeightToOpenTypeDouble is the inverse of FcWeightFromOpenType. If the 4211a32e9e42Smrg input is less than FC_WEIGHT_THIN or greater than FC_WEIGHT_EXTRABLACK, 4212a32e9e42Smrg returns -1. Otherwise returns a number in the range 1 to 1000. 4213a32e9e42Smrg 4214a32e9e42SmrgSince 4215a32e9e42Smrg 4216a32e9e42Smrg version 2.12.92 4217a32e9e42Smrg 4218a32e9e42Smrg FcWeightFromOpenType 4219a32e9e42Smrg 4220a32e9e42SmrgName 4221a32e9e42Smrg 4222a32e9e42Smrg FcWeightFromOpenType -- Convert from OpenType weight values to fontconfig 4223a32e9e42Smrg ones 4224a32e9e42Smrg 4225a32e9e42SmrgSynopsis 4226a32e9e42Smrg 4227a32e9e42Smrg #include <fontconfig/fontconfig.h> 4228a32e9e42Smrg 42292c393a42Smrg 4230953daebaSmrg int FcWeightFromOpenType(intot_weight); 42312c393a42Smrg 4232953daebaSmrgDescription 42332c393a42Smrg 4234a32e9e42Smrg FcWeightFromOpenType is like FcWeightFromOpenTypeDouble but with integer 4235a32e9e42Smrg arguments. Use the other function instead. 4236ca08ab68Smrg 4237953daebaSmrgSince 4238ca08ab68Smrg 4239953daebaSmrg version 2.11.91 4240ca08ab68Smrg 4241a32e9e42Smrg FcWeightToOpenType 42422c393a42Smrg 42432c393a42SmrgName 42442c393a42Smrg 4245a32e9e42Smrg FcWeightToOpenType -- Convert from fontconfig weight values to OpenType 4246a32e9e42Smrg ones 42472c393a42Smrg 42482c393a42SmrgSynopsis 42492c393a42Smrg 4250a32e9e42Smrg #include <fontconfig/fontconfig.h> 4251a32e9e42Smrg 42522c393a42Smrg 4253953daebaSmrg int FcWeightToOpenType(intot_weight); 42542c393a42Smrg 42552c393a42SmrgDescription 42562c393a42Smrg 4257a32e9e42Smrg FcWeightToOpenType is like FcWeightToOpenTypeDouble but with integer 4258a32e9e42Smrg arguments. Use the other function instead. 4259953daebaSmrg 4260953daebaSmrgSince 4261953daebaSmrg 4262953daebaSmrg version 2.11.91 4263953daebaSmrg 4264a32e9e42Smrg -------------------------------------------------------------------------- 4265a32e9e42Smrg 4266a32e9e42Smrg FcBlanks 4267953daebaSmrg 4268953daebaSmrg Table of Contents 4269953daebaSmrg 4270a32e9e42Smrg [159]FcBlanksCreate -- Create an FcBlanks 42712c393a42Smrg 4272a32e9e42Smrg [160]FcBlanksDestroy -- Destroy and FcBlanks 4273a32e9e42Smrg 4274a32e9e42Smrg [161]FcBlanksAdd -- Add a character to an FcBlanks 4275a32e9e42Smrg 4276a32e9e42Smrg [162]FcBlanksIsMember -- Query membership in an FcBlanks 4277a32e9e42Smrg 4278a32e9e42Smrg An FcBlanks object holds a list of Unicode chars which are expected to be 4279a32e9e42Smrg blank when drawn. When scanning new fonts, any glyphs which are empty and 4280a32e9e42Smrg not in this list will be assumed to be broken and not placed in the 4281a32e9e42Smrg FcCharSet associated with the font. This provides a significantly more 4282a32e9e42Smrg accurate CharSet for applications. 4283a32e9e42Smrg 4284a32e9e42Smrg FcBlanks is deprecated and should not be used in newly written code. It is 4285a32e9e42Smrg still accepted by some functions for compatibility with older code but 4286a32e9e42Smrg will be removed in the future. 4287a32e9e42Smrg 4288a32e9e42Smrg FcBlanksCreate 42892c393a42Smrg 42902c393a42SmrgName 42912c393a42Smrg 4292a32e9e42Smrg FcBlanksCreate -- Create an FcBlanks 42932c393a42Smrg 42942c393a42SmrgSynopsis 42952c393a42Smrg 4296a32e9e42Smrg #include <fontconfig/fontconfig.h> 4297a32e9e42Smrg 42982c393a42Smrg 4299953daebaSmrg FcBlanks * FcBlanksCreate(void); 43002c393a42Smrg 43012c393a42SmrgDescription 43022c393a42Smrg 4303a32e9e42Smrg FcBlanks is deprecated. This function always returns NULL. 43042c393a42Smrg 4305a32e9e42Smrg FcBlanksDestroy 43062c393a42Smrg 43072c393a42SmrgName 43082c393a42Smrg 4309a32e9e42Smrg FcBlanksDestroy -- Destroy and FcBlanks 43102c393a42Smrg 43112c393a42SmrgSynopsis 43122c393a42Smrg 4313a32e9e42Smrg #include <fontconfig/fontconfig.h> 4314a32e9e42Smrg 4315a6844aabSmrg 4316953daebaSmrg void FcBlanksDestroy(FcBlanks *b); 43172c393a42Smrg 43182c393a42SmrgDescription 43192c393a42Smrg 4320a32e9e42Smrg FcBlanks is deprecated. This function does nothing. 43212c393a42Smrg 4322a32e9e42Smrg FcBlanksAdd 43232c393a42Smrg 43242c393a42SmrgName 43252c393a42Smrg 4326a32e9e42Smrg FcBlanksAdd -- Add a character to an FcBlanks 43272c393a42Smrg 43282c393a42SmrgSynopsis 43292c393a42Smrg 4330a32e9e42Smrg #include <fontconfig/fontconfig.h> 4331a32e9e42Smrg 4332a6844aabSmrg 4333953daebaSmrg FcBool FcBlanksAdd(FcBlanks *b, FcChar32 ucs4); 43342c393a42Smrg 43352c393a42SmrgDescription 43362c393a42Smrg 4337a32e9e42Smrg FcBlanks is deprecated. This function always returns FALSE. 43382c393a42Smrg 4339a32e9e42Smrg FcBlanksIsMember 4340ca08ab68Smrg 4341953daebaSmrgName 4342ca08ab68Smrg 4343a32e9e42Smrg FcBlanksIsMember -- Query membership in an FcBlanks 4344ca08ab68Smrg 4345953daebaSmrgSynopsis 4346ca08ab68Smrg 4347a32e9e42Smrg #include <fontconfig/fontconfig.h> 4348a32e9e42Smrg 4349a6844aabSmrg 4350953daebaSmrg FcBool FcBlanksIsMember(FcBlanks *b, FcChar32 ucs4); 43512c393a42Smrg 4352953daebaSmrgDescription 43532c393a42Smrg 4354a32e9e42Smrg FcBlanks is deprecated. This function always returns FALSE. 4355a32e9e42Smrg 4356a32e9e42Smrg -------------------------------------------------------------------------- 43572c393a42Smrg 4358a32e9e42Smrg FcAtomic 43592c393a42Smrg 4360953daebaSmrg Table of Contents 4361ca08ab68Smrg 4362a32e9e42Smrg [163]FcAtomicCreate -- create an FcAtomic object 4363a32e9e42Smrg 4364a32e9e42Smrg [164]FcAtomicLock -- lock a file 4365a32e9e42Smrg 4366a32e9e42Smrg [165]FcAtomicNewFile -- return new temporary file name 4367a32e9e42Smrg 4368a32e9e42Smrg [166]FcAtomicOrigFile -- return original file name 4369a32e9e42Smrg 4370a32e9e42Smrg [167]FcAtomicReplaceOrig -- replace original with new 4371a32e9e42Smrg 4372a32e9e42Smrg [168]FcAtomicDeleteNew -- delete new file 4373a32e9e42Smrg 4374a32e9e42Smrg [169]FcAtomicUnlock -- unlock a file 4375ca08ab68Smrg 4376a32e9e42Smrg [170]FcAtomicDestroy -- destroy an FcAtomic object 4377a32e9e42Smrg 4378a32e9e42Smrg These functions provide a safe way to update configuration files, allowing 4379a32e9e42Smrg ongoing reading of the old configuration file while locked for writing and 4380a32e9e42Smrg ensuring that a consistent and complete version of the configuration file 4381a32e9e42Smrg is always available. 4382a32e9e42Smrg 4383a32e9e42Smrg FcAtomicCreate 43842c393a42Smrg 43852c393a42SmrgName 43862c393a42Smrg 4387a32e9e42Smrg FcAtomicCreate -- create an FcAtomic object 43882c393a42Smrg 43892c393a42SmrgSynopsis 43902c393a42Smrg 4391a32e9e42Smrg #include <fontconfig/fontconfig.h> 4392a32e9e42Smrg 4393a6844aabSmrg 4394ca08ab68Smrg FcAtomic * FcAtomicCreate(const FcChar8 *file); 43952c393a42Smrg 43962c393a42SmrgDescription 43972c393a42Smrg 4398a32e9e42Smrg Creates a data structure containing data needed to control access to file. 4399a32e9e42Smrg Writing is done to a separate file. Once that file is complete, the 4400a32e9e42Smrg original configuration file is atomically replaced so that reading process 4401a32e9e42Smrg always see a consistent and complete file without the need to lock for 4402a32e9e42Smrg reading. 44032c393a42Smrg 4404a32e9e42Smrg FcAtomicLock 44052c393a42Smrg 44062c393a42SmrgName 44072c393a42Smrg 4408a32e9e42Smrg FcAtomicLock -- lock a file 44092c393a42Smrg 44102c393a42SmrgSynopsis 44112c393a42Smrg 4412a32e9e42Smrg #include <fontconfig/fontconfig.h> 4413a32e9e42Smrg 4414a6844aabSmrg 4415ca08ab68Smrg FcBool FcAtomicLock(FcAtomic *atomic); 44162c393a42Smrg 44172c393a42SmrgDescription 44182c393a42Smrg 4419a32e9e42Smrg Attempts to lock the file referenced by atomic. Returns FcFalse if the 4420a32e9e42Smrg file is already locked, else returns FcTrue and leaves the file locked. 44212c393a42Smrg 4422a32e9e42Smrg FcAtomicNewFile 44232c393a42Smrg 44242c393a42SmrgName 44252c393a42Smrg 4426a32e9e42Smrg FcAtomicNewFile -- return new temporary file name 44272c393a42Smrg 44282c393a42SmrgSynopsis 44292c393a42Smrg 4430a32e9e42Smrg #include <fontconfig/fontconfig.h> 4431a32e9e42Smrg 4432a6844aabSmrg 4433ca08ab68Smrg FcChar8 * FcAtomicNewFile(FcAtomic *atomic); 44342c393a42Smrg 44352c393a42SmrgDescription 44362c393a42Smrg 4437a32e9e42Smrg Returns the filename for writing a new version of the file referenced by 4438a32e9e42Smrg atomic. 44392c393a42Smrg 4440a32e9e42Smrg FcAtomicOrigFile 44412c393a42Smrg 44422c393a42SmrgName 44432c393a42Smrg 4444a32e9e42Smrg FcAtomicOrigFile -- return original file name 44452c393a42Smrg 44462c393a42SmrgSynopsis 44472c393a42Smrg 4448a32e9e42Smrg #include <fontconfig/fontconfig.h> 4449a32e9e42Smrg 4450a6844aabSmrg 4451ca08ab68Smrg FcChar8 * FcAtomicOrigFile(FcAtomic *atomic); 44522c393a42Smrg 44532c393a42SmrgDescription 44542c393a42Smrg 4455ca08ab68Smrg Returns the file referenced by atomic. 44562c393a42Smrg 4457a32e9e42Smrg FcAtomicReplaceOrig 44582c393a42Smrg 44592c393a42SmrgName 44602c393a42Smrg 4461a32e9e42Smrg FcAtomicReplaceOrig -- replace original with new 44622c393a42Smrg 44632c393a42SmrgSynopsis 44642c393a42Smrg 4465a32e9e42Smrg #include <fontconfig/fontconfig.h> 4466a32e9e42Smrg 4467a6844aabSmrg 4468ca08ab68Smrg FcBool FcAtomicReplaceOrig(FcAtomic *atomic); 44692c393a42Smrg 44702c393a42SmrgDescription 44712c393a42Smrg 4472a32e9e42Smrg Replaces the original file referenced by atomic with the new file. Returns 4473a32e9e42Smrg FcFalse if the file cannot be replaced due to permission issues in the 4474a32e9e42Smrg filesystem. Otherwise returns FcTrue. 44752c393a42Smrg 4476a32e9e42Smrg FcAtomicDeleteNew 44772c393a42Smrg 44782c393a42SmrgName 44792c393a42Smrg 4480a32e9e42Smrg FcAtomicDeleteNew -- delete new file 44812c393a42Smrg 44822c393a42SmrgSynopsis 44832c393a42Smrg 4484a32e9e42Smrg #include <fontconfig/fontconfig.h> 4485a32e9e42Smrg 4486a6844aabSmrg 4487ca08ab68Smrg void FcAtomicDeleteNew(FcAtomic *atomic); 44882c393a42Smrg 44892c393a42SmrgDescription 44902c393a42Smrg 4491a32e9e42Smrg Deletes the new file. Used in error recovery to back out changes. 44922c393a42Smrg 4493a32e9e42Smrg FcAtomicUnlock 44942c393a42Smrg 44952c393a42SmrgName 44962c393a42Smrg 4497a32e9e42Smrg FcAtomicUnlock -- unlock a file 44982c393a42Smrg 44992c393a42SmrgSynopsis 45002c393a42Smrg 4501a32e9e42Smrg #include <fontconfig/fontconfig.h> 4502a32e9e42Smrg 4503a6844aabSmrg 4504ca08ab68Smrg void FcAtomicUnlock(FcAtomic *atomic); 45052c393a42Smrg 45062c393a42SmrgDescription 45072c393a42Smrg 4508ca08ab68Smrg Unlocks the file. 45092c393a42Smrg 4510a32e9e42Smrg FcAtomicDestroy 45112c393a42Smrg 45122c393a42SmrgName 45132c393a42Smrg 4514a32e9e42Smrg FcAtomicDestroy -- destroy an FcAtomic object 45152c393a42Smrg 45162c393a42SmrgSynopsis 45172c393a42Smrg 4518a32e9e42Smrg #include <fontconfig/fontconfig.h> 4519a32e9e42Smrg 4520a6844aabSmrg 4521ca08ab68Smrg void FcAtomicDestroy(FcAtomic *atomic); 45222c393a42Smrg 45232c393a42SmrgDescription 45242c393a42Smrg 4525ca08ab68Smrg Destroys atomic. 45262c393a42Smrg 4527a32e9e42Smrg -------------------------------------------------------------------------- 4528a32e9e42Smrg 4529a32e9e42Smrg File and Directory routines 4530ca08ab68Smrg 4531ca08ab68Smrg Table of Contents 4532ca08ab68Smrg 4533a32e9e42Smrg [171]FcFileScan -- scan a font file 4534a32e9e42Smrg 4535a32e9e42Smrg [172]FcFileIsDir -- check whether a file is a directory 4536a32e9e42Smrg 4537a32e9e42Smrg [173]FcDirScan -- scan a font directory without caching it 4538a32e9e42Smrg 4539a32e9e42Smrg [174]FcDirSave -- DEPRECATED: formerly used to save a directory cache 4540a32e9e42Smrg 4541a32e9e42Smrg [175]FcDirCacheUnlink -- Remove all caches related to dir 4542a32e9e42Smrg 4543a32e9e42Smrg [176]FcDirCacheValid -- check directory cache 45442c393a42Smrg 4545a32e9e42Smrg [177]FcDirCacheLoad -- load a directory cache 45462c393a42Smrg 4547a32e9e42Smrg [178]FcDirCacheRescan -- Re-scan a directory cache 4548a32e9e42Smrg 4549a32e9e42Smrg [179]FcDirCacheRead -- read or construct a directory cache 4550a32e9e42Smrg 4551a32e9e42Smrg [180]FcDirCacheLoadFile -- load a cache file 4552a32e9e42Smrg 4553a32e9e42Smrg [181]FcDirCacheUnload -- unload a cache file 4554a32e9e42Smrg 4555a32e9e42Smrg These routines work with font files and directories, including font 4556a32e9e42Smrg directory cache files. 4557a32e9e42Smrg 4558a32e9e42Smrg FcFileScan 45592c393a42Smrg 45602c393a42SmrgName 45612c393a42Smrg 4562a32e9e42Smrg FcFileScan -- scan a font file 45632c393a42Smrg 45642c393a42SmrgSynopsis 45652c393a42Smrg 4566a32e9e42Smrg #include <fontconfig/fontconfig.h> 4567a32e9e42Smrg 45682c393a42Smrg 4569a32e9e42Smrg FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 4570a32e9e42Smrg FcBlanks *blanks, const FcChar8 *file, FcBool force); 45712c393a42Smrg 45722c393a42SmrgDescription 45732c393a42Smrg 4574a32e9e42Smrg Scans a single file and adds all fonts found to set. If force is FcTrue, 4575a32e9e42Smrg then the file is scanned even if associated information is found in cache. 4576a32e9e42Smrg If file is a directory, it is added to dirs. Whether fonts are found 4577a32e9e42Smrg depends on fontconfig policy as well as the current configuration. 4578a32e9e42Smrg Internally, fontconfig will ignore BDF and PCF fonts which are not in 4579a32e9e42Smrg Unicode (or the effectively equivalent ISO Latin-1) encoding as those are 4580a32e9e42Smrg not usable by Unicode-based applications. The configuration can ignore 4581a32e9e42Smrg fonts based on filename or contents of the font file itself. Returns 4582a32e9e42Smrg FcFalse if any of the fonts cannot be added (due to allocation failure). 4583a32e9e42Smrg Otherwise returns FcTrue. 45842c393a42Smrg 4585a32e9e42Smrg FcFileIsDir 45862c393a42Smrg 45872c393a42SmrgName 45882c393a42Smrg 4589a32e9e42Smrg FcFileIsDir -- check whether a file is a directory 45902c393a42Smrg 45912c393a42SmrgSynopsis 45922c393a42Smrg 4593a32e9e42Smrg #include <fontconfig/fontconfig.h> 4594a32e9e42Smrg 4595a6844aabSmrg 4596ca08ab68Smrg FcBool FcFileIsDir(const FcChar8 *file); 45972c393a42Smrg 45982c393a42SmrgDescription 45992c393a42Smrg 4600a32e9e42Smrg Returns FcTrue if file is a directory, otherwise returns FcFalse. 46012c393a42Smrg 4602a32e9e42Smrg FcDirScan 46032c393a42Smrg 46042c393a42SmrgName 46052c393a42Smrg 4606a32e9e42Smrg FcDirScan -- scan a font directory without caching it 46072c393a42Smrg 46082c393a42SmrgSynopsis 46092c393a42Smrg 4610a32e9e42Smrg #include <fontconfig/fontconfig.h> 4611a6844aabSmrg 4612a32e9e42Smrg 4613a32e9e42Smrg FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, 4614a32e9e42Smrg FcBlanks *blanks, const FcChar8 *dir, FcBool force); 46152c393a42Smrg 46162c393a42SmrgDescription 46172c393a42Smrg 4618a32e9e42Smrg If cache is not zero or if force is FcFalse, this function currently 4619a32e9e42Smrg returns FcFalse. Otherwise, it scans an entire directory and adds all 4620a32e9e42Smrg fonts found to set. Any subdirectories found are added to dirs. Calling 4621a32e9e42Smrg this function does not create any cache files. Use FcDirCacheRead() if 4622a32e9e42Smrg caching is desired. 46232c393a42Smrg 4624a32e9e42Smrg FcDirSave 46252c393a42Smrg 46262c393a42SmrgName 46272c393a42Smrg 4628a32e9e42Smrg FcDirSave -- DEPRECATED: formerly used to save a directory cache 46292c393a42Smrg 46302c393a42SmrgSynopsis 46312c393a42Smrg 4632a32e9e42Smrg #include <fontconfig/fontconfig.h> 4633a32e9e42Smrg 46342c393a42Smrg 4635a32e9e42Smrg FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); 46362c393a42Smrg 46372c393a42SmrgDescription 46382c393a42Smrg 4639a32e9e42Smrg This function now does nothing aside from returning FcFalse. It used to 4640a32e9e42Smrg creates the per-directory cache file for dir and populates it with the 4641a32e9e42Smrg fonts in set and subdirectories in dirs. All of this functionality is now 4642a32e9e42Smrg automatically managed by FcDirCacheLoad and FcDirCacheRead. 46432c393a42Smrg 4644a32e9e42Smrg FcDirCacheUnlink 46452c393a42Smrg 46462c393a42SmrgName 46472c393a42Smrg 4648a32e9e42Smrg FcDirCacheUnlink -- Remove all caches related to dir 46492c393a42Smrg 46502c393a42SmrgSynopsis 46512c393a42Smrg 4652a32e9e42Smrg #include <fontconfig/fontconfig.h> 4653a32e9e42Smrg 4654a6844aabSmrg 4655ca08ab68Smrg FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config); 46562c393a42Smrg 46572c393a42SmrgDescription 46582c393a42Smrg 4659a32e9e42Smrg Scans the cache directories in config, removing any instances of the cache 4660a32e9e42Smrg file for dir. Returns FcFalse when some internal error occurs (out of 4661a32e9e42Smrg memory, etc). Errors actually unlinking any files are ignored. 46622c393a42Smrg 4663a32e9e42Smrg FcDirCacheValid 46642c393a42Smrg 46652c393a42SmrgName 46662c393a42Smrg 4667a32e9e42Smrg FcDirCacheValid -- check directory cache 46682c393a42Smrg 46692c393a42SmrgSynopsis 46702c393a42Smrg 4671a32e9e42Smrg #include <fontconfig/fontconfig.h> 4672a32e9e42Smrg 4673a6844aabSmrg 4674ca08ab68Smrg FcBool FcDirCacheValid(const FcChar8 *dir); 46752c393a42Smrg 46762c393a42SmrgDescription 46772c393a42Smrg 4678a32e9e42Smrg Returns FcTrue if dir has an associated valid cache file, else returns 4679a32e9e42Smrg FcFalse 46802c393a42Smrg 4681a32e9e42Smrg FcDirCacheLoad 46822c393a42Smrg 46832c393a42SmrgName 46842c393a42Smrg 4685a32e9e42Smrg FcDirCacheLoad -- load a directory cache 46862c393a42Smrg 46872c393a42SmrgSynopsis 46882c393a42Smrg 4689a32e9e42Smrg #include <fontconfig/fontconfig.h> 4690a6844aabSmrg 4691a32e9e42Smrg 4692a32e9e42Smrg FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config, FcChar8 4693a32e9e42Smrg **cache_file); 46942c393a42Smrg 46952c393a42SmrgDescription 46962c393a42Smrg 4697a32e9e42Smrg Loads the cache related to dir. If no cache file exists, returns NULL. The 4698a32e9e42Smrg name of the cache file is returned in cache_file, unless that is NULL. See 4699a32e9e42Smrg also FcDirCacheRead. 47002c393a42Smrg 4701a32e9e42Smrg FcDirCacheRescan 4702b09479dcSmrg 4703b09479dcSmrgName 4704b09479dcSmrg 4705a32e9e42Smrg FcDirCacheRescan -- Re-scan a directory cache 4706b09479dcSmrg 4707b09479dcSmrgSynopsis 4708b09479dcSmrg 4709a32e9e42Smrg #include <fontconfig/fontconfig.h> 4710b09479dcSmrg 4711a32e9e42Smrg 4712a32e9e42Smrg FcCache * FcDirCacheRescan(const FcChar8 *dir, FcConfig *config); 4713b09479dcSmrg 4714b09479dcSmrgDescription 4715b09479dcSmrg 4716a32e9e42Smrg Re-scan directories only at dir and update the cache. returns NULL if 4717a32e9e42Smrg failed. 4718b09479dcSmrg 4719b09479dcSmrgSince 47202c393a42Smrg 4721b09479dcSmrg version 2.11.1 47222c393a42Smrg 4723a32e9e42Smrg FcDirCacheRead 47242c393a42Smrg 47252c393a42SmrgName 47262c393a42Smrg 4727a32e9e42Smrg FcDirCacheRead -- read or construct a directory cache 47282c393a42Smrg 47292c393a42SmrgSynopsis 47302c393a42Smrg 4731a32e9e42Smrg #include <fontconfig/fontconfig.h> 4732a32e9e42Smrg 47332c393a42Smrg 4734a32e9e42Smrg FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force, FcConfig 4735a32e9e42Smrg *config); 47362c393a42Smrg 47372c393a42SmrgDescription 47382c393a42Smrg 4739a32e9e42Smrg This returns a cache for dir. If force is FcFalse, then an existing, valid 4740a32e9e42Smrg cache file will be used. Otherwise, a new cache will be created by 4741a32e9e42Smrg scanning the directory and that returned. 47422c393a42Smrg 4743a32e9e42Smrg FcDirCacheLoadFile 47442c393a42Smrg 47452c393a42SmrgName 47462c393a42Smrg 4747a32e9e42Smrg FcDirCacheLoadFile -- load a cache file 47482c393a42Smrg 47492c393a42SmrgSynopsis 47502c393a42Smrg 4751a32e9e42Smrg #include <fontconfig/fontconfig.h> 4752a32e9e42Smrg 47532c393a42Smrg 4754a32e9e42Smrg FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct stat 4755a32e9e42Smrg *file_stat); 47562c393a42Smrg 47572c393a42SmrgDescription 47582c393a42Smrg 4759a32e9e42Smrg This function loads a directory cache from cache_file. If file_stat is 4760a32e9e42Smrg non-NULL, it will be filled with the results of stat(2) on the cache file. 47612c393a42Smrg 4762a32e9e42Smrg FcDirCacheUnload 47632c393a42Smrg 47642c393a42SmrgName 47652c393a42Smrg 4766a32e9e42Smrg FcDirCacheUnload -- unload a cache file 47672c393a42Smrg 47682c393a42SmrgSynopsis 47692c393a42Smrg 4770a32e9e42Smrg #include <fontconfig/fontconfig.h> 4771a32e9e42Smrg 4772a6844aabSmrg 4773ca08ab68Smrg void FcDirCacheUnload(FcCache *cache); 47742c393a42Smrg 47752c393a42SmrgDescription 47762c393a42Smrg 4777a32e9e42Smrg This function dereferences cache. When no other references to it remain, 4778a32e9e42Smrg all memory associated with the cache will be freed. 4779a32e9e42Smrg 4780a32e9e42Smrg -------------------------------------------------------------------------- 47812c393a42Smrg 4782a32e9e42Smrg FcCache routines 4783ca08ab68Smrg 4784ca08ab68Smrg Table of Contents 4785ca08ab68Smrg 4786a32e9e42Smrg [182]FcCacheDir -- Return directory of cache 4787a32e9e42Smrg 4788a32e9e42Smrg [183]FcCacheCopySet -- Returns a copy of the fontset from cache 4789a32e9e42Smrg 4790a32e9e42Smrg [184]FcCacheSubdir -- Return the i'th subdirectory. 4791a32e9e42Smrg 4792a32e9e42Smrg [185]FcCacheNumSubdir -- Return the number of subdirectories in cache. 4793a32e9e42Smrg 4794a32e9e42Smrg [186]FcCacheNumFont -- Returns the number of fonts in cache. 47952c393a42Smrg 4796a32e9e42Smrg [187]FcDirCacheClean -- Clean up a cache directory 47972c393a42Smrg 4798a32e9e42Smrg [188]FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 4799ca08ab68Smrg 4800a32e9e42Smrg [189]FcDirCacheCreateUUID -- Create .uuid file at a directory 4801a32e9e42Smrg 4802a32e9e42Smrg [190]FcDirCacheDeleteUUID -- Delete .uuid file 4803a32e9e42Smrg 4804a32e9e42Smrg These routines work with font directory caches, accessing their contents 4805a32e9e42Smrg in limited ways. It is not expected that normal applications will need to 4806a32e9e42Smrg use these functions. 4807a32e9e42Smrg 4808a32e9e42Smrg FcCacheDir 48092c393a42Smrg 48102c393a42SmrgName 48112c393a42Smrg 4812a32e9e42Smrg FcCacheDir -- Return directory of cache 48132c393a42Smrg 48142c393a42SmrgSynopsis 48152c393a42Smrg 4816a32e9e42Smrg #include <fontconfig/fontconfig.h> 4817a32e9e42Smrg 4818a6844aabSmrg 4819ca08ab68Smrg const FcChar8 * FcCacheDir(const FcCache *cache); 48202c393a42Smrg 48212c393a42SmrgDescription 48222c393a42Smrg 4823a32e9e42Smrg This function returns the directory from which the cache was constructed. 48242c393a42Smrg 4825a32e9e42Smrg FcCacheCopySet 48262c393a42Smrg 48272c393a42SmrgName 48282c393a42Smrg 4829a32e9e42Smrg FcCacheCopySet -- Returns a copy of the fontset from cache 48302c393a42Smrg 48312c393a42SmrgSynopsis 48322c393a42Smrg 4833a32e9e42Smrg #include <fontconfig/fontconfig.h> 4834a32e9e42Smrg 4835a6844aabSmrg 4836ca08ab68Smrg FcFontSet * FcCacheCopySet(const FcCache *cache); 48372c393a42Smrg 48382c393a42SmrgDescription 48392c393a42Smrg 4840a32e9e42Smrg The returned fontset contains each of the font patterns from cache. This 4841a32e9e42Smrg fontset may be modified, but the patterns from the cache are read-only. 48422c393a42Smrg 4843a32e9e42Smrg FcCacheSubdir 48442c393a42Smrg 48452c393a42SmrgName 48462c393a42Smrg 4847a32e9e42Smrg FcCacheSubdir -- Return the i'th subdirectory. 48482c393a42Smrg 48492c393a42SmrgSynopsis 48502c393a42Smrg 4851a32e9e42Smrg #include <fontconfig/fontconfig.h> 4852a32e9e42Smrg 4853a6844aabSmrg 4854ca08ab68Smrg const FcChar8 * FcCacheSubdir(const FcCache *cache, inti); 48552c393a42Smrg 48562c393a42SmrgDescription 48572c393a42Smrg 4858a32e9e42Smrg The set of subdirectories stored in a cache file are indexed by this 4859a32e9e42Smrg function, i should range from 0 to n-1, where n is the return value from 4860a32e9e42Smrg FcCacheNumSubdir. 48612c393a42Smrg 4862a32e9e42Smrg FcCacheNumSubdir 48632c393a42Smrg 48642c393a42SmrgName 48652c393a42Smrg 4866a32e9e42Smrg FcCacheNumSubdir -- Return the number of subdirectories in cache. 48672c393a42Smrg 48682c393a42SmrgSynopsis 48692c393a42Smrg 4870a32e9e42Smrg #include <fontconfig/fontconfig.h> 4871a32e9e42Smrg 4872a6844aabSmrg 4873ca08ab68Smrg int FcCacheNumSubdir(const FcCache *cache); 48742c393a42Smrg 48752c393a42SmrgDescription 48762c393a42Smrg 4877ca08ab68Smrg This returns the total number of subdirectories in the cache. 48782c393a42Smrg 4879a32e9e42Smrg FcCacheNumFont 48802c393a42Smrg 48812c393a42SmrgName 48822c393a42Smrg 4883a32e9e42Smrg FcCacheNumFont -- Returns the number of fonts in cache. 48842c393a42Smrg 48852c393a42SmrgSynopsis 48862c393a42Smrg 4887a32e9e42Smrg #include <fontconfig/fontconfig.h> 4888a32e9e42Smrg 4889a6844aabSmrg 4890ca08ab68Smrg int FcCacheNumFont(const FcCache *cache); 48912c393a42Smrg 48922c393a42SmrgDescription 48932c393a42Smrg 4894a32e9e42Smrg This returns the number of fonts which would be included in the return 4895a32e9e42Smrg from FcCacheCopySet. 48962c393a42Smrg 4897a32e9e42Smrg FcDirCacheClean 4898ca08ab68Smrg 4899ca08ab68SmrgName 4900ca08ab68Smrg 4901a32e9e42Smrg FcDirCacheClean -- Clean up a cache directory 4902ca08ab68Smrg 4903ca08ab68SmrgSynopsis 4904ca08ab68Smrg 4905a32e9e42Smrg #include <fontconfig/fontconfig.h> 4906a6844aabSmrg 4907a32e9e42Smrg 4908a32e9e42Smrg FcBool FcDirCacheClean(const FcChar8 *cache_dir, FcBoolverbose); 4909ca08ab68Smrg 4910ca08ab68SmrgDescription 49112c393a42Smrg 4912a32e9e42Smrg This tries to clean up the cache directory of cache_dir. This returns 4913a32e9e42Smrg FcTrue if the operation is successfully complete. otherwise FcFalse. 4914a32e9e42Smrg 4915b09479dcSmrgSince 49162c393a42Smrg 4917b09479dcSmrg version 2.9.91 4918ca08ab68Smrg 4919a32e9e42Smrg FcCacheCreateTagFile 49202c393a42Smrg 49212c393a42SmrgName 49222c393a42Smrg 4923a32e9e42Smrg FcCacheCreateTagFile -- Create CACHEDIR.TAG at cache directory. 49242c393a42Smrg 49252c393a42SmrgSynopsis 49262c393a42Smrg 4927a32e9e42Smrg #include <fontconfig/fontconfig.h> 4928a32e9e42Smrg 4929a6844aabSmrg 4930ca08ab68Smrg void FcCacheCreateTagFile(const FcConfig *config); 49312c393a42Smrg 49322c393a42SmrgDescription 49332c393a42Smrg 4934a32e9e42Smrg This tries to create CACHEDIR.TAG file at the cache directory registered 4935a32e9e42Smrg to config. 49362c393a42Smrg 4937b09479dcSmrgSince 49382c393a42Smrg 4939b09479dcSmrg version 2.9.91 4940ca08ab68Smrg 4941a32e9e42Smrg FcDirCacheCreateUUID 4942a32e9e42Smrg 4943a32e9e42SmrgName 4944a32e9e42Smrg 4945a32e9e42Smrg FcDirCacheCreateUUID -- Create .uuid file at a directory 4946a32e9e42Smrg 4947a32e9e42SmrgSynopsis 4948a32e9e42Smrg 4949a32e9e42Smrg #include <fontconfig/fontconfig.h> 4950a32e9e42Smrg 4951a32e9e42Smrg 4952a32e9e42Smrg FcBool FcDirCacheCreateUUID(FcChar8 *dir, FcBoolforce, FcConfig *config); 4953a32e9e42Smrg 4954a32e9e42SmrgDescription 4955a32e9e42Smrg 4956a32e9e42Smrg This is to create .uuid file containing an UUID at a font directory of 4957a32e9e42Smrg dir. The UUID will be used to identify the font directory and is used to 4958a32e9e42Smrg determine the cache filename if available. 4959a32e9e42Smrg 4960a32e9e42SmrgSince 4961a32e9e42Smrg 4962a32e9e42Smrg version 2.12.92 4963a32e9e42Smrg 4964a32e9e42Smrg FcDirCacheDeleteUUID 4965a32e9e42Smrg 4966a32e9e42SmrgName 4967a32e9e42Smrg 4968a32e9e42Smrg FcDirCacheDeleteUUID -- Delete .uuid file 4969a32e9e42Smrg 4970a32e9e42SmrgSynopsis 4971a32e9e42Smrg 4972a32e9e42Smrg #include <fontconfig/fontconfig.h> 4973a32e9e42Smrg 4974a32e9e42Smrg 4975a32e9e42Smrg FcBool FcDirCacheDeleteUUID(const FcChar8 *dir, FcConfig *config); 4976a32e9e42Smrg 4977a32e9e42SmrgDescription 4978a32e9e42Smrg 4979a32e9e42Smrg This is to delete .uuid file containing an UUID at a font directory of 4980a32e9e42Smrg dir. 4981a32e9e42Smrg 4982a32e9e42SmrgSince 4983a32e9e42Smrg 4984a32e9e42Smrg version 2.13.1 4985a32e9e42Smrg 4986a32e9e42Smrg -------------------------------------------------------------------------- 4987a32e9e42Smrg 4988a32e9e42Smrg FcStrSet and FcStrList 4989ca08ab68Smrg 4990ca08ab68Smrg Table of Contents 4991ca08ab68Smrg 4992a32e9e42Smrg [191]FcStrSetCreate -- create a string set 4993a32e9e42Smrg 4994a32e9e42Smrg [192]FcStrSetMember -- check set for membership 4995a32e9e42Smrg 4996a32e9e42Smrg [193]FcStrSetEqual -- check sets for equality 4997a32e9e42Smrg 4998a32e9e42Smrg [194]FcStrSetAdd -- add to a string set 4999a32e9e42Smrg 5000a32e9e42Smrg [195]FcStrSetAddFilename -- add a filename to a string set 5001a32e9e42Smrg 5002a32e9e42Smrg [196]FcStrSetDel -- delete from a string set 5003a32e9e42Smrg 5004a32e9e42Smrg [197]FcStrSetDestroy -- destroy a string set 5005ca08ab68Smrg 5006a32e9e42Smrg [198]FcStrListCreate -- create a string iterator 5007a32e9e42Smrg 5008a32e9e42Smrg [199]FcStrListFirst -- get first string in iteration 5009a32e9e42Smrg 5010a32e9e42Smrg [200]FcStrListNext -- get next string in iteration 5011a32e9e42Smrg 5012a32e9e42Smrg [201]FcStrListDone -- destroy a string iterator 5013a32e9e42Smrg 5014a32e9e42Smrg A data structure for enumerating strings, used to list directories while 5015a32e9e42Smrg scanning the configuration as directories are added while scanning. 5016a32e9e42Smrg 5017a32e9e42Smrg FcStrSetCreate 50182c393a42Smrg 50192c393a42SmrgName 50202c393a42Smrg 5021a32e9e42Smrg FcStrSetCreate -- create a string set 50222c393a42Smrg 50232c393a42SmrgSynopsis 50242c393a42Smrg 5025a32e9e42Smrg #include <fontconfig/fontconfig.h> 5026a32e9e42Smrg 5027a6844aabSmrg 5028ca08ab68Smrg FcStrSet * FcStrSetCreate(void); 50292c393a42Smrg 50302c393a42SmrgDescription 50312c393a42Smrg 5032ca08ab68Smrg Create an empty set. 50332c393a42Smrg 5034a32e9e42Smrg FcStrSetMember 50352c393a42Smrg 50362c393a42SmrgName 50372c393a42Smrg 5038a32e9e42Smrg FcStrSetMember -- check set for membership 50392c393a42Smrg 50402c393a42SmrgSynopsis 50412c393a42Smrg 5042a32e9e42Smrg #include <fontconfig/fontconfig.h> 5043a32e9e42Smrg 5044a6844aabSmrg 5045ca08ab68Smrg FcBool FcStrSetMember(FcStrSet *set, const FcChar8 *s); 50462c393a42Smrg 50472c393a42SmrgDescription 50482c393a42Smrg 5049ca08ab68Smrg Returns whether s is a member of set. 50502c393a42Smrg 5051a32e9e42Smrg FcStrSetEqual 50522c393a42Smrg 50532c393a42SmrgName 50542c393a42Smrg 5055a32e9e42Smrg FcStrSetEqual -- check sets for equality 50562c393a42Smrg 50572c393a42SmrgSynopsis 50582c393a42Smrg 5059a32e9e42Smrg #include <fontconfig/fontconfig.h> 5060a32e9e42Smrg 5061a6844aabSmrg 5062ca08ab68Smrg FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b); 50632c393a42Smrg 50642c393a42SmrgDescription 50652c393a42Smrg 5066a32e9e42Smrg Returns whether set_a contains precisely the same strings as set_b. 5067a32e9e42Smrg Ordering of strings within the two sets is not considered. 50682c393a42Smrg 5069a32e9e42Smrg FcStrSetAdd 50702c393a42Smrg 50712c393a42SmrgName 50722c393a42Smrg 5073a32e9e42Smrg FcStrSetAdd -- add to a string set 50742c393a42Smrg 50752c393a42SmrgSynopsis 50762c393a42Smrg 5077a32e9e42Smrg #include <fontconfig/fontconfig.h> 5078a32e9e42Smrg 5079a6844aabSmrg 5080ca08ab68Smrg FcBool FcStrSetAdd(FcStrSet *set, const FcChar8 *s); 50812c393a42Smrg 50822c393a42SmrgDescription 50832c393a42Smrg 5084ca08ab68Smrg Adds a copy of s to set. 50852c393a42Smrg 5086a32e9e42Smrg FcStrSetAddFilename 50872c393a42Smrg 50882c393a42SmrgName 50892c393a42Smrg 5090a32e9e42Smrg FcStrSetAddFilename -- add a filename to a string set 50912c393a42Smrg 50922c393a42SmrgSynopsis 50932c393a42Smrg 5094a32e9e42Smrg #include <fontconfig/fontconfig.h> 5095a32e9e42Smrg 5096a6844aabSmrg 5097ca08ab68Smrg FcBool FcStrSetAddFilename(FcStrSet *set, const FcChar8 *s); 50982c393a42Smrg 50992c393a42SmrgDescription 51002c393a42Smrg 5101a32e9e42Smrg Adds a copy s to set, The copy is created with FcStrCopyFilename so that 5102a32e9e42Smrg leading '~' values are replaced with the value of the HOME environment 5103a32e9e42Smrg variable. 51042c393a42Smrg 5105a32e9e42Smrg FcStrSetDel 51062c393a42Smrg 51072c393a42SmrgName 51082c393a42Smrg 5109a32e9e42Smrg FcStrSetDel -- delete from a string set 51102c393a42Smrg 51112c393a42SmrgSynopsis 51122c393a42Smrg 5113a32e9e42Smrg #include <fontconfig/fontconfig.h> 5114a32e9e42Smrg 5115a6844aabSmrg 5116ca08ab68Smrg FcBool FcStrSetDel(FcStrSet *set, const FcChar8 *s); 51172c393a42Smrg 51182c393a42SmrgDescription 51192c393a42Smrg 5120a32e9e42Smrg Removes s from set, returning FcTrue if s was a member else FcFalse. 51212c393a42Smrg 5122a32e9e42Smrg FcStrSetDestroy 51232c393a42Smrg 51242c393a42SmrgName 51252c393a42Smrg 5126a32e9e42Smrg FcStrSetDestroy -- destroy a string set 51272c393a42Smrg 51282c393a42SmrgSynopsis 51292c393a42Smrg 5130a32e9e42Smrg #include <fontconfig/fontconfig.h> 5131a32e9e42Smrg 5132a6844aabSmrg 5133ca08ab68Smrg void FcStrSetDestroy(FcStrSet *set); 51342c393a42Smrg 51352c393a42SmrgDescription 51362c393a42Smrg 5137ca08ab68Smrg Destroys set. 51382c393a42Smrg 5139a32e9e42Smrg FcStrListCreate 51402c393a42Smrg 51412c393a42SmrgName 51422c393a42Smrg 5143a32e9e42Smrg FcStrListCreate -- create a string iterator 51442c393a42Smrg 51452c393a42SmrgSynopsis 51462c393a42Smrg 5147a32e9e42Smrg #include <fontconfig/fontconfig.h> 5148a32e9e42Smrg 5149a6844aabSmrg 5150ca08ab68Smrg FcStrList * FcStrListCreate(FcStrSet *set); 51512c393a42Smrg 51522c393a42SmrgDescription 51532c393a42Smrg 5154ca08ab68Smrg Creates an iterator to list the strings in set. 51552c393a42Smrg 5156a32e9e42Smrg FcStrListFirst 51576fc018e4Smrg 51586fc018e4SmrgName 51596fc018e4Smrg 5160a32e9e42Smrg FcStrListFirst -- get first string in iteration 51616fc018e4Smrg 51626fc018e4SmrgSynopsis 51636fc018e4Smrg 5164a32e9e42Smrg #include <fontconfig/fontconfig.h> 5165a32e9e42Smrg 51666fc018e4Smrg 51676fc018e4Smrg void FcStrListFirst(FcStrList *list); 51686fc018e4Smrg 51696fc018e4SmrgDescription 51706fc018e4Smrg 51716fc018e4Smrg Returns the first string in list. 51726fc018e4Smrg 5173b09479dcSmrgSince 51746fc018e4Smrg 5175b09479dcSmrg version 2.11.0 51762c393a42Smrg 5177a32e9e42Smrg FcStrListNext 51782c393a42Smrg 51792c393a42SmrgName 51802c393a42Smrg 5181a32e9e42Smrg FcStrListNext -- get next string in iteration 51822c393a42Smrg 51832c393a42SmrgSynopsis 51842c393a42Smrg 5185a32e9e42Smrg #include <fontconfig/fontconfig.h> 5186a32e9e42Smrg 5187a6844aabSmrg 5188ca08ab68Smrg FcChar8 * FcStrListNext(FcStrList *list); 51892c393a42Smrg 51902c393a42SmrgDescription 51912c393a42Smrg 51926fc018e4Smrg Returns the next string in list. 51932c393a42Smrg 5194a32e9e42Smrg FcStrListDone 51952c393a42Smrg 5196ca08ab68SmrgName 5197ca08ab68Smrg 5198a32e9e42Smrg FcStrListDone -- destroy a string iterator 5199ca08ab68Smrg 5200ca08ab68SmrgSynopsis 5201ca08ab68Smrg 5202a32e9e42Smrg #include <fontconfig/fontconfig.h> 5203a32e9e42Smrg 5204ca08ab68Smrg 5205ca08ab68Smrg void FcStrListDone(FcStrList *list); 5206ca08ab68Smrg 5207ca08ab68SmrgDescription 5208ca08ab68Smrg 5209ca08ab68Smrg Destroys the enumerator list. 5210ca08ab68Smrg 5211a32e9e42Smrg -------------------------------------------------------------------------- 5212a32e9e42Smrg 5213a32e9e42Smrg String utilities 5214ca08ab68Smrg 5215ca08ab68Smrg Table of Contents 5216ca08ab68Smrg 5217a32e9e42Smrg [202]FcUtf8ToUcs4 -- convert UTF-8 to UCS4 5218a32e9e42Smrg 5219a32e9e42Smrg [203]FcUcs4ToUtf8 -- convert UCS4 to UTF-8 5220a32e9e42Smrg 5221a32e9e42Smrg [204]FcUtf8Len -- count UTF-8 encoded chars 5222a32e9e42Smrg 5223a32e9e42Smrg [205]FcUtf16ToUcs4 -- convert UTF-16 to UCS4 5224a32e9e42Smrg 5225a32e9e42Smrg [206]FcUtf16Len -- count UTF-16 encoded chars 5226a32e9e42Smrg 5227a32e9e42Smrg [207]FcIsLower -- check for lower case ASCII character 5228a32e9e42Smrg 5229a32e9e42Smrg [208]FcIsUpper -- check for upper case ASCII character 5230a32e9e42Smrg 5231a32e9e42Smrg [209]FcToLower -- convert upper case ASCII to lower case 5232ca08ab68Smrg 5233a32e9e42Smrg [210]FcStrCopy -- duplicate a string 5234ca08ab68Smrg 5235a32e9e42Smrg [211]FcStrDowncase -- create a lower case translation of a string 5236a32e9e42Smrg 5237a32e9e42Smrg [212]FcStrCopyFilename -- create a complete path from a filename 5238a32e9e42Smrg 5239a32e9e42Smrg [213]FcStrCmp -- compare UTF-8 strings 5240a32e9e42Smrg 5241a32e9e42Smrg [214]FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 5242a32e9e42Smrg 5243a32e9e42Smrg [215]FcStrStr -- locate UTF-8 substring 5244a32e9e42Smrg 5245a32e9e42Smrg [216]FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 5246a32e9e42Smrg 5247a32e9e42Smrg [217]FcStrPlus -- concatenate two strings 5248a32e9e42Smrg 5249a32e9e42Smrg [218]FcStrFree -- free a string 5250a32e9e42Smrg 5251a32e9e42Smrg [219]FcStrDirname -- directory part of filename 5252a32e9e42Smrg 5253a32e9e42Smrg [220]FcStrBasename -- last component of filename 5254a32e9e42Smrg 5255a32e9e42Smrg Fontconfig manipulates many UTF-8 strings represented with the FcChar8 5256a32e9e42Smrg type. These functions are exposed to help applications deal with these 5257a32e9e42Smrg UTF-8 strings in a locale-insensitive manner. 5258a32e9e42Smrg 5259a32e9e42Smrg FcUtf8ToUcs4 52602c393a42Smrg 52612c393a42SmrgName 52622c393a42Smrg 5263a32e9e42Smrg FcUtf8ToUcs4 -- convert UTF-8 to UCS4 52642c393a42Smrg 52652c393a42SmrgSynopsis 52662c393a42Smrg 5267a32e9e42Smrg #include <fontconfig/fontconfig.h> 5268a32e9e42Smrg 5269a6844aabSmrg 5270ca08ab68Smrg int FcUtf8ToUcs4(FcChar8 *src, FcChar32 *dst, int len); 52712c393a42Smrg 52722c393a42SmrgDescription 52732c393a42Smrg 5274a32e9e42Smrg Converts the next Unicode char from src into dst and returns the number of 5275a32e9e42Smrg bytes containing the char. src must be at least len bytes long. 52762c393a42Smrg 5277a32e9e42Smrg FcUcs4ToUtf8 52782c393a42Smrg 52792c393a42SmrgName 52802c393a42Smrg 5281a32e9e42Smrg FcUcs4ToUtf8 -- convert UCS4 to UTF-8 52822c393a42Smrg 52832c393a42SmrgSynopsis 52842c393a42Smrg 5285a32e9e42Smrg #include <fontconfig/fontconfig.h> 5286a32e9e42Smrg 5287a6844aabSmrg 5288ca08ab68Smrg int FcUcs4ToUtf8(FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]); 52892c393a42Smrg 52902c393a42SmrgDescription 52912c393a42Smrg 5292a32e9e42Smrg Converts the Unicode char from src into dst and returns the number of 5293a32e9e42Smrg bytes needed to encode the char. 52942c393a42Smrg 5295a32e9e42Smrg FcUtf8Len 52962c393a42Smrg 52972c393a42SmrgName 52982c393a42Smrg 5299a32e9e42Smrg FcUtf8Len -- count UTF-8 encoded chars 53002c393a42Smrg 53012c393a42SmrgSynopsis 53022c393a42Smrg 5303a32e9e42Smrg #include <fontconfig/fontconfig.h> 5304a6844aabSmrg 5305a32e9e42Smrg 5306a32e9e42Smrg FcBool FcUtf8Len(FcChar8 *src, int len, int *nchar, int *wchar); 53072c393a42Smrg 53082c393a42SmrgDescription 53092c393a42Smrg 5310a32e9e42Smrg Counts the number of Unicode chars in len bytes of src. Places that count 5311a32e9e42Smrg in nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed 5312a32e9e42Smrg to hold the largest Unicode char counted. The return value indicates 5313a32e9e42Smrg whether src is a well-formed UTF8 string. 53142c393a42Smrg 5315a32e9e42Smrg FcUtf16ToUcs4 53162c393a42Smrg 53172c393a42SmrgName 53182c393a42Smrg 5319a32e9e42Smrg FcUtf16ToUcs4 -- convert UTF-16 to UCS4 53202c393a42Smrg 53212c393a42SmrgSynopsis 53222c393a42Smrg 5323a32e9e42Smrg #include <fontconfig/fontconfig.h> 5324a32e9e42Smrg 5325a6844aabSmrg 5326a32e9e42Smrg int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst, int len); 53272c393a42Smrg 53282c393a42SmrgDescription 53292c393a42Smrg 5330a32e9e42Smrg Converts the next Unicode char from src into dst and returns the number of 5331a32e9e42Smrg bytes containing the char. src must be at least len bytes long. Bytes of 5332a32e9e42Smrg src are combined into 16-bit units according to endian. 53332c393a42Smrg 5334a32e9e42Smrg FcUtf16Len 53352c393a42Smrg 53362c393a42SmrgName 53372c393a42Smrg 5338a32e9e42Smrg FcUtf16Len -- count UTF-16 encoded chars 53392c393a42Smrg 53402c393a42SmrgSynopsis 53412c393a42Smrg 5342a32e9e42Smrg #include <fontconfig/fontconfig.h> 53432c393a42Smrg 5344a32e9e42Smrg 5345a32e9e42Smrg FcBool FcUtf16Len(FcChar8 *src, FcEndian endian, int len, int *nchar, int 5346a32e9e42Smrg *wchar); 53472c393a42Smrg 53482c393a42SmrgDescription 53492c393a42Smrg 5350a32e9e42Smrg Counts the number of Unicode chars in len bytes of src. Bytes of src are 5351a32e9e42Smrg combined into 16-bit units according to endian. Places that count in 5352a32e9e42Smrg nchar. wchar contains 1, 2 or 4 depending on the number of bytes needed to 5353a32e9e42Smrg hold the largest Unicode char counted. The return value indicates whether 5354a32e9e42Smrg string is a well-formed UTF16 string. 53552c393a42Smrg 5356a32e9e42Smrg FcIsLower 53572c393a42Smrg 53582c393a42SmrgName 53592c393a42Smrg 5360a32e9e42Smrg FcIsLower -- check for lower case ASCII character 53612c393a42Smrg 53622c393a42SmrgSynopsis 53632c393a42Smrg 5364a32e9e42Smrg #include <fontconfig/fontconfig.h> 5365a32e9e42Smrg 5366a6844aabSmrg 5367ca08ab68Smrg FcBool FcIsLower(FcChar8c); 53682c393a42Smrg 53692c393a42SmrgDescription 53702c393a42Smrg 5371ca08ab68Smrg This macro checks whether c is an lower case ASCII letter. 53722c393a42Smrg 5373a32e9e42Smrg FcIsUpper 53742c393a42Smrg 53752c393a42SmrgName 53762c393a42Smrg 5377a32e9e42Smrg FcIsUpper -- check for upper case ASCII character 53782c393a42Smrg 53792c393a42SmrgSynopsis 53802c393a42Smrg 5381a32e9e42Smrg #include <fontconfig/fontconfig.h> 5382a32e9e42Smrg 5383a6844aabSmrg 5384ca08ab68Smrg FcBool FcIsUpper(FcChar8c); 53852c393a42Smrg 53862c393a42SmrgDescription 53872c393a42Smrg 5388ca08ab68Smrg This macro checks whether c is a upper case ASCII letter. 53892c393a42Smrg 5390a32e9e42Smrg FcToLower 53912c393a42Smrg 53922c393a42SmrgName 53932c393a42Smrg 5394a32e9e42Smrg FcToLower -- convert upper case ASCII to lower case 53952c393a42Smrg 53962c393a42SmrgSynopsis 53972c393a42Smrg 5398a32e9e42Smrg #include <fontconfig/fontconfig.h> 5399a32e9e42Smrg 5400a6844aabSmrg 5401ca08ab68Smrg FcChar8 FcToLower(FcChar8c); 54022c393a42Smrg 54032c393a42SmrgDescription 54042c393a42Smrg 5405a32e9e42Smrg This macro converts upper case ASCII c to the equivalent lower case 5406a32e9e42Smrg letter. 54072c393a42Smrg 5408a32e9e42Smrg FcStrCopy 54092c393a42Smrg 54102c393a42SmrgName 54112c393a42Smrg 5412a32e9e42Smrg FcStrCopy -- duplicate a string 54132c393a42Smrg 54142c393a42SmrgSynopsis 54152c393a42Smrg 5416a32e9e42Smrg #include <fontconfig/fontconfig.h> 5417a32e9e42Smrg 5418a6844aabSmrg 5419ca08ab68Smrg FcChar8 * FcStrCopy(const FcChar8 *s); 54202c393a42Smrg 54212c393a42SmrgDescription 54222c393a42Smrg 5423a32e9e42Smrg Allocates memory, copies s and returns the resulting buffer. Yes, this is 5424a32e9e42Smrg strdup, but that function isn't available on every platform. 54252c393a42Smrg 5426a32e9e42Smrg FcStrDowncase 54272c393a42Smrg 54282c393a42SmrgName 54292c393a42Smrg 5430a32e9e42Smrg FcStrDowncase -- create a lower case translation of a string 54312c393a42Smrg 54322c393a42SmrgSynopsis 54332c393a42Smrg 5434a32e9e42Smrg #include <fontconfig/fontconfig.h> 5435a32e9e42Smrg 5436a6844aabSmrg 5437ca08ab68Smrg FcChar8 * FcStrDowncase(const FcChar8 *s); 54382c393a42Smrg 54392c393a42SmrgDescription 54402c393a42Smrg 5441a32e9e42Smrg Allocates memory, copies s, converting upper case letters to lower case 5442a32e9e42Smrg and returns the allocated buffer. 54432c393a42Smrg 5444a32e9e42Smrg FcStrCopyFilename 54452c393a42Smrg 54462c393a42SmrgName 54472c393a42Smrg 5448a32e9e42Smrg FcStrCopyFilename -- create a complete path from a filename 54492c393a42Smrg 54502c393a42SmrgSynopsis 54512c393a42Smrg 5452a32e9e42Smrg #include <fontconfig/fontconfig.h> 5453a32e9e42Smrg 5454a6844aabSmrg 5455ca08ab68Smrg FcChar8 * FcStrCopyFilename(const FcChar8 *s); 54562c393a42Smrg 54572c393a42SmrgDescription 54582c393a42Smrg 5459a32e9e42Smrg FcStrCopyFilename constructs an absolute pathname from s. It converts any 5460a32e9e42Smrg leading '~' characters in to the value of the HOME environment variable, 5461a32e9e42Smrg and any relative paths are converted to absolute paths using the current 5462a32e9e42Smrg working directory. Sequences of '/' characters are converted to a single 5463a32e9e42Smrg '/', and names containing the current directory '.' or parent directory 5464a32e9e42Smrg '..' are correctly reconstructed. Returns NULL if '~' is the leading 5465a32e9e42Smrg character and HOME is unset or disabled (see FcConfigEnableHome). 54662c393a42Smrg 5467a32e9e42Smrg FcStrCmp 54682c393a42Smrg 54692c393a42SmrgName 54702c393a42Smrg 5471a32e9e42Smrg FcStrCmp -- compare UTF-8 strings 54722c393a42Smrg 54732c393a42SmrgSynopsis 54742c393a42Smrg 5475a32e9e42Smrg #include <fontconfig/fontconfig.h> 5476a32e9e42Smrg 5477a6844aabSmrg 5478ca08ab68Smrg int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2); 54792c393a42Smrg 54802c393a42SmrgDescription 54812c393a42Smrg 5482ca08ab68Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. 54832c393a42Smrg 5484a32e9e42Smrg FcStrCmpIgnoreCase 54852c393a42Smrg 54862c393a42SmrgName 54872c393a42Smrg 5488a32e9e42Smrg FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case 54892c393a42Smrg 54902c393a42SmrgSynopsis 54912c393a42Smrg 5492a32e9e42Smrg #include <fontconfig/fontconfig.h> 5493a32e9e42Smrg 5494a6844aabSmrg 5495ca08ab68Smrg int FcStrCmpIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 54962c393a42Smrg 54972c393a42SmrgDescription 54982c393a42Smrg 5499a32e9e42Smrg Returns the usual <0, 0, >0 result of comparing s1 and s2. This test is 5500a32e9e42Smrg case-insensitive for all proper UTF-8 encoded strings. 55012c393a42Smrg 5502a32e9e42Smrg FcStrStr 55032c393a42Smrg 55042c393a42SmrgName 55052c393a42Smrg 5506a32e9e42Smrg FcStrStr -- locate UTF-8 substring 55072c393a42Smrg 55082c393a42SmrgSynopsis 55092c393a42Smrg 5510a32e9e42Smrg #include <fontconfig/fontconfig.h> 5511a32e9e42Smrg 5512a6844aabSmrg 5513ca08ab68Smrg FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2); 55142c393a42Smrg 55152c393a42SmrgDescription 55162c393a42Smrg 5517a32e9e42Smrg Returns the location of s2 in s1. Returns NULL if s2 is not present in s1. 5518a32e9e42Smrg This test will operate properly with UTF8 encoded strings. 55192c393a42Smrg 5520a32e9e42Smrg FcStrStrIgnoreCase 55212c393a42Smrg 55222c393a42SmrgName 55232c393a42Smrg 5524a32e9e42Smrg FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII case 55252c393a42Smrg 55262c393a42SmrgSynopsis 55272c393a42Smrg 5528a32e9e42Smrg #include <fontconfig/fontconfig.h> 5529a32e9e42Smrg 5530a6844aabSmrg 5531a32e9e42Smrg FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8 *s2); 55322c393a42Smrg 55332c393a42SmrgDescription 55342c393a42Smrg 5535a32e9e42Smrg Returns the location of s2 in s1, ignoring case. Returns NULL if s2 is not 5536a32e9e42Smrg present in s1. This test is case-insensitive for all proper UTF-8 encoded 5537a32e9e42Smrg strings. 55382c393a42Smrg 5539a32e9e42Smrg FcStrPlus 55402c393a42Smrg 55412c393a42SmrgName 55422c393a42Smrg 5543a32e9e42Smrg FcStrPlus -- concatenate two strings 55442c393a42Smrg 55452c393a42SmrgSynopsis 55462c393a42Smrg 5547a32e9e42Smrg #include <fontconfig/fontconfig.h> 5548a32e9e42Smrg 5549a6844aabSmrg 5550ca08ab68Smrg FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2); 55512c393a42Smrg 55522c393a42SmrgDescription 55532c393a42Smrg 5554a32e9e42Smrg This function allocates new storage and places the concatenation of s1 and 5555a32e9e42Smrg s2 there, returning the new string. 55562c393a42Smrg 5557a32e9e42Smrg FcStrFree 55582c393a42Smrg 55592c393a42SmrgName 55602c393a42Smrg 5561a32e9e42Smrg FcStrFree -- free a string 55622c393a42Smrg 55632c393a42SmrgSynopsis 55642c393a42Smrg 5565a32e9e42Smrg #include <fontconfig/fontconfig.h> 5566a32e9e42Smrg 5567a6844aabSmrg 5568ca08ab68Smrg void FcStrFree(FcChar8 *s); 55692c393a42Smrg 55702c393a42SmrgDescription 55712c393a42Smrg 5572a32e9e42Smrg This is just a wrapper around free(3) which helps track memory usage of 5573a32e9e42Smrg strings within the fontconfig library. 55742c393a42Smrg 5575a32e9e42Smrg FcStrDirname 55762c393a42Smrg 55772c393a42SmrgName 55782c393a42Smrg 5579a32e9e42Smrg FcStrDirname -- directory part of filename 55802c393a42Smrg 55812c393a42SmrgSynopsis 55822c393a42Smrg 5583a32e9e42Smrg #include <fontconfig/fontconfig.h> 5584a32e9e42Smrg 5585a6844aabSmrg 5586ca08ab68Smrg FcChar8 * FcStrDirname(const FcChar8 *file); 55872c393a42Smrg 55882c393a42SmrgDescription 55892c393a42Smrg 5590a32e9e42Smrg Returns the directory containing file. This is returned in newly allocated 5591a32e9e42Smrg storage which should be freed when no longer needed. 55922c393a42Smrg 5593a32e9e42Smrg FcStrBasename 55942c393a42Smrg 55952c393a42SmrgName 55962c393a42Smrg 5597a32e9e42Smrg FcStrBasename -- last component of filename 55982c393a42Smrg 55992c393a42SmrgSynopsis 56002c393a42Smrg 5601a32e9e42Smrg #include <fontconfig/fontconfig.h> 5602a32e9e42Smrg 5603a6844aabSmrg 5604ca08ab68Smrg FcChar8 * FcStrBasename(const FcChar8 *file); 56052c393a42Smrg 56062c393a42SmrgDescription 56072c393a42Smrg 5608a32e9e42Smrg Returns the filename of file stripped of any leading directory names. This 5609a32e9e42Smrg is returned in newly allocated storage which should be freed when no 5610a32e9e42Smrg longer needed. 5611a32e9e42Smrg 5612a32e9e42SmrgReferences 5613a32e9e42Smrg 5614a32e9e42Smrg Visible links 5615a32e9e42Smrg 1. file:///tmp/html-am902r#AEN16 5616a32e9e42Smrg 2. file:///tmp/html-am902r#AEN19 5617a32e9e42Smrg 3. file:///tmp/html-am902r#AEN31 5618a32e9e42Smrg 4. file:///tmp/html-am902r#AEN103 5619a32e9e42Smrg 5. file:///tmp/html-am902r#FCINITLOADCONFIG 5620a32e9e42Smrg 6. file:///tmp/html-am902r#FCINITLOADCONFIGANDFONTS 5621a32e9e42Smrg 7. file:///tmp/html-am902r#FCINIT 5622a32e9e42Smrg 8. file:///tmp/html-am902r#FCFINI 5623a32e9e42Smrg 9. file:///tmp/html-am902r#FCGETVERSION 5624a32e9e42Smrg 10. file:///tmp/html-am902r#FCINITREINITIALIZE 5625a32e9e42Smrg 11. file:///tmp/html-am902r#FCINITBRINGUPTODATE 5626a32e9e42Smrg 12. file:///tmp/html-am902r#FCPATTERNCREATE 5627a32e9e42Smrg 13. file:///tmp/html-am902r#FCPATTERNDUPLICATE 5628a32e9e42Smrg 14. file:///tmp/html-am902r#FCPATTERNREFERENCE 5629a32e9e42Smrg 15. file:///tmp/html-am902r#FCPATTERNDESTROY 5630a32e9e42Smrg 16. file:///tmp/html-am902r#FCPATTERNOBJECTCOUNT 5631a32e9e42Smrg 17. file:///tmp/html-am902r#FCPATTERNEQUAL 5632a32e9e42Smrg 18. file:///tmp/html-am902r#FCPATTERNEQUALSUBSET 5633a32e9e42Smrg 19. file:///tmp/html-am902r#FCPATTERNFILTER 5634a32e9e42Smrg 20. file:///tmp/html-am902r#FCPATTERNHASH 5635a32e9e42Smrg 21. file:///tmp/html-am902r#FCPATTERNADD 5636a32e9e42Smrg 22. file:///tmp/html-am902r#FCPATTERNADDWEAK 5637a32e9e42Smrg 23. file:///tmp/html-am902r#FCPATTERNADD-TYPE 5638a32e9e42Smrg 24. file:///tmp/html-am902r#FCPATTERNGETWITHBINDING 5639a32e9e42Smrg 25. file:///tmp/html-am902r#FCPATTERNGET 5640a32e9e42Smrg 26. file:///tmp/html-am902r#FCPATTERNGET-TYPE 5641a32e9e42Smrg 27. file:///tmp/html-am902r#FCPATTERNBUILD 5642a32e9e42Smrg 28. file:///tmp/html-am902r#FCPATTERNDEL 5643a32e9e42Smrg 29. file:///tmp/html-am902r#FCPATTERNREMOVE 5644a32e9e42Smrg 30. file:///tmp/html-am902r#FCPATTERNITERSTART 5645a32e9e42Smrg 31. file:///tmp/html-am902r#FCPATTERNITERNEXT 5646a32e9e42Smrg 32. file:///tmp/html-am902r#FCPATTERNITEREQUAL 5647a32e9e42Smrg 33. file:///tmp/html-am902r#FCPATTERNFINDITER 5648a32e9e42Smrg 34. file:///tmp/html-am902r#FCPATTERNITERISVALID 5649a32e9e42Smrg 35. file:///tmp/html-am902r#FCPATTERNITERGETOBJECT 5650a32e9e42Smrg 36. file:///tmp/html-am902r#FCPATTERNITERVALUECOUNT 5651a32e9e42Smrg 37. file:///tmp/html-am902r#FCPATTERNITERGETVALUE 5652a32e9e42Smrg 38. file:///tmp/html-am902r#FCPATTERNPRINT 5653a32e9e42Smrg 39. file:///tmp/html-am902r#FCDEFAULTSUBSTITUTE 5654a32e9e42Smrg 40. file:///tmp/html-am902r#FCNAMEPARSE 5655a32e9e42Smrg 41. file:///tmp/html-am902r#FCNAMEUNPARSE 5656a32e9e42Smrg 42. file:///tmp/html-am902r#FCPATTERNFORMAT 5657a32e9e42Smrg 43. file:///tmp/html-am902r#FCFONTSETCREATE 5658a32e9e42Smrg 44. file:///tmp/html-am902r#FCFONTSETDESTROY 5659a32e9e42Smrg 45. file:///tmp/html-am902r#FCFONTSETADD 5660a32e9e42Smrg 46. file:///tmp/html-am902r#FCFONTSETLIST 5661a32e9e42Smrg 47. file:///tmp/html-am902r#FCFONTSETMATCH 5662a32e9e42Smrg 48. file:///tmp/html-am902r#FCFONTSETPRINT 5663a32e9e42Smrg 49. file:///tmp/html-am902r#FCFONTSETSORT 5664a32e9e42Smrg 50. file:///tmp/html-am902r#FCFONTSETSORTDESTROY 5665a32e9e42Smrg 51. file:///tmp/html-am902r#FCOBJECTSETCREATE 5666a32e9e42Smrg 52. file:///tmp/html-am902r#FCOBJECTSETADD 5667a32e9e42Smrg 53. file:///tmp/html-am902r#FCOBJECTSETDESTROY 5668a32e9e42Smrg 54. file:///tmp/html-am902r#FCOBJECTSETBUILD 5669a32e9e42Smrg 55. file:///tmp/html-am902r#FCFREETYPECHARINDEX 5670a32e9e42Smrg 56. file:///tmp/html-am902r#FCFREETYPECHARSET 5671a32e9e42Smrg 57. file:///tmp/html-am902r#FCFREETYPECHARSETANDSPACING 5672a32e9e42Smrg 58. file:///tmp/html-am902r#FCFREETYPEQUERY 5673a32e9e42Smrg 59. file:///tmp/html-am902r#FCFREETYPEQUERYALL 5674a32e9e42Smrg 60. file:///tmp/html-am902r#FCFREETYPEQUERYFACE 5675a32e9e42Smrg 61. file:///tmp/html-am902r#FCVALUEDESTROY 5676a32e9e42Smrg 62. file:///tmp/html-am902r#FCVALUESAVE 5677a32e9e42Smrg 63. file:///tmp/html-am902r#FCVALUEPRINT 5678a32e9e42Smrg 64. file:///tmp/html-am902r#FCVALUEEQUAL 5679a32e9e42Smrg 65. file:///tmp/html-am902r#FCCHARSETCREATE 5680a32e9e42Smrg 66. file:///tmp/html-am902r#FCCHARSETDESTROY 5681a32e9e42Smrg 67. file:///tmp/html-am902r#FCCHARSETADDCHAR 5682a32e9e42Smrg 68. file:///tmp/html-am902r#FCCHARSETDELCHAR 5683a32e9e42Smrg 69. file:///tmp/html-am902r#FCCHARSETCOPY 5684a32e9e42Smrg 70. file:///tmp/html-am902r#FCCHARSETEQUAL 5685a32e9e42Smrg 71. file:///tmp/html-am902r#FCCHARSETINTERSECT 5686a32e9e42Smrg 72. file:///tmp/html-am902r#FCCHARSETUNION 5687a32e9e42Smrg 73. file:///tmp/html-am902r#FCCHARSETSUBTRACT 5688a32e9e42Smrg 74. file:///tmp/html-am902r#FCCHARSETMERGE 5689a32e9e42Smrg 75. file:///tmp/html-am902r#FCCHARSETHASCHAR 5690a32e9e42Smrg 76. file:///tmp/html-am902r#FCCHARSETCOUNT 5691a32e9e42Smrg 77. file:///tmp/html-am902r#FCCHARSETINTERSECTCOUNT 5692a32e9e42Smrg 78. file:///tmp/html-am902r#FCCHARSETSUBTRACTCOUNT 5693a32e9e42Smrg 79. file:///tmp/html-am902r#FCCHARSETISSUBSET 5694a32e9e42Smrg 80. file:///tmp/html-am902r#FCCHARSETFIRSTPAGE 5695a32e9e42Smrg 81. file:///tmp/html-am902r#FCCHARSETNEXTPAGE 5696a32e9e42Smrg 82. file:///tmp/html-am902r#FCCHARSETCOVERAGE 5697a32e9e42Smrg 83. file:///tmp/html-am902r#FCCHARSETNEW 5698a32e9e42Smrg 84. file:///tmp/html-am902r#FCLANGSETCREATE 5699a32e9e42Smrg 85. file:///tmp/html-am902r#FCLANGSETDESTROY 5700a32e9e42Smrg 86. file:///tmp/html-am902r#FCLANGSETCOPY 5701a32e9e42Smrg 87. file:///tmp/html-am902r#FCLANGSETADD 5702a32e9e42Smrg 88. file:///tmp/html-am902r#FCLANGSETDEL 5703a32e9e42Smrg 89. file:///tmp/html-am902r#FCLANGSETUNION 5704a32e9e42Smrg 90. file:///tmp/html-am902r#FCLANGSETSUBTRACT 5705a32e9e42Smrg 91. file:///tmp/html-am902r#FCLANGSETCOMPARE 5706a32e9e42Smrg 92. file:///tmp/html-am902r#FCLANGSETCONTAINS 5707a32e9e42Smrg 93. file:///tmp/html-am902r#FCLANGSETEQUAL 5708a32e9e42Smrg 94. file:///tmp/html-am902r#FCLANGSETHASH 5709a32e9e42Smrg 95. file:///tmp/html-am902r#FCLANGSETHASLANG 5710a32e9e42Smrg 96. file:///tmp/html-am902r#FCGETDEFAULTLANGS 5711a32e9e42Smrg 97. file:///tmp/html-am902r#FCLANGSETGETLANGS 5712a32e9e42Smrg 98. file:///tmp/html-am902r#FCGETLANGS 5713a32e9e42Smrg 99. file:///tmp/html-am902r#FCLANGNORMALIZE 5714a32e9e42Smrg 100. file:///tmp/html-am902r#FCLANGGETCHARSET 5715a32e9e42Smrg 101. file:///tmp/html-am902r#FCMATRIXINIT 5716a32e9e42Smrg 102. file:///tmp/html-am902r#FCMATRIXCOPY 5717a32e9e42Smrg 103. file:///tmp/html-am902r#FCMATRIXEQUAL 5718a32e9e42Smrg 104. file:///tmp/html-am902r#FCMATRIXMULTIPLY 5719a32e9e42Smrg 105. file:///tmp/html-am902r#FCMATRIXROTATE 5720a32e9e42Smrg 106. file:///tmp/html-am902r#FCMATRIXSCALE 5721a32e9e42Smrg 107. file:///tmp/html-am902r#FCMATRIXSHEAR 5722a32e9e42Smrg 108. file:///tmp/html-am902r#FCRANGECOPY 5723a32e9e42Smrg 109. file:///tmp/html-am902r#FCRANGECREATEDOUBLE 5724a32e9e42Smrg 110. file:///tmp/html-am902r#FCRANGECREATEINTEGER 5725a32e9e42Smrg 111. file:///tmp/html-am902r#FCRANGEDESTROY 5726a32e9e42Smrg 112. file:///tmp/html-am902r#FCRANGEGETDOUBLE 5727a32e9e42Smrg 113. file:///tmp/html-am902r#FCCONFIGCREATE 5728a32e9e42Smrg 114. file:///tmp/html-am902r#FCCONFIGREFERENCE 5729a32e9e42Smrg 115. file:///tmp/html-am902r#FCCONFIGDESTROY 5730a32e9e42Smrg 116. file:///tmp/html-am902r#FCCONFIGSETCURRENT 5731a32e9e42Smrg 117. file:///tmp/html-am902r#FCCONFIGGETCURRENT 5732a32e9e42Smrg 118. file:///tmp/html-am902r#FCCONFIGUPTODATE 5733a32e9e42Smrg 119. file:///tmp/html-am902r#FCCONFIGHOME 5734a32e9e42Smrg 120. file:///tmp/html-am902r#FCCONFIGENABLEHOME 5735a32e9e42Smrg 121. file:///tmp/html-am902r#FCCONFIGBUILDFONTS 5736a32e9e42Smrg 122. file:///tmp/html-am902r#FCCONFIGGETCONFIGDIRS 5737a32e9e42Smrg 123. file:///tmp/html-am902r#FCCONFIGGETFONTDIRS 5738a32e9e42Smrg 124. file:///tmp/html-am902r#FCCONFIGGETCONFIGFILES 5739a32e9e42Smrg 125. file:///tmp/html-am902r#FCCONFIGGETCACHE 5740a32e9e42Smrg 126. file:///tmp/html-am902r#FCCONFIGGETCACHEDIRS 5741a32e9e42Smrg 127. file:///tmp/html-am902r#FCCONFIGGETFONTS 5742a32e9e42Smrg 128. file:///tmp/html-am902r#FCCONFIGGETBLANKS 5743a32e9e42Smrg 129. file:///tmp/html-am902r#FCCONFIGGETRESCANINTERVAL 5744a32e9e42Smrg 130. file:///tmp/html-am902r#FCCONFIGSETRESCANINTERVAL 5745a32e9e42Smrg 131. file:///tmp/html-am902r#FCCONFIGAPPFONTADDFILE 5746a32e9e42Smrg 132. file:///tmp/html-am902r#FCCONFIGAPPFONTADDDIR 5747a32e9e42Smrg 133. file:///tmp/html-am902r#FCCONFIGAPPFONTCLEAR 5748a32e9e42Smrg 134. file:///tmp/html-am902r#FCCONFIGSUBSTITUTEWITHPAT 5749a32e9e42Smrg 135. file:///tmp/html-am902r#FCCONFIGSUBSTITUTE 5750a32e9e42Smrg 136. file:///tmp/html-am902r#FCFONTMATCH 5751a32e9e42Smrg 137. file:///tmp/html-am902r#FCFONTSORT 5752a32e9e42Smrg 138. file:///tmp/html-am902r#FCFONTRENDERPREPARE 5753a32e9e42Smrg 139. file:///tmp/html-am902r#FCFONTLIST 5754a32e9e42Smrg 140. file:///tmp/html-am902r#FCCONFIGFILENAME 5755a32e9e42Smrg 141. file:///tmp/html-am902r#FCCONFIGPARSEANDLOAD 5756a32e9e42Smrg 142. file:///tmp/html-am902r#FCCONFIGPARSEANDLOADFROMMEMORY 5757a32e9e42Smrg 143. file:///tmp/html-am902r#FCCONFIGGETSYSROOT 5758a32e9e42Smrg 144. file:///tmp/html-am902r#FCCONFIGSETSYSROOT 5759a32e9e42Smrg 145. file:///tmp/html-am902r#FCCONFIGFILEINFOITERINIT 5760a32e9e42Smrg 146. file:///tmp/html-am902r#FCCONFIGFILEINFOITERNEXT 5761a32e9e42Smrg 147. file:///tmp/html-am902r#FCCONFIGFILEINFOITERGET 5762a32e9e42Smrg 148. file:///tmp/html-am902r#FCNAMEREGISTEROBJECTTYPES 5763a32e9e42Smrg 149. file:///tmp/html-am902r#FCNAMEUNREGISTEROBJECTTYPES 5764a32e9e42Smrg 150. file:///tmp/html-am902r#FCNAMEGETOBJECTTYPE 5765a32e9e42Smrg 151. file:///tmp/html-am902r#FCNAMEREGISTERCONSTANTS 5766a32e9e42Smrg 152. file:///tmp/html-am902r#FCNAMEUNREGISTERCONSTANTS 5767a32e9e42Smrg 153. file:///tmp/html-am902r#FCNAMEGETCONSTANT 5768a32e9e42Smrg 154. file:///tmp/html-am902r#FCNAMECONSTANT 5769a32e9e42Smrg 155. file:///tmp/html-am902r#FCWEIGHTFROMOPENTYPEDOUBLE 5770a32e9e42Smrg 156. file:///tmp/html-am902r#FCWEIGHTTOOPENTYPEDOUBLE 5771a32e9e42Smrg 157. file:///tmp/html-am902r#FCWEIGHTFROMOPENTYPE 5772a32e9e42Smrg 158. file:///tmp/html-am902r#FCWEIGHTTOOPENTYPE 5773a32e9e42Smrg 159. file:///tmp/html-am902r#FCBLANKSCREATE 5774a32e9e42Smrg 160. file:///tmp/html-am902r#FCBLANKSDESTROY 5775a32e9e42Smrg 161. file:///tmp/html-am902r#FCBLANKSADD 5776a32e9e42Smrg 162. file:///tmp/html-am902r#FCBLANKSISMEMBER 5777a32e9e42Smrg 163. file:///tmp/html-am902r#FCATOMICCREATE 5778a32e9e42Smrg 164. file:///tmp/html-am902r#FCATOMICLOCK 5779a32e9e42Smrg 165. file:///tmp/html-am902r#FCATOMICNEWFILE 5780a32e9e42Smrg 166. file:///tmp/html-am902r#FCATOMICORIGFILE 5781a32e9e42Smrg 167. file:///tmp/html-am902r#FCATOMICREPLACEORIG 5782a32e9e42Smrg 168. file:///tmp/html-am902r#FCATOMICDELETENEW 5783a32e9e42Smrg 169. file:///tmp/html-am902r#FCATOMICUNLOCK 5784a32e9e42Smrg 170. file:///tmp/html-am902r#FCATOMICDESTROY 5785a32e9e42Smrg 171. file:///tmp/html-am902r#FCFILESCAN 5786a32e9e42Smrg 172. file:///tmp/html-am902r#FCFILEISDIR 5787a32e9e42Smrg 173. file:///tmp/html-am902r#FCDIRSCAN 5788a32e9e42Smrg 174. file:///tmp/html-am902r#FCDIRSAVE 5789a32e9e42Smrg 175. file:///tmp/html-am902r#FCDIRCACHEUNLINK 5790a32e9e42Smrg 176. file:///tmp/html-am902r#FCDIRCACHEVALID 5791a32e9e42Smrg 177. file:///tmp/html-am902r#FCDIRCACHELOAD 5792a32e9e42Smrg 178. file:///tmp/html-am902r#FCDIRCACHERESCAN 5793a32e9e42Smrg 179. file:///tmp/html-am902r#FCDIRCACHEREAD 5794a32e9e42Smrg 180. file:///tmp/html-am902r#FCDIRCACHELOADFILE 5795a32e9e42Smrg 181. file:///tmp/html-am902r#FCDIRCACHEUNLOAD 5796a32e9e42Smrg 182. file:///tmp/html-am902r#FCCACHEDIR 5797a32e9e42Smrg 183. file:///tmp/html-am902r#FCCACHECOPYSET 5798a32e9e42Smrg 184. file:///tmp/html-am902r#FCCACHESUBDIR 5799a32e9e42Smrg 185. file:///tmp/html-am902r#FCCACHENUMSUBDIR 5800a32e9e42Smrg 186. file:///tmp/html-am902r#FCCACHENUMFONT 5801a32e9e42Smrg 187. file:///tmp/html-am902r#FCDIRCACHECLEAN 5802a32e9e42Smrg 188. file:///tmp/html-am902r#FCCACHECREATETAGFILE 5803a32e9e42Smrg 189. file:///tmp/html-am902r#FCDIRCACHECREATEUUID 5804a32e9e42Smrg 190. file:///tmp/html-am902r#FCDIRCACHEDELETEUUID 5805a32e9e42Smrg 191. file:///tmp/html-am902r#FCSTRSETCREATE 5806a32e9e42Smrg 192. file:///tmp/html-am902r#FCSTRSETMEMBER 5807a32e9e42Smrg 193. file:///tmp/html-am902r#FCSTRSETEQUAL 5808a32e9e42Smrg 194. file:///tmp/html-am902r#FCSTRSETADD 5809a32e9e42Smrg 195. file:///tmp/html-am902r#FCSTRSETADDFILENAME 5810a32e9e42Smrg 196. file:///tmp/html-am902r#FCSTRSETDEL 5811a32e9e42Smrg 197. file:///tmp/html-am902r#FCSTRSETDESTROY 5812a32e9e42Smrg 198. file:///tmp/html-am902r#FCSTRLISTCREATE 5813a32e9e42Smrg 199. file:///tmp/html-am902r#FCSTRLISTFIRST 5814a32e9e42Smrg 200. file:///tmp/html-am902r#FCSTRLISTNEXT 5815a32e9e42Smrg 201. file:///tmp/html-am902r#FCSTRLISTDONE 5816a32e9e42Smrg 202. file:///tmp/html-am902r#FCUTF8TOUCS4 5817a32e9e42Smrg 203. file:///tmp/html-am902r#FCUCS4TOUTF8 5818a32e9e42Smrg 204. file:///tmp/html-am902r#FCUTF8LEN 5819a32e9e42Smrg 205. file:///tmp/html-am902r#FCUTF16TOUCS4 5820a32e9e42Smrg 206. file:///tmp/html-am902r#FCUTF16LEN 5821a32e9e42Smrg 207. file:///tmp/html-am902r#FCISLOWER 5822a32e9e42Smrg 208. file:///tmp/html-am902r#FCISUPPER 5823a32e9e42Smrg 209. file:///tmp/html-am902r#FCTOLOWER 5824a32e9e42Smrg 210. file:///tmp/html-am902r#FCSTRCOPY 5825a32e9e42Smrg 211. file:///tmp/html-am902r#FCSTRDOWNCASE 5826a32e9e42Smrg 212. file:///tmp/html-am902r#FCSTRCOPYFILENAME 5827a32e9e42Smrg 213. file:///tmp/html-am902r#FCSTRCMP 5828a32e9e42Smrg 214. file:///tmp/html-am902r#FCSTRCMPIGNORECASE 5829a32e9e42Smrg 215. file:///tmp/html-am902r#FCSTRSTR 5830a32e9e42Smrg 216. file:///tmp/html-am902r#FCSTRSTRIGNORECASE 5831a32e9e42Smrg 217. file:///tmp/html-am902r#FCSTRPLUS 5832a32e9e42Smrg 218. file:///tmp/html-am902r#FCSTRFREE 5833a32e9e42Smrg 219. file:///tmp/html-am902r#FCSTRDIRNAME 5834a32e9e42Smrg 220. file:///tmp/html-am902r#FCSTRBASENAME 5835