| 1 |
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ |
| 2 |
<!ENTITY fcatomic SYSTEM "fcatomic.sgml"> |
| 3 |
<!ENTITY fcblanks SYSTEM "fcblanks.sgml"> |
| 4 |
<!ENTITY fccache SYSTEM "fccache.sgml"> |
| 5 |
<!ENTITY fccharset SYSTEM "fccharset.sgml"> |
| 6 |
<!ENTITY fcconfig SYSTEM "fcconfig.sgml"> |
| 7 |
<!ENTITY fcconstant SYSTEM "fcconstant.sgml"> |
| 8 |
<!ENTITY fcdircache SYSTEM "fcdircache.sgml"> |
| 9 |
<!ENTITY fcfile SYSTEM "fcfile.sgml"> |
| 10 |
<!ENTITY fcfontations SYSTEM "fcfontations.sgml"> |
| 11 |
<!ENTITY fcfontset SYSTEM "fcfontset.sgml"> |
| 12 |
<!ENTITY fcformat SYSTEM "fcformat.sgml"> |
| 13 |
<!ENTITY fcfreetype SYSTEM "fcfreetype.sgml"> |
| 14 |
<!ENTITY fcinit SYSTEM "fcinit.sgml"> |
| 15 |
<!ENTITY fclangset SYSTEM "fclangset.sgml"> |
| 16 |
<!ENTITY fcmatrix SYSTEM "fcmatrix.sgml"> |
| 17 |
<!ENTITY fcobjectset SYSTEM "fcobjectset.sgml"> |
| 18 |
<!ENTITY fcobjecttype SYSTEM "fcobjecttype.sgml"> |
| 19 |
<!ENTITY fcpattern SYSTEM "fcpattern.sgml"> |
| 20 |
<!ENTITY fcrange SYSTEM "fcrange.sgml"> |
| 21 |
<!ENTITY fcstring SYSTEM "fcstring.sgml"> |
| 22 |
<!ENTITY fcstrset SYSTEM "fcstrset.sgml"> |
| 23 |
<!ENTITY fcvalue SYSTEM "fcvalue.sgml"> |
| 24 |
<!ENTITY fcweight SYSTEM "fcweight.sgml"> |
| 25 |
<!ENTITY version SYSTEM "version.sgml"> |
| 26 |
]> |
| 27 |
<!-- |
| 28 |
fontconfig/doc/local-fontconfig-devel.sgml |
| 29 |
|
| 30 |
Copyright © 2003 Keith Packard |
| 31 |
|
| 32 |
Permission to use, copy, modify, distribute, and sell this software and its |
| 33 |
documentation for any purpose is hereby granted without fee, provided that |
| 34 |
the above copyright notice appear in all copies and that both that |
| 35 |
copyright notice and this permission notice appear in supporting |
| 36 |
documentation, and that the name of the author(s) not be used in |
| 37 |
advertising or publicity pertaining to distribution of the software without |
| 38 |
specific, written prior permission. The authors make no |
| 39 |
representations about the suitability of this software for any purpose. It |
| 40 |
is provided "as is" without express or implied warranty. |
| 41 |
|
| 42 |
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 43 |
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
| 44 |
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 45 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
| 46 |
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 47 |
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 48 |
PERFORMANCE OF THIS SOFTWARE. |
| 49 |
--> |
| 50 |
<article id="index"> |
| 51 |
<title>Fontconfig Developers Reference, Version &version; </title> |
| 52 |
<artheader> |
| 53 |
<author> |
| 54 |
<firstname>Keith</firstname> |
| 55 |
<surname>Packard</surname> |
| 56 |
<affiliation><orgname> |
| 57 |
HP Cambridge Research Lab |
| 58 |
</orgname></affiliation> |
| 59 |
</author> |
| 60 |
<authorinitials>KRP</authorinitials> |
| 61 |
<productname>Fontconfig</productname> |
| 62 |
<productnumber>&version;</productnumber> |
| 63 |
<LegalNotice> |
| 64 |
<simpara> |
| 65 |
Copyright © 2002 Keith Packard |
| 66 |
</simpara><simpara> |
| 67 |
Permission to use, copy, modify, distribute, and sell this software and its |
| 68 |
documentation for any purpose is hereby granted without fee, provided that |
| 69 |
the above copyright notice appear in all copies and that both that |
| 70 |
copyright notice and this permission notice appear in supporting |
| 71 |
documentation, and that the name of the author(s) not be used in |
| 72 |
advertising or publicity pertaining to distribution of the software without |
| 73 |
specific, written prior permission. The authors make no |
| 74 |
representations about the suitability of this software for any purpose. It |
| 75 |
is provided "as is" without express or implied warranty. |
| 76 |
</simpara><simpara> |
| 77 |
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 78 |
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
| 79 |
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 80 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
| 81 |
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 82 |
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 83 |
PERFORMANCE OF THIS SOFTWARE. |
| 84 |
</simpara> |
| 85 |
</LegalNotice> |
| 86 |
</artheader> |
| 87 |
<sect1><title>DESCRIPTION</title> |
| 88 |
<para> |
| 89 |
Fontconfig is a library designed to provide system-wide font configuration, |
| 90 |
customization and application access. |
| 91 |
</para> |
| 92 |
</sect1> |
| 93 |
<sect1><title>FUNCTIONAL OVERVIEW</title> |
| 94 |
<para> |
| 95 |
Fontconfig contains two essential modules, the configuration module which |
| 96 |
builds an internal configuration from XML files and the matching module |
| 97 |
which accepts font patterns and returns the nearest matching font. |
| 98 |
</para> |
| 99 |
<sect2><title>FONT CONFIGURATION</title> |
| 100 |
<para> |
| 101 |
The configuration module consists of the FcConfig datatype, libexpat and |
| 102 |
FcConfigParse which walks over an XML tree and amends a configuration with |
| 103 |
data found within. From an external perspective, configuration of the |
| 104 |
library consists of generating a valid XML tree and feeding that to |
| 105 |
FcConfigParse. The only other mechanism provided to applications for |
| 106 |
changing the running configuration is to add fonts and directories to the |
| 107 |
list of application-provided font files. |
| 108 |
</para><para> |
| 109 |
The intent is to make font configurations relatively static, and shared by |
| 110 |
as many applications as possible. It is hoped that this will lead to more |
| 111 |
stable font selection when passing names from one application to another. |
| 112 |
XML was chosen as a configuration file format because it provides a format |
| 113 |
which is easy for external agents to edit while retaining the correct |
| 114 |
structure and syntax. |
| 115 |
</para><para> |
| 116 |
Font configuration is separate from font matching; applications needing to |
| 117 |
do their own matching can access the available fonts from the library and |
| 118 |
perform private matching. The intent is to permit applications to pick and |
| 119 |
choose appropriate functionality from the library instead of forcing them to |
| 120 |
choose between this library and a private configuration mechanism. The hope |
| 121 |
is that this will ensure that configuration of fonts for all applications |
| 122 |
can be centralized in one place. Centralizing font configuration will |
| 123 |
simplify and regularize font installation and customization. |
| 124 |
</para> |
| 125 |
</sect2> |
| 126 |
<sect2> |
| 127 |
<title>FONT PROPERTIES</title> |
| 128 |
<para> |
| 129 |
While font patterns may contain essentially any properties, there are some |
| 130 |
well known properties with associated types. Fontconfig uses some of these |
| 131 |
properties for font matching and font completion. Others are provided as a |
| 132 |
convenience for the application's rendering mechanism. |
| 133 |
</para> |
| 134 |
<programlisting> |
| 135 |
Property Definitions |
| 136 |
|
| 137 |
Property C Preprocessor Symbol Type Description |
| 138 |
---------------------------------------------------- |
| 139 |
family FC_FAMILY String Font family names |
| 140 |
familylang FC_FAMILYLANG String Language corresponding to |
| 141 |
each family name |
| 142 |
style FC_STYLE String Font style. Overrides weight |
| 143 |
and slant |
| 144 |
stylelang FC_STYLELANG String Language corresponding to |
| 145 |
each style name |
| 146 |
fullname FC_FULLNAME String Font face full name where |
| 147 |
different from family and |
| 148 |
family + style |
| 149 |
fullnamelang FC_FULLNAMELANG String Language corresponding to |
| 150 |
each fullname |
| 151 |
slant FC_SLANT Int Italic, oblique or roman |
| 152 |
weight FC_WEIGHT Int Light, medium, demibold, |
| 153 |
bold or black |
| 154 |
width FC_WIDTH Int Condensed, normal or expanded |
| 155 |
size FC_SIZE Double Point size |
| 156 |
aspect FC_ASPECT Double Stretches glyphs horizontally |
| 157 |
before hinting |
| 158 |
pixelsize FC_PIXEL_SIZE Double Pixel size |
| 159 |
spacing FC_SPACING Int Proportional, dual-width, |
| 160 |
monospace or charcell |
| 161 |
foundry FC_FOUNDRY String Font foundry name |
| 162 |
antialias FC_ANTIALIAS Bool Whether glyphs can be |
| 163 |
antialiased |
| 164 |
hintstyle FC_HINT_STYLE Int Automatic hinting style |
| 165 |
hinting FC_HINTING Bool Whether the rasterizer should |
| 166 |
use hinting |
| 167 |
verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout |
| 168 |
autohint FC_AUTOHINT Bool Use autohinter instead of |
| 169 |
normal hinter |
| 170 |
globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) |
| 171 |
file FC_FILE String The filename holding the font |
| 172 |
relative to the config's sysroot |
| 173 |
index FC_INDEX Int The index of the font within |
| 174 |
the file |
| 175 |
ftface FC_FT_FACE FT_Face Use the specified FreeType |
| 176 |
face object |
| 177 |
rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated) |
| 178 |
outline FC_OUTLINE Bool Whether the glyphs are outlines |
| 179 |
scalable FC_SCALABLE Bool Whether the glyphs are outlines or have color |
| 180 |
dpi FC_DPI Double Target dots per inch |
| 181 |
rgba FC_RGBA Int unknown, rgb, bgr, vrgb, |
| 182 |
vbgr, none - subpixel geometry |
| 183 |
scale FC_SCALE Double Scale factor for point->pixel |
| 184 |
conversions (deprecated) |
| 185 |
minspace FC_MINSPACE Bool Eliminate leading from line |
| 186 |
spacing |
| 187 |
matrix FC_MATRIX Matrix Hold an affine transformation |
| 188 |
charset FC_CHARSET CharSet Unicode chars encoded by |
| 189 |
the font |
| 190 |
lang FC_LANG LangSet Set of RFC-3066-style |
| 191 |
languages this font supports |
| 192 |
fontversion FC_FONTVERSION Int Version number of the font |
| 193 |
capability FC_CAPABILITY String List of layout capabilities in |
| 194 |
the font |
| 195 |
fontformat FC_FONTFORMAT String String name of the font format |
| 196 |
embolden FC_EMBOLDEN Bool Rasterizer should |
| 197 |
synthetically embolden the font |
| 198 |
embeddedbitmap FC_EMBEDDED_BITMAP Bool Use the embedded bitmap instead |
| 199 |
of the outline |
| 200 |
decorative FC_DECORATIVE Bool Whether the style is a decorative |
| 201 |
variant |
| 202 |
lcdfilter FC_LCD_FILTER Int Type of LCD filter |
| 203 |
namelang FC_NAMELANG String Language name to be used for the |
| 204 |
default value of familylang, |
| 205 |
stylelang and fullnamelang |
| 206 |
fontfeatures FC_FONT_FEATURES String List of extra feature tags in |
| 207 |
OpenType to be enabled |
| 208 |
prgname FC_PRGNAME String Name of the running program |
| 209 |
hash FC_HASH String SHA256 hash value of the font data |
| 210 |
with "sha256:" prefix (deprecated) |
| 211 |
postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript |
| 212 |
color FC_COLOR Bool Whether any glyphs have color |
| 213 |
symbol FC_SYMBOL Bool Whether font uses MS symbol-font encoding |
| 214 |
fontvariations FC_FONT_VARIATIONS String comma-separated string of axes in variable font |
| 215 |
variable FC_VARIABLE Bool Whether font is Variable Font |
| 216 |
fonthashint FC_FONT_HAS_HINT Bool Whether font has hinting |
| 217 |
order FC_ORDER Int Order number of the font |
| 218 |
desktop FC_DESKTOP_NAME String Current desktop name |
| 219 |
namedinstance FC_NAMED_INSTANCE Bool Whether font is a named instance |
| 220 |
fontwarapper FC_FONT_WRAPPER String The font wrapper format |
| 221 |
</programlisting> |
| 222 |
</sect2> |
| 223 |
</sect1> |
| 224 |
<sect1><title>Datatypes</title> |
| 225 |
<para> |
| 226 |
Fontconfig uses abstract data types to hide internal implementation details |
| 227 |
for most data structures. A few structures are exposed where appropriate. |
| 228 |
</para> |
| 229 |
<sect2><title>FcChar8, FcChar16, FcChar32, FcBool</title> |
| 230 |
<para> |
| 231 |
These are primitive data types; the FcChar* types hold precisely the number |
| 232 |
of bits stated (if supported by the C implementation). FcBool holds |
| 233 |
one of two C preprocessor symbols: FcFalse or FcTrue. |
| 234 |
</para> |
| 235 |
</sect2> |
| 236 |
<sect2><title>FcMatrix</title> |
| 237 |
<para> |
| 238 |
An FcMatrix holds an affine transformation, usually used to reshape glyphs. |
| 239 |
A small set of matrix operations are provided to manipulate these. |
| 240 |
<programlisting> |
| 241 |
typedef struct _FcMatrix { |
| 242 |
double xx, xy, yx, yy; |
| 243 |
} FcMatrix; |
| 244 |
</programlisting> |
| 245 |
</para> |
| 246 |
</sect2> |
| 247 |
<sect2><title>FcCharSet</title> |
| 248 |
<para> |
| 249 |
An FcCharSet is an abstract type that holds the set of encoded Unicode chars |
| 250 |
in a font. Operations to build and compare these sets are provided. |
| 251 |
</para> |
| 252 |
</sect2> |
| 253 |
<sect2><title>FcLangSet</title> |
| 254 |
<para> |
| 255 |
An FcLangSet is an abstract type that holds the set of languages supported |
| 256 |
by a font. Operations to build and compare these sets are provided. These |
| 257 |
are computed for a font based on orthographic information built into the |
| 258 |
fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 |
| 259 |
languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If |
| 260 |
you have orthographic information for any of these languages, please submit |
| 261 |
them. |
| 262 |
</para> |
| 263 |
</sect2> |
| 264 |
<sect2><title>FcLangResult</title> |
| 265 |
<para> |
| 266 |
An FcLangResult is an enumeration used to return the results of comparing |
| 267 |
two language strings or FcLangSet objects. FcLangEqual means the |
| 268 |
objects match language and territory. FcLangDifferentTerritory means |
| 269 |
the objects match in language but differ in territory. |
| 270 |
FcLangDifferentLang means the objects differ in language. |
| 271 |
</para> |
| 272 |
</sect2> |
| 273 |
<sect2><title>FcType</title> |
| 274 |
<para> |
| 275 |
Tags the kind of data stored in an FcValue. |
| 276 |
</para> |
| 277 |
</sect2> |
| 278 |
<sect2><title>FcValue</title> |
| 279 |
<para> |
| 280 |
An FcValue object holds a single value with one of a number of different |
| 281 |
types. The 'type' tag indicates which member is valid. |
| 282 |
<programlisting> |
| 283 |
typedef struct _FcValue { |
| 284 |
FcType type; |
| 285 |
union { |
| 286 |
const FcChar8 *s; |
| 287 |
int i; |
| 288 |
FcBool b; |
| 289 |
double d; |
| 290 |
const FcMatrix *m; |
| 291 |
const FcCharSet *c; |
| 292 |
void *f; |
| 293 |
const FcLangSet *l; |
| 294 |
const FcRange *r; |
| 295 |
} u; |
| 296 |
} FcValue; |
| 297 |
</programlisting> |
| 298 |
<programlisting> |
| 299 |
FcValue Members |
| 300 |
|
| 301 |
Type Union member Datatype |
| 302 |
-------------------------------- |
| 303 |
FcTypeVoid (none) (none) |
| 304 |
FcTypeInteger i int |
| 305 |
FcTypeDouble d double |
| 306 |
FcTypeString s FcChar8 * |
| 307 |
FcTypeBool b b |
| 308 |
FcTypeMatrix m FcMatrix * |
| 309 |
FcTypeCharSet c FcCharSet * |
| 310 |
FcTypeFTFace f void * (FT_Face) |
| 311 |
FcTypeLangSet l FcLangSet * |
| 312 |
FcTypeRange r FcRange * |
| 313 |
</programlisting> |
| 314 |
</para> |
| 315 |
</sect2> |
| 316 |
<sect2><title>FcPattern, FcPatternIter</title> |
| 317 |
<para> |
| 318 |
An FcPattern holds a set of names with associated value lists; each name refers to a |
| 319 |
property of a font. FcPatterns are used as inputs to the matching code as |
| 320 |
well as holding information about specific fonts. Each property can hold |
| 321 |
one or more values; conventionally all of the same type, although the |
| 322 |
interface doesn't demand that. An FcPatternIter is used during iteration to |
| 323 |
access properties in FcPattern. |
| 324 |
</para> |
| 325 |
</sect2> |
| 326 |
<sect2><title>FcFontSet</title> |
| 327 |
<para> |
| 328 |
<programlisting> |
| 329 |
typedef struct _FcFontSet { |
| 330 |
int nfont; |
| 331 |
int sfont; |
| 332 |
FcPattern **fonts; |
| 333 |
} FcFontSet; |
| 334 |
</programlisting> |
| 335 |
An FcFontSet contains a list of FcPatterns. Internally fontconfig uses this |
| 336 |
data structure to hold sets of fonts. Externally, fontconfig returns the |
| 337 |
results of listing fonts in this format. 'nfont' holds the number of |
| 338 |
patterns in the 'fonts' array; 'sfont' is used to indicate the size of that |
| 339 |
array. |
| 340 |
</para> |
| 341 |
</sect2> |
| 342 |
<sect2><title>FcStrSet, FcStrList</title> |
| 343 |
<para> |
| 344 |
FcStrSet holds a list of strings that can be appended to and enumerated. |
| 345 |
Its unique characteristic is that the enumeration works even while strings |
| 346 |
are appended during enumeration. FcStrList is used during enumeration to |
| 347 |
safely and correctly walk the list of strings even while that list is edited |
| 348 |
in the middle of enumeration. |
| 349 |
</para> |
| 350 |
</sect2> |
| 351 |
<sect2><title>FcObjectSet</title> |
| 352 |
<para> |
| 353 |
<programlisting> |
| 354 |
typedef struct _FcObjectSet { |
| 355 |
int nobject; |
| 356 |
int sobject; |
| 357 |
const char **objects; |
| 358 |
} FcObjectSet; |
| 359 |
</programlisting> |
| 360 |
holds a set of names and is used to specify which fields from fonts are |
| 361 |
placed in the the list of returned patterns when listing fonts. |
| 362 |
</para> |
| 363 |
</sect2> |
| 364 |
<sect2><title>FcObjectType</title> |
| 365 |
<para> |
| 366 |
<programlisting> |
| 367 |
typedef struct _FcObjectType { |
| 368 |
const char *object; |
| 369 |
FcType type; |
| 370 |
} FcObjectType; |
| 371 |
</programlisting> |
| 372 |
marks the type of a pattern element generated when parsing font names. |
| 373 |
Applications can add new object types so that font names may contain the new |
| 374 |
elements. |
| 375 |
</para> |
| 376 |
</sect2> |
| 377 |
<sect2><title>FcConstant</title> |
| 378 |
<para> |
| 379 |
<programlisting> |
| 380 |
typedef struct _FcConstant { |
| 381 |
const FcChar8 *name; |
| 382 |
const char *object; |
| 383 |
int value; |
| 384 |
} FcConstant; |
| 385 |
</programlisting> |
| 386 |
Provides for symbolic constants for new pattern elements. When 'name' is |
| 387 |
seen in a font name, an 'object' element is created with value 'value'. |
| 388 |
</para> |
| 389 |
</sect2> |
| 390 |
<sect2><title>FcBlanks</title> |
| 391 |
<para> |
| 392 |
holds a list of Unicode chars which are expected to be blank; unexpectedly |
| 393 |
blank chars are assumed to be invalid and are elided from the charset |
| 394 |
associated with the font. |
| 395 |
</para> |
| 396 |
<para> |
| 397 |
FcBlanks is deprecated and should not be used in newly written code. |
| 398 |
It is still accepted by some functions for compatibility with |
| 399 |
older code but will be removed in the future. |
| 400 |
</para> |
| 401 |
</sect2> |
| 402 |
<sect2><title>FcFileCache</title> |
| 403 |
<para> |
| 404 |
holds the per-user cache information for use while loading the font |
| 405 |
database. This is built automatically for the current configuration when |
| 406 |
that is loaded. Applications must always pass '0' when one is requested. |
| 407 |
</para> |
| 408 |
</sect2> |
| 409 |
<sect2><title>FcConfig</title> |
| 410 |
<para> |
| 411 |
holds a complete configuration of the library; there is one default |
| 412 |
configuration, other can be constructed from XML data structures. All |
| 413 |
public entry points that need global data can take an optional FcConfig* |
| 414 |
argument; passing 0 uses the default configuration. FcConfig objects hold two |
| 415 |
sets of fonts, the first contains those specified by the configuration, the |
| 416 |
second set holds those added by the application at run-time. Interfaces |
| 417 |
that need to reference a particular set use one of the FcSetName enumerated |
| 418 |
values. |
| 419 |
</para> |
| 420 |
</sect2> |
| 421 |
<sect2><title>FcSetName</title> |
| 422 |
<para> |
| 423 |
Specifies one of the two sets of fonts available in a configuration; |
| 424 |
FcSetSystem for those fonts specified in the configuration and |
| 425 |
FcSetApplication which holds fonts provided by the application. |
| 426 |
</para> |
| 427 |
</sect2> |
| 428 |
<sect2><title>FcResult</title> |
| 429 |
<para> |
| 430 |
Used as a return type for functions manipulating FcPattern objects. |
| 431 |
<programlisting> |
| 432 |
FcResult Values |
| 433 |
Result Code Meaning |
| 434 |
----------------------------------------------------------- |
| 435 |
FcResultMatch Object exists with the specified ID |
| 436 |
FcResultNoMatch Object doesn't exist at all |
| 437 |
FcResultTypeMismatch Object exists, but the type doesn't match |
| 438 |
FcResultNoId Object exists, but has fewer values |
| 439 |
than specified |
| 440 |
FcResultOutOfMemory malloc failed |
| 441 |
</programlisting> |
| 442 |
</para> |
| 443 |
</sect2> |
| 444 |
<sect2><title>FcAtomic</title> |
| 445 |
<para> |
| 446 |
Used for locking access to configuration files. Provides a safe way to update |
| 447 |
configuration files. |
| 448 |
</para> |
| 449 |
</sect2> |
| 450 |
<sect2><title>FcCache</title> |
| 451 |
<para> |
| 452 |
Holds information about the fonts contained in a single directory. Normal |
| 453 |
applications need not worry about this as caches for font access are |
| 454 |
automatically managed by the library. Applications dealing with cache |
| 455 |
management may want to use some of these objects in their work, however the |
| 456 |
included 'fc-cache' program generally suffices for all of that. |
| 457 |
</para> |
| 458 |
</sect2> |
| 459 |
</sect1> |
| 460 |
<sect1><title>FUNCTIONS</title> |
| 461 |
<para> |
| 462 |
These are grouped by functionality, often using the main data type being |
| 463 |
manipulated. |
| 464 |
</para> |
| 465 |
<sect2><title>Initialization</title> |
| 466 |
<para> |
| 467 |
These functions provide some control over how the library is initialized. |
| 468 |
</para> |
| 469 |
&fcinit; |
| 470 |
</sect2> |
| 471 |
<sect2><title>FcPattern</title> |
| 472 |
<para> |
| 473 |
An FcPattern is an opaque type that holds both patterns to match against the |
| 474 |
available fonts, as well as the information about each font. |
| 475 |
</para> |
| 476 |
&fcpattern; |
| 477 |
&fcformat; |
| 478 |
</sect2> |
| 479 |
<sect2><title>FcFontSet</title> |
| 480 |
<para> |
| 481 |
An FcFontSet simply holds a list of patterns; these are used to return the |
| 482 |
results of listing available fonts. |
| 483 |
</para> |
| 484 |
&fcfontset; |
| 485 |
</sect2> |
| 486 |
<sect2><title>FcObjectSet</title> |
| 487 |
<para> |
| 488 |
An FcObjectSet holds a list of pattern property names; it is used to |
| 489 |
indicate which properties are to be returned in the patterns from |
| 490 |
FcFontList. |
| 491 |
</para> |
| 492 |
&fcobjectset; |
| 493 |
</sect2> |
| 494 |
<sect2><title>FreeType specific functions</title> |
| 495 |
<para> |
| 496 |
While the fontconfig library doesn't insist that FreeType be used as the |
| 497 |
rasterization mechanism for fonts, it does provide some convenience |
| 498 |
functions. |
| 499 |
</para> |
| 500 |
&fcfreetype; |
| 501 |
</sect2> |
| 502 |
<sect2><title>Fontations specific functions</title> |
| 503 |
<para> |
| 504 |
For font indexing, an alternative backend based on the Fontations set |
| 505 |
of font libraries is in development. The indexing functions are exposed |
| 506 |
as Fontations specific functions. |
| 507 |
</para> |
| 508 |
&fcfontations; |
| 509 |
</sect2> |
| 510 |
<sect2><title>FcValue</title> |
| 511 |
<para> |
| 512 |
FcValue is a structure containing a type tag and a union of all possible |
| 513 |
datatypes. The tag is an enum of type |
| 514 |
<emphasis>FcType</emphasis> |
| 515 |
and is intended to provide a measure of run-time |
| 516 |
typechecking, although that depends on careful programming. |
| 517 |
</para> |
| 518 |
&fcvalue; |
| 519 |
</sect2> |
| 520 |
<sect2><title>FcCharSet</title> |
| 521 |
<para> |
| 522 |
An FcCharSet is a boolean array indicating a set of Unicode chars. Those |
| 523 |
associated with a font are marked constant and cannot be edited. |
| 524 |
FcCharSets may be reference counted internally to reduce memory consumption; |
| 525 |
this may be visible to applications as the result of FcCharSetCopy may |
| 526 |
return it's argument, and that CharSet may remain unmodifiable. |
| 527 |
</para> |
| 528 |
&fccharset; |
| 529 |
</sect2> |
| 530 |
<sect2><title>FcLangSet</title> |
| 531 |
<para> |
| 532 |
An FcLangSet is a set of language names (each of which include language and |
| 533 |
an optional territory). They are used when selecting fonts to indicate which |
| 534 |
languages the fonts need to support. Each font is marked, using language |
| 535 |
orthography information built into fontconfig, with the set of supported |
| 536 |
languages. |
| 537 |
</para> |
| 538 |
&fclangset; |
| 539 |
</sect2> |
| 540 |
<sect2><title>FcMatrix</title> |
| 541 |
<para> |
| 542 |
FcMatrix structures hold an affine transformation in matrix form. |
| 543 |
</para> |
| 544 |
&fcmatrix; |
| 545 |
</sect2> |
| 546 |
<sect2><title>FcRange</title> |
| 547 |
<para> |
| 548 |
An FcRange holds two variables to indicate a range in between. |
| 549 |
</para> |
| 550 |
&fcrange; |
| 551 |
</sect2> |
| 552 |
<sect2><title>FcConfig</title> |
| 553 |
<para> |
| 554 |
An FcConfig object holds the internal representation of a configuration. |
| 555 |
There is a default configuration which applications may use by passing 0 to |
| 556 |
any function using the data within an FcConfig. |
| 557 |
</para> |
| 558 |
&fcconfig; |
| 559 |
</sect2> |
| 560 |
<sect2><title>FcObjectType</title> |
| 561 |
<para> |
| 562 |
Provides for application-specified font name object types so that new |
| 563 |
pattern elements can be generated from font names. |
| 564 |
</para> |
| 565 |
&fcobjecttype; |
| 566 |
</sect2> |
| 567 |
<sect2><title>FcConstant</title> |
| 568 |
<para> |
| 569 |
Provides for application-specified symbolic constants for font names. |
| 570 |
</para> |
| 571 |
&fcconstant; |
| 572 |
</sect2> |
| 573 |
<sect2><title>FcWeight</title> |
| 574 |
<para> |
| 575 |
Maps weights to and from OpenType weights. |
| 576 |
</para> |
| 577 |
&fcweight; |
| 578 |
</sect2> |
| 579 |
<sect2><title>FcBlanks</title> |
| 580 |
<para> |
| 581 |
An FcBlanks object holds a list of Unicode chars which are expected to |
| 582 |
be blank when drawn. When scanning new fonts, any glyphs which are |
| 583 |
empty and not in this list will be assumed to be broken and not placed in |
| 584 |
the FcCharSet associated with the font. This provides a significantly more |
| 585 |
accurate CharSet for applications. |
| 586 |
</para> |
| 587 |
<para> |
| 588 |
FcBlanks is deprecated and should not be used in newly written code. |
| 589 |
It is still accepted by some functions for compatibility with |
| 590 |
older code but will be removed in the future. |
| 591 |
</para> |
| 592 |
&fcblanks; |
| 593 |
</sect2> |
| 594 |
<sect2><title>FcAtomic</title> |
| 595 |
<para> |
| 596 |
These functions provide a safe way to update configuration files, allowing ongoing |
| 597 |
reading of the old configuration file while locked for writing and ensuring that a |
| 598 |
consistent and complete version of the configuration file is always available. |
| 599 |
</para> |
| 600 |
&fcatomic; |
| 601 |
</sect2> |
| 602 |
<sect2><title>File and Directory routines</title> |
| 603 |
<para> |
| 604 |
These routines work with font files and directories, including font |
| 605 |
directory cache files. |
| 606 |
</para> |
| 607 |
&fcfile; |
| 608 |
&fcdircache; |
| 609 |
</sect2> |
| 610 |
<sect2><title>FcCache routines</title> |
| 611 |
<para> |
| 612 |
These routines work with font directory caches, accessing their contents in |
| 613 |
limited ways. It is not expected that normal applications will need to use |
| 614 |
these functions. |
| 615 |
</para> |
| 616 |
&fccache; |
| 617 |
</sect2> |
| 618 |
<sect2><title>FcStrSet and FcStrList</title> |
| 619 |
<para> |
| 620 |
A data structure for enumerating strings, used to list directories while |
| 621 |
scanning the configuration as directories are added while scanning. |
| 622 |
</para> |
| 623 |
&fcstrset; |
| 624 |
</sect2> |
| 625 |
<sect2><title>String utilities</title> |
| 626 |
<para> |
| 627 |
Fontconfig manipulates many UTF-8 strings represented with the FcChar8 type. |
| 628 |
These functions are exposed to help applications deal with these UTF-8 |
| 629 |
strings in a locale-insensitive manner. |
| 630 |
</para> |
| 631 |
&fcstring; |
| 632 |
</sect2> |
| 633 |
</sect1> |
| 634 |
</article> |