|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
|
|
Packit |
352660 |
]>
|
|
Packit |
352660 |
|
|
Packit |
352660 |
fontconfig/doc/local-fontconfig-devel.sgml
|
|
Packit |
352660 |
|
|
Packit |
352660 |
Copyright © 2003 Keith Packard
|
|
Packit |
352660 |
|
|
Packit |
352660 |
Permission to use, copy, modify, distribute, and sell this software and its
|
|
Packit |
352660 |
documentation for any purpose is hereby granted without fee, provided that
|
|
Packit |
352660 |
the above copyright notice appear in all copies and that both that
|
|
Packit |
352660 |
copyright notice and this permission notice appear in supporting
|
|
Packit |
352660 |
documentation, and that the name of the author(s) not be used in
|
|
Packit |
352660 |
advertising or publicity pertaining to distribution of the software without
|
|
Packit |
352660 |
specific, written prior permission. The authors make no
|
|
Packit |
352660 |
representations about the suitability of this software for any purpose. It
|
|
Packit |
352660 |
is provided "as is" without express or implied warranty.
|
|
Packit |
352660 |
|
|
Packit |
352660 |
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
Packit |
352660 |
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
Packit |
352660 |
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
Packit |
352660 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
Packit |
352660 |
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
Packit |
352660 |
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
Packit |
352660 |
PERFORMANCE OF THIS SOFTWARE.
|
|
Packit |
352660 |
-->
|
|
Packit |
352660 |
<article>
|
|
Packit |
352660 |
<title>Fontconfig Developers Reference, Version &version; </title>
|
|
Packit |
352660 |
<artheader>
|
|
Packit |
352660 |
<author>
|
|
Packit |
352660 |
<firstname>Keith</firstname>
|
|
Packit |
352660 |
<surname>Packard</surname>
|
|
Packit |
352660 |
<affiliation><orgname>
|
|
Packit |
352660 |
HP Cambridge Research Lab
|
|
Packit |
352660 |
</orgname></affiliation>
|
|
Packit |
352660 |
</author>
|
|
Packit |
352660 |
<authorinitials>KRP</authorinitials>
|
|
Packit |
352660 |
<productname>Fontconfig</productname>
|
|
Packit |
352660 |
<productnumber>&version;</productnumber>
|
|
Packit |
352660 |
<LegalNotice>
|
|
Packit |
352660 |
<simpara>
|
|
Packit |
352660 |
Copyright © 2002 Keith Packard
|
|
Packit |
352660 |
</simpara><simpara>
|
|
Packit |
352660 |
Permission to use, copy, modify, distribute, and sell this software and its
|
|
Packit |
352660 |
documentation for any purpose is hereby granted without fee, provided that
|
|
Packit |
352660 |
the above copyright notice appear in all copies and that both that
|
|
Packit |
352660 |
copyright notice and this permission notice appear in supporting
|
|
Packit |
352660 |
documentation, and that the name of the author(s) not be used in
|
|
Packit |
352660 |
advertising or publicity pertaining to distribution of the software without
|
|
Packit |
352660 |
specific, written prior permission. The authors make no
|
|
Packit |
352660 |
representations about the suitability of this software for any purpose. It
|
|
Packit |
352660 |
is provided "as is" without express or implied warranty.
|
|
Packit |
352660 |
</simpara><simpara>
|
|
Packit |
352660 |
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
Packit |
352660 |
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
Packit |
352660 |
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
Packit |
352660 |
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
Packit |
352660 |
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
Packit |
352660 |
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
Packit |
352660 |
PERFORMANCE OF THIS SOFTWARE.
|
|
Packit |
352660 |
</simpara>
|
|
Packit |
352660 |
</LegalNotice>
|
|
Packit |
352660 |
</artheader>
|
|
Packit |
352660 |
<sect1><title>DESCRIPTION</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Fontconfig is a library designed to provide system-wide font configuration,
|
|
Packit |
352660 |
customization and application access.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect1>
|
|
Packit |
352660 |
<sect1><title>FUNCTIONAL OVERVIEW</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Fontconfig contains two essential modules, the configuration module which
|
|
Packit |
352660 |
builds an internal configuration from XML files and the matching module
|
|
Packit |
352660 |
which accepts font patterns and returns the nearest matching font.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<sect2><title>FONT CONFIGURATION</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
The configuration module consists of the FcConfig datatype, libexpat and
|
|
Packit |
352660 |
FcConfigParse which walks over an XML tree and amends a configuration with
|
|
Packit |
352660 |
data found within. From an external perspective, configuration of the
|
|
Packit |
352660 |
library consists of generating a valid XML tree and feeding that to
|
|
Packit |
352660 |
FcConfigParse. The only other mechanism provided to applications for
|
|
Packit |
352660 |
changing the running configuration is to add fonts and directories to the
|
|
Packit |
352660 |
list of application-provided font files.
|
|
Packit |
352660 |
</para><para>
|
|
Packit |
352660 |
The intent is to make font configurations relatively static, and shared by
|
|
Packit |
352660 |
as many applications as possible. It is hoped that this will lead to more
|
|
Packit |
352660 |
stable font selection when passing names from one application to another.
|
|
Packit |
352660 |
XML was chosen as a configuration file format because it provides a format
|
|
Packit |
352660 |
which is easy for external agents to edit while retaining the correct
|
|
Packit |
352660 |
structure and syntax.
|
|
Packit |
352660 |
</para><para>
|
|
Packit |
352660 |
Font configuration is separate from font matching; applications needing to
|
|
Packit |
352660 |
do their own matching can access the available fonts from the library and
|
|
Packit |
352660 |
perform private matching. The intent is to permit applications to pick and
|
|
Packit |
352660 |
choose appropriate functionality from the library instead of forcing them to
|
|
Packit |
352660 |
choose between this library and a private configuration mechanism. The hope
|
|
Packit |
352660 |
is that this will ensure that configuration of fonts for all applications
|
|
Packit |
352660 |
can be centralized in one place. Centralizing font configuration will
|
|
Packit |
352660 |
simplify and regularize font installation and customization.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2>
|
|
Packit |
352660 |
<title>FONT PROPERTIES</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
While font patterns may contain essentially any properties, there are some
|
|
Packit |
352660 |
well known properties with associated types. Fontconfig uses some of these
|
|
Packit |
352660 |
properties for font matching and font completion. Others are provided as a
|
|
Packit |
352660 |
convenience for the application's rendering mechanism.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
Property Definitions
|
|
Packit |
352660 |
|
|
Packit |
352660 |
Property C Preprocessor Symbol Type Description
|
|
Packit |
352660 |
----------------------------------------------------
|
|
Packit |
352660 |
family FC_FAMILY String Font family names
|
|
Packit |
352660 |
familylang FC_FAMILYLANG String Language corresponding to
|
|
Packit |
352660 |
each family name
|
|
Packit |
352660 |
style FC_STYLE String Font style. Overrides weight
|
|
Packit |
352660 |
and slant
|
|
Packit |
352660 |
stylelang FC_STYLELANG String Language corresponding to
|
|
Packit |
352660 |
each style name
|
|
Packit |
352660 |
fullname FC_FULLNAME String Font face full name where
|
|
Packit |
352660 |
different from family and
|
|
Packit |
352660 |
family + style
|
|
Packit |
352660 |
fullnamelang FC_FULLNAMELANG String Language corresponding to
|
|
Packit |
352660 |
each fullname
|
|
Packit |
352660 |
slant FC_SLANT Int Italic, oblique or roman
|
|
Packit |
352660 |
weight FC_WEIGHT Int Light, medium, demibold,
|
|
Packit |
352660 |
bold or black
|
|
Packit |
352660 |
size FC_SIZE Double Point size
|
|
Packit |
352660 |
width FC_WIDTH Int Condensed, normal or expanded
|
|
Packit |
352660 |
aspect FC_ASPECT Double Stretches glyphs horizontally
|
|
Packit |
352660 |
before hinting
|
|
Packit |
352660 |
pixelsize FC_PIXEL_SIZE Double Pixel size
|
|
Packit |
352660 |
spacing FC_SPACING Int Proportional, dual-width,
|
|
Packit |
352660 |
monospace or charcell
|
|
Packit |
352660 |
foundry FC_FOUNDRY String Font foundry name
|
|
Packit |
352660 |
antialias FC_ANTIALIAS Bool Whether glyphs can be
|
|
Packit |
352660 |
antialiased
|
|
Packit |
352660 |
hinting FC_HINTING Bool Whether the rasterizer should
|
|
Packit |
352660 |
use hinting
|
|
Packit |
352660 |
hintstyle FC_HINT_STYLE Int Automatic hinting style
|
|
Packit |
352660 |
verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout
|
|
Packit |
352660 |
autohint FC_AUTOHINT Bool Use autohinter instead of
|
|
Packit |
352660 |
normal hinter
|
|
Packit |
352660 |
globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated)
|
|
Packit |
352660 |
file FC_FILE String The filename holding the font
|
|
Packit |
352660 |
index FC_INDEX Int The index of the font within
|
|
Packit |
352660 |
the file
|
|
Packit |
352660 |
ftface FC_FT_FACE FT_Face Use the specified FreeType
|
|
Packit |
352660 |
face object
|
|
Packit |
352660 |
rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated)
|
|
Packit |
352660 |
outline FC_OUTLINE Bool Whether the glyphs are outlines
|
|
Packit |
352660 |
scalable FC_SCALABLE Bool Whether glyphs can be scaled
|
|
Packit |
352660 |
scale FC_SCALE Double Scale factor for point->pixel
|
|
Packit |
352660 |
conversions (deprecated)
|
|
Packit |
352660 |
symbol FC_SYMBOL Bool Whether font uses MS symbol-font encoding
|
|
Packit |
352660 |
color FC_COLOR Bool Whether any glyphs have color
|
|
Packit |
352660 |
dpi FC_DPI Double Target dots per inch
|
|
Packit |
352660 |
rgba FC_RGBA Int unknown, rgb, bgr, vrgb,
|
|
Packit |
352660 |
vbgr, none - subpixel geometry
|
|
Packit |
352660 |
lcdfilter FC_LCD_FILTER Int Type of LCD filter
|
|
Packit |
352660 |
minspace FC_MINSPACE Bool Eliminate leading from line
|
|
Packit |
352660 |
spacing
|
|
Packit |
352660 |
charset FC_CHARSET CharSet Unicode chars encoded by
|
|
Packit |
352660 |
the font
|
|
Packit |
352660 |
lang FC_LANG LangSet Set of RFC-3066-style
|
|
Packit |
352660 |
languages this font supports
|
|
Packit |
352660 |
fontversion FC_FONTVERSION Int Version number of the font
|
|
Packit |
352660 |
capability FC_CAPABILITY String List of layout capabilities in
|
|
Packit |
352660 |
the font
|
|
Packit |
352660 |
fontformat FC_FONTFORMAT String String name of the font format
|
|
Packit |
352660 |
embolden FC_EMBOLDEN Bool Rasterizer should
|
|
Packit |
352660 |
synthetically embolden the font
|
|
Packit |
352660 |
embeddedbitmap FC_EMBEDDED_BITMAP Bool Use the embedded bitmap instead
|
|
Packit |
352660 |
of the outline
|
|
Packit |
352660 |
decorative FC_DECORATIVE Bool Whether the style is a decorative
|
|
Packit |
352660 |
variant
|
|
Packit |
352660 |
fontfeatures FC_FONT_FEATURES String List of extra feature tags in
|
|
Packit |
352660 |
OpenType to be enabled
|
|
Packit |
352660 |
namelang FC_NAMELANG String Language name to be used for the
|
|
Packit |
352660 |
default value of familylang,
|
|
Packit |
352660 |
stylelang and fullnamelang
|
|
Packit |
352660 |
prgname FC_PRGNAME String Name of the running program
|
|
Packit |
352660 |
hash FC_HASH String SHA256 hash value of the font data
|
|
Packit |
352660 |
with "sha256:" prefix (deprecated)
|
|
Packit |
352660 |
postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
</sect1>
|
|
Packit |
352660 |
<sect1><title>Datatypes</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Fontconfig uses abstract data types to hide internal implementation details
|
|
Packit |
352660 |
for most data structures. A few structures are exposed where appropriate.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<sect2><title>FcChar8, FcChar16, FcChar32, FcBool</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These are primitive data types; the FcChar* types hold precisely the number
|
|
Packit |
352660 |
of bits stated (if supported by the C implementation). FcBool holds
|
|
Packit |
352660 |
one of two C preprocessor symbols: FcFalse or FcTrue.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcMatrix</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcMatrix holds an affine transformation, usually used to reshape glyphs.
|
|
Packit |
352660 |
A small set of matrix operations are provided to manipulate these.
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcMatrix {
|
|
Packit |
352660 |
double xx, xy, yx, yy;
|
|
Packit |
352660 |
} FcMatrix;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcCharSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcCharSet is an abstract type that holds the set of encoded Unicode chars
|
|
Packit |
352660 |
in a font. Operations to build and compare these sets are provided.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcLangSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcLangSet is an abstract type that holds the set of languages supported
|
|
Packit |
352660 |
by a font. Operations to build and compare these sets are provided. These
|
|
Packit |
352660 |
are computed for a font based on orthographic information built into the
|
|
Packit |
352660 |
fontconfig library. Fontconfig has orthographies for all of the ISO 639-1
|
|
Packit |
352660 |
languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If
|
|
Packit |
352660 |
you have orthographic information for any of these languages, please submit
|
|
Packit |
352660 |
them.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcLangResult</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcLangResult is an enumeration used to return the results of comparing
|
|
Packit |
352660 |
two language strings or FcLangSet objects. FcLangEqual means the
|
|
Packit |
352660 |
objects match language and territory. FcLangDifferentTerritory means
|
|
Packit |
352660 |
the objects match in language but differ in territory.
|
|
Packit |
352660 |
FcLangDifferentLang means the objects differ in language.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcType</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Tags the kind of data stored in an FcValue.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcValue</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcValue object holds a single value with one of a number of different
|
|
Packit |
352660 |
types. The 'type' tag indicates which member is valid.
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcValue {
|
|
Packit |
352660 |
FcType type;
|
|
Packit |
352660 |
union {
|
|
Packit |
352660 |
const FcChar8 *s;
|
|
Packit |
352660 |
int i;
|
|
Packit |
352660 |
FcBool b;
|
|
Packit |
352660 |
double d;
|
|
Packit |
352660 |
const FcMatrix *m;
|
|
Packit |
352660 |
const FcCharSet *c;
|
|
Packit |
352660 |
void *f;
|
|
Packit |
352660 |
const FcLangSet *l;
|
|
Packit |
352660 |
} u;
|
|
Packit |
352660 |
} FcValue;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
FcValue Members
|
|
Packit |
352660 |
|
|
Packit |
352660 |
Type Union member Datatype
|
|
Packit |
352660 |
--------------------------------
|
|
Packit |
352660 |
FcTypeVoid (none) (none)
|
|
Packit |
352660 |
FcTypeInteger i int
|
|
Packit |
352660 |
FcTypeDouble d double
|
|
Packit |
352660 |
FcTypeString s FcChar8 *
|
|
Packit |
352660 |
FcTypeBool b b
|
|
Packit |
352660 |
FcTypeMatrix m FcMatrix *
|
|
Packit |
352660 |
FcTypeCharSet c FcCharSet *
|
|
Packit |
352660 |
FcTypeFTFace f void * (FT_Face)
|
|
Packit |
352660 |
FcTypeLangSet l FcLangSet *
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcPattern</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
holds a set of names with associated value lists; each name refers to a
|
|
Packit |
352660 |
property of a font. FcPatterns are used as inputs to the matching code as
|
|
Packit |
352660 |
well as holding information about specific fonts. Each property can hold
|
|
Packit |
352660 |
one or more values; conventionally all of the same type, although the
|
|
Packit |
352660 |
interface doesn't demand that.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcFontSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcFontSet {
|
|
Packit |
352660 |
int nfont;
|
|
Packit |
352660 |
int sfont;
|
|
Packit |
352660 |
FcPattern **fonts;
|
|
Packit |
352660 |
} FcFontSet;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
An FcFontSet contains a list of FcPatterns. Internally fontconfig uses this
|
|
Packit |
352660 |
data structure to hold sets of fonts. Externally, fontconfig returns the
|
|
Packit |
352660 |
results of listing fonts in this format. 'nfont' holds the number of
|
|
Packit |
352660 |
patterns in the 'fonts' array; 'sfont' is used to indicate the size of that
|
|
Packit |
352660 |
array.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcStrSet, FcStrList</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
FcStrSet holds a list of strings that can be appended to and enumerated.
|
|
Packit |
352660 |
Its unique characteristic is that the enumeration works even while strings
|
|
Packit |
352660 |
are appended during enumeration. FcStrList is used during enumeration to
|
|
Packit |
352660 |
safely and correctly walk the list of strings even while that list is edited
|
|
Packit |
352660 |
in the middle of enumeration.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcObjectSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcObjectSet {
|
|
Packit |
352660 |
int nobject;
|
|
Packit |
352660 |
int sobject;
|
|
Packit |
352660 |
const char **objects;
|
|
Packit |
352660 |
} FcObjectSet;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
holds a set of names and is used to specify which fields from fonts are
|
|
Packit |
352660 |
placed in the the list of returned patterns when listing fonts.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcObjectType</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcObjectType {
|
|
Packit |
352660 |
const char *object;
|
|
Packit |
352660 |
FcType type;
|
|
Packit |
352660 |
} FcObjectType;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
marks the type of a pattern element generated when parsing font names.
|
|
Packit |
352660 |
Applications can add new object types so that font names may contain the new
|
|
Packit |
352660 |
elements.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcConstant</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
typedef struct _FcConstant {
|
|
Packit |
352660 |
const FcChar8 *name;
|
|
Packit |
352660 |
const char *object;
|
|
Packit |
352660 |
int value;
|
|
Packit |
352660 |
} FcConstant;
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
Provides for symbolic constants for new pattern elements. When 'name' is
|
|
Packit |
352660 |
seen in a font name, an 'object' element is created with value 'value'.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcBlanks</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
holds a list of Unicode chars which are expected to be blank; unexpectedly
|
|
Packit |
352660 |
blank chars are assumed to be invalid and are elided from the charset
|
|
Packit |
352660 |
associated with the font.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
FcBlanks is deprecated and should not be used in newly written code.
|
|
Packit |
352660 |
It is still accepted by some functions for compatibility with
|
|
Packit |
352660 |
older code but will be removed in the future.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcFileCache</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
holds the per-user cache information for use while loading the font
|
|
Packit |
352660 |
database. This is built automatically for the current configuration when
|
|
Packit |
352660 |
that is loaded. Applications must always pass '0' when one is requested.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcConfig</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
holds a complete configuration of the library; there is one default
|
|
Packit |
352660 |
configuration, other can be constructed from XML data structures. All
|
|
Packit |
352660 |
public entry points that need global data can take an optional FcConfig*
|
|
Packit |
352660 |
argument; passing 0 uses the default configuration. FcConfig objects hold two
|
|
Packit |
352660 |
sets of fonts, the first contains those specified by the configuration, the
|
|
Packit |
352660 |
second set holds those added by the application at run-time. Interfaces
|
|
Packit |
352660 |
that need to reference a particular set use one of the FcSetName enumerated
|
|
Packit |
352660 |
values.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcSetName</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Specifies one of the two sets of fonts available in a configuration;
|
|
Packit |
352660 |
FcSetSystem for those fonts specified in the configuration and
|
|
Packit |
352660 |
FcSetApplication which holds fonts provided by the application.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcResult</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Used as a return type for functions manipulating FcPattern objects.
|
|
Packit |
352660 |
<programlisting>
|
|
Packit |
352660 |
FcResult Values
|
|
Packit |
352660 |
Result Code Meaning
|
|
Packit |
352660 |
-----------------------------------------------------------
|
|
Packit |
352660 |
FcResultMatch Object exists with the specified ID
|
|
Packit |
352660 |
FcResultNoMatch Object doesn't exist at all
|
|
Packit |
352660 |
FcResultTypeMismatch Object exists, but the type doesn't match
|
|
Packit |
352660 |
FcResultNoId Object exists, but has fewer values
|
|
Packit |
352660 |
than specified
|
|
Packit |
352660 |
FcResultOutOfMemory malloc failed
|
|
Packit |
352660 |
</programlisting>
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcAtomic</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Used for locking access to configuration files. Provides a safe way to update
|
|
Packit |
352660 |
configuration files.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcCache</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Holds information about the fonts contained in a single directory. Normal
|
|
Packit |
352660 |
applications need not worry about this as caches for font access are
|
|
Packit |
352660 |
automatically managed by the library. Applications dealing with cache
|
|
Packit |
352660 |
management may want to use some of these objects in their work, however the
|
|
Packit |
352660 |
included 'fc-cache' program generally suffices for all of that.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
</sect1>
|
|
Packit |
352660 |
<sect1><title>FUNCTIONS</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These are grouped by functionality, often using the main data type being
|
|
Packit |
352660 |
manipulated.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<sect2><title>Initialization</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These functions provide some control over how the library is initialized.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcinit;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcPattern</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcPattern is an opaque type that holds both patterns to match against the
|
|
Packit |
352660 |
available fonts, as well as the information about each font.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcpattern;
|
|
Packit |
352660 |
&fcformat;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcFontSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcFontSet simply holds a list of patterns; these are used to return the
|
|
Packit |
352660 |
results of listing available fonts.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcfontset;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcObjectSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcObjectSet holds a list of pattern property names; it is used to
|
|
Packit |
352660 |
indicate which properties are to be returned in the patterns from
|
|
Packit |
352660 |
FcFontList.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcobjectset;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FreeType specific functions</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
While the fontconfig library doesn't insist that FreeType be used as the
|
|
Packit |
352660 |
rasterization mechanism for fonts, it does provide some convenience
|
|
Packit |
352660 |
functions.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcfreetype;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcValue</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
FcValue is a structure containing a type tag and a union of all possible
|
|
Packit |
352660 |
datatypes. The tag is an enum of type
|
|
Packit |
352660 |
<emphasis>FcType</emphasis>
|
|
Packit |
352660 |
and is intended to provide a measure of run-time
|
|
Packit |
352660 |
typechecking, although that depends on careful programming.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcvalue;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcCharSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcCharSet is a boolean array indicating a set of Unicode chars. Those
|
|
Packit |
352660 |
associated with a font are marked constant and cannot be edited.
|
|
Packit |
352660 |
FcCharSets may be reference counted internally to reduce memory consumption;
|
|
Packit |
352660 |
this may be visible to applications as the result of FcCharSetCopy may
|
|
Packit |
352660 |
return it's argument, and that CharSet may remain unmodifiable.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fccharset;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcLangSet</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcLangSet is a set of language names (each of which include language and
|
|
Packit |
352660 |
an optional territory). They are used when selecting fonts to indicate which
|
|
Packit |
352660 |
languages the fonts need to support. Each font is marked, using language
|
|
Packit |
352660 |
orthography information built into fontconfig, with the set of supported
|
|
Packit |
352660 |
languages.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fclangset;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcMatrix</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
FcMatrix structures hold an affine transformation in matrix form.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcmatrix;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcRange</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcRange holds two variables to indicate a range in between.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcrange;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcConfig</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcConfig object holds the internal representation of a configuration.
|
|
Packit |
352660 |
There is a default configuration which applications may use by passing 0 to
|
|
Packit |
352660 |
any function using the data within an FcConfig.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcconfig;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcObjectType</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Provides for application-specified font name object types so that new
|
|
Packit |
352660 |
pattern elements can be generated from font names.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcobjecttype;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcConstant</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Provides for application-specified symbolic constants for font names.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcconstant;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcWeight</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Maps weights to and from OpenType weights.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcweight;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcBlanks</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
An FcBlanks object holds a list of Unicode chars which are expected to
|
|
Packit |
352660 |
be blank when drawn. When scanning new fonts, any glyphs which are
|
|
Packit |
352660 |
empty and not in this list will be assumed to be broken and not placed in
|
|
Packit |
352660 |
the FcCharSet associated with the font. This provides a significantly more
|
|
Packit |
352660 |
accurate CharSet for applications.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
FcBlanks is deprecated and should not be used in newly written code.
|
|
Packit |
352660 |
It is still accepted by some functions for compatibility with
|
|
Packit |
352660 |
older code but will be removed in the future.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcblanks;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcAtomic</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These functions provide a safe way to update configuration files, allowing ongoing
|
|
Packit |
352660 |
reading of the old configuration file while locked for writing and ensuring that a
|
|
Packit |
352660 |
consistent and complete version of the configuration file is always available.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcatomic;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>File and Directory routines</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These routines work with font files and directories, including font
|
|
Packit |
352660 |
directory cache files.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcfile;
|
|
Packit |
352660 |
&fcdircache;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcCache routines</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
These routines work with font directory caches, accessing their contents in
|
|
Packit |
352660 |
limited ways. It is not expected that normal applications will need to use
|
|
Packit |
352660 |
these functions.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fccache;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>FcStrSet and FcStrList</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
A data structure for enumerating strings, used to list directories while
|
|
Packit |
352660 |
scanning the configuration as directories are added while scanning.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcstrset;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
<sect2><title>String utilities</title>
|
|
Packit |
352660 |
<para>
|
|
Packit |
352660 |
Fontconfig manipulates many UTF-8 strings represented with the FcChar8 type.
|
|
Packit |
352660 |
These functions are exposed to help applications deal with these UTF-8
|
|
Packit |
352660 |
strings in a locale-insensitive manner.
|
|
Packit |
352660 |
</para>
|
|
Packit |
352660 |
&fcstring;
|
|
Packit |
352660 |
</sect2>
|
|
Packit |
352660 |
</sect1>
|
|
Packit |
352660 |
</article>
|