aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/doc/fontconfig-devel.sgml2
-rw-r--r--fontconfig/doc/fontconfig-user.sgml2
-rw-r--r--fontconfig/fc-query/fc-query.c28
-rw-r--r--fontconfig/fc-query/fc-query.sgml12
-rw-r--r--fontconfig/fc-scan/fc-scan.c28
-rw-r--r--fontconfig/fc-scan/fc-scan.sgml14
-rw-r--r--fontconfig/fontconfig/fontconfig.h2
7 files changed, 66 insertions, 22 deletions
diff --git a/fontconfig/doc/fontconfig-devel.sgml b/fontconfig/doc/fontconfig-devel.sgml
index 0fa4605b5..17402c7bc 100644
--- a/fontconfig/doc/fontconfig-devel.sgml
+++ b/fontconfig/doc/fontconfig-devel.sgml
@@ -176,7 +176,7 @@ convenience for the application's rendering mechanism.
outline FC_OUTLINE Bool Whether the glyphs are outlines
scalable FC_SCALABLE Bool Whether glyphs can be scaled
scale FC_SCALE Double Scale factor for point->pixel
- conversions
+ conversions (deprecated)
color FC_COLOR Bool Whether any glyphs have color
dpi FC_DPI Double Target dots per inch
rgba FC_RGBA Int unknown, rgb, bgr, vrgb,
diff --git a/fontconfig/doc/fontconfig-user.sgml b/fontconfig/doc/fontconfig-user.sgml
index 5803929f7..e7cdb2e77 100644
--- a/fontconfig/doc/fontconfig-user.sgml
+++ b/fontconfig/doc/fontconfig-user.sgml
@@ -120,7 +120,7 @@ convenience for the applications' rendering mechanism.
outline Bool Whether the glyphs are outlines
scalable Bool Whether glyphs can be scaled
color Bool Whether any glyphs have color
- scale Double Scale factor for point->pixel conversions
+ scale Double Scale factor for point->pixel conversions (deprecated)
dpi Double Target dots per inch
rgba Int unknown, rgb, bgr, vrgb, vbgr,
none - subpixel geometry
diff --git a/fontconfig/fc-query/fc-query.c b/fontconfig/fc-query/fc-query.c
index 2983e0f19..9bd398059 100644
--- a/fontconfig/fc-query/fc-query.c
+++ b/fontconfig/fc-query/fc-query.c
@@ -52,6 +52,7 @@
#define _GNU_SOURCE
#include <getopt.h>
static const struct option longopts[] = {
+ {"ignore-blanks", 0, 0, 'b'},
{"index", 1, 0, 'i'},
{"format", 1, 0, 'f'},
{"version", 0, 0, 'V'},
@@ -70,24 +71,26 @@ usage (char *program, int error)
{
FILE *file = error ? stderr : stdout;
#if HAVE_GETOPT_LONG
- fprintf (file, "usage: %s [-Vh] [-i index] [-f FORMAT] [--index index] [--format FORMAT] [--version] [--help] font-file...\n",
+ fprintf (file, "usage: %s [-Vbh] [-i index] [-f FORMAT] [--ignore-blanks] [--index index] [--format FORMAT] [--version] [--help] font-file...\n",
program);
#else
- fprintf (file, "usage: %s [-Vh] [-i index] [-f FORMAT] font-file...\n",
+ fprintf (file, "usage: %s [-Vbh] [-i index] [-f FORMAT] font-file...\n",
program);
#endif
fprintf (file, "Query font files and print resulting pattern(s)\n");
fprintf (file, "\n");
#if HAVE_GETOPT_LONG
+ fprintf (file, " -b, --ignore-blanks ignore blanks to compute langauges\n");
fprintf (file, " -i, --index INDEX display the INDEX face of each font file only\n");
fprintf (file, " -f, --format=FORMAT use the given output format\n");
fprintf (file, " -V, --version display font config version and exit\n");
fprintf (file, " -h, --help display this help and exit\n");
#else
- fprintf (file, " -i INDEX (index) display the INDEX face of each font file only\n");
- fprintf (file, " -f FORMAT (format) use the given output format\n");
- fprintf (file, " -V (version) display font config version and exit\n");
- fprintf (file, " -h (help) display this help and exit\n");
+ fprintf (file, " -b (ignore-blanks) ignore blanks to compute languages\n");
+ fprintf (file, " -i INDEX (index) display the INDEX face of each font file only\n");
+ fprintf (file, " -f FORMAT (format) use the given output format\n");
+ fprintf (file, " -V (version) display font config version and exit\n");
+ fprintf (file, " -h (help) display this help and exit\n");
#endif
exit (error);
}
@@ -97,19 +100,24 @@ main (int argc, char **argv)
{
int index_set = 0;
int set_index = 0;
+ int ignore_blanks = 0;
FcChar8 *format = NULL;
+ FcBlanks *blanks = NULL;
int err = 0;
int i;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
int c;
#if HAVE_GETOPT_LONG
- while ((c = getopt_long (argc, argv, "i:f:Vh", longopts, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "bi:f:Vh", longopts, NULL)) != -1)
#else
- while ((c = getopt (argc, argv, "i:f:Vh")) != -1)
+ while ((c = getopt (argc, argv, "bi:f:Vh")) != -1)
#endif
{
switch (c) {
+ case 'b':
+ ignore_blanks = 1;
+ break;
case 'i':
index_set = 1;
set_index = atoi (optarg);
@@ -135,6 +143,8 @@ main (int argc, char **argv)
if (i == argc)
usage (argv[0], 1);
+ if (!ignore_blanks)
+ blanks = FcConfigGetBlanks (NULL);
for (; i < argc; i++)
{
int index;
@@ -145,7 +155,7 @@ main (int argc, char **argv)
do {
FcPattern *pat;
- pat = FcFreeTypeQuery ((FcChar8 *) argv[i], index, NULL, &count);
+ pat = FcFreeTypeQuery ((FcChar8 *) argv[i], index, blanks, &count);
if (pat)
{
if (format)
diff --git a/fontconfig/fc-query/fc-query.sgml b/fontconfig/fc-query/fc-query.sgml
index 5351d1e4d..fd51d2171 100644
--- a/fontconfig/fc-query/fc-query.sgml
+++ b/fontconfig/fc-query/fc-query.sgml
@@ -65,6 +65,10 @@ manpage.1: manpage.sgml
<arg><option>-Vh</option></arg>
<sbr>
<group>
+ <arg><option>-b</option></arg>
+ <arg><option>--ignore-blanks</option></arg>
+ </group>
+ <group>
<arg><option>-i</option> <option><replaceable>index</replaceable></option></arg>
<arg><option>--index</option> <option><replaceable>index</replaceable></option></arg>
</group>
@@ -97,6 +101,14 @@ manpage.1: manpage.sgml
<variablelist>
<varlistentry>
+ <term><option>-b</option>
+ <option>--ignore-blanks</option>
+ </term>
+ <listitem>
+ <para>Ignore blanks to compute languages</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>-i</option>
<option>--index</option>
<option><replaceable>index</replaceable></option>
diff --git a/fontconfig/fc-scan/fc-scan.c b/fontconfig/fc-scan/fc-scan.c
index 5638b51cf..4d0b1db44 100644
--- a/fontconfig/fc-scan/fc-scan.c
+++ b/fontconfig/fc-scan/fc-scan.c
@@ -52,6 +52,7 @@
#define _GNU_SOURCE
#include <getopt.h>
static const struct option longopts[] = {
+ {"ignore-blanks", 0, 0, 'b'},
{"format", 1, 0, 'f'},
{"version", 0, 0, 'V'},
{"help", 0, 0, 'h'},
@@ -69,22 +70,24 @@ usage (char *program, int error)
{
FILE *file = error ? stderr : stdout;
#if HAVE_GETOPT_LONG
- fprintf (file, "usage: %s [-Vh] [-f FORMAT] [--format FORMAT] [--version] [--help] font-file...\n",
+ fprintf (file, "usage: %s [-Vbh] [-f FORMAT] [--ignore-blanks] [--format FORMAT] [--version] [--help] font-file...\n",
program);
#else
- fprintf (file, "usage: %s [-Vh] [-f FORMAT] font-file...\n",
+ fprintf (file, "usage: %s [-Vbh] [-f FORMAT] font-file...\n",
program);
#endif
fprintf (file, "Scan font files and directories, and print resulting pattern(s)\n");
fprintf (file, "\n");
#if HAVE_GETOPT_LONG
+ fprintf (file, " -b, --ignore-blanks ignore blanks to compute languages\n");
fprintf (file, " -f, --format=FORMAT use the given output format\n");
fprintf (file, " -V, --version display font config version and exit\n");
fprintf (file, " -h, --help display this help and exit\n");
#else
- fprintf (file, " -f FORMAT (format) use the given output format\n");
- fprintf (file, " -V (version) display font config version and exit\n");
- fprintf (file, " -h (help) display this help and exit\n");
+ fprintf (file, " -b (ignore-blanks) ignore blanks to compute languages\n");
+ fprintf (file, " -f FORMAT (format) use the given output format\n");
+ fprintf (file, " -V (version) display font config version and exit\n");
+ fprintf (file, " -h (help) display this help and exit\n");
#endif
exit (error);
}
@@ -94,17 +97,22 @@ main (int argc, char **argv)
{
FcChar8 *format = NULL;
int i;
+ int ignore_blanks = 0;
FcFontSet *fs;
+ FcBlanks *blanks = NULL;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
int c;
#if HAVE_GETOPT_LONG
- while ((c = getopt_long (argc, argv, "f:Vh", longopts, NULL)) != -1)
+ while ((c = getopt_long (argc, argv, "bf:Vh", longopts, NULL)) != -1)
#else
- while ((c = getopt (argc, argv, "f:Vh")) != -1)
+ while ((c = getopt (argc, argv, "bf:Vh")) != -1)
#endif
{
switch (c) {
+ case 'b':
+ ignore_blanks = 1;
+ break;
case 'f':
format = (FcChar8 *) strdup (optarg);
break;
@@ -127,20 +135,22 @@ main (int argc, char **argv)
usage (argv[0], 1);
fs = FcFontSetCreate ();
+ if (!ignore_blanks)
+ blanks = FcConfigGetBlanks (NULL);
for (; i < argc; i++)
{
const FcChar8 *file = (FcChar8*) argv[i];
if (!FcFileIsDir (file))
- FcFileScan (fs, NULL, NULL, NULL, file, FcTrue);
+ FcFileScan (fs, NULL, NULL, blanks, file, FcTrue);
else
{
FcStrSet *dirs = FcStrSetCreate ();
FcStrList *strlist = FcStrListCreate (dirs);
do
{
- FcDirScan (fs, dirs, NULL, NULL, file, FcTrue);
+ FcDirScan (fs, dirs, NULL, blanks, file, FcTrue);
}
while ((file = FcStrListNext (strlist)));
FcStrListDone (strlist);
diff --git a/fontconfig/fc-scan/fc-scan.sgml b/fontconfig/fc-scan/fc-scan.sgml
index 9af403c1f..65a66c4f3 100644
--- a/fontconfig/fc-scan/fc-scan.sgml
+++ b/fontconfig/fc-scan/fc-scan.sgml
@@ -62,9 +62,13 @@ manpage.1: manpage.sgml
<cmdsynopsis>
<command>&dhpackage;</command>
- <arg><option>-Vh</option></arg>
+ <arg><option>-Vbh</option></arg>
<sbr>
<group>
+ <arg><option>-b</option></arg>
+ <arg><option>--ignore-blanks</option></arg>
+ </group>
+ <group>
<arg><option>-f</option> <option><replaceable>format</replaceable></option></arg>
<arg><option>--format</option> <option><replaceable>format</replaceable></option></arg>
</group>
@@ -91,6 +95,14 @@ manpage.1: manpage.sgml
<variablelist>
<varlistentry>
+ <term><option>-b</option>
+ <option>--ignore-blanks</option>
+ </term>
+ <listitem>
+ <para>Ignore blanks to compute languages</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>-f</option>
<option>--format</option>
<option><replaceable>format</replaceable></option>
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index b14c9616c..58b6b5137 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -95,7 +95,7 @@ typedef int FcBool;
#define FC_OUTLINE "outline" /* Bool */
#define FC_SCALABLE "scalable" /* Bool */
#define FC_COLOR "color" /* Bool */
-#define FC_SCALE "scale" /* double */
+#define FC_SCALE "scale" /* double (deprecated) */
#define FC_DPI "dpi" /* double */
#define FC_RGBA "rgba" /* Int */
#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */