update to mkfontscale 1.0.5

This commit is contained in:
matthieu 2008-06-13 01:01:26 +00:00
parent ab31903cb7
commit f275352e0c
7 changed files with 91 additions and 22 deletions

View File

@ -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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,3 +1,62 @@
commit 8126d2b694f48cc8137be05705a125f7d02e7e12
Author: Julien Cristau <jcristau@debian.org>
Date: Sun May 11 00:03:44 2008 +0200
Bump to 1.0.5
commit f131ff40d2b46692c393346110df2567cfa67c29
Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
Date: Sat May 10 23:58:55 2008 +0200
Update copyright date.
commit c322c79c2b9b8d6075b6782d572033cc50799a49
Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
Date: Sat May 10 23:56:33 2008 +0200
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.
commit 5db9e13aafbed8c0562838005147ebefb12d08ac
Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
Date: Sat May 10 23:37:14 2008 +0200
Remove doubly included header.
commit b0860282c3229d088840fa0758d8473ea6d8813b
Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
Date: Mon Apr 28 19:53:11 2008 +0200
Add bdf and pcf to font priority table.
This mirrors the behaviour of the old mkfontdir, which prefers pcf to
bdf fonts.
commit 9c5594ad13e9143e86a7fd94f90858795ae2970b
Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
Date: Mon Apr 28 19:15:05 2008 +0200
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.
commit 5ca409f025fb35a20ab1ef4742a9034a36e3d959
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Sat Mar 15 18:44:06 2008 -0300
Compile warning fixes.
Include headers for proper prototypes and "ansify" makeHashTable.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit 47ec1e2697eb856f823cc1b488c6b5a1d2077df9
Author: Adam Jackson <ajax@redhat.com>
Date: Thu Mar 6 16:40:41 2008 -0500
mkfontscale 1.0.4
commit 1cb9c0074c5075bbce63ff3601712f34bbb74ca1 commit 1cb9c0074c5075bbce63ff3601712f34bbb74ca1
Author: Adam Jackson <ajax@redhat.com> Author: Adam Jackson <ajax@redhat.com>
Date: Sun Feb 24 21:34:00 2008 -0500 Date: Sun Feb 24 21:34:00 2008 -0500

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # 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>. # 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. # Identity of this package.
PACKAGE_NAME='mkfontscale' PACKAGE_NAME='mkfontscale'
PACKAGE_TARNAME='mkfontscale' PACKAGE_TARNAME='mkfontscale'
PACKAGE_VERSION='1.0.4' PACKAGE_VERSION='1.0.5'
PACKAGE_STRING='mkfontscale 1.0.4' PACKAGE_STRING='mkfontscale 1.0.5'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' 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' 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. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF 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]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -824,7 +824,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of mkfontscale 1.0.4:";; short | recursive ) echo "Configuration of mkfontscale 1.0.5:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -956,7 +956,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
mkfontscale configure 1.0.4 mkfontscale configure 1.0.5
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
@ -970,7 +970,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. 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 generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@ -1568,7 +1568,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='mkfontscale' PACKAGE='mkfontscale'
VERSION='1.0.4' VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -3882,7 +3882,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF 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 generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -3945,7 +3945,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
mkfontscale config.status 1.0.4 mkfontscale config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -21,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57]) 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_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE

View File

@ -53,7 +53,7 @@ strcpy_lwr(char *dst, char *src)
} }
HashTablePtr HashTablePtr
makeHashTable() makeHashTable(void)
{ {
return calloc(NUMBUCKETS, sizeof(HashBucketPtr)); return calloc(NUMBUCKETS, sizeof(HashBucketPtr));
} }

View File

@ -29,6 +29,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "zlib.h" #include "zlib.h"
#include "ident.h"
#define PCF_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1) #define PCF_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1)
#define PCF_PROPERTIES (1 << 0) #define PCF_PROPERTIES (1 << 0)

View File

@ -30,6 +30,7 @@
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <ctype.h>
#include <X11/Xos.h> #include <X11/Xos.h>
#include <X11/fonts/fontenc.h> #include <X11/fonts/fontenc.h>
@ -40,7 +41,7 @@
#include FT_TRUETYPE_IDS_H #include FT_TRUETYPE_IDS_H
#include FT_TYPE1_TABLES_H #include FT_TYPE1_TABLES_H
#include FT_BDF_H #include FT_BDF_H
#include FT_TRUETYPE_TABLES_H #include FT_XFREE86_H
#include "list.h" #include "list.h"
#include "hash.h" #include "hash.h"
@ -726,16 +727,24 @@ filePrio(char *filename)
if(n < 4) if(n < 4)
return 0; return 0;
if(strcmp(filename + n - 4, ".otf") == 0) if(strcmp(filename + n - 4, ".otf") == 0)
return 4; return 6;
if(strcmp(filename + n - 4, ".OTF") == 0) if(strcmp(filename + n - 4, ".OTF") == 0)
return 4; return 6;
if(strcmp(filename + n - 4, ".ttf") == 0) if(strcmp(filename + n - 4, ".ttf") == 0)
return 3; return 5;
if(strcmp(filename + n - 4, ".TTF") == 0) 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) if(strcmp(filename + n - 3, ".gz") == 0)
return 2; return 3;
if(strcmp(filename + n - 2, ".Z") == 0) 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 1;
return 0; return 0;
} }
@ -840,8 +849,9 @@ doDirectory(char *dirname_given, int numEncodings, ListPtr encodingsToDo)
isBitmap = ((face->face_flags & FT_FACE_FLAG_SCALABLE) == 0); isBitmap = ((face->face_flags & FT_FACE_FLAG_SCALABLE) == 0);
if(!isBitmap) { if(!isBitmap) {
/* Workaround for bitmap-only TTF fonts */ /* Workaround for bitmap-only SFNT fonts */
if(face->num_fixed_sizes > 0) { if(FT_IS_SFNT(face) && face->num_fixed_sizes > 0 &&
strcmp(FT_Get_X11_Font_Format(face), "TrueType") == 0) {
TT_MaxProfile *maxp; TT_MaxProfile *maxp;
maxp = FT_Get_Sfnt_Table(face, ft_sfnt_maxp); maxp = FT_Get_Sfnt_Table(face, ft_sfnt_maxp);
if(maxp != NULL && maxp->maxContours == 0) if(maxp != NULL && maxp->maxContours == 0)
@ -1129,7 +1139,6 @@ find_cmap(int type, int pid, int eid, FT_Face face)
return 1; return 1;
} }
} }
break;
/* Try Apple Unicode */ /* Try Apple Unicode */
for(i=0; i<n; i++) { for(i=0; i<n; i++) {
cmap = face->charmaps[i]; cmap = face->charmaps[i];