~ubuntu-branches/ubuntu/intrepid/fontconfig/intrepid

« back to all changes in this revision

Viewing changes to doc/fontconfig-devel.txt

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-05 14:16:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071205141640-xikzw02c8gpgndze
Tags: 2.5.0-2ubuntu1
* Merge with Debian; remaining changes:
  - conf.d/40-nonlatin.conf: Add `MgOpen Moderna' to the list of fonts
    for which we might fall back to sans-serif.
  - conf.d/60-latin.conf: Prefer DejaVu over Bitstream Vera,
    as done for dapper.
  - 52-languageselector.conf loads language-selector.conf.
  - Include 52-languageselector.conf in the lists in conf.d/Makefile.am so
    that it actually gets installed and used.  Fixes LP 73714.
  - Some hackery in the debconf config script which attempts to upgrade
    user preferences across the many changes which have occurred to the
    debconf questions.  In particular:
    + Do not attempt to divine enable_bitmaps option by reading the
      symlinks in /etc.  This leaves the only way to permanently change
      the behaviour being dpkg-reconfigure.  The divination code was
      wrong and was intended by Debian to preserve pre-debconf
      configuration.  It would be nicer to preserve handmade updates to
      the /etc directory.
    + Always create /etc/fontconfig/conf.d/ symlink for enabling or
      disabling bitmap fonts.  This records the state from debconf
      unambiguously into the filesystem and will make it possible for
      future upgrades (from Edgy or later) to preserve handmade changes.
  - Add a (optional) include for "language-selector.conf" in fonts.conf
  - debian/patches/03_preferred_symbol_font.patch:
    + prefer "Standard Symbols L" as symbol font (Ubuntu: #37745)
  - Fix incorrect location of /usr/share/X11/fonts.
  - Correctly fix the (eg) firefox vs. (eg) evince font metrics problem:
    + New FC_ANY_METRICS property, boolean.
    + Change URW Nimbus and AMT font aliases in 30-{urw,metric}-aliases.conf
      into equivalent <match> directives so that we can add an additional
      test which disables them when the anymetrics property is true.
* Link using -Bsymbolic-functions.
* debian/rules (clean): Clean doc directory.
* debian/rules: Set shell to /bin/bash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
Fontconfig Developers Reference, Version 2.4.2
 
1
Fontconfig Developers Reference, Version 2.5.0
3
2
 
4
3
Keith Packard
5
4
 
6
5
   HP Cambridge Research Lab
7
 
     _________________________________________________________
 
6
     __________________________________________________________
8
7
 
9
8
   Table of Contents
10
9
   1. DESCRIPTION
18
17
        3.1. FcChar8, FcChar16, FcChar32, FcBool
19
18
        3.2. FcMatrix
20
19
        3.3. FcCharSet
21
 
        3.4. FcType
22
 
        3.5. FcValue
23
 
        3.6. FcPattern
24
 
        3.7. FcFontSet
25
 
        3.8. FcStrSet, FcStrList
26
 
        3.9. FcObjectSet
27
 
        3.10. FcObjectType
28
 
        3.11. FcConstant
29
 
        3.12. FcBlanks
30
 
        3.13. FcFileCache
31
 
        3.14. FcConfig
32
 
        3.15. FcSetName
33
 
        3.16. FcResult
34
 
        3.17. FcAtomic
 
20
        3.4. FcLangSet
 
21
        3.5. FcLangResult
 
22
        3.6. FcType
 
23
        3.7. FcValue
 
24
        3.8. FcPattern
 
25
        3.9. FcFontSet
 
26
        3.10. FcStrSet, FcStrList
 
27
        3.11. FcObjectSet
 
28
        3.12. FcObjectType
 
29
        3.13. FcConstant
 
30
        3.14. FcBlanks
 
31
        3.15. FcFileCache
 
32
        3.16. FcConfig
 
33
        3.17. FcSetName
 
34
        3.18. FcResult
 
35
        3.19. FcAtomic
 
36
        3.20. FcCache
35
37
 
36
38
   4. FUNCTIONS
37
39
 
45
47
              FcFini -- finalize fonconfig library
46
48
              FcGetVersion -- library version number
47
49
              FcInitReinitialize -- re-initialize library
48
 
              FcInitBringUptoDate -- reload configuration files
49
 
                      if needed
 
50
              FcInitBringUptoDate -- reload configuration files if
 
51
                      needed
50
52
 
51
53
        4.2. FcPattern
52
54
 
53
55
              FcPatternCreate -- Create a pattern
 
56
              FcPatternDuplicate -- Copy a pattern
 
57
              FcPatternReference -- Increment pattern reference
 
58
                      count
 
59
 
54
60
              FcPatternDestroy -- Destroy a pattern
55
61
              FcPatternEqual -- Compare patterns
56
 
              FcPatternEqualSubset -- Compare portions of
57
 
                      patterns
58
 
 
 
62
              FcPatternEqualSubset -- Compare portions of patterns
59
63
              FcPatternHash -- Compute a pattern hash value
60
64
              FcPatternAdd -- Add a value to a pattern
61
65
              FcPatternAddWeak -- Add a value to a pattern with
72
76
                      specified type from the pattern
73
77
 
74
78
              FcPatternPrint -- Print a pattern for debugging
75
 
              FcDefaultSubstitute -- Perform default
76
 
                      substitutions in a pattern
 
79
              FcDefaultSubstitute -- Perform default substitutions
 
80
                      in a pattern
77
81
 
78
82
              FcNameParse -- Parse a pattern string
79
83
              FcNameUnparse -- Convert a pattern back into a
84
88
              FcFontSetCreate -- Create a font set
85
89
              FcFontSetDestroy -- Destroy a font set
86
90
              FcFontSetAdd -- Add to a font set
 
91
              FcFontSetList -- List fonts from a set of font sets
 
92
              FcFontSetMatch -- Return the best font from a set of
 
93
                      font sets
 
94
 
 
95
              FcFontSetPrint -- Print a set of patterns to stdout
 
96
              FcFontSetSort -- Add to a font set
 
97
              FcFontSetSortDestroy -- DEPRECATED destroy a font
 
98
                      set
87
99
 
88
100
        4.4. FcObjectSet
89
101
 
96
108
 
97
109
              FcFreeTypeCharIndex -- map Unicode to glyph id
98
110
              FcFreeTypeCharSet -- compute unicode coverage
 
111
              FcFreeTypeCharSetAndSpacing -- compute unicode
 
112
                      coverage and spacing type
 
113
 
99
114
              FcFreeTypeQuery -- compute pattern from font file
100
115
                      (and index)
101
116
 
105
120
 
106
121
              FcValueDestroy -- Free a value
107
122
              FcValueSave -- Copy a value
 
123
              FcValuePrint -- Print a value to stdout
 
124
              FcValueEqual -- Test two values for equality
108
125
 
109
126
        4.7. FcCharSet
110
127
 
131
148
              FcCharSetNextPage -- Continue enumerating charset
132
149
                      contents
133
150
 
134
 
        4.8. FcMatrix
 
151
              FcCharSetCoverage -- DEPRECATED return coverage for
 
152
                      a Unicode page
 
153
 
 
154
              FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
 
155
 
 
156
        4.8. FcLangSet
 
157
 
 
158
              FcLangSetCreate -- create a langset object
 
159
              FcLangSetDestroy -- destroy a langset object
 
160
              FcLangSetCopy -- copy a langset object
 
161
              FcLangSetAdd -- add a language to a langset
 
162
              FcLangSetCompare -- compare language sets
 
163
              FcLangSetContains -- check langset subset relation
 
164
              FcLangSetEqual -- test for matching langsets
 
165
              FcLangSetHash -- return a hash value for a langset
 
166
              FcLangSetHasLang -- test langset for language
 
167
                      support
 
168
 
 
169
              FcGetLangs -- Get list of languages
 
170
              FcLangGetCharSet -- Get character map for a language
 
171
 
 
172
        4.9. FcMatrix
135
173
 
136
174
              FcMatrixInit -- initialize an FcMatrix structure
137
175
              FcMatrixCopy -- Copy a matrix
141
179
              FcMatrixScale -- Scale a matrix
142
180
              FcMatrixShear -- Shear a matrix
143
181
 
144
 
        4.9. FcConfig
 
182
        4.10. FcConfig
145
183
 
146
184
              FcConfigCreate -- Create a configuration
147
185
              FcConfigDestroy -- Destroy a configuration
148
186
              FcConfigSetCurrent -- Set configuration as default
149
187
              FcConfigGetCurrent -- Return current configuration
150
 
              FcConfigUptoDate -- Check timestamps on config
151
 
                      files
 
188
              FcConfigUptoDate -- Check timestamps on config files
 
189
              FcConfigHome -- return the current home directory.
 
190
              FcConfigEnableHome -- controls use of the home
 
191
                      directory.
152
192
 
153
193
              FcConfigBuildFonts -- Build font database
154
194
              FcConfigGetConfigDirs -- Get config directories
155
195
              FcConfigGetFontDirs -- Get font directories
156
196
              FcConfigGetConfigFiles -- Get config files
157
 
              FcConfigGetCache -- Get cache filename
 
197
              FcConfigGetCache -- DEPRECATED used to return
 
198
                      per-user cache filename
 
199
 
 
200
              FcConfigGetCacheDirs -- return the list of
 
201
                      directories searched for cache files
 
202
 
158
203
              FcConfigGetFonts -- Get config font set
159
204
              FcConfigGetBlanks -- Get config blanks
160
 
              FcConfigGetRescanInverval -- Get config rescan
 
205
              FcConfigGetRescanInterval -- Get config rescan
161
206
                      interval
162
207
 
163
 
              FcConfigSetRescanInverval -- Set config rescan
 
208
              FcConfigSetRescanInterval -- Set config rescan
164
209
                      interval
165
210
 
166
211
              FcConfigAppFontAddFile -- Add font file to font
167
212
                      database
168
213
 
169
 
              FcConfigAppFontAddDir -- Add fonts from directory
170
 
                      to font database
 
214
              FcConfigAppFontAddDir -- Add fonts from directory to
 
215
                      font database
171
216
 
172
217
              FcConfigAppFontClear -- Remove all app fonts from
173
218
                      font database
183
228
              FcConfigFilename -- Find a config file
184
229
              FcConfigParseAndLoad -- load a configuration file
185
230
 
186
 
        4.10. FcObjectType
 
231
        4.11. FcObjectType
187
232
 
188
233
              FcNameRegisterObjectTypes -- Register object types
189
234
              FcNameUnregisterObjectTypes -- Unregister object
191
236
 
192
237
              FcNameGetObjectType -- Lookup an object type
193
238
 
194
 
        4.11. FcConstant
 
239
        4.12. FcConstant
195
240
 
196
241
              FcNameRegisterConstants -- Register symbolic
197
242
                      constants
203
248
              FcNameConstant -- Get the value for a symbolic
204
249
                      constant
205
250
 
206
 
        4.12. FcBlanks
 
251
        4.13. FcBlanks
207
252
 
208
253
              FcBlanksCreate -- Create an FcBlanks
209
254
              FcBlanksDestroy -- Destroy and FcBlanks
210
255
              FcBlanksAdd -- Add a character to an FcBlanks
211
256
              FcBlanksIsMember -- Query membership in an FcBlanks
212
257
 
213
 
        4.13. FcAtomic
 
258
        4.14. FcAtomic
214
259
 
215
260
              FcAtomicCreate -- create an FcAtomic object
216
261
              FcAtomicLock -- lock a file
221
266
              FcAtomicUnlock -- unlock a file
222
267
              FcAtomicDestroy -- destroy an FcAtomic object
223
268
 
224
 
        4.14. File and Directory routines
 
269
        4.15. File and Directory routines
225
270
 
226
271
              FcFileScan -- scan a font file
227
 
              FcDirScan -- scan a font directory
228
 
              FcDirSave -- save a directory cache
229
 
              FcDirCacheValid -- check directory cache timestamp
230
 
 
231
 
        4.15. FcStrSet and FcStrList
 
272
              FcFileIsDir -- check whether a file is a directory
 
273
              FcDirScan -- DEPRECATED: formerly used to scan a
 
274
                      font directory
 
275
 
 
276
              FcDirSave -- DEPRECATED: formerly used to save a
 
277
                      directory cache
 
278
 
 
279
              FcDirCacheUnlink -- Remove all caches related to dir
 
280
              FcDirCacheValid -- check directory cache
 
281
              FcDirCacheLoad -- load a directory cache
 
282
              FcDirCacheRead -- read or construct a directory
 
283
                      cache
 
284
 
 
285
              FcDirCacheLoadFile -- load a cache file
 
286
              FcDirCacheUnload -- unload a cache file
 
287
 
 
288
        4.16. FcCache routines
 
289
 
 
290
              FcCacheDir -- Return directory of cache
 
291
              FcCacheCopySet -- Returns a copy of the fontset from
 
292
                      cache
 
293
 
 
294
              FcCacheSubdir -- Return the i'th subdirectory.
 
295
              FcCacheNumSubdir -- Return the number of
 
296
                      subdirectories in cache.
 
297
 
 
298
              FcCacheNumFont -- Returns the number of fonts in
 
299
                      cache.
 
300
 
 
301
        4.17. FcStrSet and FcStrList
232
302
 
233
303
              FcStrSetCreate -- create a string set
234
304
              FcStrSetMember -- check set for membership
 
305
              FcStrSetEqual -- check sets for equality
235
306
              FcStrSetAdd -- add to a string set
236
307
              FcStrSetAddFilename -- add a filename to a string
237
308
                      set
242
313
              FcStrListNext -- get next string in iteration
243
314
              FcStrListDone -- destroy a string iterator
244
315
 
245
 
        4.16. String utilities
 
316
        4.18. String utilities
246
317
 
247
318
              FcUtf8ToUcs4 -- convert UTF-8 to UCS4
248
319
              FcUcs4ToUtf8 -- convert UCS4 to UTF-8
249
320
              FcUtf8Len -- count UTF-8 encoded chars
250
321
              FcUtf16ToUcs4 -- convert UTF-16 to UCS4
251
322
              FcUtf16Len -- count UTF-16 encoded chars
 
323
              FcIsLower -- check for lower case ASCII character
 
324
              FcIsUpper -- check for upper case ASCII character
 
325
              FcToLower -- convert upper case ASCII to lower case
252
326
              FcStrCopy -- duplicate a string
253
327
              FcStrDowncase -- create a lower case translation of
254
328
                      a string
255
329
 
256
 
              FcStrCopyFilename -- copy a string, expanding '~'
257
 
              FcStrCmpIgnoreCase -- compare UTF-8 strings
258
 
                      ignoring ASCII case
 
330
              FcStrCopyFilename -- create a complete path from a
 
331
                      filename
 
332
 
 
333
              FcStrCmp -- compare UTF-8 strings
 
334
              FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring
 
335
                      case
259
336
 
260
337
              FcStrStr -- locate UTF-8 substring
261
338
              FcStrStrIgnoreCase -- locate UTF-8 substring
262
339
                      ignoring ASCII case
263
340
 
264
 
              FcStrDirname -- directory part of filename
 
341
              FcStrPlus -- concatenate two strings
 
342
              FcStrFree -- free a string
265
343
              FcStrBasename -- last component of filename
266
344
 
267
345
1. DESCRIPTION
268
346
 
269
347
   Fontconfig is a library designed to provide system-wide font
270
348
   configuration, customization and application access.
271
 
     _________________________________________________________
 
349
     __________________________________________________________
272
350
 
273
351
2. FUNCTIONAL OVERVIEW
274
352
 
275
353
   Fontconfig contains two essential modules, the configuration
276
354
   module which builds an internal configuration from XML files
277
 
   and the matching module which accepts font patterns and
278
 
   returns the nearest matching font.
279
 
     _________________________________________________________
 
355
   and the matching module which accepts font patterns and returns
 
356
   the nearest matching font.
 
357
     __________________________________________________________
280
358
 
281
359
2.1. FONT CONFIGURATION
282
360
 
293
371
   and shared by as many applications as possible. It is hoped
294
372
   that this will lead to more stable font selection when passing
295
373
   names from one application to another. XML was chosen as a
296
 
   configuration file format because it provides a format which
297
 
   is easy for external agents to edit while retaining the
298
 
   correct structure and syntax.
 
374
   configuration file format because it provides a format which is
 
375
   easy for external agents to edit while retaining the correct
 
376
   structure and syntax.
299
377
 
300
 
   Font configuration is separate from font matching;
301
 
   applications needing to do their own matching can access the
302
 
   available fonts from the library and perform private matching.
303
 
   The intent is to permit applications to pick and choose
304
 
   appropriate functionality from the library instead of forcing
305
 
   them to choose between this library and a private
306
 
   configuration mechanism. The hope is that this will ensure
307
 
   that configuration of fonts for all applications can be
308
 
   centralized in one place. Centralizing font configuration will
309
 
   simplify and regularize font installation and customization.
310
 
     _________________________________________________________
 
378
   Font configuration is separate from font matching; applications
 
379
   needing to do their own matching can access the available fonts
 
380
   from the library and perform private matching. The intent is to
 
381
   permit applications to pick and choose appropriate
 
382
   functionality from the library instead of forcing them to
 
383
   choose between this library and a private configuration
 
384
   mechanism. The hope is that this will ensure that configuration
 
385
   of fonts for all applications can be centralized in one place.
 
386
   Centralizing font configuration will simplify and regularize
 
387
   font installation and customization.
 
388
     __________________________________________________________
311
389
 
312
390
2.2. FONT PROPERTIES
313
391
 
321
399
    Property       CPP Symbol           Type    Description
322
400
    ----------------------------------------------------
323
401
    family         FC_FAMILY            String  Font family names
324
 
    familylang     FC_FAMILYLANG        String  Language cooresponding
325
 
to
 
402
    familylang     FC_FAMILYLANG        String  Language cooresponding t
 
403
o
326
404
                                                each family name
327
 
    style          FC_STYLE             String  Font style. Overrides w
328
 
eight
 
405
    style          FC_STYLE             String  Font style. Overrides we
 
406
ight
329
407
                                                and slant
330
 
    stylelang      FC_STYLELANG         String  Language cooresponding
331
 
to
 
408
    stylelang      FC_STYLELANG         String  Language cooresponding t
 
409
o
332
410
                                                each style name
333
 
    fullname       FC_FULLNAME          String  Font face full name whe
334
 
re
335
 
                                                different from family a
336
 
nd
 
411
    fullname       FC_FULLNAME          String  Font face full name wher
 
412
e
 
413
                                                different from family an
 
414
d
337
415
                                                family + style
338
 
    fullnamelang   FC_FULLNAMELANG      String  Language cooresponding
339
 
to
 
416
    fullnamelang   FC_FULLNAMELANG      String  Language cooresponding t
 
417
o
340
418
                                                each fullname
341
 
    slant          FC_SLANT             Int     Italic, oblique or roma
342
 
n
343
 
    weight         FC_WEIGHT            Int     Light, medium, demibold
344
 
,
 
419
    slant          FC_SLANT             Int     Italic, oblique or roman
 
420
    weight         FC_WEIGHT            Int     Light, medium, demibold,
345
421
                                                bold or black
346
422
    size           FC_SIZE              Double  Point size
347
 
    width          FC_WIDTH             Int     Condensed, normal or ex
348
 
panded
349
 
    aspect         FC_ASPECT            Double  Stretches glyphs horizo
350
 
ntally
 
423
    width          FC_WIDTH             Int     Condensed, normal or exp
 
424
anded
 
425
    aspect         FC_ASPECT            Double  Stretches glyphs horizon
 
426
tally
351
427
                                                before hinting
352
428
    pixelsize      FC_PIXEL_SIZE        Double  Pixel size
353
 
    spacing        FC_SPACING           Int     Proportional, dual-widt
354
 
h,
 
429
    spacing        FC_SPACING           Int     Proportional, dual-width
 
430
,
355
431
                                                monospace or charcell
356
432
    foundry        FC_FOUNDRY           String  Font foundry name
357
433
    antialias      FC_ANTIALIAS         Bool    Whether glyphs can be
358
434
                                                antialiased
359
 
    hinting        FC_HINTING           Bool    Whether the rasterizer
360
 
should
 
435
    hinting        FC_HINTING           Bool    Whether the rasterizer s
 
436
hould
361
437
                                                use hinting
362
438
    hintstyle      FC_HINT_STYLE        Int     Automatic hinting style
363
439
    verticallayout FC_VERTICAL_LAYOUT   Bool    Use vertical layout
364
 
    autohint       FC_AUTOHINT          Bool    Use autohinter instead
365
 
of
 
440
    autohint       FC_AUTOHINT          Bool    Use autohinter instead o
 
441
f
366
442
                                                normal hinter
367
443
    globaladvance  FC_GLOBAL_ADVANCE    Bool    Use font global advance
368
 
 data
369
 
    file           FC_FILE              String  The filename holding th
370
 
e font
371
 
    index          FC_INDEX             Int     The index of the font w
372
 
ithin
 
444
data
 
445
    file           FC_FILE              String  The filename holding the
 
446
 font
 
447
    index          FC_INDEX             Int     The index of the font wi
 
448
thin
373
449
                                                the file
374
 
    ftface         FC_FT_FACE           FT_Face Use the specified FreeT
375
 
ype
 
450
    ftface         FC_FT_FACE           FT_Face Use the specified FreeTy
 
451
pe
376
452
                                                face object
377
 
    rasterizer     FC_RASTERIZER        String  Which rasterizer is in
378
 
use
379
 
    outline        FC_OUTLINE           Bool    Whether the glyphs are
380
 
outlines
381
 
    scalable       FC_SCALABLE          Bool    Whether glyphs can be s
382
 
caled
383
 
    scale          FC_SCALE             Double  Scale factor for point-
384
 
>pixel
 
453
    rasterizer     FC_RASTERIZER        String  Which rasterizer is in u
 
454
se
 
455
    outline        FC_OUTLINE           Bool    Whether the glyphs are o
 
456
utlines
 
457
    scalable       FC_SCALABLE          Bool    Whether glyphs can be sc
 
458
aled
 
459
    scale          FC_SCALE             Double  Scale factor for point->
 
460
pixel
385
461
                                                conversions
386
462
    dpi            FC_DPI               Double  Target dots per inch
387
 
    rgba           FC_RGBA              Int     unknown, rgb, bgr, vrgb
388
 
,
389
 
                                                vbgr, none - subpixel g
390
 
eometry
391
 
    minspace       FC_MINSPACE          Bool    Eliminate leading from
392
 
line
 
463
    rgba           FC_RGBA              Int     unknown, rgb, bgr, vrgb,
 
464
                                                vbgr, none - subpixel ge
 
465
ometry
 
466
    minspace       FC_MINSPACE          Bool    Eliminate leading from l
 
467
ine
393
468
                                                spacing
394
 
    charset        FC_CHARSET           CharSet Unicode chars encoded b
395
 
y
 
469
    charset        FC_CHARSET           CharSet Unicode chars encoded by
396
470
                                                the font
397
 
    lang           FC_LANG              String  List of RFC-3066-style
398
 
                                                languages this font sup
399
 
ports
400
 
    fontversion    FC_FONTVERSION       Int     Version number of the f
401
 
ont
402
 
    capability     FC_CAPABILITY        String  List of layout capabili
403
 
ties in
 
471
    lang           FC_LANG              LangSet Set of RFC-3066-style
 
472
                                                languages this font supp
 
473
orts
 
474
    fontversion    FC_FONTVERSION       Int     Version number of the fo
 
475
nt
 
476
    capability     FC_CAPABILITY        String  List of layout capabilit
 
477
ies in
404
478
                                                the font
405
479
    embolden       FC_EMBOLDEN          Bool    Rasterizer should
406
 
                                                synthetically embolden
407
 
the font
408
 
 
409
 
     _________________________________________________________
 
480
                                                synthetically embolden t
 
481
he font
 
482
     __________________________________________________________
410
483
 
411
484
3. Datatypes
412
485
 
413
486
   Fontconfig uses abstract datatypes to hide internal
414
487
   implementation details for most data structures. A few
415
488
   structures are exposed where appropriate.
416
 
     _________________________________________________________
 
489
     __________________________________________________________
417
490
 
418
491
3.1. FcChar8, FcChar16, FcChar32, FcBool
419
492
 
420
 
   These are primitive datatypes; the FcChar* types hold
421
 
   precisely the number of bits stated (if supported by the C
 
493
   These are primitive datatypes; the FcChar* types hold precisely
 
494
   the number of bits stated (if supported by the C
422
495
   implementation). FcBool holds one of two CPP symbols: FcFalse
423
496
   or FcTrue.
424
 
     _________________________________________________________
 
497
     __________________________________________________________
425
498
 
426
499
3.2. FcMatrix
427
500
 
431
504
        typedef struct _FcMatrix {
432
505
                double xx, xy, yx, yy;
433
506
        } FcMatrix;
434
 
 
435
 
     _________________________________________________________
 
507
     __________________________________________________________
436
508
 
437
509
3.3. FcCharSet
438
510
 
439
511
   An FcCharSet is an abstract type that holds the set of encoded
440
512
   unicode chars in a font. Operations to build and compare these
441
513
   sets are provided.
442
 
     _________________________________________________________
443
 
 
444
 
3.4. FcType
 
514
     __________________________________________________________
 
515
 
 
516
3.4. FcLangSet
 
517
 
 
518
   An FcLangSet is an abstract type that holds the set of
 
519
   languages supported by a font. Operations to build and compare
 
520
   these sets are provided. These are computed for a font based on
 
521
   orthographic information built into the fontconfig library.
 
522
   Fontconfig has orthographies for all of the ISO 639-1 languages
 
523
   except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA.
 
524
   If you have orthographic information for any of these
 
525
   languages, please submit them.
 
526
     __________________________________________________________
 
527
 
 
528
3.5. FcLangResult
 
529
 
 
530
   An FcLangResult is an enumeration used to return the results of
 
531
   comparing two language strings or FcLangSet objects.
 
532
   FcLangEqual means the objects match language and territory.
 
533
   FcLangDifferentTerritory means the objects match in language
 
534
   but differ in territory. FcLangDifferentLang means the objects
 
535
   differ in language.
 
536
     __________________________________________________________
 
537
 
 
538
3.6. FcType
445
539
 
446
540
   Tags the kind of data stored in an FcValue.
447
 
     _________________________________________________________
 
541
     __________________________________________________________
448
542
 
449
 
3.5. FcValue
 
543
3.7. FcValue
450
544
 
451
545
   An FcValue object holds a single value with one of a number of
452
546
   different types. The 'type' tag indicates which member is
460
554
                        double d;
461
555
                        const FcMatrix *m;
462
556
                        const FcCharSet *c;
 
557
                        void *f;
 
558
                        const FcLangSet *l;
463
559
                } u;
464
560
        } FcValue;
465
561
 
470
566
        FcTypeVoid      (none)          (none)
471
567
        FcTypeInteger   i               int
472
568
        FcTypeDouble    d               double
473
 
        FcTypeString    s               char *
 
569
        FcTypeString    s               FcChar8 *
474
570
        FcTypeBool      b               b
475
571
        FcTypeMatrix    m               FcMatrix *
476
572
        FcTypeCharSet   c               FcCharSet *
477
 
 
478
 
     _________________________________________________________
479
 
 
480
 
3.6. FcPattern
 
573
        FcTypeFTFace    f               void * (FT_Face)
 
574
        FcTypeLangSet   l               FcLangSet *
 
575
     __________________________________________________________
 
576
 
 
577
3.8. FcPattern
481
578
 
482
579
   holds a set of names with associated value lists; each name
483
580
   refers to a property of a font. FcPatterns are used as inputs
485
582
   specific fonts. Each property can hold one or more values;
486
583
   conventionally all of the same type, although the interface
487
584
   doesn't demand that.
488
 
     _________________________________________________________
 
585
     __________________________________________________________
489
586
 
490
 
3.7. FcFontSet
 
587
3.9. FcFontSet
491
588
 
492
589
        typedef struct _FcFontSet {
493
590
                int nfont;
495
592
                FcPattern **fonts;
496
593
        } FcFontSet;
497
594
 
498
 
 
499
595
   An FcFontSet contains a list of FcPatterns. Internally
500
596
   fontconfig uses this data structure to hold sets of fonts.
501
597
   Externally, fontconfig returns the results of listing fonts in
502
598
   this format. 'nfont' holds the number of patterns in the
503
599
   'fonts' array; 'sfont' is used to indicate the size of that
504
600
   array.
505
 
     _________________________________________________________
 
601
     __________________________________________________________
506
602
 
507
 
3.8. FcStrSet, FcStrList
 
603
3.10. FcStrSet, FcStrList
508
604
 
509
605
   FcStrSet holds a list of strings that can be appended to and
510
606
   enumerated. Its unique characteristic is that the enumeration
512
608
   FcStrList is used during enumeration to safely and correctly
513
609
   walk the list of strings even while that list is edited in the
514
610
   middle of enumeration.
515
 
     _________________________________________________________
 
611
     __________________________________________________________
516
612
 
517
 
3.9. FcObjectSet
 
613
3.11. FcObjectSet
518
614
 
519
615
        typedef struct _FcObjectSet {
520
616
                int nobject;
522
618
                const char **objects;
523
619
        } FcObjectSet;
524
620
 
525
 
 
526
621
   holds a set of names and is used to specify which fields from
527
622
   fonts are placed in the the list of returned patterns when
528
623
   listing fonts.
529
 
     _________________________________________________________
 
624
     __________________________________________________________
530
625
 
531
 
3.10. FcObjectType
 
626
3.12. FcObjectType
532
627
 
533
628
        typedef struct _FcObjectType {
534
629
                const char *object;
535
630
                FcType type;
536
631
        } FcObjectType;
537
632
 
538
 
 
539
 
   marks the type of a pattern element generated when parsing
540
 
   font names. Applications can add new object types so that font
541
 
   names may contain the new elements.
542
 
     _________________________________________________________
543
 
 
544
 
3.11. FcConstant
 
633
   marks the type of a pattern element generated when parsing font
 
634
   names. Applications can add new object types so that font names
 
635
   may contain the new elements.
 
636
     __________________________________________________________
 
637
 
 
638
3.13. FcConstant
545
639
 
546
640
        typedef struct _FcConstant {
547
641
            const FcChar8 *name;
549
643
            int value;
550
644
        } FcConstant;
551
645
 
552
 
 
553
646
   Provides for symbolic constants for new pattern elements. When
554
647
   'name' is seen in a font name, an 'object' element is created
555
648
   with value 'value'.
556
 
     _________________________________________________________
 
649
     __________________________________________________________
557
650
 
558
 
3.12. FcBlanks
 
651
3.14. FcBlanks
559
652
 
560
653
   holds a list of Unicode chars which are expected to be blank;
561
654
   unexpectedly blank chars are assumed to be invalid and are
562
655
   elided from the charset associated with the font.
563
 
     _________________________________________________________
 
656
     __________________________________________________________
564
657
 
565
 
3.13. FcFileCache
 
658
3.15. FcFileCache
566
659
 
567
660
   holds the per-user cache information for use while loading the
568
661
   font database. This is built automatically for the current
569
662
   configuration when that is loaded. Applications must always
570
663
   pass '0' when one is requested.
571
 
     _________________________________________________________
 
664
     __________________________________________________________
572
665
 
573
 
3.14. FcConfig
 
666
3.16. FcConfig
574
667
 
575
668
   holds a complete configuration of the library; there is one
576
669
   default configuration, other can be constructed from XML data
577
670
   structures. All public entry points that need global data can
578
 
   take an optional FcConfig* argument; passing 0 uses the
579
 
   default configuration. FcConfig objects hold two sets of
580
 
   fonts, the first contains those specified by the
581
 
   configuration, the second set holds those added by the
582
 
   application at run-time. Interfaces that need to reference a
583
 
   particulat set use one of the FcSetName enumerated values.
584
 
     _________________________________________________________
 
671
   take an optional FcConfig* argument; passing 0 uses the default
 
672
   configuration. FcConfig objects hold two sets of fonts, the
 
673
   first contains those specified by the configuration, the second
 
674
   set holds those added by the application at run-time.
 
675
   Interfaces that need to reference a particulat set use one of
 
676
   the FcSetName enumerated values.
 
677
     __________________________________________________________
585
678
 
586
 
3.15. FcSetName
 
679
3.17. FcSetName
587
680
 
588
681
   Specifies one of the two sets of fonts available in a
589
682
   configuration; FcSetSystem for those fonts specified in the
590
683
   configuration and FcSetApplication which holds fonts provided
591
684
   by the application.
592
 
     _________________________________________________________
 
685
     __________________________________________________________
593
686
 
594
 
3.16. FcResult
 
687
3.18. FcResult
595
688
 
596
689
   Used as a return type for functions manipulating FcPattern
597
690
   objects.
600
693
        -----------------------------------------------------------
601
694
        FcResultMatch           Object exists with the specified ID
602
695
        FcResultNoMatch         Object doesn't exist at all
603
 
        FcResultTypeMismatch    Object exists, but the type doesn't mat
604
 
ch
 
696
        FcResultTypeMismatch    Object exists, but the type doesn't matc
 
697
h
605
698
        FcResultNoId            Object exists, but has fewer values
606
699
                                than specified
607
700
        FcResultOutOfMemory     Malloc failed
608
 
 
609
 
     _________________________________________________________
610
 
 
611
 
3.17. FcAtomic
612
 
 
613
 
   Used for locking access to config files. Provides a safe way
614
 
   to update configuration files.
615
 
     _________________________________________________________
 
701
     __________________________________________________________
 
702
 
 
703
3.19. FcAtomic
 
704
 
 
705
   Used for locking access to config files. Provides a safe way to
 
706
   update configuration files.
 
707
     __________________________________________________________
 
708
 
 
709
3.20. FcCache
 
710
 
 
711
   Holds information about the fonts contained in a single
 
712
   directory. Normal applications need not worry about this as
 
713
   caches for font access are automatically managed by the
 
714
   library. Applications dealing with cache management may want to
 
715
   use some of these objects in their work, however the included
 
716
   'fc-cache' program generally suffices for all of that.
 
717
     __________________________________________________________
616
718
 
617
719
4. FUNCTIONS
618
720
 
619
721
   These are grouped by functionality, often using the main
620
722
   datatype being manipulated.
621
 
     _________________________________________________________
 
723
     __________________________________________________________
622
724
 
623
725
4.1. Initialization
624
726
 
653
755
 
654
756
Version
655
757
 
656
 
   Fontconfig version 2.4.2
 
758
   Fontconfig version 2.5.0
657
759
 
658
760
FcInitLoadConfigAndFonts
659
761
 
670
772
Description
671
773
 
672
774
   Loads the default configuration file and builds information
673
 
   about the available fonts. Returns the resulting
674
 
   configuration.
 
775
   about the available fonts. Returns the resulting configuration.
675
776
 
676
777
Version
677
778
 
678
 
   Fontconfig version 2.4.2
 
779
   Fontconfig version 2.5.0
679
780
 
680
781
FcInit
681
782
 
699
800
 
700
801
Version
701
802
 
702
 
   Fontconfig version 2.4.2
 
803
   Fontconfig version 2.5.0
703
804
 
704
805
FcFini
705
806
 
722
823
 
723
824
Version
724
825
 
725
 
   Fontconfig version 2.4.2
 
826
   Fontconfig version 2.5.0
726
827
 
727
828
FcGetVersion
728
829
 
742
843
 
743
844
Version
744
845
 
745
 
   Fontconfig version 2.4.2
 
846
   Fontconfig version 2.5.0
746
847
 
747
848
FcInitReinitialize
748
849
 
758
859
 
759
860
Description
760
861
 
761
 
   Forces the default configuration file to be reloaded and
762
 
   resets the default configuration.
 
862
   Forces the default configuration file to be reloaded and resets
 
863
   the default configuration. Returns FcFalse if the configuration
 
864
   cannot be reloaded (due to config file errors, allocation
 
865
   failures or other issues) and leaves the existing configuration
 
866
   unchanged. Otherwise returns FcTrue.
763
867
 
764
868
Version
765
869
 
766
 
   Fontconfig version 2.4.2
 
870
   Fontconfig version 2.5.0
767
871
 
768
872
FcInitBringUptoDate
769
873
 
782
886
   Checks the rescan interval in the default configuration,
783
887
   checking the configuration if the interval has passed and
784
888
   reloading the configuration if when any changes are detected.
 
889
   Returns FcFalse if the configuration cannot be reloaded (see
 
890
   FcInitReinitialize). Otherwise returns FcTrue.
785
891
 
786
892
Version
787
893
 
788
 
   Fontconfig version 2.4.2
789
 
     _________________________________________________________
 
894
   Fontconfig version 2.5.0
 
895
     __________________________________________________________
790
896
 
791
897
4.2. FcPattern
792
898
 
793
899
   Table of Contents
794
900
   FcPatternCreate -- Create a pattern
 
901
   FcPatternDuplicate -- Copy a pattern
 
902
   FcPatternReference -- Increment pattern reference count
795
903
   FcPatternDestroy -- Destroy a pattern
796
904
   FcPatternEqual -- Compare patterns
797
905
   FcPatternEqualSubset -- Compare portions of patterns
803
911
   FcPatternGet-Type -- Return a typed value from a pattern
804
912
   FcPatternBuild -- Create patterns from arguments
805
913
   FcPatternDel -- Delete a property from a pattern
806
 
   FcPatternRemove -- Remove one object of the specified type
807
 
          from the pattern
 
914
   FcPatternRemove -- Remove one object of the specified type from
 
915
          the pattern
808
916
 
809
917
   FcPatternPrint -- Print a pattern for debugging
810
918
   FcDefaultSubstitute -- Perform default substitutions in a
837
945
 
838
946
Version
839
947
 
840
 
   Fontconfig version 2.4.2
 
948
   Fontconfig version 2.5.0
 
949
 
 
950
FcPatternDuplicate
 
951
 
 
952
Name
 
953
 
 
954
   FcPatternDuplicate -- Copy a pattern
 
955
 
 
956
Synopsis
 
957
 
 
958
#include <fontconfig.h>
 
959
 
 
960
   FcPattern * FcPatternDuplicate(FcPattern *p);
 
961
 
 
962
Description
 
963
 
 
964
   Copy a pattern, returning a new pattern that matches p. Each
 
965
   pattern may be modified without affecting the other.
 
966
 
 
967
Version
 
968
 
 
969
   Fontconfig version 2.5.0
 
970
 
 
971
FcPatternReference
 
972
 
 
973
Name
 
974
 
 
975
   FcPatternReference -- Increment pattern reference count
 
976
 
 
977
Synopsis
 
978
 
 
979
#include <fontconfig.h>
 
980
 
 
981
   void FcPatternReference(FcPattern *p);
 
982
 
 
983
Description
 
984
 
 
985
   Add another reference to p. Patterns are freed only when the
 
986
   reference count reaches zero.
 
987
 
 
988
Version
 
989
 
 
990
   Fontconfig version 2.5.0
841
991
 
842
992
FcPatternDestroy
843
993
 
853
1003
 
854
1004
Description
855
1005
 
856
 
   Destroys a pattern, in the process destroying all related
857
 
   values.
 
1006
   Decrement the pattern reference count. If all references are
 
1007
   gone, destroys the pattern, in the process destroying all
 
1008
   related values.
858
1009
 
859
1010
Version
860
1011
 
861
 
   Fontconfig version 2.4.2
 
1012
   Fontconfig version 2.5.0
862
1013
 
863
1014
FcPatternEqual
864
1015
 
879
1030
 
880
1031
Version
881
1032
 
882
 
   Fontconfig version 2.4.2
 
1033
   Fontconfig version 2.5.0
883
1034
 
884
1035
FcPatternEqualSubset
885
1036
 
901
1052
 
902
1053
Version
903
1054
 
904
 
   Fontconfig version 2.4.2
 
1055
   Fontconfig version 2.5.0
905
1056
 
906
1057
FcPatternHash
907
1058
 
922
1073
 
923
1074
Version
924
1075
 
925
 
   Fontconfig version 2.4.2
 
1076
   Fontconfig version 2.5.0
926
1077
 
927
1078
FcPatternAdd
928
1079
 
941
1092
 
942
1093
   Adds a single value to the list of values associated with the
943
1094
   property named `object. If `append is FcTrue, the value is
944
 
   added at the end of any existing list, otherwise it is
945
 
   inserted at the begining. `value' is saved (with FcValueSave)
946
 
   when inserted into the pattern so that the library retains no
 
1095
   added at the end of any existing list, otherwise it is inserted
 
1096
   at the begining. `value' is saved (with FcValueSave) when
 
1097
   inserted into the pattern so that the library retains no
947
1098
   reference to any application-supplied data structure.
948
1099
 
949
1100
Version
950
1101
 
951
 
   Fontconfig version 2.4.2
 
1102
   Fontconfig version 2.5.0
952
1103
 
953
1104
FcPatternAddWeak
954
1105
 
965
1116
 
966
1117
Description
967
1118
 
968
 
   FcPatternAddWeak is essentially the same as FcPatternAdd
969
 
   except that any values added to the list have binding weak
970
 
   instead of strong.
 
1119
   FcPatternAddWeak is essentially the same as FcPatternAdd except
 
1120
   that any values added to the list have binding weak instead of
 
1121
   strong.
971
1122
 
972
1123
Version
973
1124
 
974
 
   Fontconfig version 2.4.2
 
1125
   Fontconfig version 2.5.0
975
1126
 
976
1127
FcPatternAdd-Type
977
1128
 
978
1129
Name
979
1130
 
980
1131
   FcPatternAddInteger, FcPatternAddDouble, FcPatternAddString,
981
 
   FcPatternAddMatrix, FcPatternAddCharSet,
982
 
   FcPatternAddBool -- Add a typed value to a pattern
 
1132
   FcPatternAddMatrix, FcPatternAddCharSet, FcPatternAddBool,
 
1133
   FcPatternAddFTFace, FcPatternAddLangSet -- Add a typed value to
 
1134
   a pattern
983
1135
 
984
1136
Synopsis
985
1137
 
992
1144
   double d);
993
1145
 
994
1146
   FcBool FcPatternAddString(FcPattern *p, const char *object,
995
 
   const char *s);
 
1147
   const FcChar8 *s);
996
1148
 
997
1149
   FcBool FcPatternAddMatrix(FcPattern *p, const char *object,
998
1150
   const FcMatrix *m);
1003
1155
   FcBool FcPatternAddBool(FcPattern *p, const char *object,
1004
1156
   FcBool b);
1005
1157
 
 
1158
   FcBool FcPatternAddFTFace(FcPattern *p, const char *object,
 
1159
   const FT_Facef);
 
1160
 
 
1161
   FcBool FcPatternAddLangSet(FcPattern *p, const char *object,
 
1162
   const FcLangSet *l);
 
1163
 
1006
1164
Description
1007
1165
 
1008
1166
   These are all convenience functions that insert objects of the
1012
1170
 
1013
1171
Version
1014
1172
 
1015
 
   Fontconfig version 2.4.2
 
1173
   Fontconfig version 2.5.0
1016
1174
 
1017
1175
FcPatternGet
1018
1176
 
1024
1182
 
1025
1183
#include <fontconfig.h>
1026
1184
 
1027
 
   FcResult FcPatternGet(FcPattern *p, const char *object, int
1028
 
   id, FcValue *v);
 
1185
   FcResult FcPatternGet(FcPattern *p, const char *object, int id,
 
1186
   FcValue *v);
1029
1187
 
1030
1188
Description
1031
1189
 
1036
1194
 
1037
1195
Version
1038
1196
 
1039
 
   Fontconfig version 2.4.2
 
1197
   Fontconfig version 2.5.0
1040
1198
 
1041
1199
FcPatternGet-Type
1042
1200
 
1043
1201
Name
1044
1202
 
1045
1203
   FcPatternGetInteger, FcPatternGetDouble, FcPatternGetString,
1046
 
   FcPatternGetMatrix, FcPatternGetCharSet,
1047
 
   FcPatternGetBool -- Return a typed value from a pattern
 
1204
   FcPatternGetMatrix, FcPatternGetCharSet, FcPatternGetBool,
 
1205
   FcPatternGetFTFace, FcPatternGetLangSet -- Return a typed value
 
1206
   from a pattern
1048
1207
 
1049
1208
Synopsis
1050
1209
 
1057
1216
   int n, double *d);
1058
1217
 
1059
1218
   FcResult FcPatternGetString(FcPattern *p, const char *object,
1060
 
   int n, char **consts);
 
1219
   int n, FcChar8 **s);
1061
1220
 
1062
1221
   FcResult FcPatternGetMatrix(FcPattern *p, const char *object,
1063
1222
   int n, FcMatrix **s);
1065
1224
   FcResult FcPatternGetCharSet(FcPattern *p, const char *object,
1066
1225
   int n, FcCharSet **c);
1067
1226
 
1068
 
   FcResult FcPatternGetBool(FcPattern *p, const char *object,
1069
 
   int n, FcBool *b);
 
1227
   FcResult FcPatternGetBool(FcPattern *p, const char *object, int
 
1228
   n, FcBool *b);
 
1229
 
 
1230
   FcBool FcPatternGetFTFace(FcPattern *p, const char *object,
 
1231
   const FT_Face *f);
 
1232
 
 
1233
   FcBool FcPatternGetLangSet(FcPattern *p, const char *object,
 
1234
   const FcLangSet **l);
1070
1235
 
1071
1236
Description
1072
1237
 
1080
1245
 
1081
1246
Version
1082
1247
 
1083
 
   Fontconfig version 2.4.2
 
1248
   Fontconfig version 2.5.0
1084
1249
 
1085
1250
FcPatternBuild
1086
1251
 
1087
1252
Name
1088
1253
 
1089
 
   FcPatternBuild, FcPatternVaBuild -- Create patterns from
1090
 
   arguments
 
1254
   FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild -- Create
 
1255
   patterns from arguments
1091
1256
 
1092
1257
Synopsis
1093
1258
 
1097
1262
 
1098
1263
   FcPattern * FcPatternVaBuild(FcPattern *orig, va_list va);
1099
1264
 
 
1265
   void FcPatternVapBuild(FcPattern *result, FcPattern *orig,
 
1266
   va_list va);
 
1267
 
1100
1268
Description
1101
1269
 
1102
1270
   Builds a pattern using a list of objects, types and values.
1103
 
   Each value to be entered in the pattern is specified with
1104
 
   three arguments:
 
1271
   Each value to be entered in the pattern is specified with three
 
1272
   arguments:
1105
1273
 
1106
1274
    1. Object name, a string describing the property to be added.
1107
1275
    2. Object type, one of the FcType enumerated values
1108
 
    3. Value, not an FcValue, but the raw type as passed to any
1109
 
       of the FcPatternAdd<type> functions. Must match the type
1110
 
       of the second argument.
 
1276
    3. Value, not an FcValue, but the raw type as passed to any of
 
1277
       the FcPatternAdd<type> functions. Must match the type of
 
1278
       the second argument.
1111
1279
 
1112
1280
   The argument list is terminated by a null object name, no
1113
1281
   object type nor value need be passed for this. The values are
1114
1282
   added to `pattern', if `pattern' is null, a new pattern is
1115
1283
   created. In either case, the pattern is returned. Example
1116
1284
pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *)
1117
 
 0);
 
1285
0);
1118
1286
 
1119
1287
   FcPatternVaBuild is used when the arguments are already in the
1120
 
   form of a varargs value.
 
1288
   form of a varargs value. FcPatternVapBuild is a macro version
 
1289
   of FcPatternVaBuild which returns its result directly in the
 
1290
   result variable.
1121
1291
 
1122
1292
Version
1123
1293
 
1124
 
   Fontconfig version 2.4.2
 
1294
   Fontconfig version 2.5.0
1125
1295
 
1126
1296
FcPatternDel
1127
1297
 
1142
1312
 
1143
1313
Version
1144
1314
 
1145
 
   Fontconfig version 2.4.2
 
1315
   Fontconfig version 2.5.0
1146
1316
 
1147
1317
FcPatternRemove
1148
1318
 
1149
1319
Name
1150
1320
 
1151
 
   FcPatternRemove -- Remove one object of the specified type
1152
 
   from the pattern
 
1321
   FcPatternRemove -- Remove one object of the specified type from
 
1322
   the pattern
1153
1323
 
1154
1324
Synopsis
1155
1325
 
1161
1331
Description
1162
1332
 
1163
1333
   Removes the value associated with the property `object' at
1164
 
   position `id', returning whether the property existed and had
1165
 
   a value at that position or not.
 
1334
   position `id', returning whether the property existed and had a
 
1335
   value at that position or not.
1166
1336
 
1167
1337
Version
1168
1338
 
1169
 
   Fontconfig version 2.4.2
 
1339
   Fontconfig version 2.5.0
1170
1340
 
1171
1341
FcPatternPrint
1172
1342
 
1188
1358
 
1189
1359
Version
1190
1360
 
1191
 
   Fontconfig version 2.4.2
 
1361
   Fontconfig version 2.5.0
1192
1362
 
1193
1363
FcDefaultSubstitute
1194
1364
 
1217
1387
 
1218
1388
Version
1219
1389
 
1220
 
   Fontconfig version 2.4.2
 
1390
   Fontconfig version 2.5.0
1221
1391
 
1222
1392
FcNameParse
1223
1393
 
1229
1399
 
1230
1400
#include <fontconfig.h>
1231
1401
 
1232
 
   FcPattern * FcNameParse(const char *name);
 
1402
   FcPattern * FcNameParse(const FcChar8 *name);
1233
1403
 
1234
1404
Description
1235
1405
 
1238
1408
 
1239
1409
Version
1240
1410
 
1241
 
   Fontconfig version 2.4.2
 
1411
   Fontconfig version 2.5.0
1242
1412
 
1243
1413
FcNameUnparse
1244
1414
 
1262
1432
 
1263
1433
Version
1264
1434
 
1265
 
   Fontconfig version 2.4.2
1266
 
     _________________________________________________________
 
1435
   Fontconfig version 2.5.0
 
1436
     __________________________________________________________
1267
1437
 
1268
1438
4.3. FcFontSet
1269
1439
 
1271
1441
   FcFontSetCreate -- Create a font set
1272
1442
   FcFontSetDestroy -- Destroy a font set
1273
1443
   FcFontSetAdd -- Add to a font set
 
1444
   FcFontSetList -- List fonts from a set of font sets
 
1445
   FcFontSetMatch -- Return the best font from a set of font sets
 
1446
   FcFontSetPrint -- Print a set of patterns to stdout
 
1447
   FcFontSetSort -- Add to a font set
 
1448
   FcFontSetSortDestroy -- DEPRECATED destroy a font set
1274
1449
 
1275
 
   An FcFontSet simply holds a list of patterns; these are used
1276
 
   to return the results of listing available fonts.
 
1450
   An FcFontSet simply holds a list of patterns; these are used to
 
1451
   return the results of listing available fonts.
1277
1452
 
1278
1453
FcFontSetCreate
1279
1454
 
1293
1468
 
1294
1469
Version
1295
1470
 
1296
 
   Fontconfig version 2.4.2
 
1471
   Fontconfig version 2.5.0
1297
1472
 
1298
1473
FcFontSetDestroy
1299
1474
 
1314
1489
 
1315
1490
Version
1316
1491
 
1317
 
   Fontconfig version 2.4.2
 
1492
   Fontconfig version 2.5.0
1318
1493
 
1319
1494
FcFontSetAdd
1320
1495
 
1331
1506
Description
1332
1507
 
1333
1508
   Adds a pattern to a font set. Note that the pattern is not
1334
 
   copied before being inserted into the set.
1335
 
 
1336
 
Version
1337
 
 
1338
 
   Fontconfig version 2.4.2
1339
 
     _________________________________________________________
 
1509
   copied before being inserted into the set. Returns FcFalse if
 
1510
   the pattern cannot be inserted into the set (due to allocation
 
1511
   failure). Otherwise returns FcTrue.
 
1512
 
 
1513
Version
 
1514
 
 
1515
   Fontconfig version 2.5.0
 
1516
 
 
1517
FcFontSetList
 
1518
 
 
1519
Name
 
1520
 
 
1521
   FcFontSetList -- List fonts from a set of font sets
 
1522
 
 
1523
Synopsis
 
1524
 
 
1525
#include <fontconfig.h>
 
1526
 
 
1527
   FcFontSet * FcFontSetList(FcConfig *config, FcFontSet **sets,
 
1528
   intnsets, FcPattern *pattern, FcObjectSet *object_set);
 
1529
 
 
1530
Description
 
1531
 
 
1532
   Selects fonts matching pattern from sets, creates patterns from
 
1533
   those fonts containing only the objects in object_set and
 
1534
   returns the set of unique such patterns.
 
1535
 
 
1536
Version
 
1537
 
 
1538
   Fontconfig version 2.5.0
 
1539
 
 
1540
FcFontSetMatch
 
1541
 
 
1542
Name
 
1543
 
 
1544
   FcFontSetMatch -- Return the best font from a set of font sets
 
1545
 
 
1546
Synopsis
 
1547
 
 
1548
#include <fontconfig.h>
 
1549
 
 
1550
   FcPattern * FcFontSetMatch(FcConfig *config, FcFontSet **sets,
 
1551
   intnsets, FcPattern *pattern, FcResult *result);
 
1552
 
 
1553
Description
 
1554
 
 
1555
   Finds the font in sets most closely matching pattern and
 
1556
   returns the result of FcFontRenderPrepare for that font and the
 
1557
   provided pattern. This function should be called only after
 
1558
   FcConfigSubstitute and FcDefaultSubstitute have been called for
 
1559
   pattern; otherwise the results will not be correct. Returns
 
1560
   NULL if an error occurs during this process.
 
1561
 
 
1562
Version
 
1563
 
 
1564
   Fontconfig version 2.5.0
 
1565
 
 
1566
FcFontSetPrint
 
1567
 
 
1568
Name
 
1569
 
 
1570
   FcFontSetPrint -- Print a set of patterns to stdout
 
1571
 
 
1572
Synopsis
 
1573
 
 
1574
#include <fontconfig.h>
 
1575
 
 
1576
   void FcFontSetPrint(FcFontSet *set);
 
1577
 
 
1578
Description
 
1579
 
 
1580
   This function is useful for diagnosing font related issues,
 
1581
   printing the complete contents of every pattern in set. The
 
1582
   format of the output is designed to be of help to users and
 
1583
   developers, and may change at any time.
 
1584
 
 
1585
Version
 
1586
 
 
1587
   Fontconfig version 2.5.0
 
1588
 
 
1589
FcFontSetSort
 
1590
 
 
1591
Name
 
1592
 
 
1593
   FcFontSetSort -- Add to a font set
 
1594
 
 
1595
Synopsis
 
1596
 
 
1597
#include <fontconfig.h>
 
1598
 
 
1599
   FcFontSetSort(FcConfig *config, FcFontSet **sets, intnsets,
 
1600
   FcPattern *pattern, FcBool trim, FcCharSet **csp, FcResult
 
1601
   *result);
 
1602
 
 
1603
Description
 
1604
 
 
1605
   Returns the list of fonts from sets sorted by closeness to
 
1606
   pattern. If trim is FcTrue, elements in the list which don't
 
1607
   include Unicode coverage not provided by earlier elements in
 
1608
   the list are elided. The union of Unicode coverage of all of
 
1609
   the fonts is returned in csp, if csp is not NULL. This function
 
1610
   should be called only after FcConfigSubstitute and
 
1611
   FcDefaultSubstitute have been called for p; otherwise the
 
1612
   results will not be correct.
 
1613
 
 
1614
   The returned FcFontSet references FcPattern structures which
 
1615
   may be shared by the return value from multiple FcFontSort
 
1616
   calls, applications cannot modify these patterns. Instead, they
 
1617
   should be passed, along with pattern to FcFontRenderPrepare
 
1618
   which combines them into a complete pattern.
 
1619
 
 
1620
   The FcFontSet returned by FcFontSetSort is destroyed by caling
 
1621
   FcFontSetDestroy.
 
1622
 
 
1623
Version
 
1624
 
 
1625
   Fontconfig version 2.5.0
 
1626
 
 
1627
FcFontSetSortDestroy
 
1628
 
 
1629
Name
 
1630
 
 
1631
   FcFontSetSortDestroy -- DEPRECATED destroy a font set
 
1632
 
 
1633
Synopsis
 
1634
 
 
1635
#include <fontconfig.h>
 
1636
 
 
1637
   FcFontSetSortDestroy(FcFontSet *set);
 
1638
 
 
1639
Description
 
1640
 
 
1641
   This function is DEPRECATED. FcFontSetSortDestroy destroys set
 
1642
   by calling FcFontSetDestroy. Applications should use
 
1643
   FcFontSetDestroy directly instead.
 
1644
 
 
1645
Version
 
1646
 
 
1647
   Fontconfig version 2.5.0
 
1648
     __________________________________________________________
1340
1649
 
1341
1650
4.4. FcObjectSet
1342
1651
 
1368
1677
 
1369
1678
Version
1370
1679
 
1371
 
   Fontconfig version 2.4.2
 
1680
   Fontconfig version 2.5.0
1372
1681
 
1373
1682
FcObjectSetAdd
1374
1683
 
1384
1693
 
1385
1694
Description
1386
1695
 
1387
 
   Adds a proprety name to the set.
 
1696
   Adds a proprety name to the set. Returns FcFalse if the
 
1697
   property name cannot be inserted into the set (due to
 
1698
   allocation failure). Otherwise returns FcTrue.
1388
1699
 
1389
1700
Version
1390
1701
 
1391
 
   Fontconfig version 2.4.2
 
1702
   Fontconfig version 2.5.0
1392
1703
 
1393
1704
FcObjectSetDestroy
1394
1705
 
1408
1719
 
1409
1720
Version
1410
1721
 
1411
 
   Fontconfig version 2.4.2
 
1722
   Fontconfig version 2.5.0
1412
1723
 
1413
1724
FcObjectSetBuild
1414
1725
 
1415
1726
Name
1416
1727
 
1417
 
   FcObjectSetBuild, FcObjectSetVaBuild -- Build object set from
1418
 
   args
 
1728
   FcObjectSetBuild, FcObjectSetVaBuild,
 
1729
   FcObjectSetVapBuild -- Build object set from args
1419
1730
 
1420
1731
Synopsis
1421
1732
 
1426
1737
   FcObjectSet * FcObjectSetVaBuild(const char *first, va_list
1427
1738
   va);
1428
1739
 
 
1740
   void FcObjectSetVapBuild(FcObjectSet *result, const char
 
1741
   *first, va_list va);
 
1742
 
1429
1743
Description
1430
1744
 
1431
1745
   These build an object set from a null-terminated list of
1432
 
   property names.
 
1746
   property names. FcObjectSetVapBuild is a macro version of
 
1747
   FcObjectSetVaBuild which returns the result in the result
 
1748
   variable directly.
1433
1749
 
1434
1750
Version
1435
1751
 
1436
 
   Fontconfig version 2.4.2
1437
 
     _________________________________________________________
 
1752
   Fontconfig version 2.5.0
 
1753
     __________________________________________________________
1438
1754
 
1439
1755
4.5. FreeType specific functions
1440
1756
 
1441
1757
   Table of Contents
1442
1758
   FcFreeTypeCharIndex -- map Unicode to glyph id
1443
1759
   FcFreeTypeCharSet -- compute unicode coverage
 
1760
   FcFreeTypeCharSetAndSpacing -- compute unicode coverage and
 
1761
          spacing type
 
1762
 
1444
1763
   FcFreeTypeQuery -- compute pattern from font file (and index)
1445
1764
   FcFreeTypeQueryFace -- compute pattern from FT_Face
1446
1765
 
1464
1783
Description
1465
1784
 
1466
1785
   Maps a Unicode char to a glyph index. This function uses
1467
 
   information from several possible underlying encoding tables
1468
 
   to work around broken fonts. As a result, this function isn't
 
1786
   information from several possible underlying encoding tables to
 
1787
   work around broken fonts. As a result, this function isn't
1469
1788
   designed to be used in performance sensitive areas; results
1470
1789
   from this function are intended to be cached by higher level
1471
1790
   functions.
1472
1791
 
1473
1792
Version
1474
1793
 
1475
 
   Fontconfig version 2.4.2
 
1794
   Fontconfig version 2.5.0
1476
1795
 
1477
1796
FcFreeTypeCharSet
1478
1797
 
1497
1816
 
1498
1817
Version
1499
1818
 
1500
 
   Fontconfig version 2.4.2
 
1819
   Fontconfig version 2.5.0
 
1820
 
 
1821
FcFreeTypeCharSetAndSpacing
 
1822
 
 
1823
Name
 
1824
 
 
1825
   FcFreeTypeCharSetAndSpacing -- compute unicode coverage and
 
1826
   spacing type
 
1827
 
 
1828
Synopsis
 
1829
 
 
1830
#include <fontconfig.h>
 
1831
#include <fcfreetype.h>
 
1832
 
 
1833
   FcCharSet * FcFreeTypeCharSetAndSpacing(FT_Face face, FcBlanks
 
1834
   *blanks, int *spacing);
 
1835
 
 
1836
Description
 
1837
 
 
1838
   Scans a FreeType face and returns the set of encoded Unicode
 
1839
   chars. This scans several encoding tables to build as complete
 
1840
   a list as possible. If 'blanks' is not 0, the glyphs in the
 
1841
   font are examined and any blank glyphs not in 'blanks' are not
 
1842
   placed in the returned FcCharSet. spacing receives the computed
 
1843
   spacing type of the font, one of FC_MONO for a font where all
 
1844
   glyphs have the same width, FC_DUAL, where the font has glyphs
 
1845
   in precisely two widths, one twice as wide as the other, or
 
1846
   FC_PROPORTIONAL where the font has glyphs of many widths.
 
1847
 
 
1848
Version
 
1849
 
 
1850
   Fontconfig version 2.5.0
1501
1851
 
1502
1852
FcFreeTypeQuery
1503
1853
 
1510
1860
#include <fontconfig.h>
1511
1861
#include <fcfreetype.h>
1512
1862
 
1513
 
   FcPattern * FcFreeTypeQuery(const char *file, int id, FcBlanks
1514
 
   *blanks, int *count);
 
1863
   FcPattern * FcFreeTypeQuery(const FcChar8 *file, int id,
 
1864
   FcBlanks *blanks, int *count);
1515
1865
 
1516
1866
Description
1517
1867
 
1520
1870
 
1521
1871
Version
1522
1872
 
1523
 
   Fontconfig version 2.4.2
 
1873
   Fontconfig version 2.5.0
1524
1874
 
1525
1875
FcFreeTypeQueryFace
1526
1876
 
1533
1883
#include <fontconfig.h>
1534
1884
#include <fcfreetype.h>
1535
1885
 
1536
 
   FcPattern * FcFreeTypeQueryFace(const FT_Face face, const char
1537
 
   *file, int id, FcBlanks *blanks);
 
1886
   FcPattern * FcFreeTypeQueryFace(const FT_Face face, const
 
1887
   FcChar8 *file, int id, FcBlanks *blanks);
1538
1888
 
1539
1889
Description
1540
1890
 
1541
1891
   Constructs a pattern representing 'face'. 'file' and 'id' are
1542
 
   used solely as data for pattern elements (FC_FILE, FC_INDEX
1543
 
   and sometimes FC_FAMILY).
 
1892
   used solely as data for pattern elements (FC_FILE, FC_INDEX and
 
1893
   sometimes FC_FAMILY).
1544
1894
 
1545
1895
Version
1546
1896
 
1547
 
   Fontconfig version 2.4.2
1548
 
     _________________________________________________________
 
1897
   Fontconfig version 2.5.0
 
1898
     __________________________________________________________
1549
1899
 
1550
1900
4.6. FcValue
1551
1901
 
1552
1902
   Table of Contents
1553
1903
   FcValueDestroy -- Free a value
1554
1904
   FcValueSave -- Copy a value
 
1905
   FcValuePrint -- Print a value to stdout
 
1906
   FcValueEqual -- Test two values for equality
1555
1907
 
1556
 
   FcValue is a structure containing a type tag and a union of
1557
 
   all possible datatypes. The tag is an enum of type FcType and
1558
 
   is intended to provide a measure of run-time typechecking,
 
1908
   FcValue is a structure containing a type tag and a union of all
 
1909
   possible datatypes. The tag is an enum of type FcType and is
 
1910
   intended to provide a measure of run-time typechecking,
1559
1911
   although that depends on careful programming.
1560
1912
 
1561
1913
FcValueDestroy
1578
1930
 
1579
1931
Version
1580
1932
 
1581
 
   Fontconfig version 2.4.2
 
1933
   Fontconfig version 2.5.0
1582
1934
 
1583
1935
FcValueSave
1584
1936
 
1599
1951
 
1600
1952
Version
1601
1953
 
1602
 
   Fontconfig version 2.4.2
1603
 
     _________________________________________________________
 
1954
   Fontconfig version 2.5.0
 
1955
 
 
1956
FcValuePrint
 
1957
 
 
1958
Name
 
1959
 
 
1960
   FcValuePrint -- Print a value to stdout
 
1961
 
 
1962
Synopsis
 
1963
 
 
1964
#include <fontconfig.h>
 
1965
 
 
1966
   void FcValuePrint(FcValue v);
 
1967
 
 
1968
Description
 
1969
 
 
1970
   Prints a human-readable representation of v to stdout. The
 
1971
   format should not be considered part of the library
 
1972
   specification as it may change in the future.
 
1973
 
 
1974
Version
 
1975
 
 
1976
   Fontconfig version 2.5.0
 
1977
 
 
1978
FcValueEqual
 
1979
 
 
1980
Name
 
1981
 
 
1982
   FcValueEqual -- Test two values for equality
 
1983
 
 
1984
Synopsis
 
1985
 
 
1986
#include <fontconfig.h>
 
1987
 
 
1988
   FcBool FcValueEqual(FcValue v_a, FcValue v_b);
 
1989
 
 
1990
Description
 
1991
 
 
1992
   Compares two values. Integers and Doubles are compared as
 
1993
   numbers; otherwise the two values have to be the same type to
 
1994
   be considered equal. Strings are compared ignoring case.
 
1995
 
 
1996
Version
 
1997
 
 
1998
   Fontconfig version 2.5.0
 
1999
     __________________________________________________________
1604
2000
 
1605
2001
4.7. FcCharSet
1606
2002
 
1620
2016
   FcCharSetIsSubset -- Test for charset inclusion
1621
2017
   FcCharSetFirstPage -- Start enumerating charset contents
1622
2018
   FcCharSetNextPage -- Continue enumerating charset contents
 
2019
   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
 
2020
          page
 
2021
 
 
2022
   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
1623
2023
 
1624
2024
   An FcCharSet is a boolean array indicating a set of unicode
1625
2025
   chars. Those associated with a font are marked constant and
1626
2026
   cannot be edited. FcCharSets may be reference counted
1627
 
   internally to reduce memory consumption; this may be visible
1628
 
   to applications as the result of FcCharSetCopy may return it's
 
2027
   internally to reduce memory consumption; this may be visible to
 
2028
   applications as the result of FcCharSetCopy may return it's
1629
2029
   argument, and that CharSet may remain unmodifiable.
1630
2030
 
1631
2031
FcCharSetCreate
1642
2042
 
1643
2043
Description
1644
2044
 
1645
 
   FcCharSetCreate allocates and initializes a new empty
1646
 
   character set object.
 
2045
   FcCharSetCreate allocates and initializes a new empty character
 
2046
   set object.
1647
2047
 
1648
2048
Version
1649
2049
 
1650
 
   Fontconfig version 2.4.2
 
2050
   Fontconfig version 2.5.0
1651
2051
 
1652
2052
FcCharSetDestroy
1653
2053
 
1668
2068
 
1669
2069
Version
1670
2070
 
1671
 
   Fontconfig version 2.4.2
 
2071
   Fontconfig version 2.5.0
1672
2072
 
1673
2073
FcCharSetAddChar
1674
2074
 
1690
2090
 
1691
2091
Version
1692
2092
 
1693
 
   Fontconfig version 2.4.2
 
2093
   Fontconfig version 2.5.0
1694
2094
 
1695
2095
FcCharSetCopy
1696
2096
 
1711
2111
 
1712
2112
Version
1713
2113
 
1714
 
   Fontconfig version 2.4.2
 
2114
   Fontconfig version 2.5.0
1715
2115
 
1716
2116
FcCharSetEqual
1717
2117
 
1731
2131
 
1732
2132
Version
1733
2133
 
1734
 
   Fontconfig version 2.4.2
 
2134
   Fontconfig version 2.5.0
1735
2135
 
1736
2136
FcCharSetIntersect
1737
2137
 
1748
2148
 
1749
2149
Description
1750
2150
 
1751
 
   Returns a set including only those chars found in both a and
1752
 
   b.
 
2151
   Returns a set including only those chars found in both a and b.
1753
2152
 
1754
2153
Version
1755
2154
 
1756
 
   Fontconfig version 2.4.2
 
2155
   Fontconfig version 2.5.0
1757
2156
 
1758
2157
FcCharSetUnion
1759
2158
 
1775
2174
 
1776
2175
Version
1777
2176
 
1778
 
   Fontconfig version 2.4.2
 
2177
   Fontconfig version 2.5.0
1779
2178
 
1780
2179
FcCharSetSubtract
1781
2180
 
1796
2195
 
1797
2196
Version
1798
2197
 
1799
 
   Fontconfig version 2.4.2
 
2198
   Fontconfig version 2.5.0
1800
2199
 
1801
2200
FcCharSetHasChar
1802
2201
 
1816
2215
 
1817
2216
Version
1818
2217
 
1819
 
   Fontconfig version 2.4.2
 
2218
   Fontconfig version 2.5.0
1820
2219
 
1821
2220
FcCharSetCount
1822
2221
 
1836
2235
 
1837
2236
Version
1838
2237
 
1839
 
   Fontconfig version 2.4.2
 
2238
   Fontconfig version 2.5.0
1840
2239
 
1841
2240
FcCharSetIntersectCount
1842
2241
 
1857
2256
 
1858
2257
Version
1859
2258
 
1860
 
   Fontconfig version 2.4.2
 
2259
   Fontconfig version 2.5.0
1861
2260
 
1862
2261
FcCharSetSubtractCount
1863
2262
 
1878
2277
 
1879
2278
Version
1880
2279
 
1881
 
   Fontconfig version 2.4.2
 
2280
   Fontconfig version 2.5.0
1882
2281
 
1883
2282
FcCharSetIsSubset
1884
2283
 
1899
2298
 
1900
2299
Version
1901
2300
 
1902
 
   Fontconfig version 2.4.2
 
2301
   Fontconfig version 2.5.0
1903
2302
 
1904
2303
FcCharSetFirstPage
1905
2304
 
1917
2316
Description
1918
2317
 
1919
2318
   Builds an array of bits marking the first page of Unicode
1920
 
   coverage of a. Returns the base of the array. next contains
1921
 
   the next page in the font.
 
2319
   coverage of a. Returns the base of the array. next contains the
 
2320
   next page in the font.
1922
2321
 
1923
2322
Version
1924
2323
 
1925
 
   Fontconfig version 2.4.2
 
2324
   Fontconfig version 2.5.0
1926
2325
 
1927
2326
FcCharSetNextPage
1928
2327
 
1945
2344
 
1946
2345
Version
1947
2346
 
1948
 
   Fontconfig version 2.4.2
1949
 
     _________________________________________________________
1950
 
 
1951
 
4.8. FcMatrix
 
2347
   Fontconfig version 2.5.0
 
2348
 
 
2349
FcCharSetCoverage
 
2350
 
 
2351
Name
 
2352
 
 
2353
   FcCharSetCoverage -- DEPRECATED return coverage for a Unicode
 
2354
   page
 
2355
 
 
2356
Synopsis
 
2357
 
 
2358
#include <fontconfig.h>
 
2359
 
 
2360
   FcChar32 FcCharSetCoverage(const FcCharSet *a, FcChar32page,
 
2361
   FcChar32[8]result);
 
2362
 
 
2363
Description
 
2364
 
 
2365
   DEPRECATED This function returns a bitmask in result which
 
2366
   indicates which code points in page are included in a.
 
2367
   FcCharSetCoverage returns the next page in the charset which
 
2368
   has any coverage.
 
2369
 
 
2370
Version
 
2371
 
 
2372
   Fontconfig version 2.5.0
 
2373
 
 
2374
FcCharSetNew
 
2375
 
 
2376
Name
 
2377
 
 
2378
   FcCharSetNew -- DEPRECATED alias for FcCharSetCreate
 
2379
 
 
2380
Synopsis
 
2381
 
 
2382
#include <fontconfig.h>
 
2383
 
 
2384
   FcCharSet * FcCharSetNew(void);
 
2385
 
 
2386
Description
 
2387
 
 
2388
   FcCharSetNew is a DEPRECATED alias for FcCharSetCreate.
 
2389
 
 
2390
Version
 
2391
 
 
2392
   Fontconfig version 2.5.0
 
2393
     __________________________________________________________
 
2394
 
 
2395
4.8. FcLangSet
 
2396
 
 
2397
   Table of Contents
 
2398
   FcLangSetCreate -- create a langset object
 
2399
   FcLangSetDestroy -- destroy a langset object
 
2400
   FcLangSetCopy -- copy a langset object
 
2401
   FcLangSetAdd -- add a language to a langset
 
2402
   FcLangSetCompare -- compare language sets
 
2403
   FcLangSetContains -- check langset subset relation
 
2404
   FcLangSetEqual -- test for matching langsets
 
2405
   FcLangSetHash -- return a hash value for a langset
 
2406
   FcLangSetHasLang -- test langset for language support
 
2407
   FcGetLangs -- Get list of languages
 
2408
   FcLangGetCharSet -- Get character map for a language
 
2409
 
 
2410
   An FcLangSet is a set of language names (each of which include
 
2411
   language and an optional territory). They are used when
 
2412
   selecting fonts to indicate which languages the fonts need to
 
2413
   support. Each font is marked, using language orthography
 
2414
   information built into fontconfig, with the set of supported
 
2415
   languages.
 
2416
 
 
2417
FcLangSetCreate
 
2418
 
 
2419
Name
 
2420
 
 
2421
   FcLangSetCreate -- create a langset object
 
2422
 
 
2423
Synopsis
 
2424
 
 
2425
#include <fontconfig.h>
 
2426
 
 
2427
   FcLangSet * FcLangSetCreate(void);
 
2428
 
 
2429
Description
 
2430
 
 
2431
   FcLangSetCreate creates a new FcLangSet object.
 
2432
 
 
2433
Version
 
2434
 
 
2435
   Fontconfig version 2.5.0
 
2436
 
 
2437
FcLangSetDestroy
 
2438
 
 
2439
Name
 
2440
 
 
2441
   FcLangSetDestroy -- destroy a langset object
 
2442
 
 
2443
Synopsis
 
2444
 
 
2445
#include <fontconfig.h>
 
2446
 
 
2447
   void FcLangSetDestroy(FcLangSet *ls);
 
2448
 
 
2449
Description
 
2450
 
 
2451
   FcLangSetDestroy destroys a FcLangSet object, freeing all
 
2452
   memory associated with it.
 
2453
 
 
2454
Version
 
2455
 
 
2456
   Fontconfig version 2.5.0
 
2457
 
 
2458
FcLangSetCopy
 
2459
 
 
2460
Name
 
2461
 
 
2462
   FcLangSetCopy -- copy a langset object
 
2463
 
 
2464
Synopsis
 
2465
 
 
2466
#include <fontconfig.h>
 
2467
 
 
2468
   FcLangSet * FcLangSetCopy(const FcLangSet *ls);
 
2469
 
 
2470
Description
 
2471
 
 
2472
   FcLangSetCopy creates a new FcLangSet object and populates it
 
2473
   with the contents of ls.
 
2474
 
 
2475
Version
 
2476
 
 
2477
   Fontconfig version 2.5.0
 
2478
 
 
2479
FcLangSetAdd
 
2480
 
 
2481
Name
 
2482
 
 
2483
   FcLangSetAdd -- add a language to a langset
 
2484
 
 
2485
Synopsis
 
2486
 
 
2487
#include <fontconfig.h>
 
2488
 
 
2489
   FcBool FcLangSetAdd(FcLangSet *ls, const FcChar8 *lang);
 
2490
 
 
2491
Description
 
2492
 
 
2493
   lang is added to ls. lang should be of the form Ll-Tt where Ll
 
2494
   is a two or three letter language from ISO 639 and Tt is a
 
2495
   territory from ISO 3166.
 
2496
 
 
2497
Version
 
2498
 
 
2499
   Fontconfig version 2.5.0
 
2500
 
 
2501
FcLangSetCompare
 
2502
 
 
2503
Name
 
2504
 
 
2505
   FcLangSetCompare -- compare language sets
 
2506
 
 
2507
Synopsis
 
2508
 
 
2509
#include <fontconfig.h>
 
2510
 
 
2511
   FcLangResult FcLangSetCompare(const FcLangSet *ls_a, const
 
2512
   FcLangSet *ls_b);
 
2513
 
 
2514
Description
 
2515
 
 
2516
   FcLangSetCompare compares language coverage for ls_a and ls_b.
 
2517
   If they share any language and territory pair, this function
 
2518
   returns FcLangEqual. If they share a language but differ in
 
2519
   which territory that language is for, this function returns
 
2520
   FcLangDiffentTerritory. If they share no languages in common,
 
2521
   this function returns FcLangDifferentLang.
 
2522
 
 
2523
Version
 
2524
 
 
2525
   Fontconfig version 2.5.0
 
2526
 
 
2527
FcLangSetContains
 
2528
 
 
2529
Name
 
2530
 
 
2531
   FcLangSetContains -- check langset subset relation
 
2532
 
 
2533
Synopsis
 
2534
 
 
2535
#include <fontconfig.h>
 
2536
 
 
2537
   FcBool FcLangSetContains(const FcLangSet *ls_a, const FcLangSet
 
2538
   *ls_b);
 
2539
 
 
2540
Description
 
2541
 
 
2542
   FcLangSetContains returns FcTrue if ls_a contains every
 
2543
   language in ls_b. ls_a will 'contain' a language from ls_b if
 
2544
   ls_a has exactly the language, or either the language or ls_a
 
2545
   has no territory.
 
2546
 
 
2547
Version
 
2548
 
 
2549
   Fontconfig version 2.5.0
 
2550
 
 
2551
FcLangSetEqual
 
2552
 
 
2553
Name
 
2554
 
 
2555
   FcLangSetEqual -- test for matching langsets
 
2556
 
 
2557
Synopsis
 
2558
 
 
2559
#include <fontconfig.h>
 
2560
 
 
2561
   FcBool FcLangSetEqual(const FcLangSet *ls_a, const FcLangSet
 
2562
   *ls_b);
 
2563
 
 
2564
Description
 
2565
 
 
2566
   Returns FcTrue if and only if ls_a supports precisely the same
 
2567
   language and territory combinations as ls_b.
 
2568
 
 
2569
Version
 
2570
 
 
2571
   Fontconfig version 2.5.0
 
2572
 
 
2573
FcLangSetHash
 
2574
 
 
2575
Name
 
2576
 
 
2577
   FcLangSetHash -- return a hash value for a langset
 
2578
 
 
2579
Synopsis
 
2580
 
 
2581
#include <fontconfig.h>
 
2582
 
 
2583
   FcChar32 FcLangSetHash(const FcLangSet *ls);
 
2584
 
 
2585
Description
 
2586
 
 
2587
   This function returns a value which depends solely on the
 
2588
   languages supported by ls. Any language which equals ls will
 
2589
   have the same result from FcLangSetHash. However, two langsets
 
2590
   with the same hash value may not be equal.
 
2591
 
 
2592
Version
 
2593
 
 
2594
   Fontconfig version 2.5.0
 
2595
 
 
2596
FcLangSetHasLang
 
2597
 
 
2598
Name
 
2599
 
 
2600
   FcLangSetHasLang -- test langset for language support
 
2601
 
 
2602
Synopsis
 
2603
 
 
2604
#include <fontconfig.h>
 
2605
 
 
2606
   FcLangResult FcLangSetHasLang(const FcLangSet *ls, const
 
2607
   FcChar8 *lang);
 
2608
 
 
2609
Description
 
2610
 
 
2611
   FcLangSetHasLang checks whether ls supports lang. If ls has a
 
2612
   matching language and territory pair, this function returns
 
2613
   FcLangEqual. If ls has a matching language but differs in which
 
2614
   territory that language is for, this function returns
 
2615
   FcLangDiffentTerritory. If ls has no matching language, this
 
2616
   function returns FcLangDifferentLang.
 
2617
 
 
2618
Version
 
2619
 
 
2620
   Fontconfig version 2.5.0
 
2621
 
 
2622
FcGetLangs
 
2623
 
 
2624
Name
 
2625
 
 
2626
   FcGetLangs -- Get list of languages
 
2627
 
 
2628
Synopsis
 
2629
 
 
2630
#include <fontconfig.h>
 
2631
 
 
2632
   FcStrSet * FcGetLangs(void);
 
2633
 
 
2634
Description
 
2635
 
 
2636
   Returns a string set of all known languages.
 
2637
 
 
2638
Version
 
2639
 
 
2640
   Fontconfig version 2.5.0
 
2641
 
 
2642
FcLangGetCharSet
 
2643
 
 
2644
Name
 
2645
 
 
2646
   FcLangGetCharSet -- Get character map for a language
 
2647
 
 
2648
Synopsis
 
2649
 
 
2650
#include <fontconfig.h>
 
2651
 
 
2652
   const FcCharSet * FcLangGetCharSet(const FcChar8 *lang);
 
2653
 
 
2654
Description
 
2655
 
 
2656
   Returns the FcCharMap for a language.
 
2657
 
 
2658
Version
 
2659
 
 
2660
   Fontconfig version 2.5.0
 
2661
     __________________________________________________________
 
2662
 
 
2663
4.9. FcMatrix
1952
2664
 
1953
2665
   Table of Contents
1954
2666
   FcMatrixInit -- initialize an FcMatrix structure
1980
2692
 
1981
2693
Version
1982
2694
 
1983
 
   Fontconfig version 2.4.2
 
2695
   Fontconfig version 2.5.0
1984
2696
 
1985
2697
FcMatrixCopy
1986
2698
 
2000
2712
 
2001
2713
Version
2002
2714
 
2003
 
   Fontconfig version 2.4.2
 
2715
   Fontconfig version 2.5.0
2004
2716
 
2005
2717
FcMatrixEqual
2006
2718
 
2022
2734
 
2023
2735
Version
2024
2736
 
2025
 
   Fontconfig version 2.4.2
 
2737
   Fontconfig version 2.5.0
2026
2738
 
2027
2739
FcMatrixMultiply
2028
2740
 
2044
2756
 
2045
2757
Version
2046
2758
 
2047
 
   Fontconfig version 2.4.2
 
2759
   Fontconfig version 2.5.0
2048
2760
 
2049
2761
FcMatrixRotate
2050
2762
 
2067
2779
 
2068
2780
Version
2069
2781
 
2070
 
   Fontconfig version 2.4.2
 
2782
   Fontconfig version 2.5.0
2071
2783
 
2072
2784
FcMatrixScale
2073
2785
 
2090
2802
 
2091
2803
Version
2092
2804
 
2093
 
   Fontconfig version 2.4.2
 
2805
   Fontconfig version 2.5.0
2094
2806
 
2095
2807
FcMatrixShear
2096
2808
 
2113
2825
 
2114
2826
Version
2115
2827
 
2116
 
   Fontconfig version 2.4.2
2117
 
     _________________________________________________________
 
2828
   Fontconfig version 2.5.0
 
2829
     __________________________________________________________
2118
2830
 
2119
 
4.9. FcConfig
 
2831
4.10. FcConfig
2120
2832
 
2121
2833
   Table of Contents
2122
2834
   FcConfigCreate -- Create a configuration
2124
2836
   FcConfigSetCurrent -- Set configuration as default
2125
2837
   FcConfigGetCurrent -- Return current configuration
2126
2838
   FcConfigUptoDate -- Check timestamps on config files
 
2839
   FcConfigHome -- return the current home directory.
 
2840
   FcConfigEnableHome -- controls use of the home directory.
2127
2841
   FcConfigBuildFonts -- Build font database
2128
2842
   FcConfigGetConfigDirs -- Get config directories
2129
2843
   FcConfigGetFontDirs -- Get font directories
2130
2844
   FcConfigGetConfigFiles -- Get config files
2131
 
   FcConfigGetCache -- Get cache filename
 
2845
   FcConfigGetCache -- DEPRECATED used to return per-user cache
 
2846
          filename
 
2847
 
 
2848
   FcConfigGetCacheDirs -- return the list of directories searched
 
2849
          for cache files
 
2850
 
2132
2851
   FcConfigGetFonts -- Get config font set
2133
2852
   FcConfigGetBlanks -- Get config blanks
2134
 
   FcConfigGetRescanInverval -- Get config rescan interval
2135
 
   FcConfigSetRescanInverval -- Set config rescan interval
 
2853
   FcConfigGetRescanInterval -- Get config rescan interval
 
2854
   FcConfigSetRescanInterval -- Set config rescan interval
2136
2855
   FcConfigAppFontAddFile -- Add font file to font database
2137
2856
   FcConfigAppFontAddDir -- Add fonts from directory to font
2138
2857
          database
2139
2858
 
2140
 
   FcConfigAppFontClear -- Remove all app fonts from font
2141
 
          database
2142
 
 
 
2859
   FcConfigAppFontClear -- Remove all app fonts from font database
2143
2860
   FcConfigSubstituteWithPat -- Execute substitutions
2144
2861
   FcConfigSubstitute -- Execute substitutions
2145
2862
   FcFontMatch -- Return best font
2172
2889
 
2173
2890
Version
2174
2891
 
2175
 
   Fontconfig version 2.4.2
 
2892
   Fontconfig version 2.5.0
2176
2893
 
2177
2894
FcConfigDestroy
2178
2895
 
2195
2912
 
2196
2913
Version
2197
2914
 
2198
 
   Fontconfig version 2.4.2
 
2915
   Fontconfig version 2.5.0
2199
2916
 
2200
2917
FcConfigSetCurrent
2201
2918
 
2217
2934
 
2218
2935
Version
2219
2936
 
2220
 
   Fontconfig version 2.4.2
 
2937
   Fontconfig version 2.5.0
2221
2938
 
2222
2939
FcConfigGetCurrent
2223
2940
 
2237
2954
 
2238
2955
Version
2239
2956
 
2240
 
   Fontconfig version 2.4.2
 
2957
   Fontconfig version 2.5.0
2241
2958
 
2242
2959
FcConfigUptoDate
2243
2960
 
2254
2971
Description
2255
2972
 
2256
2973
   Checks all of the files related to config and returns whether
2257
 
   the in-memory version is in sync with the disk version.
2258
 
 
2259
 
Version
2260
 
 
2261
 
   Fontconfig version 2.4.2
 
2974
   any of them has been modified since the configuration was
 
2975
   created.
 
2976
 
 
2977
Version
 
2978
 
 
2979
   Fontconfig version 2.5.0
 
2980
 
 
2981
FcConfigHome
 
2982
 
 
2983
Name
 
2984
 
 
2985
   FcConfigHome -- return the current home directory.
 
2986
 
 
2987
Synopsis
 
2988
 
 
2989
#include <fontconfig.h>
 
2990
 
 
2991
   FcBool FcConfigHome(void);
 
2992
 
 
2993
Description
 
2994
 
 
2995
   Return the current user's home directory, if it is available,
 
2996
   and if using it is enabled. See also FcConfigEnableHome).
 
2997
 
 
2998
Version
 
2999
 
 
3000
   Fontconfig version 2.5.0
 
3001
 
 
3002
FcConfigEnableHome
 
3003
 
 
3004
Name
 
3005
 
 
3006
   FcConfigEnableHome -- controls use of the home directory.
 
3007
 
 
3008
Synopsis
 
3009
 
 
3010
#include <fontconfig.h>
 
3011
 
 
3012
   FcBol FcConfigEnableHome(FcBool enable);
 
3013
 
 
3014
Description
 
3015
 
 
3016
   If enable is FcTrue, then Fontconfig will use various files
 
3017
   which are specified relative to the user's home directory
 
3018
   (using the ~ notation in the configuration). When enable is
 
3019
   FcFalse, then all use of the home directory in these contexts
 
3020
   will be disabled. The previous setting of the value is
 
3021
   returned.
 
3022
 
 
3023
Version
 
3024
 
 
3025
   Fontconfig version 2.5.0
2262
3026
 
2263
3027
FcConfigBuildFonts
2264
3028
 
2275
3039
Description
2276
3040
 
2277
3041
   Builds the set of available fonts for the given configuration.
2278
 
   Note that any changes to the configuration after this call
2279
 
   have indeterminate effects. Returns FcFalse if this operation
2280
 
   runs out of memory.
 
3042
   Note that any changes to the configuration after this call have
 
3043
   indeterminate effects. Returns FcFalse if this operation runs
 
3044
   out of memory.
2281
3045
 
2282
3046
Version
2283
3047
 
2284
 
   Fontconfig version 2.4.2
 
3048
   Fontconfig version 2.5.0
2285
3049
 
2286
3050
FcConfigGetConfigDirs
2287
3051
 
2303
3067
 
2304
3068
Version
2305
3069
 
2306
 
   Fontconfig version 2.4.2
 
3070
   Fontconfig version 2.5.0
2307
3071
 
2308
3072
FcConfigGetFontDirs
2309
3073
 
2325
3089
 
2326
3090
Version
2327
3091
 
2328
 
   Fontconfig version 2.4.2
 
3092
   Fontconfig version 2.5.0
2329
3093
 
2330
3094
FcConfigGetConfigFiles
2331
3095
 
2342
3106
Description
2343
3107
 
2344
3108
   Returns the list of known configuration files used to generate
2345
 
   config. Note that this will not include any configuration done
2346
 
   with FcConfigParse.
 
3109
   config.
2347
3110
 
2348
3111
Version
2349
3112
 
2350
 
   Fontconfig version 2.4.2
 
3113
   Fontconfig version 2.5.0
2351
3114
 
2352
3115
FcConfigGetCache
2353
3116
 
2354
3117
Name
2355
3118
 
2356
 
   FcConfigGetCache -- Get cache filename
2357
 
 
2358
 
Synopsis
2359
 
 
2360
 
#include <fontconfig.h>
2361
 
 
2362
 
   char * FcConfigGetCache(FcConfig *config);
2363
 
 
2364
 
Description
2365
 
 
2366
 
   Returns the name of the file used to store per-user font
2367
 
   information.
2368
 
 
2369
 
Version
2370
 
 
2371
 
   Fontconfig version 2.4.2
 
3119
   FcConfigGetCache -- DEPRECATED used to return per-user cache
 
3120
   filename
 
3121
 
 
3122
Synopsis
 
3123
 
 
3124
#include <fontconfig.h>
 
3125
 
 
3126
   FcChar8 * FcConfigGetCache(FcConfig *config);
 
3127
 
 
3128
Description
 
3129
 
 
3130
   With fontconfig no longer using per-user cache files, this
 
3131
   function now simply returns NULL to indicate that no per-user
 
3132
   file exists.
 
3133
 
 
3134
Version
 
3135
 
 
3136
   Fontconfig version 2.5.0
 
3137
 
 
3138
FcConfigGetCacheDirs
 
3139
 
 
3140
Name
 
3141
 
 
3142
   FcConfigGetCacheDirs -- return the list of directories searched
 
3143
   for cache files
 
3144
 
 
3145
Synopsis
 
3146
 
 
3147
#include <fontconfig.h>
 
3148
 
 
3149
   FcStrList * FcConfigGetCacheDirs(FcConfig *config);
 
3150
 
 
3151
Description
 
3152
 
 
3153
   FcConfigGetCacheDirs returns a string list containing all of
 
3154
   the directories that fontconfig will search when attempting to
 
3155
   load a cache file for a font directory.
 
3156
 
 
3157
Version
 
3158
 
 
3159
   Fontconfig version 2.5.0
2372
3160
 
2373
3161
FcConfigGetFonts
2374
3162
 
2385
3173
Description
2386
3174
 
2387
3175
   Returns one of the two sets of fonts from the configuration as
2388
 
   specified by set.
 
3176
   specified by set. This font set is owned by the library and
 
3177
   must not be freed.
2389
3178
 
2390
3179
Version
2391
3180
 
2392
 
   Fontconfig version 2.4.2
 
3181
   Fontconfig version 2.5.0
2393
3182
 
2394
3183
FcConfigGetBlanks
2395
3184
 
2411
3200
 
2412
3201
Version
2413
3202
 
2414
 
   Fontconfig version 2.4.2
 
3203
   Fontconfig version 2.5.0
2415
3204
 
2416
 
FcConfigGetRescanInverval
 
3205
FcConfigGetRescanInterval
2417
3206
 
2418
3207
Name
2419
3208
 
2420
 
   FcConfigGetRescanInverval -- Get config rescan interval
 
3209
   FcConfigGetRescanInterval -- Get config rescan interval
2421
3210
 
2422
3211
Synopsis
2423
3212
 
2424
3213
#include <fontconfig.h>
2425
3214
 
2426
 
   int FcConfigGetRescanInverval(FcConfig *config);
 
3215
   int FcConfigGetRescanInterval(FcConfig *config);
2427
3216
 
2428
3217
Description
2429
3218
 
2434
3223
 
2435
3224
Version
2436
3225
 
2437
 
   Fontconfig version 2.4.2
 
3226
   Fontconfig version 2.5.0
2438
3227
 
2439
 
FcConfigSetRescanInverval
 
3228
FcConfigSetRescanInterval
2440
3229
 
2441
3230
Name
2442
3231
 
2443
 
   FcConfigSetRescanInverval -- Set config rescan interval
 
3232
   FcConfigSetRescanInterval -- Set config rescan interval
2444
3233
 
2445
3234
Synopsis
2446
3235
 
2447
3236
#include <fontconfig.h>
2448
3237
 
2449
 
   FcBool FcConfigSetRescanInverval(FcConfig *config, int
 
3238
   FcBool FcConfigSetRescanInterval(FcConfig *config, int
2450
3239
   rescanInterval);
2451
3240
 
2452
3241
Description
2453
3242
 
2454
 
   Sets the rescan interval; returns FcFalse if an error
2455
 
   occurred.
 
3243
   Sets the rescan interval. Returns FcFalse if the interval
 
3244
   cannot be set (due to allocation failure). Otherwise returns
 
3245
   FcTrue.
2456
3246
 
2457
3247
Version
2458
3248
 
2459
 
   Fontconfig version 2.4.2
 
3249
   Fontconfig version 2.5.0
2460
3250
 
2461
3251
FcConfigAppFontAddFile
2462
3252
 
2468
3258
 
2469
3259
#include <fontconfig.h>
2470
3260
 
2471
 
   FcBool FcConfigAppFontAddFile(FcConfig *config, const char
 
3261
   FcBool FcConfigAppFontAddFile(FcConfig *config, const FcChar8
2472
3262
   *file);
2473
3263
 
2474
3264
Description
2475
3265
 
2476
 
   Adds an application-specific font to the configuration.
 
3266
   Adds an application-specific font to the configuration. Returns
 
3267
   FcFalse if the fonts cannot be added (due to allocation
 
3268
   failure). Otherwise returns FcTrue.
2477
3269
 
2478
3270
Version
2479
3271
 
2480
 
   Fontconfig version 2.4.2
 
3272
   Fontconfig version 2.5.0
2481
3273
 
2482
3274
FcConfigAppFontAddDir
2483
3275
 
2490
3282
 
2491
3283
#include <fontconfig.h>
2492
3284
 
2493
 
   FcBool FcConfigAppFontAddDir(FcConfig *config, const char *);
 
3285
   FcBool FcConfigAppFontAddDir(FcConfig *config, const FcChar8
 
3286
   *dir);
2494
3287
 
2495
3288
Description
2496
3289
 
2497
3290
   Scans the specified directory for fonts, adding each one found
2498
 
   to the application-specific set of fonts.
 
3291
   to the application-specific set of fonts. Returns FcFalse if
 
3292
   the fonts cannot be added (due to allocation failure).
 
3293
   Otherwise returns FcTrue.
2499
3294
 
2500
3295
Version
2501
3296
 
2502
 
   Fontconfig version 2.4.2
 
3297
   Fontconfig version 2.5.0
2503
3298
 
2504
3299
FcConfigAppFontClear
2505
3300
 
2506
3301
Name
2507
3302
 
2508
 
   FcConfigAppFontClear -- Remove all app fonts from font
2509
 
   database
 
3303
   FcConfigAppFontClear -- Remove all app fonts from font database
2510
3304
 
2511
3305
Synopsis
2512
3306
 
2520
3314
 
2521
3315
Version
2522
3316
 
2523
 
   Fontconfig version 2.4.2
 
3317
   Fontconfig version 2.5.0
2524
3318
 
2525
3319
FcConfigSubstituteWithPat
2526
3320
 
2538
3332
Description
2539
3333
 
2540
3334
   Performs the sequence of pattern modification operations, if
2541
 
   kind is FcMatchPattern, then those tagged as pattern
2542
 
   operations are applied, else if kind is FcMatchFont, those
2543
 
   tagged as font operations are applied and p_pat is used for
2544
 
   <test> elements with target=pattern.
 
3335
   kind is FcMatchPattern, then those tagged as pattern operations
 
3336
   are applied, else if kind is FcMatchFont, those tagged as font
 
3337
   operations are applied and p_pat is used for <test> elements
 
3338
   with target=pattern. Returns FcFalse if the substitution cannot
 
3339
   be performed (due to allocation failure). Otherwise returns
 
3340
   FcTrue.
2545
3341
 
2546
3342
Version
2547
3343
 
2548
 
   Fontconfig version 2.4.2
 
3344
   Fontconfig version 2.5.0
2549
3345
 
2550
3346
FcConfigSubstitute
2551
3347
 
2562
3358
 
2563
3359
Description
2564
3360
 
2565
 
   Calls FcConfigSubstituteWithPat setting p_pat to NULL.
 
3361
   Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns
 
3362
   FcFalse if the substitution cannot be performed (due to
 
3363
   allocation failure). Otherwise returns FcTrue.
2566
3364
 
2567
3365
Version
2568
3366
 
2569
 
   Fontconfig version 2.4.2
 
3367
   Fontconfig version 2.5.0
2570
3368
 
2571
3369
FcFontMatch
2572
3370
 
2583
3381
 
2584
3382
Description
2585
3383
 
2586
 
   Returns the font in config most close matching p. This
2587
 
   function should be called only after FcConfigSubstitute and
2588
 
   FcDefaultSubstitute have been called for p; otherwise the
2589
 
   results will not be correct.
 
3384
   Finds the font in sets most closely matching pattern and
 
3385
   returns the result of FcFontRenderPrepare for that font and the
 
3386
   provided pattern. This function should be called only after
 
3387
   FcConfigSubstitute and FcDefaultSubstitute have been called for
 
3388
   p; otherwise the results will not be correct.
2590
3389
 
2591
3390
Version
2592
3391
 
2593
 
   Fontconfig version 2.4.2
 
3392
   Fontconfig version 2.5.0
2594
3393
 
2595
3394
FcFontSort
2596
3395
 
2627
3426
 
2628
3427
Version
2629
3428
 
2630
 
   Fontconfig version 2.4.2
 
3429
   Fontconfig version 2.5.0
2631
3430
 
2632
3431
FcFontRenderPrepare
2633
3432
 
2645
3444
Description
2646
3445
 
2647
3446
   Creates a new pattern consisting of elements of font not
2648
 
   appearing in pat, elements of pat not appearing in font and
2649
 
   the best matching value from pat for elements appearing in
2650
 
   both. The result is passed to FcConfigSubstitute with kind
 
3447
   appearing in pat, elements of pat not appearing in font and the
 
3448
   best matching value from pat for elements appearing in both.
 
3449
   The result is passed to FcConfigSubstitute with kind
2651
3450
   FcMatchFont and then returned.
2652
3451
 
2653
3452
Version
2654
3453
 
2655
 
   Fontconfig version 2.4.2
 
3454
   Fontconfig version 2.5.0
2656
3455
 
2657
3456
FcFontList
2658
3457
 
2670
3469
Description
2671
3470
 
2672
3471
   Selects fonts matching p, creates patterns from those fonts
2673
 
   containing only the objects in os and returns the set of
2674
 
   unique such patterns.
 
3472
   containing only the objects in os and returns the set of unique
 
3473
   such patterns.
2675
3474
 
2676
3475
Version
2677
3476
 
2678
 
   Fontconfig version 2.4.2
 
3477
   Fontconfig version 2.5.0
2679
3478
 
2680
3479
FcConfigFilename
2681
3480
 
2687
3486
 
2688
3487
#include <fontconfig.h>
2689
3488
 
2690
 
   char * FcConfigFilename(const char *name);
 
3489
   FcChar8 * FcConfigFilename(const FcChar8 *name);
2691
3490
 
2692
3491
Description
2693
3492
 
2694
 
   Given the specified external entity name, return the
2695
 
   associated filename. This provides applications a way to
2696
 
   convert various configuration file references into filename
2697
 
   form.
 
3493
   Given the specified external entity name, return the associated
 
3494
   filename. This provides applications a way to convert various
 
3495
   configuration file references into filename form.
2698
3496
 
2699
3497
   A null or empty name indicates that the default configuration
2700
3498
   file should be used; which file this references can be
2707
3505
 
2708
3506
Version
2709
3507
 
2710
 
   Fontconfig version 2.4.2
 
3508
   Fontconfig version 2.5.0
2711
3509
 
2712
3510
FcConfigParseAndLoad
2713
3511
 
2720
3518
#include <fontconfig.h>
2721
3519
 
2722
3520
   FcBool FcConfigParseAndLoad(FcConfig *config, const FcChar8
2723
 
   *file);
 
3521
   *file, FcBool complain);
2724
3522
 
2725
3523
Description
2726
3524
 
2727
3525
   Walks the configuration in 'file' and constructs the internal
2728
3526
   representation in 'config'. Any include files referenced from
2729
 
   within 'file' will be loaded with FcConfigLoad and also
2730
 
   parsed. If 'complain' is FcFalse, no warning will be displayed
2731
 
   if 'file' does not exist.
 
3527
   within 'file' will be loaded and parsed. If 'complain' is
 
3528
   FcFalse, no warning will be displayed if 'file' does not exist.
 
3529
   Error and warning messages will be output to stderr. Returns
 
3530
   FcFalse if some error occurred while loading the file, either a
 
3531
   parse error, semantic error or allocation failure. Otherwise
 
3532
   returns FcTrue.
2732
3533
 
2733
3534
Version
2734
3535
 
2735
 
   Fontconfig version 2.4.2
2736
 
     _________________________________________________________
 
3536
   Fontconfig version 2.5.0
 
3537
     __________________________________________________________
2737
3538
 
2738
 
4.10. FcObjectType
 
3539
4.11. FcObjectType
2739
3540
 
2740
3541
   Table of Contents
2741
3542
   FcNameRegisterObjectTypes -- Register object types
2755
3556
 
2756
3557
#include <fontconfig.h>
2757
3558
 
2758
 
   FcBool FcNameRegisterObjectTypes(const FcObjectType *types,
2759
 
   int ntype);
 
3559
   FcBool FcNameRegisterObjectTypes(const FcObjectType *types, int
 
3560
   ntype);
2760
3561
 
2761
3562
Description
2762
3563
 
2763
 
   Register ntype new object types.
 
3564
   Register ntype new object types. Returns FcFalse if some of the
 
3565
   names cannot be registered (due to allocation failure).
 
3566
   Otherwise returns FcTrue.
2764
3567
 
2765
3568
Version
2766
3569
 
2767
 
   Fontconfig version 2.4.2
 
3570
   Fontconfig version 2.5.0
2768
3571
 
2769
3572
FcNameUnregisterObjectTypes
2770
3573
 
2781
3584
 
2782
3585
Description
2783
3586
 
2784
 
   Unregister ntype object types.
 
3587
   Unregister ntype object types. Returns FcTrue.
2785
3588
 
2786
3589
Version
2787
3590
 
2788
 
   Fontconfig version 2.4.2
 
3591
   Fontconfig version 2.5.0
2789
3592
 
2790
3593
FcNameGetObjectType
2791
3594
 
2805
3608
 
2806
3609
Version
2807
3610
 
2808
 
   Fontconfig version 2.4.2
2809
 
     _________________________________________________________
 
3611
   Fontconfig version 2.5.0
 
3612
     __________________________________________________________
2810
3613
 
2811
 
4.11. FcConstant
 
3614
4.12. FcConstant
2812
3615
 
2813
3616
   Table of Contents
2814
3617
   FcNameRegisterConstants -- Register symbolic constants
2834
3637
 
2835
3638
Description
2836
3639
 
2837
 
   Register nconsts new symbolic constants.
 
3640
   Register nconsts new symbolic constants. Returns FcFalse if the
 
3641
   constants cannot be registered (due to allocation failure).
 
3642
   Otherwise returns FcTrue.
2838
3643
 
2839
3644
Version
2840
3645
 
2841
 
   Fontconfig version 2.4.2
 
3646
   Fontconfig version 2.5.0
2842
3647
 
2843
3648
FcNameUnregisterConstants
2844
3649
 
2855
3660
 
2856
3661
Description
2857
3662
 
2858
 
   Unregister nconsts symbolic constants.
 
3663
   Unregister nconsts symbolic constants. Returns FcFalse if the
 
3664
   specified constants were not registered. Otherwise returns
 
3665
   FcTrue.
2859
3666
 
2860
3667
Version
2861
3668
 
2862
 
   Fontconfig version 2.4.2
 
3669
   Fontconfig version 2.5.0
2863
3670
 
2864
3671
FcNameGetConstant
2865
3672
 
2880
3687
 
2881
3688
Version
2882
3689
 
2883
 
   Fontconfig version 2.4.2
 
3690
   Fontconfig version 2.5.0
2884
3691
 
2885
3692
FcNameConstant
2886
3693
 
2902
3709
 
2903
3710
Version
2904
3711
 
2905
 
   Fontconfig version 2.4.2
2906
 
     _________________________________________________________
 
3712
   Fontconfig version 2.5.0
 
3713
     __________________________________________________________
2907
3714
 
2908
 
4.12. FcBlanks
 
3715
4.13. FcBlanks
2909
3716
 
2910
3717
   Table of Contents
2911
3718
   FcBlanksCreate -- Create an FcBlanks
2938
3745
 
2939
3746
Version
2940
3747
 
2941
 
   Fontconfig version 2.4.2
 
3748
   Fontconfig version 2.5.0
2942
3749
 
2943
3750
FcBlanksDestroy
2944
3751
 
2958
3765
 
2959
3766
Version
2960
3767
 
2961
 
   Fontconfig version 2.4.2
 
3768
   Fontconfig version 2.5.0
2962
3769
 
2963
3770
FcBlanksAdd
2964
3771
 
2979
3786
 
2980
3787
Version
2981
3788
 
2982
 
   Fontconfig version 2.4.2
 
3789
   Fontconfig version 2.5.0
2983
3790
 
2984
3791
FcBlanksIsMember
2985
3792
 
3000
3807
 
3001
3808
Version
3002
3809
 
3003
 
   Fontconfig version 2.4.2
3004
 
     _________________________________________________________
 
3810
   Fontconfig version 2.5.0
 
3811
     __________________________________________________________
3005
3812
 
3006
 
4.13. FcAtomic
 
3813
4.14. FcAtomic
3007
3814
 
3008
3815
   Table of Contents
3009
3816
   FcAtomicCreate -- create an FcAtomic object
3017
3824
 
3018
3825
   These functions provide a safe way to update config files,
3019
3826
   allowing ongoing reading of the old config file while locked
3020
 
   for writing and ensuring that a consistent and complete
3021
 
   version of the config file is always available.
 
3827
   for writing and ensuring that a consistent and complete version
 
3828
   of the config file is always available.
3022
3829
 
3023
3830
FcAtomicCreate
3024
3831
 
3036
3843
 
3037
3844
   Creates a data structure containing data needed to control
3038
3845
   access to file. Writing is done to a separate file. Once that
3039
 
   file is complete, the original configuration file is
3040
 
   atomically replaced so that reading process always see a
3041
 
   consistent and complete file without the need to lock for
3042
 
   reading.
 
3846
   file is complete, the original configuration file is atomically
 
3847
   replaced so that reading process always see a consistent and
 
3848
   complete file without the need to lock for reading.
3043
3849
 
3044
3850
Version
3045
3851
 
3046
 
   Fontconfig version 2.4.2
 
3852
   Fontconfig version 2.5.0
3047
3853
 
3048
3854
FcAtomicLock
3049
3855
 
3059
3865
 
3060
3866
Description
3061
3867
 
3062
 
   Attempts to lock the file referenced by atomic. Returns
3063
 
   FcFalse if the file is locked by another process, else returns
3064
 
   FcTrue and leaves the file locked.
 
3868
   Attempts to lock the file referenced by atomic. Returns FcFalse
 
3869
   if the file is already locked, else returns FcTrue and leaves
 
3870
   the file locked.
3065
3871
 
3066
3872
Version
3067
3873
 
3068
 
   Fontconfig version 2.4.2
 
3874
   Fontconfig version 2.5.0
3069
3875
 
3070
3876
FcAtomicNewFile
3071
3877
 
3086
3892
 
3087
3893
Version
3088
3894
 
3089
 
   Fontconfig version 2.4.2
 
3895
   Fontconfig version 2.5.0
3090
3896
 
3091
3897
FcAtomicOrigFile
3092
3898
 
3106
3912
 
3107
3913
Version
3108
3914
 
3109
 
   Fontconfig version 2.4.2
 
3915
   Fontconfig version 2.5.0
3110
3916
 
3111
3917
FcAtomicReplaceOrig
3112
3918
 
3123
3929
Description
3124
3930
 
3125
3931
   Replaces the original file referenced by atomic with the new
3126
 
   file.
 
3932
   file. Returns FcFalse if the file cannot be replaced due to
 
3933
   permission issues in the filesystem. Otherwise returns FcTrue.
3127
3934
 
3128
3935
Version
3129
3936
 
3130
 
   Fontconfig version 2.4.2
 
3937
   Fontconfig version 2.5.0
3131
3938
 
3132
3939
FcAtomicDeleteNew
3133
3940
 
3148
3955
 
3149
3956
Version
3150
3957
 
3151
 
   Fontconfig version 2.4.2
 
3958
   Fontconfig version 2.5.0
3152
3959
 
3153
3960
FcAtomicUnlock
3154
3961
 
3168
3975
 
3169
3976
Version
3170
3977
 
3171
 
   Fontconfig version 2.4.2
 
3978
   Fontconfig version 2.5.0
3172
3979
 
3173
3980
FcAtomicDestroy
3174
3981
 
3188
3995
 
3189
3996
Version
3190
3997
 
3191
 
   Fontconfig version 2.4.2
3192
 
     _________________________________________________________
 
3998
   Fontconfig version 2.5.0
 
3999
     __________________________________________________________
3193
4000
 
3194
 
4.14. File and Directory routines
 
4001
4.15. File and Directory routines
3195
4002
 
3196
4003
   Table of Contents
3197
4004
   FcFileScan -- scan a font file
3198
 
   FcDirScan -- scan a font directory
3199
 
   FcDirSave -- save a directory cache
3200
 
   FcDirCacheValid -- check directory cache timestamp
 
4005
   FcFileIsDir -- check whether a file is a directory
 
4006
   FcDirScan -- DEPRECATED: formerly used to scan a font directory
 
4007
   FcDirSave -- DEPRECATED: formerly used to save a directory
 
4008
          cache
 
4009
 
 
4010
   FcDirCacheUnlink -- Remove all caches related to dir
 
4011
   FcDirCacheValid -- check directory cache
 
4012
   FcDirCacheLoad -- load a directory cache
 
4013
   FcDirCacheRead -- read or construct a directory cache
 
4014
   FcDirCacheLoadFile -- load a cache file
 
4015
   FcDirCacheUnload -- unload a cache file
3201
4016
 
3202
4017
   These routines work with font files and directories, including
3203
4018
   font directory cache files.
3213
4028
#include <fontconfig.h>
3214
4029
 
3215
4030
   FcBool FcFileScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
3216
 
   *cache, FcBlanks *blanks, const char *file, FcBool force);
 
4031
   *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force);
3217
4032
 
3218
4033
Description
3219
4034
 
3220
4035
   Scans a single file and adds all fonts found to set. If force
3221
4036
   is FcTrue, then the file is scanned even if associated
3222
4037
   information is found in cache. If file is a directory, it is
3223
 
   added to dirs.
3224
 
 
3225
 
Version
3226
 
 
3227
 
   Fontconfig version 2.4.2
 
4038
   added to dirs. Whether fonts are found depends on fontconfig
 
4039
   policy as well as the current configuration. Internally,
 
4040
   fontconfig will ignore BDF and PCF fonts which are not in
 
4041
   Unicode (or the effectively equivalent ISO Latin-1) encoding as
 
4042
   those are not usable by Unicode-based applications. The
 
4043
   configuration can ignore fonts based on filename or contents of
 
4044
   the font file itself. Returns FcFalse if any of the fonts
 
4045
   cannot be added (due to allocation failure). Otherwise returns
 
4046
   FcTrue.
 
4047
 
 
4048
Version
 
4049
 
 
4050
   Fontconfig version 2.5.0
 
4051
 
 
4052
FcFileIsDir
 
4053
 
 
4054
Name
 
4055
 
 
4056
   FcFileIsDir -- check whether a file is a directory
 
4057
 
 
4058
Synopsis
 
4059
 
 
4060
#include <fontconfig.h>
 
4061
 
 
4062
   FcBool FcFileIsDir(const FcChar8 *file);
 
4063
 
 
4064
Description
 
4065
 
 
4066
   Returns FcTrue if file is a directory, otherwise returns
 
4067
   FcFalse.
 
4068
 
 
4069
Version
 
4070
 
 
4071
   Fontconfig version 2.5.0
3228
4072
 
3229
4073
FcDirScan
3230
4074
 
3231
4075
Name
3232
4076
 
3233
 
   FcDirScan -- scan a font directory
 
4077
   FcDirScan -- DEPRECATED: formerly used to scan a font directory
3234
4078
 
3235
4079
Synopsis
3236
4080
 
3237
4081
#include <fontconfig.h>
3238
4082
 
3239
4083
   FcBool FcDirScan(FcFontSet *set, FcStrSet *dirs, FcFileCache
3240
 
   *cache, FcBlanks *blanks, const char *dir, FcBool force);
 
4084
   *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force);
3241
4085
 
3242
4086
Description
3243
4087
 
3244
 
   Scans an entire directory and adds all fonts found to set. If
3245
 
   force is FcTrue, then the directory and all files within it
3246
 
   are scanned even if information is present in the
 
4088
   This function does nothing aside from returning FcFalse. It
 
4089
   used to scan an entire directory and add all fonts found to
 
4090
   set. If force was FcTrue, then the directory and all files
 
4091
   within it were scanned even if information was present in the
3247
4092
   per-directory cache file or cache. Any subdirectories found
3248
 
   are added to dirs.
 
4093
   were added to dirs.
3249
4094
 
3250
4095
Version
3251
4096
 
3252
 
   Fontconfig version 2.4.2
 
4097
   Fontconfig version 2.5.0
3253
4098
 
3254
4099
FcDirSave
3255
4100
 
3256
4101
Name
3257
4102
 
3258
 
   FcDirSave -- save a directory cache
 
4103
   FcDirSave -- DEPRECATED: formerly used to save a directory
 
4104
   cache
3259
4105
 
3260
4106
Synopsis
3261
4107
 
3262
4108
#include <fontconfig.h>
3263
4109
 
3264
 
   FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const char
 
4110
   FcBool FcDirSave(FcFontSet *set, FcStrSet *dirs, const FcChar8
3265
4111
   *dir);
3266
4112
 
3267
4113
Description
3268
4114
 
3269
 
   Creates the per-directory cache file for dir and populates it
3270
 
   with the fonts in set and subdirectories in dirs.
3271
 
 
3272
 
Version
3273
 
 
3274
 
   Fontconfig version 2.4.2
 
4115
   This function now does nothing aside from returning FcFalse. It
 
4116
   used to creates the per-directory cache file for dir and
 
4117
   populates it with the fonts in set and subdirectories in dirs.
 
4118
   All of this functionality is now automatically managed by
 
4119
   FcDirCacheLoad and FcDirCacheRead.
 
4120
 
 
4121
Version
 
4122
 
 
4123
   Fontconfig version 2.5.0
 
4124
 
 
4125
FcDirCacheUnlink
 
4126
 
 
4127
Name
 
4128
 
 
4129
   FcDirCacheUnlink -- Remove all caches related to dir
 
4130
 
 
4131
Synopsis
 
4132
 
 
4133
#include <fontconfig.h>
 
4134
 
 
4135
   FcBool FcDirCacheUnlink(const FcChar8 *dir, FcConfig *config);
 
4136
 
 
4137
Description
 
4138
 
 
4139
   Scans the cache directories in config, removing any instances
 
4140
   of the cache file for dir. Returns FcFalse when some internal
 
4141
   error occurs (out of memory, etc). Errors actually unlinking
 
4142
   any files are ignored.
 
4143
 
 
4144
Version
 
4145
 
 
4146
   Fontconfig version 2.5.0
3275
4147
 
3276
4148
FcDirCacheValid
3277
4149
 
3278
4150
Name
3279
4151
 
3280
 
   FcDirCacheValid -- check directory cache timestamp
3281
 
 
3282
 
Synopsis
3283
 
 
3284
 
#include <fontconfig.h>
3285
 
 
3286
 
   FcBool FcDirCacheValid(const FcChar8 *cache_file);
3287
 
 
3288
 
Description
3289
 
 
3290
 
   Returns FcTrue if cache_file is no older than the directory
3291
 
   containing it, else FcFalse.
3292
 
 
3293
 
Version
3294
 
 
3295
 
   Fontconfig version 2.4.2
3296
 
     _________________________________________________________
3297
 
 
3298
 
4.15. FcStrSet and FcStrList
 
4152
   FcDirCacheValid -- check directory cache
 
4153
 
 
4154
Synopsis
 
4155
 
 
4156
#include <fontconfig.h>
 
4157
 
 
4158
   FcBool FcDirCacheValid(const FcChar8 *dir);
 
4159
 
 
4160
Description
 
4161
 
 
4162
   Returns FcTrue if dir has an associated valid cache file, else
 
4163
   returns FcFalse
 
4164
 
 
4165
Version
 
4166
 
 
4167
   Fontconfig version 2.5.0
 
4168
 
 
4169
FcDirCacheLoad
 
4170
 
 
4171
Name
 
4172
 
 
4173
   FcDirCacheLoad -- load a directory cache
 
4174
 
 
4175
Synopsis
 
4176
 
 
4177
#include <fontconfig.h>
 
4178
 
 
4179
   FcCache * FcDirCacheLoad(const FcChar8 *dir, FcConfig *config,
 
4180
   FcChar8 **cache_file);
 
4181
 
 
4182
Description
 
4183
 
 
4184
   Loads the cache related to dir. If no cache file exists,
 
4185
   returns NULL. The name of the cache file is returned in
 
4186
   cache_file, unless that is NULL. See also FcDirCacheRead.
 
4187
 
 
4188
Version
 
4189
 
 
4190
   Fontconfig version 2.5.0
 
4191
 
 
4192
FcDirCacheRead
 
4193
 
 
4194
Name
 
4195
 
 
4196
   FcDirCacheRead -- read or construct a directory cache
 
4197
 
 
4198
Synopsis
 
4199
 
 
4200
#include <fontconfig.h>
 
4201
 
 
4202
   FcCache * FcDirCacheRead(const FcChar8 *dir, FcBool force,
 
4203
   FcConfig *config);
 
4204
 
 
4205
Description
 
4206
 
 
4207
   This returns a cache for dir. If force is FcFalse, then an
 
4208
   existing, valid cache file will be used. Otherwise, a new cache
 
4209
   will be created by scanning the directory and that returned.
 
4210
 
 
4211
Version
 
4212
 
 
4213
   Fontconfig version 2.5.0
 
4214
 
 
4215
FcDirCacheLoadFile
 
4216
 
 
4217
Name
 
4218
 
 
4219
   FcDirCacheLoadFile -- load a cache file
 
4220
 
 
4221
Synopsis
 
4222
 
 
4223
#include <fontconfig.h>
 
4224
 
 
4225
   FcCache * FcDirCacheLoadFile(const FcChar8 *cache_file, struct
 
4226
   stat *file_stat);
 
4227
 
 
4228
Description
 
4229
 
 
4230
   This function loads a directory cache from cache_file. If
 
4231
   file_stat is non-NULL, it will be filled with the results of
 
4232
   stat(2) on the cache file.
 
4233
 
 
4234
Version
 
4235
 
 
4236
   Fontconfig version 2.5.0
 
4237
 
 
4238
FcDirCacheUnload
 
4239
 
 
4240
Name
 
4241
 
 
4242
   FcDirCacheUnload -- unload a cache file
 
4243
 
 
4244
Synopsis
 
4245
 
 
4246
#include <fontconfig.h>
 
4247
 
 
4248
   void FcDirCacheUnload(FcCache *cache);
 
4249
 
 
4250
Description
 
4251
 
 
4252
   This function dereferences cache. When no other references to
 
4253
   it remain, all memory associated with the cache will be freed.
 
4254
 
 
4255
Version
 
4256
 
 
4257
   Fontconfig version 2.5.0
 
4258
     __________________________________________________________
 
4259
 
 
4260
4.16. FcCache routines
 
4261
 
 
4262
   Table of Contents
 
4263
   FcCacheDir -- Return directory of cache
 
4264
   FcCacheCopySet -- Returns a copy of the fontset from cache
 
4265
   FcCacheSubdir -- Return the i'th subdirectory.
 
4266
   FcCacheNumSubdir -- Return the number of subdirectories in
 
4267
          cache.
 
4268
 
 
4269
   FcCacheNumFont -- Returns the number of fonts in cache.
 
4270
 
 
4271
   These routines work with font directory caches, accessing their
 
4272
   contents in limited ways. It is not expected that normal
 
4273
   applications will need to use these functions.
 
4274
 
 
4275
FcCacheDir
 
4276
 
 
4277
Name
 
4278
 
 
4279
   FcCacheDir -- Return directory of cache
 
4280
 
 
4281
Synopsis
 
4282
 
 
4283
#include <fontconfig.h>
 
4284
 
 
4285
   const FcChar8 * FcCacheDir(const FcCache *cache);
 
4286
 
 
4287
Description
 
4288
 
 
4289
   This function returns the directory from which the cache was
 
4290
   constructed.
 
4291
 
 
4292
Version
 
4293
 
 
4294
   Fontconfig version 2.5.0
 
4295
 
 
4296
FcCacheCopySet
 
4297
 
 
4298
Name
 
4299
 
 
4300
   FcCacheCopySet -- Returns a copy of the fontset from cache
 
4301
 
 
4302
Synopsis
 
4303
 
 
4304
#include <fontconfig.h>
 
4305
 
 
4306
   FcFontSet * FcCacheCopySet(const FcCache *cache);
 
4307
 
 
4308
Description
 
4309
 
 
4310
   The returned fontset contains each of the font patterns from
 
4311
   cache. This fontset may be modified, but the patterns from the
 
4312
   cache are read-only.
 
4313
 
 
4314
Version
 
4315
 
 
4316
   Fontconfig version 2.5.0
 
4317
 
 
4318
FcCacheSubdir
 
4319
 
 
4320
Name
 
4321
 
 
4322
   FcCacheSubdir -- Return the i'th subdirectory.
 
4323
 
 
4324
Synopsis
 
4325
 
 
4326
#include <fontconfig.h>
 
4327
 
 
4328
   const FcChar8 * FcCacheSubdir(const FcCache *cache, inti);
 
4329
 
 
4330
Description
 
4331
 
 
4332
   The set of subdirectories stored in a cache file are indexed by
 
4333
   this function, i should range from 0 to n-1, where n is the
 
4334
   return value from FcCacheNumSubdir.
 
4335
 
 
4336
Version
 
4337
 
 
4338
   Fontconfig version 2.5.0
 
4339
 
 
4340
FcCacheNumSubdir
 
4341
 
 
4342
Name
 
4343
 
 
4344
   FcCacheNumSubdir -- Return the number of subdirectories in
 
4345
   cache.
 
4346
 
 
4347
Synopsis
 
4348
 
 
4349
#include <fontconfig.h>
 
4350
 
 
4351
   int FcCacheNumSubdir(const FcCache *cache);
 
4352
 
 
4353
Description
 
4354
 
 
4355
   This returns the total number of subdirectories in the cache.
 
4356
 
 
4357
Version
 
4358
 
 
4359
   Fontconfig version 2.5.0
 
4360
 
 
4361
FcCacheNumFont
 
4362
 
 
4363
Name
 
4364
 
 
4365
   FcCacheNumFont -- Returns the number of fonts in cache.
 
4366
 
 
4367
Synopsis
 
4368
 
 
4369
#include <fontconfig.h>
 
4370
 
 
4371
   int FcCacheNumFont(const FcCache *cache);
 
4372
 
 
4373
Description
 
4374
 
 
4375
   This returns the number of fonts which would be included in the
 
4376
   return from FcCacheCopySet.
 
4377
 
 
4378
Version
 
4379
 
 
4380
   Fontconfig version 2.5.0
 
4381
     __________________________________________________________
 
4382
 
 
4383
4.17. FcStrSet and FcStrList
3299
4384
 
3300
4385
   Table of Contents
3301
4386
   FcStrSetCreate -- create a string set
3302
4387
   FcStrSetMember -- check set for membership
 
4388
   FcStrSetEqual -- check sets for equality
3303
4389
   FcStrSetAdd -- add to a string set
3304
4390
   FcStrSetAddFilename -- add a filename to a string set
3305
4391
   FcStrSetDel -- delete from a string set
3309
4395
   FcStrListDone -- destroy a string iterator
3310
4396
 
3311
4397
   A data structure for enumerating strings, used to list
3312
 
   directories while scanning the configuration as directories
3313
 
   are added while scanning.
 
4398
   directories while scanning the configuration as directories are
 
4399
   added while scanning.
3314
4400
 
3315
4401
FcStrSetCreate
3316
4402
 
3330
4416
 
3331
4417
Version
3332
4418
 
3333
 
   Fontconfig version 2.4.2
 
4419
   Fontconfig version 2.5.0
3334
4420
 
3335
4421
FcStrSetMember
3336
4422
 
3350
4436
 
3351
4437
Version
3352
4438
 
3353
 
   Fontconfig version 2.4.2
 
4439
   Fontconfig version 2.5.0
 
4440
 
 
4441
FcStrSetEqual
 
4442
 
 
4443
Name
 
4444
 
 
4445
   FcStrSetEqual -- check sets for equality
 
4446
 
 
4447
Synopsis
 
4448
 
 
4449
#include <fontconfig.h>
 
4450
 
 
4451
   FcBool FcStrSetEqual(FcStrSet *set_a, FcStrSet *set_b);
 
4452
 
 
4453
Description
 
4454
 
 
4455
   Returns whether set_a contains precisely the same strings as
 
4456
   set_b. Ordering of strings within the two sets is not
 
4457
   considered.
 
4458
 
 
4459
Version
 
4460
 
 
4461
   Fontconfig version 2.5.0
3354
4462
 
3355
4463
FcStrSetAdd
3356
4464
 
3370
4478
 
3371
4479
Version
3372
4480
 
3373
 
   Fontconfig version 2.4.2
 
4481
   Fontconfig version 2.5.0
3374
4482
 
3375
4483
FcStrSetAddFilename
3376
4484
 
3392
4500
 
3393
4501
Version
3394
4502
 
3395
 
   Fontconfig version 2.4.2
 
4503
   Fontconfig version 2.5.0
3396
4504
 
3397
4505
FcStrSetDel
3398
4506
 
3413
4521
 
3414
4522
Version
3415
4523
 
3416
 
   Fontconfig version 2.4.2
 
4524
   Fontconfig version 2.5.0
3417
4525
 
3418
4526
FcStrSetDestroy
3419
4527
 
3433
4541
 
3434
4542
Version
3435
4543
 
3436
 
   Fontconfig version 2.4.2
 
4544
   Fontconfig version 2.5.0
3437
4545
 
3438
4546
FcStrListCreate
3439
4547
 
3453
4561
 
3454
4562
Version
3455
4563
 
3456
 
   Fontconfig version 2.4.2
 
4564
   Fontconfig version 2.5.0
3457
4565
 
3458
4566
FcStrListNext
3459
4567
 
3473
4581
 
3474
4582
Version
3475
4583
 
3476
 
   Fontconfig version 2.4.2
 
4584
   Fontconfig version 2.5.0
3477
4585
 
3478
4586
FcStrListDone
3479
4587
 
3493
4601
 
3494
4602
Version
3495
4603
 
3496
 
   Fontconfig version 2.4.2
3497
 
     _________________________________________________________
 
4604
   Fontconfig version 2.5.0
 
4605
     __________________________________________________________
3498
4606
 
3499
 
4.16. String utilities
 
4607
4.18. String utilities
3500
4608
 
3501
4609
   Table of Contents
3502
4610
   FcUtf8ToUcs4 -- convert UTF-8 to UCS4
3504
4612
   FcUtf8Len -- count UTF-8 encoded chars
3505
4613
   FcUtf16ToUcs4 -- convert UTF-16 to UCS4
3506
4614
   FcUtf16Len -- count UTF-16 encoded chars
 
4615
   FcIsLower -- check for lower case ASCII character
 
4616
   FcIsUpper -- check for upper case ASCII character
 
4617
   FcToLower -- convert upper case ASCII to lower case
3507
4618
   FcStrCopy -- duplicate a string
3508
4619
   FcStrDowncase -- create a lower case translation of a string
3509
 
   FcStrCopyFilename -- copy a string, expanding '~'
3510
 
   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring ASCII
3511
 
          case
3512
 
 
 
4620
   FcStrCopyFilename -- create a complete path from a filename
 
4621
   FcStrCmp -- compare UTF-8 strings
 
4622
   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
3513
4623
   FcStrStr -- locate UTF-8 substring
3514
4624
   FcStrStrIgnoreCase -- locate UTF-8 substring ignoring ASCII
3515
4625
          case
3516
4626
 
3517
 
   FcStrDirname -- directory part of filename
 
4627
   FcStrPlus -- concatenate two strings
 
4628
   FcStrFree -- free a string
3518
4629
   FcStrBasename -- last component of filename
3519
4630
 
3520
4631
   Fontconfig manipulates many UTF-8 strings represented with the
3536
4647
Description
3537
4648
 
3538
4649
   Converts the next Unicode char from src into dst and returns
3539
 
   the number of bytes containing the char. src nust be at least
 
4650
   the number of bytes containing the char. src must be at least
3540
4651
   len bytes long.
3541
4652
 
3542
4653
Version
3543
4654
 
3544
 
   Fontconfig version 2.4.2
 
4655
   Fontconfig version 2.5.0
3545
4656
 
3546
4657
FcUcs4ToUtf8
3547
4658
 
3562
4673
 
3563
4674
Version
3564
4675
 
3565
 
   Fontconfig version 2.4.2
 
4676
   Fontconfig version 2.5.0
3566
4677
 
3567
4678
FcUtf8Len
3568
4679
 
3587
4698
 
3588
4699
Version
3589
4700
 
3590
 
   Fontconfig version 2.4.2
 
4701
   Fontconfig version 2.5.0
3591
4702
 
3592
4703
FcUtf16ToUcs4
3593
4704
 
3599
4710
 
3600
4711
#include <fontconfig.h>
3601
4712
 
3602
 
   int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32
3603
 
   *dst, int len);
 
4713
   int FcUtf16ToUcs4(FcChar8 *src, FcEndian endian, FcChar32 *dst,
 
4714
   int len);
3604
4715
 
3605
4716
Description
3606
4717
 
3611
4722
 
3612
4723
Version
3613
4724
 
3614
 
   Fontconfig version 2.4.2
 
4725
   Fontconfig version 2.5.0
3615
4726
 
3616
4727
FcUtf16Len
3617
4728
 
3637
4748
 
3638
4749
Version
3639
4750
 
3640
 
   Fontconfig version 2.4.2
 
4751
   Fontconfig version 2.5.0
 
4752
 
 
4753
FcIsLower
 
4754
 
 
4755
Name
 
4756
 
 
4757
   FcIsLower -- check for lower case ASCII character
 
4758
 
 
4759
Synopsis
 
4760
 
 
4761
#include <fontconfig.h>
 
4762
 
 
4763
   FcBool FcIsLower(FcChar8c);
 
4764
 
 
4765
Description
 
4766
 
 
4767
   This macro checks whether c is an lower case ASCII letter.
 
4768
 
 
4769
Version
 
4770
 
 
4771
   Fontconfig version 2.5.0
 
4772
 
 
4773
FcIsUpper
 
4774
 
 
4775
Name
 
4776
 
 
4777
   FcIsUpper -- check for upper case ASCII character
 
4778
 
 
4779
Synopsis
 
4780
 
 
4781
#include <fontconfig.h>
 
4782
 
 
4783
   FcBool FcIsUpper(FcChar8c);
 
4784
 
 
4785
Description
 
4786
 
 
4787
   This macro checks whether c is a upper case ASCII letter.
 
4788
 
 
4789
Version
 
4790
 
 
4791
   Fontconfig version 2.5.0
 
4792
 
 
4793
FcToLower
 
4794
 
 
4795
Name
 
4796
 
 
4797
   FcToLower -- convert upper case ASCII to lower case
 
4798
 
 
4799
Synopsis
 
4800
 
 
4801
#include <fontconfig.h>
 
4802
 
 
4803
   FcChar8 FcToLower(FcChar8c);
 
4804
 
 
4805
Description
 
4806
 
 
4807
   This macro converts upper case ASCII c to the equivalent lower
 
4808
   case letter.
 
4809
 
 
4810
Version
 
4811
 
 
4812
   Fontconfig version 2.5.0
3641
4813
 
3642
4814
FcStrCopy
3643
4815
 
3654
4826
Description
3655
4827
 
3656
4828
   Allocates memory, copies s and returns the resulting buffer.
3657
 
   Yes, this is strdup, but that function isn't available on
3658
 
   every platform.
 
4829
   Yes, this is strdup, but that function isn't available on every
 
4830
   platform.
3659
4831
 
3660
4832
Version
3661
4833
 
3662
 
   Fontconfig version 2.4.2
 
4834
   Fontconfig version 2.5.0
3663
4835
 
3664
4836
FcStrDowncase
3665
4837
 
3680
4852
 
3681
4853
Version
3682
4854
 
3683
 
   Fontconfig version 2.4.2
 
4855
   Fontconfig version 2.5.0
3684
4856
 
3685
4857
FcStrCopyFilename
3686
4858
 
3687
4859
Name
3688
4860
 
3689
 
   FcStrCopyFilename -- copy a string, expanding '~'
 
4861
   FcStrCopyFilename -- create a complete path from a filename
3690
4862
 
3691
4863
Synopsis
3692
4864
 
3696
4868
 
3697
4869
Description
3698
4870
 
3699
 
   Just like FcStrCopy except that it converts any leading '~'
3700
 
   characters in s to the value of the HOME environment variable.
3701
 
   Returns NULL if '~' is present in s and HOME is unset.
3702
 
 
3703
 
Version
3704
 
 
3705
 
   Fontconfig version 2.4.2
 
4871
   FcStrCopyFilename constructs an absolute pathname from s. It
 
4872
   converts any leading '~' characters in to the value of the HOME
 
4873
   environment variable, and any relative paths are converted to
 
4874
   absolute paths using the current working directory. Sequences
 
4875
   of '/' characters are converted to a single '/', and names
 
4876
   containing the current directory '.' or parent directory '..'
 
4877
   are correctly reconstructed. Returns NULL if '~' is the leading
 
4878
   character and HOME is unset or disabled (see
 
4879
   FcConfigEnableHome).
 
4880
 
 
4881
Version
 
4882
 
 
4883
   Fontconfig version 2.5.0
 
4884
 
 
4885
FcStrCmp
 
4886
 
 
4887
Name
 
4888
 
 
4889
   FcStrCmp -- compare UTF-8 strings
 
4890
 
 
4891
Synopsis
 
4892
 
 
4893
#include <fontconfig.h>
 
4894
 
 
4895
   int FcStrCmp(const FcChar8 *s1, const FcChar8 *s2);
 
4896
 
 
4897
Description
 
4898
 
 
4899
   Returns the usual <0, 0, >0 result of comparing s1 and s2.
 
4900
 
 
4901
Version
 
4902
 
 
4903
   Fontconfig version 2.5.0
3706
4904
 
3707
4905
FcStrCmpIgnoreCase
3708
4906
 
3709
4907
Name
3710
4908
 
3711
 
   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring ASCII
3712
 
   case
 
4909
   FcStrCmpIgnoreCase -- compare UTF-8 strings ignoring case
3713
4910
 
3714
4911
Synopsis
3715
4912
 
3719
4916
 
3720
4917
Description
3721
4918
 
3722
 
   Returns the usual <0, 0, >0 result of comparing s1 and s2.
3723
 
   This test is case-insensitive in the ASCII range and will
3724
 
   operate properly with UTF8 encoded strings, although it does
3725
 
   not check for well formed strings.
 
4919
   Returns the usual <0, 0, >0 result of comparing s1 and s2. This
 
4920
   test is case-insensitive for all proper UTF-8 encoded strings.
3726
4921
 
3727
4922
Version
3728
4923
 
3729
 
   Fontconfig version 2.4.2
 
4924
   Fontconfig version 2.5.0
3730
4925
 
3731
4926
FcStrStr
3732
4927
 
3738
4933
 
3739
4934
#include <fontconfig.h>
3740
4935
 
3741
 
   FcChar8 * FcStrStr(const char *s1, const char *s2);
 
4936
   FcChar8 * FcStrStr(const FcChar8 *s1, const FcChar8 *s2);
3742
4937
 
3743
4938
Description
3744
4939
 
3745
4940
   Returns the location of s2 in s1. Returns NULL if s2 is not
3746
4941
   present in s1. This test will operate properly with UTF8
3747
 
   encoded strings, although it does not check for well formed
3748
 
   strings.
 
4942
   encoded strings.
3749
4943
 
3750
4944
Version
3751
4945
 
3752
 
   Fontconfig version 2.4.2
 
4946
   Fontconfig version 2.5.0
3753
4947
 
3754
4948
FcStrStrIgnoreCase
3755
4949
 
3762
4956
 
3763
4957
#include <fontconfig.h>
3764
4958
 
3765
 
   FcChar8 * FcStrStrIgnoreCase(const char *s1, const char *s2);
3766
 
 
3767
 
Description
3768
 
 
3769
 
   Returns the location of s2 in s1, ignoring ASCII case. Returns
3770
 
   NULL if s2 is not present in s1. This test is case-insensitive
3771
 
   in the ASCII range and will operate properly with UTF8 encoded
3772
 
   strings, although it does not check for well formed strings.
3773
 
 
3774
 
Version
3775
 
 
3776
 
   Fontconfig version 2.4.2
3777
 
 
3778
 
FcStrDirname
3779
 
 
3780
 
Name
3781
 
 
3782
 
   FcStrDirname -- directory part of filename
3783
 
 
3784
 
Synopsis
3785
 
 
3786
 
#include <fontconfig.h>
3787
 
 
3788
 
   FcChar8 * FcStrDirname(const FcChar8 *file);
3789
 
 
3790
 
Description
3791
 
 
3792
 
   Returns the directory containing file. This is returned in
3793
 
   newly allocated storage which should be freed when no longer
3794
 
   needed.
3795
 
 
3796
 
Version
3797
 
 
3798
 
   Fontconfig version 2.4.2
 
4959
   FcChar8 * FcStrStrIgnoreCase(const FcChar8 *s1, const FcChar8
 
4960
   *s2);
 
4961
 
 
4962
Description
 
4963
 
 
4964
   Returns the location of s2 in s1, ignoring case. Returns NULL
 
4965
   if s2 is not present in s1. This test is case-insensitive for
 
4966
   all proper UTF-8 encoded strings.
 
4967
 
 
4968
Version
 
4969
 
 
4970
   Fontconfig version 2.5.0
 
4971
 
 
4972
FcStrPlus
 
4973
 
 
4974
Name
 
4975
 
 
4976
   FcStrPlus -- concatenate two strings
 
4977
 
 
4978
Synopsis
 
4979
 
 
4980
#include <fontconfig.h>
 
4981
 
 
4982
   FcChar8 * FcStrPlus(const FcChar8 *s1, const FcChar8 *s2);
 
4983
 
 
4984
Description
 
4985
 
 
4986
   This function allocates new storage and places the
 
4987
   concatenation of s1 and s2 there, returning the new string.
 
4988
 
 
4989
Version
 
4990
 
 
4991
   Fontconfig version 2.5.0
 
4992
 
 
4993
FcStrFree
 
4994
 
 
4995
Name
 
4996
 
 
4997
   FcStrFree -- free a string
 
4998
 
 
4999
Synopsis
 
5000
 
 
5001
#include <fontconfig.h>
 
5002
 
 
5003
   void FcStrFree(FcChar8 *s);
 
5004
 
 
5005
Description
 
5006
 
 
5007
   This is just a wrapper around free(3) which helps track memory
 
5008
   usage of strings within the fontconfig library.
 
5009
 
 
5010
Version
 
5011
 
 
5012
   Fontconfig version 2.5.0
3799
5013
 
3800
5014
FcStrBasename
3801
5015
 
3812
5026
Description
3813
5027
 
3814
5028
   Returns the filename of file stripped of any leading directory
3815
 
   names. This is returned in newly allocated storage which
3816
 
   should be freed when no longer needed.
 
5029
   names. This is returned in newly allocated storage which should
 
5030
   be freed when no longer needed.
3817
5031
 
3818
5032
Version
3819
5033
 
3820
 
   Fontconfig version 2.4.2
 
5034
   Fontconfig version 2.5.0