Age | Commit message (Collapse) | Author |
|
https://bugzilla.opensuse.org/show_bug.cgi?id=918466
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Flagged by cppcheck 1.65:
[mkfontscale.c:247]: (style) Expression is always false because
'else if' condition matches previous condition at line 224.
[mkfontscale.c:245]: (style) Expression is always false because
'else if' condition matches previous condition at line 227.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
|
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
mkfontscale.c:635:25: warning: Potential leak of memory pointed to by 'notice'
foundry = notice_foundry(notice);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
mkfontscale.c:640:8: warning: Potential leak of memory pointed to by 'notice'
if(strcmp(slant, "i") == 0) {
^~~~~~
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Avoid duplicating exit(1) calls after every single call to usage()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Fix compilation for MinGW since 9cbe3256bc932b82f2435b23cda0931f4f5f5ba2
Unfortunately, MinGW doesn't define S_ISLNK, so check for that as well.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
|
|
If a symlink to a fontfile in the same directory exists the file
that got picked depends on the order in which readdir() picked
entries.
This patch gives the file a higher preference than the symlink to
it so it will be preferred if the xlfd entries match.
v2: Followed a suggestion by Julien Cristau <jcristau@debian.org>
to check for DT_LNK being defined instead of _BSD_SOURCE
and fall back to lstat() if d_type is DT_UNKNOWN.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
|
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Does not fix all of them since some lists contain constant strings and
some contain dynamically allocated strings that need to be freed later.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Fontforge uses 'ExtraLight' and 'Heavy' weights in Type 1 fonts, which
should be understood by mkfontscale. Other FontForge designations are
already addressed.
Signed-off-by: Maxim Iorsh <iorsh@users.sourceforge.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
have_face is initialized to 0 at the beginning of the loop, so no need to set
it to 0 just before it goes out of scope at the end of the loop.
mkfontscale.c:945:13: warning: Value stored to 'have_face' is never read
have_face = 0;
^ ~
Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
fscanf %s arguments don't include the trailing \0 byte in their counts.
Error: Buffer overrun
Buffer overflow (CWE 120): Use of fscanf(%1024[), with buffer 'font'
Array size is 1024 bytes
at line 707 of mkfontscale.c in function 'readFontScale'.
Buffer overflow (CWE 120): Use of fscanf(%1024s), with buffer 'file'
Array size is 1024 bytes
at line 707 of mkfontscale.c in function 'readFontScale'.
[ This bug was found by the Parfait 0.3.6 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Allows easier comparison between builds to detect changes.
Helps reduce deltas in packaging systems that compare old & new versions.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clears gcc warning of:
mkfontscale.c:714: warning: format not a string literal, argument types not checked
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
|
|
|
|
|
|
The old workaround would trigger with CFF fonts with embedded bitmaps.
We now explicitly check for the font format being TrueType.
Reported by Andrey V. Panov.
|
|
|
|
This mirrors the behaviour of the old mkfontdir, which prefers pcf to
bdf fonts.
|
|
This spurious break statement disabled checking for Apple and ISO Unicode
CMaps in SFNT fonts. Thanks to Alan Coopersmith and Stefan Dirsch.
|
|
Include headers for proper prototypes and "ansify" makeHashTable.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Thanks to Andrey Panov.
|
|
|
|
xc/fonts/encodings/ascii-0.enc
Adding ascii-0 font encoding which helps in cases where a font has all
ASCII chars populated but not enougth glyphs to match the requirements
for ISO8859-1 (and to add backwards compatibility to ttmkfdir).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|