Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fontconfig
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
152
Issues
152
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fontconfig
fontconfig
Commits
dc8326d3
Commit
dc8326d3
authored
Sep 15, 2017
by
Behdad Esfahbod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fc-query] Remove --ignore-blanks / -b
Blanks are the new black, err, dead!
parent
2db7ca7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
fc-query/fc-query.c
fc-query/fc-query.c
+5
-15
No files found.
fc-query/fc-query.c
View file @
dc8326d3
...
...
@@ -52,7 +52,6 @@
#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'
},
...
...
@@ -71,22 +70,20 @@ usage (char *program, int error)
{
FILE
*
file
=
error
?
stderr
:
stdout
;
#if HAVE_GETOPT_LONG
fprintf
(
file
,
"usage: %s [-V
bh] [-i index] [-f FORMAT] [--ignore-blanks
] [--index index] [--format FORMAT] [--version] [--help] font-file...
\n
"
,
fprintf
(
file
,
"usage: %s [-V
h] [-i index] [-f FORMAT
] [--index index] [--format FORMAT] [--version] [--help] font-file...
\n
"
,
program
);
#else
fprintf
(
file
,
"usage: %s [-V
b
h] [-i index] [-f FORMAT] font-file...
\n
"
,
fprintf
(
file
,
"usage: %s [-Vh] [-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
,
" -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
"
);
...
...
@@ -99,25 +96,20 @@ int
main
(
int
argc
,
char
**
argv
)
{
unsigned
int
id
=
(
unsigned
int
)
-
1
;
int
ignore_blanks
=
0
;
FcFontSet
*
fs
;
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
,
"
b
i:f:Vh"
,
longopts
,
NULL
))
!=
-
1
)
while
((
c
=
getopt_long
(
argc
,
argv
,
"i:f:Vh"
,
longopts
,
NULL
))
!=
-
1
)
#else
while
((
c
=
getopt
(
argc
,
argv
,
"
b
i:f:Vh"
))
!=
-
1
)
while
((
c
=
getopt
(
argc
,
argv
,
"i:f:Vh"
))
!=
-
1
)
#endif
{
switch
(
c
)
{
case
'b'
:
ignore_blanks
=
1
;
break
;
case
'i'
:
id
=
(
unsigned
int
)
strtol
(
optarg
,
NULL
,
0
);
/* strtol() To handle -1. */
break
;
...
...
@@ -143,12 +135,10 @@ main (int argc, char **argv)
usage
(
argv
[
0
],
1
);
fs
=
FcFontSetCreate
();
if
(
!
ignore_blanks
)
blanks
=
FcConfigGetBlanks
(
NULL
);
for
(;
i
<
argc
;
i
++
)
{
if
(
!
FcFreeTypeQueryAll
((
FcChar8
*
)
argv
[
i
],
id
,
blanks
,
NULL
,
fs
))
if
(
!
FcFreeTypeQueryAll
((
FcChar8
*
)
argv
[
i
],
id
,
NULL
,
NULL
,
fs
))
{
fprintf
(
stderr
,
"Can't query face %u of font file %s
\n
"
,
id
,
argv
[
i
]);
err
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment