summaryrefslogtreecommitdiff
path: root/app/mkfontscale
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-06-13 01:01:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-06-13 01:01:27 +0000
commit498399aec0e2e5f78b8aa689fd9ef072a65c8d91 (patch)
treea1317c3823dce8c7ccac616c70340e97c59a9ad8 /app/mkfontscale
parente04e726b24999c07b7467320cffc9513c05d8b22 (diff)
update to mkfontscale 1.0.5
Diffstat (limited to 'app/mkfontscale')
-rw-r--r--app/mkfontscale/COPYING2
-rw-r--r--app/mkfontscale/ChangeLog332
-rw-r--r--app/mkfontscale/configure20
-rw-r--r--app/mkfontscale/configure.ac2
-rw-r--r--app/mkfontscale/hash.c44
-rw-r--r--app/mkfontscale/ident.c1
-rw-r--r--app/mkfontscale/mkfontscale.c27
7 files changed, 347 insertions, 81 deletions
diff --git a/app/mkfontscale/COPYING b/app/mkfontscale/COPYING
index 31965e8dc..b706b38c8 100644
--- a/app/mkfontscale/COPYING
+++ b/app/mkfontscale/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2002-2003 by Juliusz Chroboczek
+Copyright (c) 2002-2008 by Juliusz Chroboczek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/app/mkfontscale/ChangeLog b/app/mkfontscale/ChangeLog
index f495e7970..a0001ad4e 100644
--- a/app/mkfontscale/ChangeLog
+++ b/app/mkfontscale/ChangeLog
@@ -1,38 +1,324 @@
-2006-05-25 Jeremy C. Reed <reed@reedmedia.net>
+commit 8126d2b694f48cc8137be05705a125f7d02e7e12
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sun May 11 00:03:44 2008 +0200
- reviewed by: Adam Jackson
+ Bump to 1.0.5
- * configure.ac:
- Check for xproto not x11 (libX11 is not needed).
+commit f131ff40d2b46692c393346110df2567cfa67c29
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Sat May 10 23:58:55 2008 +0200
-2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Update copyright date.
- * configure.ac:
- Update package version for X11R7 release.
+commit c322c79c2b9b8d6075b6782d572033cc50799a49
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Sat May 10 23:56:33 2008 +0200
-2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Fix handling of OpenType/CFF fonts with embedded bitmaps.
+ 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.
- * configure.ac:
- Update package version number for final X11R7 release candidate.
+commit 5db9e13aafbed8c0562838005147ebefb12d08ac
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Sat May 10 23:37:14 2008 +0200
-2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Remove doubly included header.
- * Makefile.am:
- Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+commit b0860282c3229d088840fa0758d8473ea6d8813b
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Mon Apr 28 19:53:11 2008 +0200
-2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Add bdf and pcf to font priority table.
+ This mirrors the behaviour of the old mkfontdir, which prefers pcf to
+ bdf fonts.
- * configure.ac:
- Update package version number for X11R7 RC3 release.
+commit 9c5594ad13e9143e86a7fd94f90858795ae2970b
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Mon Apr 28 19:15:05 2008 +0200
-2005-11-19 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Fix typo in mkfontscale.c.
+ This spurious break statement disabled checking for Apple and ISO Unicode
+ CMaps in SFNT fonts. Thanks to Alan Coopersmith and Stefan Dirsch.
- * Makefile.am:
- * configure.ac:
- Update dependencies to work with separate build roots.
+commit 5ca409f025fb35a20ab1ef4742a9034a36e3d959
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Sat Mar 15 18:44:06 2008 -0300
-2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ Compile warning fixes.
+
+ Include headers for proper prototypes and "ansify" makeHashTable.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
- * configure.ac:
- Update package version number for RC1 release.
+commit 47ec1e2697eb856f823cc1b488c6b5a1d2077df9
+Author: Adam Jackson <ajax@redhat.com>
+Date: Thu Mar 6 16:40:41 2008 -0500
+ mkfontscale 1.0.4
+
+commit 1cb9c0074c5075bbce63ff3601712f34bbb74ca1
+Author: Adam Jackson <ajax@redhat.com>
+Date: Sun Feb 24 21:34:00 2008 -0500
+
+ Bug #11337: Use strcasecmp() instead of broken open-coded version.
+
+ Also, use tolower() instead of broken open-coded version.
+
+commit 11651914cb1700528524bd3aabe2372629ce86c8
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Jan 7 14:28:30 2008 -0800
+
+ Fix typo in man page
+
+commit 963552c24bf90610f2b3e2e77277ad77e2b21210
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Jan 7 14:26:56 2008 -0800
+
+ Convert (1) to (__appmansuffix__) in man page
+
+commit 3e8bfcc4d87cd26b9426be1ab8941e1a8d709d3c
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 6 16:37:03 2007 -0500
+
+ Replace static ChangeLog with dist-hook to generate from git log
+
+commit d59c58bc3e09fd4adf773cd2e0a8c8c0e6018b08
+Author: James Cloos <cloos@jhcloos.com>
+Date: Mon Sep 3 05:51:05 2007 -0400
+
+ Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 73e8b8696e09c2502c2b3f66cbe364a8de14198e
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Aug 23 19:24:29 2007 -0400
+
+ Rename .cvsignore to .gitignore
+
+commit 08cf5e3544be3a64725e5aacd6209bae32185ff0
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Nov 8 16:29:43 2006 +0200
+
+ bump to 1.0.3
+
+commit b155ad1329e193987ed4102384b7996d6dd45088
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Tue Oct 31 16:48:18 2006 +0100
+
+ Allow SemiBold weight for Type 1 fonts.
+ Thanks to Andrey Panov.
+
+commit b849af72d7b564f7c09ee480f7496a741063b2a8
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date: Tue Oct 31 01:35:27 2006 +0100
+
+ Fix typos in manual page, update author's address, update COPYING.
+
+commit 65908e9db4457af1a896d82d5d153655096afb4e
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Fri Oct 13 17:45:45 2006 -0400
+
+ Bump to 1.0.2
+
+commit 72d7891bba975dc637dfcc4df068da4a0afae40c
+Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
+Date: Wed Jul 19 09:47:10 2006 +0100
+
+ open files in binary mode. fixes cygwin issues.
+
+commit 74743bd788dc7d9f65e151142a594dd5dd3679fb
+Author: Jeremy C. Reed <reed@reedmedia.net>
+Date: Thu May 25 23:18:01 2006 +0000
+
+ Check for xproto not x11 (libX11 is not needed).
+
+commit 300ead104133e0967dd2edfd8ef000768e5b2ec5
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Dec 21 02:29:43 2005 +0000
+
+ Update package version for X11R7 release.
+
+commit 749ba16c39f2787823d65677c46dd0df10210127
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Dec 19 16:22:41 2005 +0000
+
+ Stub COPYING files
+
+commit f6c3c20921a741d1b8aca31ae4c29105c62e6eb0
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:03 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit db2fd6b3063b161726303f469510edae5552506a
+Author: Kevin E Martin <kem@kem.org>
+Date: Tue Dec 6 22:48:17 2005 +0000
+
+ Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 36de3963aaeca770500ca1a0c1677a2a087506d3
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 05:49:16 2005 +0000
+
+ Update package version number for X11R7 RC3 release.
+
+commit 35101f83cc13a9989a0a505afbe1557e2eb2b431
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Nov 28 22:01:37 2005 +0000
+
+ Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+ update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 7494ff7b73b4bf0b3d01703f2b8d9bcbcb032c89
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Mon Nov 21 10:34:56 2005 +0000
+
+ Another pass at .cvsignores for apps.
+
+commit 818a45cd26343f5a90b5861ee3eacaeb7f1b02d9
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Sun Nov 20 22:08:49 2005 +0000
+
+ Add/improve .cvsignore files for apps.
+
+commit ff0494da73f7375ef051621c72f6ce91a101574a
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Nov 19 07:15:35 2005 +0000
+
+ Update pkgconfig files to separate library build-time dependencies from
+ application build-time dependencies, and update package deps to work
+ with separate build roots.
+
+commit cf92d3afb96be73691967875a1e659bfaf47bd5d
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:47:49 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit c1e504c4af80f9b55d766eeab7f8a76e1043f1f8
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Oct 17 23:56:20 2005 +0000
+
+ Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+ work better with BSD make
+
+commit 8abe389feee29a21ad92277f0a9bc54143102b0b
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Fri Oct 14 00:25:42 2005 +0000
+
+ Use sed to fill in variables in man page
+
+commit d2ef439ebff65d9507e8409c32ce83ed24f81c77
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jul 30 19:32:32 2005 +0000
+
+ Add -D flags to clear more compiler warnings (Stefan Dirsch)
+
+commit d84b476fa167fe34d827f36c0a5e35bca7884136
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:29 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 4ae6c4a84f601196a4cf67dd6f1269c239c757b1
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Jul 20 19:31:49 2005 +0000
+
+ Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+ configure cache, you cache it, and the cached value is probably wrong.
+
+commit bdd6bc86322d8769390ce81e74a9c2da103e3533
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Fri Jul 15 00:50:30 2005 +0000
+
+ Add dependency on zlib
+
+commit 30441ee004c0c23d42b76af09e58314aa2218fa3
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Jul 2 21:42:05 2005 +0000
+
+ Add build system for bdftopcf, mkfontdir and mkfontscale
+
+commit 3748201b7bbae3a0c0d20001651430245beab335
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date: Fri Nov 5 05:01:52 2004 +0000
+
+ xc/fonts/encodings/Imakefile
+ 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).
+
+commit 55185f35a75e6aad933e6faedd68bc14dfb94ccc
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 19:54:36 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit 8e877ebe858657d8de7b5757a6b1d371dbfa6c88
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:34:54 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit ef2e82cd947202294f2c6cf8e503512bac1452b5
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:12:53 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit a641a5d0ebd81e83fd6d61cef460b9013229a279
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:36:15 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit 0bd86c8568761556a0841afff463a2aa5e3f682b
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:23:56 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 8b2ffc7720361ca3dd61bda16e384e8258aae803
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Dec 19 20:55:45 2003 +0000
+
+ XFree86 4.3.99.902 (RC 2)
+
+commit c76578dc7395126605b9282f8453f1c54f38e61e
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Thu Dec 4 22:03:44 2003 +0000
+
+ XFree86 4.3.99.901 (RC 1)
+
+commit 324cfb1744c2c3cc253dd0f63c2252206eb72249
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:29:02 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 632e8a138dd16efe41384a4335ec46530da4a04b
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:29:02 2003 +0000
+
+ Initial revision
+
+commit 7b08fca9270b3735a66f0cf9ce898336a33ea1d6
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:57 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit 7d6e5e7aefebf361afb149d7243d09ab6cf54c2f
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:57 2003 +0000
+
+ Initial revision
diff --git a/app/mkfontscale/configure b/app/mkfontscale/configure
index 085e9bbff..58d5f850b 100644
--- a/app/mkfontscale/configure
+++ b/app/mkfontscale/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for mkfontscale 1.0.4.
+# Generated by GNU Autoconf 2.59 for mkfontscale 1.0.5.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='mkfontscale'
PACKAGE_TARNAME='mkfontscale'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='mkfontscale 1.0.4'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='mkfontscale 1.0.5'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG MKFONTSCALE_CFLAGS MKFONTSCALE_LIBS X11_CFLAGS X11_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
@@ -758,7 +758,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mkfontscale 1.0.4 to adapt to many kinds of systems.
+\`configure' configures mkfontscale 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -824,7 +824,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mkfontscale 1.0.4:";;
+ short | recursive ) echo "Configuration of mkfontscale 1.0.5:";;
esac
cat <<\_ACEOF
@@ -956,7 +956,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-mkfontscale configure 1.0.4
+mkfontscale configure 1.0.5
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -970,7 +970,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mkfontscale $as_me 1.0.4, which was
+It was created by mkfontscale $as_me 1.0.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1568,7 +1568,7 @@ fi
# Define the identity of the package.
PACKAGE='mkfontscale'
- VERSION='1.0.4'
+ VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF
@@ -3882,7 +3882,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by mkfontscale $as_me 1.0.4, which was
+This file was extended by mkfontscale $as_me 1.0.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3945,7 +3945,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-mkfontscale config.status 1.0.4
+mkfontscale config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/app/mkfontscale/configure.ac b/app/mkfontscale/configure.ac
index c2170681a..73e8b7cec 100644
--- a/app/mkfontscale/configure.ac
+++ b/app/mkfontscale/configure.ac
@@ -21,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(mkfontscale, [1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontscale)
+AC_INIT(mkfontscale, [1.0.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontscale)
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
diff --git a/app/mkfontscale/hash.c b/app/mkfontscale/hash.c
index 36c95a975..313d5b6c1 100644
--- a/app/mkfontscale/hash.c
+++ b/app/mkfontscale/hash.c
@@ -19,11 +19,11 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XFree86$ */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include "hash.h"
#include "list.h"
@@ -40,20 +40,11 @@ hash(char *string)
return (u & (NUMBUCKETS - 1));
}
-static char
-lwr(char a)
-{
- if(a >= 'A' && a <= 'Z')
- return a | 0x20;
- else
- return a;
-}
-
static void
strcpy_lwr(char *dst, char *src)
{
while(1) {
- *dst = lwr(*src);
+ *dst = tolower(*src);
if(*src == '\0')
break;
src++;
@@ -61,29 +52,8 @@ strcpy_lwr(char *dst, char *src)
}
}
-static int
-strcmp_lwr(char *a, char *b)
-{
- while(*a != '\0' && *b != '\0') {
- if(lwr(*a) != lwr(*b)) {
- if(lwr(*a) < lwr(*b))
- return -1;
- if(lwr(*a) > lwr(*b))
- return 1;
- }
- a++;
- b++;
- }
- if (*a != '\0')
- return -1;
- else if(*b == '\0')
- return 1;
- else
- return 0;
-}
-
HashTablePtr
-makeHashTable()
+makeHashTable(void)
{
return calloc(NUMBUCKETS, sizeof(HashBucketPtr));
}
@@ -112,7 +82,7 @@ getHash(HashTablePtr table, char *key)
int i = hash(key);
HashBucketPtr bp;
for(bp = table[i]; bp; bp = bp->next) {
- if(strcmp_lwr(bp->key, key) == 0)
+ if(strcasecmp(bp->key, key) == 0)
return bp->value;
}
return NULL;
@@ -125,7 +95,7 @@ putHash(HashTablePtr table, char *key, char *value, int prio)
char *keycopy = NULL, *valuecopy = NULL;
HashBucketPtr bp;
for(bp = table[i]; bp; bp = bp->next) {
- if(strcmp_lwr(bp->key, key) == 0) {
+ if(strcasecmp(bp->key, key) == 0) {
if(prio > bp->prio) {
keycopy = malloc(strlen(key) + 1);
if(keycopy == NULL) goto fail;
@@ -184,7 +154,7 @@ static int
key_first_cmp(const void *v1, const void *v2)
{
const HashBucketPtr *b1 = v1, *b2 = v2;
- int c1 = strcmp_lwr((*b1)->key, (*b2)->key);
+ int c1 = strcasecmp((*b1)->key, (*b2)->key);
if(c1 != 0) return c1;
return strcmp((*b1)->value, (*b2)->value);
}
@@ -195,7 +165,7 @@ value_first_cmp(const void *v1, const void *v2)
const HashBucketPtr *b1 = v1, *b2 = v2;
int c1 = strcmp((*b1)->value, (*b2)->value);
if(c1 != 0) return c1;
- return strcmp_lwr((*b1)->key, (*b2)->key);
+ return strcasecmp((*b1)->key, (*b2)->key);
}
HashBucketPtr *
diff --git a/app/mkfontscale/ident.c b/app/mkfontscale/ident.c
index 18402d2bc..80452e6d9 100644
--- a/app/mkfontscale/ident.c
+++ b/app/mkfontscale/ident.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
+#include "ident.h"
#define PCF_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1)
#define PCF_PROPERTIES (1 << 0)
diff --git a/app/mkfontscale/mkfontscale.c b/app/mkfontscale/mkfontscale.c
index b538d79b6..e6aacd7e2 100644
--- a/app/mkfontscale/mkfontscale.c
+++ b/app/mkfontscale/mkfontscale.c
@@ -30,6 +30,7 @@
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
+#include <ctype.h>
#include <X11/Xos.h>
#include <X11/fonts/fontenc.h>
@@ -40,7 +41,7 @@
#include FT_TRUETYPE_IDS_H
#include FT_TYPE1_TABLES_H
#include FT_BDF_H
-#include FT_TRUETYPE_TABLES_H
+#include FT_XFREE86_H
#include "list.h"
#include "hash.h"
@@ -726,16 +727,24 @@ filePrio(char *filename)
if(n < 4)
return 0;
if(strcmp(filename + n - 4, ".otf") == 0)
- return 4;
+ return 6;
if(strcmp(filename + n - 4, ".OTF") == 0)
- return 4;
+ return 6;
if(strcmp(filename + n - 4, ".ttf") == 0)
- return 3;
+ return 5;
if(strcmp(filename + n - 4, ".TTF") == 0)
- return 3;
+ return 5;
+ if(strcmp(filename + n - 4, ".pcf") == 0)
+ return 4;
+ if(strcmp(filename + n - 4, ".PCF") == 0)
+ return 4;
if(strcmp(filename + n - 3, ".gz") == 0)
- return 2;
+ return 3;
if(strcmp(filename + n - 2, ".Z") == 0)
+ return 2;
+ if(strcmp(filename + n - 4, ".bdf") == 0)
+ return 1;
+ if(strcmp(filename + n - 4, ".BDF") == 0)
return 1;
return 0;
}
@@ -840,8 +849,9 @@ doDirectory(char *dirname_given, int numEncodings, ListPtr encodingsToDo)
isBitmap = ((face->face_flags & FT_FACE_FLAG_SCALABLE) == 0);
if(!isBitmap) {
- /* Workaround for bitmap-only TTF fonts */
- if(face->num_fixed_sizes > 0) {
+ /* Workaround for bitmap-only SFNT fonts */
+ if(FT_IS_SFNT(face) && face->num_fixed_sizes > 0 &&
+ strcmp(FT_Get_X11_Font_Format(face), "TrueType") == 0) {
TT_MaxProfile *maxp;
maxp = FT_Get_Sfnt_Table(face, ft_sfnt_maxp);
if(maxp != NULL && maxp->maxContours == 0)
@@ -1129,7 +1139,6 @@ find_cmap(int type, int pid, int eid, FT_Face face)
return 1;
}
}
- break;
/* Try Apple Unicode */
for(i=0; i<n; i++) {
cmap = face->charmaps[i];