From f275352e0cfc73a570ddf76c872c795fe68e4241 Mon Sep 17 00:00:00 2001 From: matthieu Date: Fri, 13 Jun 2008 01:01:26 +0000 Subject: [PATCH] update to mkfontscale 1.0.5 --- app/mkfontscale/COPYING | 2 +- app/mkfontscale/ChangeLog | 59 +++++++++++++++++++++++++++++++++++ app/mkfontscale/configure | 20 ++++++------ app/mkfontscale/configure.ac | 2 +- app/mkfontscale/hash.c | 2 +- app/mkfontscale/ident.c | 1 + app/mkfontscale/mkfontscale.c | 27 ++++++++++------ 7 files changed, 91 insertions(+), 22 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 c6f8dfb44..a0001ad4e 100644 --- a/app/mkfontscale/ChangeLog +++ b/app/mkfontscale/ChangeLog @@ -1,3 +1,62 @@ +commit 8126d2b694f48cc8137be05705a125f7d02e7e12 +Author: Julien Cristau +Date: Sun May 11 00:03:44 2008 +0200 + + Bump to 1.0.5 + +commit f131ff40d2b46692c393346110df2567cfa67c29 +Author: Juliusz Chroboczek +Date: Sat May 10 23:58:55 2008 +0200 + + Update copyright date. + +commit c322c79c2b9b8d6075b6782d572033cc50799a49 +Author: Juliusz Chroboczek +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 +Date: Sat May 10 23:37:14 2008 +0200 + + Remove doubly included header. + +commit b0860282c3229d088840fa0758d8473ea6d8813b +Author: Juliusz Chroboczek +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 +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 +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 + +commit 47ec1e2697eb856f823cc1b488c6b5a1d2077df9 +Author: Adam Jackson +Date: Thu Mar 6 16:40:41 2008 -0500 + + mkfontscale 1.0.4 + commit 1cb9c0074c5075bbce63ff3601712f34bbb74ca1 Author: Adam Jackson Date: Sun Feb 24 21:34:00 2008 -0500 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 . # @@ -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 f650888e0..313d5b6c1 100644 --- a/app/mkfontscale/hash.c +++ b/app/mkfontscale/hash.c @@ -53,7 +53,7 @@ strcpy_lwr(char *dst, char *src) } HashTablePtr -makeHashTable() +makeHashTable(void) { return calloc(NUMBUCKETS, sizeof(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 #include #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 #include #include +#include #include #include @@ -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; icharmaps[i];