diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-12-16 18:29:47 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-12-16 18:29:47 +0000 |
commit | fcd4e993ba9b6961af69a88a123bdb8f04139ed5 (patch) | |
tree | 8271d8e0b69f17c102604dbb104b96e58d3e4970 | |
parent | 2f5fb8beece5ec9591e2cc8de2e8c342aecf542a (diff) |
merge libXfont 1.2.5 and regenerate
-rw-r--r-- | lib/libXfont/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/aclocal.m4 | 20 | ||||
-rw-r--r-- | lib/libXfont/config.h.in | 12 | ||||
-rw-r--r-- | lib/libXfont/configure | 138 | ||||
-rw-r--r-- | lib/libXfont/src/FreeType/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/Speedo/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/Type1/AFM.h | 62 | ||||
-rw-r--r-- | lib/libXfont/src/Type1/Makefile.in | 16 | ||||
-rw-r--r-- | lib/libXfont/src/Type1/afm.c | 201 | ||||
-rw-r--r-- | lib/libXfont/src/Type1/cidchar.c | 621 | ||||
-rw-r--r-- | lib/libXfont/src/Type1/range.h | 48 | ||||
-rw-r--r-- | lib/libXfont/src/bitmap/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/builtins/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/fc/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/fontcache/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/fontfile/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/stubs/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libXfont/src/util/Makefile.in | 2 |
19 files changed, 90 insertions, 1050 deletions
diff --git a/lib/libXfont/Makefile.in b/lib/libXfont/Makefile.in index 5b9fec29a..13fc9d60b 100644 --- a/lib/libXfont/Makefile.in +++ b/lib/libXfont/Makefile.in @@ -179,8 +179,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/aclocal.m4 b/lib/libXfont/aclocal.m4 index 42da0d600..92e013c52 100644 --- a/lib/libXfont/aclocal.m4 +++ b/lib/libXfont/aclocal.m4 @@ -7398,7 +7398,8 @@ dnl # -------------------- # Adds --with/without-release-string and changes the PACKAGE and # PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If -# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. +# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. AC_DEFUN([XORG_RELEASE_VERSION],[ AC_ARG_WITH(release-version, @@ -7411,6 +7412,23 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" AC_MSG_NOTICE([Building with package name set to $PACKAGE]) fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\).*/\1/p'`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/p'` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | sed -ne 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/p'` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) ]) dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ diff --git a/lib/libXfont/config.h.in b/lib/libXfont/config.h.in index c16ed770e..6b14035cd 100644 --- a/lib/libXfont/config.h.in +++ b/lib/libXfont/config.h.in @@ -72,6 +72,15 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Major version of this package */ +#undef PACKAGE_VERSION_MAJOR + +/* Minor version of this package */ +#undef PACKAGE_VERSION_MINOR + +/* Patch version of this package */ +#undef PACKAGE_VERSION_PATCHLEVEL + /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE @@ -96,9 +105,6 @@ /* Support built-in fonts */ #undef XFONT_BUILTINS -/* Support Type 1 CID font files */ -#undef XFONT_CID - /* Support the X Font Services Protocol */ #undef XFONT_FC diff --git a/lib/libXfont/configure b/lib/libXfont/configure index c36576263..86c8d3d89 100644 --- a/lib/libXfont/configure +++ b/lib/libXfont/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for libXfont 1.2.3. +# Generated by GNU Autoconf 2.59 for libXfont 1.2.5. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libXfont' PACKAGE_TARNAME='libXfont' -PACKAGE_VERSION='1.2.3' -PACKAGE_STRING='libXfont 1.2.3' +PACKAGE_VERSION='1.2.5' +PACKAGE_STRING='libXfont 1.2.5' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' # Factoring default headers for most tests. @@ -464,7 +464,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -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 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG ENCODINGSDIR XFONT_FREETYPE_TRUE XFONT_FREETYPE_FALSE FREETYPE_CFLAGS FREETYPE_LIBS ft_config FREETYPE_REQUIRES XFONT_CID_TRUE XFONT_CID_FALSE XFONT_TYPE1_TRUE XFONT_TYPE1_FALSE XFONT_SPEEDO_TRUE XFONT_SPEEDO_FALSE X_GZIP_FONT_COMPRESSION XFONT_BUILTINS_TRUE XFONT_BUILTINS_FALSE XFONT_PCFFORMAT_TRUE XFONT_PCFFORMAT_FALSE XFONT_BDFFORMAT_TRUE XFONT_BDFFORMAT_FALSE XFONT_SNFFORMAT_TRUE XFONT_SNFFORMAT_FALSE XFONT_BITMAP_TRUE XFONT_BITMAP_FALSE XFONT_FONTFILE_TRUE XFONT_FONTFILE_FALSE XFONT_FONTCACHE_TRUE XFONT_FONTCACHE_FALSE FONTCACHEPROTO_CFLAGS FONTCACHEPROTO_LIBS XFONT_FC_TRUE XFONT_FC_FALSE Z_LIBS MATH_LIBS XFONT_CFLAGS XFONT_LIBS 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 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG ENCODINGSDIR XFONT_FREETYPE_TRUE XFONT_FREETYPE_FALSE FREETYPE_CFLAGS FREETYPE_LIBS ft_config FREETYPE_REQUIRES XFONT_TYPE1_TRUE XFONT_TYPE1_FALSE XFONT_SPEEDO_TRUE XFONT_SPEEDO_FALSE X_GZIP_FONT_COMPRESSION XFONT_BUILTINS_TRUE XFONT_BUILTINS_FALSE XFONT_PCFFORMAT_TRUE XFONT_PCFFORMAT_FALSE XFONT_BDFFORMAT_TRUE XFONT_BDFFORMAT_FALSE XFONT_SNFFORMAT_TRUE XFONT_SNFFORMAT_FALSE XFONT_BITMAP_TRUE XFONT_BITMAP_FALSE XFONT_FONTFILE_TRUE XFONT_FONTFILE_FALSE XFONT_FONTCACHE_TRUE XFONT_FONTCACHE_FALSE FONTCACHEPROTO_CFLAGS FONTCACHEPROTO_LIBS XFONT_FC_TRUE XFONT_FC_FALSE Z_LIBS MATH_LIBS XFONT_CFLAGS XFONT_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -981,7 +981,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 libXfont 1.2.3 to adapt to many kinds of systems. +\`configure' configures libXfont 1.2.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1047,7 +1047,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXfont 1.2.3:";; + short | recursive ) echo "Configuration of libXfont 1.2.5:";; esac cat <<\_ACEOF @@ -1065,7 +1065,6 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --disable-freetype --enable-type1 - --disable-cid --disable-speedo --disable-builtins --disable-pcfformat @@ -1218,7 +1217,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -libXfont configure 1.2.3 +libXfont configure 1.2.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1232,7 +1231,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 libXfont $as_me 1.2.3, which was +It was created by libXfont $as_me 1.2.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1875,7 +1874,7 @@ fi # Define the identity of the package. PACKAGE='libXfont' - VERSION='1.2.3' + VERSION='1.2.5' cat >>confdefs.h <<_ACEOF @@ -3735,7 +3734,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3738 "configure"' > conftest.$ac_ext + echo '#line 3737 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5334,7 +5333,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5337:" \ +echo "$as_me:5336:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -6397,11 +6396,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6400: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6399: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6404: \$? = $ac_status" >&5 + echo "$as_me:6403: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6665,11 +6664,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6668: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6667: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6672: \$? = $ac_status" >&5 + echo "$as_me:6671: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6769,11 +6768,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6772: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6771: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6776: \$? = $ac_status" >&5 + echo "$as_me:6775: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9114,7 +9113,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9117 "configure" +#line 9116 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9214,7 +9213,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9217 "configure" +#line 9216 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11554,11 +11553,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11557: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11556: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11561: \$? = $ac_status" >&5 + echo "$as_me:11560: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11658,11 +11657,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11661: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11660: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11665: \$? = $ac_status" >&5 + echo "$as_me:11664: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13228,11 +13227,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13231: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13230: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13235: \$? = $ac_status" >&5 + echo "$as_me:13234: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13332,11 +13331,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13335: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13334: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13339: \$? = $ac_status" >&5 + echo "$as_me:13338: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15535,11 +15534,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15538: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15537: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15542: \$? = $ac_status" >&5 + echo "$as_me:15541: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15803,11 +15802,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15806: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15805: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15810: \$? = $ac_status" >&5 + echo "$as_me:15809: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15907,11 +15906,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15910: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15909: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15914: \$? = $ac_status" >&5 + echo "$as_me:15913: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19110,13 +19109,6 @@ fi -# -# A bit tricky here; CID font support uses the IBM Type1 rasterizer, -# but it's generally better to use FreeType for regular Type1 files, -# so we make CID build the IBM rasterizer, but not also make the Type1 -# rasterizer used for normal Type1 files -# - # Check whether --enable-type1 or --disable-type1 was given. if test "${enable_type1+set}" = set; then enableval="$enable_type1" @@ -19133,34 +19125,6 @@ _ACEOF XFONT_FONTFILE=yes fi -# Check whether --enable-cid or --disable-cid was given. -if test "${enable_cid+set}" = set; then - enableval="$enable_cid" - XFONT_CID=$enableval -else - XFONT_CID=yes -fi; - - -if test "x$XFONT_CID" = xyes ; then - XFONT_CID_TRUE= - XFONT_CID_FALSE='#' -else - XFONT_CID_TRUE='#' - XFONT_CID_FALSE= -fi - -if test "x$XFONT_CID" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define XFONT_CID 1 -_ACEOF - - XFONT_TYPE1=yes - XFONT_FONTFILE=yes -fi - - if test "x$XFONT_TYPE1" = xyes ; then XFONT_TYPE1_TRUE= @@ -20391,6 +20355,29 @@ fi; echo "$as_me: Building with package name set to $PACKAGE" >&6;} fi +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | sed -ne 's/^\([^\.]\+\).*/\1/p'` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | sed -ne 's/^\([^\.]\+\)\.\([^\.]\+\).*/\2/p'` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | sed -ne 's/^\([^\.]\+\)\.\([^\.]\+\)\.\([^\.]\+\).*/\3/p'` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + ac_config_files="$ac_config_files Makefile src/Makefile src/fontcache/Makefile src/fontfile/Makefile src/FreeType/Makefile src/builtins/Makefile src/bitmap/Makefile src/Type1/Makefile src/Speedo/Makefile src/fc/Makefile src/util/Makefile src/stubs/Makefile xfont.pc" cat >confcache <<\_ACEOF @@ -20512,13 +20499,6 @@ echo "$as_me: error: conditional \"XFONT_FREETYPE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${XFONT_CID_TRUE}" && test -z "${XFONT_CID_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"XFONT_CID\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"XFONT_CID\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${XFONT_TYPE1_TRUE}" && test -z "${XFONT_TYPE1_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"XFONT_TYPE1\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -20860,7 +20840,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by libXfont $as_me 1.2.3, which was +This file was extended by libXfont $as_me 1.2.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20923,7 +20903,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libXfont config.status 1.2.3 +libXfont config.status 1.2.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -21208,8 +21188,6 @@ s,@FREETYPE_CFLAGS@,$FREETYPE_CFLAGS,;t t s,@FREETYPE_LIBS@,$FREETYPE_LIBS,;t t s,@ft_config@,$ft_config,;t t s,@FREETYPE_REQUIRES@,$FREETYPE_REQUIRES,;t t -s,@XFONT_CID_TRUE@,$XFONT_CID_TRUE,;t t -s,@XFONT_CID_FALSE@,$XFONT_CID_FALSE,;t t s,@XFONT_TYPE1_TRUE@,$XFONT_TYPE1_TRUE,;t t s,@XFONT_TYPE1_FALSE@,$XFONT_TYPE1_FALSE,;t t s,@XFONT_SPEEDO_TRUE@,$XFONT_SPEEDO_TRUE,;t t diff --git a/lib/libXfont/src/FreeType/Makefile.in b/lib/libXfont/src/FreeType/Makefile.in index dad1f9975..51c8556b8 100644 --- a/lib/libXfont/src/FreeType/Makefile.in +++ b/lib/libXfont/src/FreeType/Makefile.in @@ -134,8 +134,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/Makefile.in b/lib/libXfont/src/Makefile.in index 6e5cb308c..d4664e2e8 100644 --- a/lib/libXfont/src/Makefile.in +++ b/lib/libXfont/src/Makefile.in @@ -190,8 +190,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/Speedo/Makefile.in b/lib/libXfont/src/Speedo/Makefile.in index de124dad7..546082232 100644 --- a/lib/libXfont/src/Speedo/Makefile.in +++ b/lib/libXfont/src/Speedo/Makefile.in @@ -137,8 +137,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/Type1/AFM.h b/lib/libXfont/src/Type1/AFM.h deleted file mode 100644 index f2c997a3f..000000000 --- a/lib/libXfont/src/Type1/AFM.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#ifndef AFM_H -#define AFM_H - -/* Bounding box definition. Used for the Font BBox as well as the - * Character BBox. - */ -typedef struct -{ - int llx; /* lower left x-position */ - int lly; /* lower left y-position */ - int urx; /* upper right x-position */ - int ury; /* upper right y-position */ -} BBox; - -/* Character Metric Information. This structure is used only if ALL - * character metric information is requested. If only the character - * widths is requested, then only an array of the character x-widths - * is returned. - * - * The key that each field is associated with is in comments. For an - * explanation about each key and its value please refer to the - * Character Metrics section of the AFM documentation (full title - * & version given above). - */ -typedef struct -{ - long code; /* CID code */ - int wx; /* key: WX or W0X */ - BBox charBBox; /* key: B */ -} Metrics; - -typedef struct -{ - int nChars; /* number of entries in char metrics array */ - Metrics *metrics; /* ptr to char metrics array */ -} FontInfo; - -int CIDAFM(FILE *, FontInfo **); -#endif /* AFM_H */ -#endif diff --git a/lib/libXfont/src/Type1/Makefile.in b/lib/libXfont/src/Type1/Makefile.in index f249e6b66..adebadecf 100644 --- a/lib/libXfont/src/Type1/Makefile.in +++ b/lib/libXfont/src/Type1/Makefile.in @@ -48,10 +48,10 @@ CONFIG_HEADER = $(top_builddir)/config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtype1_la_LIBADD = -am_libtype1_la_OBJECTS = afm.lo arith.lo cidchar.lo curves.lo \ - fontfcn.lo hints.lo lines.lo objects.lo paths.lo regions.lo \ - scanfont.lo spaces.lo t1funcs.lo t1info.lo t1io.lo t1malloc.lo \ - t1snap.lo t1stub.lo t1unicode.lo token.lo type1.lo util.lo +am_libtype1_la_OBJECTS = arith.lo curves.lo fontfcn.lo hints.lo \ + lines.lo objects.lo paths.lo regions.lo scanfont.lo spaces.lo \ + t1funcs.lo t1info.lo t1io.lo t1malloc.lo t1snap.lo t1stub.lo \ + t1unicode.lo token.lo type1.lo util.lo libtype1_la_OBJECTS = $(am_libtype1_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/include/X11/fonts depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -137,8 +137,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ @@ -208,12 +206,9 @@ INCLUDES = \ noinst_LTLIBRARIES = libtype1.la libtype1_la_SOURCES = \ - afm.c \ - AFM.h \ arith.c \ arith.h \ blues.h \ - cidchar.c \ cluts.h \ curves.c \ curves.h \ @@ -231,7 +226,6 @@ libtype1_la_SOURCES = \ paths.c \ paths.h \ pictures.h \ - range.h \ regions.c \ regions.h \ scanfont.c \ @@ -309,9 +303,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cidchar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curves.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontfcn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hints.Plo@am__quote@ diff --git a/lib/libXfont/src/Type1/afm.c b/lib/libXfont/src/Type1/afm.c deleted file mode 100644 index 006ff3ca2..000000000 --- a/lib/libXfont/src/Type1/afm.c +++ /dev/null @@ -1,201 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/afm.c,v 1.2 1999/08/21 13:47:38 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#ifdef XFONT_CID -#ifndef FONTMODULE -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#include <X11/fonts/fontmisc.h> /* for xalloc/xfree */ -#include "AFM.h" - -#include <limits.h> - -#define PBUF 256 -#define KBUF 20 - -char *gettoken(FILE *); - -static char *afmbuf = NULL; - -char *gettoken(FILE *fd) { - char *bp; - int c, found; - - bp = afmbuf; - found = 0; - - while((c = getc(fd)) != EOF) { - if (found == 0 && (c == ' ' || c == '\t' || c == '\n' || c == '\r' || - c == ';' || c == ',')) continue; - found = 1; - if (c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ';') { - *bp++ = c; - if (bp - afmbuf >= PBUF) { - bp = afmbuf; - break; - } - } else - break; - } - - *bp = 0; - return(afmbuf); -} - -int CIDAFM(FILE *fd, FontInfo **pfi) { - char *p = 0; - int i, j, k = 0, found = 0; - FontInfo *fi; - - if (fd == NULL || pfi == NULL) return(1); - - *pfi = NULL; - - if ((afmbuf = (char *)xalloc(PBUF)) == NULL) - return(1); - - while(1) { - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - - if (strncmp(p, "StartFontMetrics", 16) == 0) { - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - if (strncmp(p, "4", 1) < 0) { - free(afmbuf); - return(1); - } - found = 1; - } else if (strncmp(p, "StartCharMetrics", 16) == 0) { - if (!found) { - xfree(afmbuf); - return(1); - } - - if (!(p = gettoken(fd))) { - xfree(afmbuf); - return(1); - } - - fi = (FontInfo *)xalloc(sizeof(FontInfo)); - - if (fi == NULL) { - xfree(afmbuf); - return(1); - } - bzero(fi, sizeof(FontInfo)); - - fi->nChars = atoi(p); - - if (fi->nChars < 0 || fi->nChars > INT_MAX / sizeof(Metrics)) { - xfree(afmbuf); - xfree(fi); - return(1); - } - fi->metrics = (Metrics *)xalloc(fi->nChars * - sizeof(Metrics)); - if (fi->metrics == NULL) { - xfree(afmbuf); - xfree(fi); - return(1); - } - - j = 0; - for (i = 0; i < fi->nChars; i++) { - k = 0; - while(1) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - if (strncmp(p, "W0X", 3) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].wx = atoi(p); - } else if (strncmp(p, "N", 1) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].code = (long)atoi(p); - } else if (strncmp(p, "B", 1) == 0) { - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.llx = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.lly = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.urx = atoi(p); - if (!(p = gettoken(fd))) { - k = KBUF; - break; - } - fi->metrics[j].charBBox.ury = atoi(p); - j++; - break; - } - k++; - if (k >= KBUF) break; - } - if (k >= KBUF) break; - } - if (k >= KBUF || j != fi->nChars) { - xfree(fi->metrics); - xfree(fi); - xfree(afmbuf); - return(1); - } else { - *pfi = fi; - xfree(afmbuf); - return(0); - } - } - } - - xfree(afmbuf); - return(1); -} -#endif diff --git a/lib/libXfont/src/Type1/cidchar.c b/lib/libXfont/src/Type1/cidchar.c deleted file mode 100644 index 20d26650c..000000000 --- a/lib/libXfont/src/Type1/cidchar.c +++ /dev/null @@ -1,621 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -/* $XFree86: xc/lib/font/Type1/cidchar.c,v 1.9tsi Exp $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#ifndef FONTMODULE -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> -#ifdef USE_MMAP -#include <sys/mman.h> -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)(-1)) -#endif -#endif -#else -#include "Xmd.h" /* For INT32 declaration */ -#include "Xdefs.h" /* For Bool */ -#include "xf86_ansic.h" -#endif -#ifndef FONTMODULE -#ifdef _XOPEN_SOURCE -#include <math.h> -#else -#define _XOPEN_SOURCE -#include <math.h> -#undef _XOPEN_SOURCE -#endif -#endif -#include <X11/fonts/fntfilst.h> -#include "objects.h" -#include "spaces.h" -#include "range.h" -#include "util.h" -#include "fontfcn.h" -#include "blues.h" -#include "AFM.h" -#include "t1intf.h" - -#define BSIZE 4096 - -extern cidfont *CIDFontP; -extern psfont *FDArrayP; -extern psfont *FontP; - -static unsigned char sd[] = "StartData"; - -CharInfoPtr -CIDGetGlyphInfo(FontPtr pFont, unsigned int cidcode, CharInfoPtr pci, int *rc) -{ - CharInfoPtr cp = NULL; -#ifdef USE_MMAP - int fd; - unsigned char *buf; - long total_len = 0; -#else - FILE *fp; - unsigned char buf[BSIZE]; - unsigned int count = 0; -#endif - cidglyphs *cid; - unsigned char *p1 = NULL; -#ifndef USE_MMAP - unsigned char *p2; -#endif - register int i = 0, j; - long byteoffset; - int FDindex, FDBytes, GDBytes, SDBytes, SubrCount, CIDMapOffset, len; - psobj *arrayP; - psobj charstring; - long *subroffsets = NULL, cstringoffset, nextcstringoffset; - struct blues_struct *blues; - - cid = (cidglyphs *)pFont->fontPrivate; - -#ifdef USE_MMAP - if (!cid->CIDdata) { - if (!(fd = open(cid->CIDFontName, O_RDONLY, 0))) { - *rc = BadFontName; - return(cp); - } - cid->CIDsize = lseek(fd, 0, SEEK_END); - cid->CIDdata = (unsigned char *) - mmap(0, (size_t)cid->CIDsize, PROT_READ, MAP_SHARED, fd, 0); - close(fd); - if (cid->CIDdata == (unsigned char *)MAP_FAILED) { - *rc = AllocError; - cid->CIDdata = NULL; - return (cp); - } - } -#else - if (!(fp = fopen(cid->CIDFontName,"rb"))) { - *rc = BadFontName; - return(cp); - } -#endif - -#ifdef USE_MMAP - if (cid->dataoffset == 0) { - if ((p1 = (unsigned char *)strstr((char *)cid->CIDdata, (char *)sd)) - != NULL) { - cid->dataoffset = (p1 - cid->CIDdata) + strlen((char *)sd); - } - else { - *rc = BadFontFormat; - return(cp); - } - } -#else /* USE_MMAP */ - if (cid->dataoffset == 0) { - p2 = sd; - - /* find "StartData" */ - while (*p2) { - cid->dataoffset += count; - if ((count = fread(buf, 1, BSIZE, fp)) == 0) - break; - p1 = buf; - for (i=0; i < count && *p2; i++) { - if (*p1 == *p2) - p2++; - else { - p2 = sd; - if (*p1 == *p2) - p2++; - } - p1++; - } - } - - /* if "StartData" not found, or end of file */ - if (*p2 || count == 0) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - - if (i >= count) { - cid->dataoffset += count; - count = fread(buf, 1, BSIZE, fp); - p1 = buf; - } else { - cid->dataoffset += p1 - buf; - count = count - (p1 - buf); - } - } else { - if (fseek(fp, cid->dataoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - if ((count = fread(buf, 1, BSIZE, fp)) == 0) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - p1 = buf; - } - - /* if "StartData" not found, or "Binary" data and the next character */ - /* is not the space character (0x20) */ - - if (count == 0 || (CIDFontP->binarydata && (*p1 != ' '))) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif /* USE_MMAP */ - - FDBytes = CIDFontP->CIDfontInfoP[CIDFDBYTES].value.data.integer; - GDBytes = CIDFontP->CIDfontInfoP[CIDGDBYTES].value.data.integer; - CIDMapOffset = CIDFontP->CIDfontInfoP[CIDMAPOFFSET].value.data.integer; - byteoffset = cid->dataoffset + 1 + CIDMapOffset + - cidcode * (FDBytes + GDBytes); -#ifdef USE_MMAP - buf = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - if ((count = fread(buf, 1, BSIZE, fp)) < 2*(FDBytes + GDBytes)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif - - /* if FDBytes is equal to 0, the CIDMap contains no FD indices, and the */ - /* FD index of 0 is assumed. */ - if (FDBytes == 0) - FDindex = 0; - else { - FDindex = 0; - for (i = 0; i < FDBytes; i++) - FDindex += (unsigned char)buf[i] << (8 * (FDBytes - 1 - i)); - } - - if (FDindex >= CIDFontP->CIDfontInfoP[CIDFDARRAY].value.len) { - *rc = BadFontFormat; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - cstringoffset = 0; - for (i = 0; i < GDBytes; i++) - cstringoffset += (unsigned char)buf[FDBytes + i] << - (8 * (GDBytes - 1 - i)); - - nextcstringoffset = 0; - for (i = 0; i < GDBytes; i++) - nextcstringoffset += (unsigned char)buf[2*FDBytes + GDBytes + i] << - (8 * (GDBytes - 1 - i)); - - len = nextcstringoffset - cstringoffset; - - if (len <= 0) { /* empty interval, missing glyph */ - *rc = BadFontFormat; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - FontP = &FDArrayP[FDindex]; - - charstring.type = OBJ_INTEGER; - charstring.len = len; - -#ifndef USE_MMAP - if (!(charstring.data.stringP = (unsigned char *)xalloc(len))) { - *rc = AllocError; - fclose(fp); - return(cp); - } -#endif - - byteoffset = cid->dataoffset + 1 + cstringoffset; - -#ifdef USE_MMAP - charstring.data.stringP = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - xfree(charstring.data.stringP); - fclose(fp); - return(cp); - } - - if ((count = fread(charstring.data.stringP, 1, len, fp)) != len) { - *rc = BadFontFormat; - xfree(charstring.data.stringP); - fclose(fp); - return(cp); - } -#endif - - if (FontP->Subrs.data.arrayP == NULL) { - /* get subroutine data */ - byteoffset = cid->dataoffset + 1 + - FDArrayP[FDindex].Private[CIDT1SUBMAPOFF].value.data.integer; - - SDBytes = FDArrayP[FDindex].Private[CIDT1SDBYTES].value.data.integer; - - SubrCount = FDArrayP[FDindex].Private[CIDT1SUBRCNT].value.data.integer; -#ifdef USE_MMAP - buf = &cid->CIDdata[byteoffset]; -#else - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } - - if ((count = fread(buf, 1, BSIZE, fp)) < SDBytes * (SubrCount + 1)) { - *rc = BadFontFormat; - fclose(fp); - return(cp); - } -#endif - - arrayP = (psobj *)vm_alloc(SubrCount*sizeof(psobj)); - if (!arrayP) { - *rc = AllocError; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - if (!(subroffsets = (long *)xalloc((SubrCount + 1)*sizeof(long)))) { - *rc = AllocError; -#ifndef USE_MMAP - fclose(fp); -#endif - return(cp); - } - - for (i = 0; i <= SubrCount; i++) { - subroffsets[i] = 0; - for (j = 0; j < SDBytes; j++) - subroffsets[i] += (unsigned char)buf[i * SDBytes + j] << - (8 * (SDBytes - 1 - j)); - } - - byteoffset = cid->dataoffset + 1 + subroffsets[0]; - - /* get subroutine info */ -#ifndef USE_MMAP - if (fseek(fp, byteoffset, SEEK_SET)) { - *rc = BadFontFormat; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#else - total_len = byteoffset; -#endif - for (i = 0; i < SubrCount; i++) { - len = subroffsets[i + 1] - subroffsets[i]; -#ifndef USE_MMAP - arrayP[i].data.valueP = vm_alloc(len); - if (!arrayP[i].data.valueP) { - *rc = AllocError; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#endif - arrayP[i].len = len; -#ifdef USE_MMAP - arrayP[i].data.valueP = (char *)&cid->CIDdata[total_len]; - total_len += len; -#else - if ((count = fread(arrayP[i].data.valueP, 1, len, fp)) != len) { - *rc = BadFontFormat; - xfree(subroffsets); - fclose(fp); - return(cp); - } -#endif - } - - FontP->Subrs.len = SubrCount; - FontP->Subrs.data.arrayP = arrayP; - xfree(subroffsets); - } - - if (FontP->BluesP == NULL) { - blues = (struct blues_struct *) vm_alloc(sizeof(struct blues_struct)); - if (!blues) { - *rc = AllocError; -#ifndef USE_MMAP - xfree(subroffsets); - fclose(fp); -#endif - return(cp); - } - bzero(blues, sizeof(struct blues_struct)); - blues->numBlueValues = - FDArrayP[FDindex].Private[CIDT1BLUEVALUES].value.len; - for (i = 0; i < blues->numBlueValues; i++) - blues->BlueValues[i] = - FDArrayP[FDindex].Private[CIDT1BLUEVALUES].value.data.arrayP[i].data.integer; - blues->numOtherBlues = - FDArrayP[FDindex].Private[CIDT1OTHERBLUES].value.len; - for (i = 0; i < blues->numOtherBlues; i++) - blues->OtherBlues[i] = - FDArrayP[FDindex].Private[CIDT1OTHERBLUES].value.data.arrayP[i].data.integer; - blues->numFamilyBlues = - FDArrayP[FDindex].Private[CIDT1FAMBLUES].value.len; - for (i = 0; i < blues->numFamilyBlues; i++) - blues->FamilyBlues[i] = - FDArrayP[FDindex].Private[CIDT1FAMBLUES].value.data.arrayP[i].data.integer; - blues->numFamilyOtherBlues = - FDArrayP[FDindex].Private[CIDT1FAMOTHERBLUES].value.len; - for (i = 0; i < blues->numFamilyOtherBlues; i++) - blues->FamilyOtherBlues[i] = - FDArrayP[FDindex].Private[CIDT1FAMOTHERBLUES].value.data.arrayP[i].data.integer; - blues->BlueScale = FDArrayP[FDindex].Private[CIDT1BLUESCALE].value.data.real; - blues->BlueShift = FDArrayP[FDindex].Private[CIDT1BLUESHIFT].value.data.integer; - blues->BlueFuzz = FDArrayP[FDindex].Private[CIDT1BLUEFUZZ].value.data.integer; - blues->StdHW = (double)FDArrayP[FDindex].Private[CIDT1STDHW].value.data.arrayP[0].data.integer; - blues->StdVW = (double)FDArrayP[FDindex].Private[CIDT1STDVW].value.data.arrayP[0].data.integer; - - blues->numStemSnapH = - FDArrayP[FDindex].Private[CIDT1STEMSNAPH].value.len; - for (i = 0; i < blues->numStemSnapH; i++) - blues->StemSnapH[i] = - FDArrayP[FDindex].Private[CIDT1STEMSNAPH].value.data.arrayP[i].data.integer; - blues->numStemSnapV = - FDArrayP[FDindex].Private[CIDT1STEMSNAPV].value.len; - for (i = 0; i < blues->numStemSnapV; i++) - blues->StemSnapV[i] = - FDArrayP[FDindex].Private[CIDT1STEMSNAPV].value.data.arrayP[i].data.integer; - blues->ForceBold = - FDArrayP[FDindex].Private[CIDT1FORCEBOLD].value.data.boolean; - - blues->LanguageGroup = - FDArrayP[FDindex].Private[CIDT1LANGGROUP].value.data.integer; - - blues->RndStemUp = - FDArrayP[FDindex].Private[CIDT1RNDSTEMUP].value.data.boolean; - - blues->lenIV = - FDArrayP[FDindex].Private[CIDT1LENIV].value.data.integer; - - blues->ExpansionFactor = - FDArrayP[FDindex].Private[CIDT1EXPFACTOR].value.data.real; - - FontP->BluesP = blues; - } - - cp = CIDRenderGlyph(pFont, &charstring, &FontP->Subrs, FontP->BluesP, pci, rc); - -#ifndef USE_MMAP - xfree(charstring.data.stringP); - - fclose(fp); -#endif - return(cp); -} - -static int -node_compare(const void *node1, const void *node2) -{ - return (((Metrics *)node1)->code - ((Metrics *)node2)->code); -} - -static CharInfoRec * -CIDGetCharMetrics(FontPtr pFont, FontInfo *fi, unsigned int charcode, double sxmult) -{ - CharInfoPtr cp; - Metrics *p, node; - unsigned int cidcode; - - cidcode = node.code = getCID(pFont, charcode); - if ((cidcode < fi->nChars) && (cidcode == fi->metrics[cidcode].code)) - p = &fi->metrics[cidcode]; - else - p = (Metrics *)bsearch(&node, fi->metrics, fi->nChars, sizeof(Metrics), node_compare); - - if (!p) - p = &fi->metrics[0]; - - if (!(cp = (CharInfoRec *)Xalloc(sizeof(CharInfoRec)))) - return NULL; - bzero(cp, sizeof(CharInfoRec)); - - /* indicate that character bitmap is not defined */ - cp->bits = (char *)CID_BITMAP_UNDEFINED; - - - /* get metric data for this CID code from the CID AFM file */ - cp->metrics.leftSideBearing = - floor(p->charBBox.llx / sxmult + 0.5); - cp->metrics.rightSideBearing = - floor(p->charBBox.urx / sxmult + 0.5); - cp->metrics.characterWidth = floor(p->wx / sxmult + 0.5); - cp->metrics.ascent = floor(p->charBBox.ury / sxmult + 0.5); - cp->metrics.descent = -floor(p->charBBox.lly / sxmult + 0.5); - - cp->metrics.attributes = p->wx; - - return cp; -} - -int -CIDGetAFM(FontPtr pFont, unsigned long count, unsigned char *chars, FontEncoding charEncoding, unsigned long *glyphCount, CharInfoPtr *glyphs, char *cidafmfile) -{ - FILE *fp; - FontInfo *fi = NULL; - cidglyphs *cid; - CharInfoPtr *glyphsBase; - register unsigned int c; - - register CharInfoPtr pci; - CharInfoPtr pDefault; - unsigned int firstCol, code, char_row, char_col; - double sxmult; - - cid = (cidglyphs *)pFont->fontPrivate; - - if (cid->AFMinfo == NULL) { - if (!(fp = fopen(cidafmfile, "rb"))) - return(BadFontName); - - if (CIDAFM(fp, &fi) != 0) { - fprintf(stderr, - "There is something wrong with Adobe Font Metric file %s.\n", - cidafmfile); - fclose(fp); - return(BadFontName); - } - fclose(fp); - cid->AFMinfo = fi; - } - fi = cid->AFMinfo; - - firstCol = pFont->info.firstCol; - pDefault = cid->pDefault; - glyphsBase = glyphs; - - /* multiplier for computation of raw values */ - sxmult = hypot(cid->pixel_matrix[0], cid->pixel_matrix[1]); - if (sxmult > EPS) sxmult = 1000.0 / sxmult; - if (sxmult == 0.0) return(0); - - switch (charEncoding) { - -#define EXIST(pci) \ - ((pci)->metrics.attributes || \ - (pci)->metrics.ascent != -(pci)->metrics.descent || \ - (pci)->metrics.leftSideBearing != (pci)->metrics.rightSideBearing) - - case Linear8Bit: - case TwoD8Bit: - if (pFont->info.firstRow > 0) - break; - while (count--) { - c = (*chars++); - if (c >= firstCol && c <= pFont->info.lastCol) { - code = c - firstCol; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - case Linear16Bit: - while (count--) { - char_row = *chars++; - char_col = *chars++; - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - - case TwoD16Bit: - while (count--) { - char_row = (*chars++); - char_col = (*chars++); - c = char_row << 8; - c = (c | char_col); - if (pFont->info.firstRow <= char_row && char_row <= - pFont->info.lastRow && pFont->info.firstCol <= char_col && - char_col <= pFont->info.lastCol) { - code = pFont->info.lastCol - pFont->info.firstCol + 1; - char_row = char_row - pFont->info.firstRow; - char_col = char_col - pFont->info.firstCol; - code = char_row * code + char_col; - if (!(pci = (CharInfoRec *)cid->glyphs[code])) - pci = CIDGetCharMetrics(pFont, fi, c, sxmult); - if (pci && EXIST(pci)) { - *glyphs++ = pci; - cid->glyphs[code] = pci; - } else if (pDefault) { - *glyphs++ = pDefault; - cid->glyphs[code] = pDefault; - } - } else if (pDefault) - *glyphs++ = pDefault; - } - break; - } - *glyphCount = glyphs - glyphsBase; - -#undef EXIST - - return Successful; - -} -#endif diff --git a/lib/libXfont/src/Type1/range.h b/lib/libXfont/src/Type1/range.h deleted file mode 100644 index 496f000da..000000000 --- a/lib/libXfont/src/Type1/range.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. - * - * The contents of this file are subject to the CID Font Code Public Licence - * Version 1.0 (the "License"). You may not use this file except in compliance - * with the Licence. You may obtain a copy of the License at Silicon Graphics, - * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA - * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. - * - * Software distributed under the License is distributed on an "AS IS" basis. - * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED - * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF - * NON-INFRINGEMENT. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Software is CID font code that was developed by Silicon - * Graphics, Inc. - */ -#ifdef BUILDCID -#define XFONT_CID 1 -#endif - -#if XFONT_CID -#define CID_NAME_MAX 255 /* max # of characters in a file name */ -#define CID_PATH_MAX 1024 /* max # of characters in a path name */ - -typedef struct spacerange_code { - unsigned int srcCodeLo; - unsigned int srcCodeHi; -} spacerangecode; - -typedef struct space_range { - struct space_range *next; - int rangecnt; - struct spacerange_code *spacecode; -} spacerange; - -typedef struct cidrange_code { - unsigned int srcCodeLo; - unsigned int srcCodeHi; - unsigned int dstCIDLo; -} cidrangecode; - -typedef struct cid_range { - struct cid_range *next; - int rangecnt; - struct cidrange_code *range; -} cidrange; -#endif diff --git a/lib/libXfont/src/bitmap/Makefile.in b/lib/libXfont/src/bitmap/Makefile.in index 425024c97..11e0d2acc 100644 --- a/lib/libXfont/src/bitmap/Makefile.in +++ b/lib/libXfont/src/bitmap/Makefile.in @@ -136,8 +136,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/builtins/Makefile.in b/lib/libXfont/src/builtins/Makefile.in index bd2e31524..761849cb7 100644 --- a/lib/libXfont/src/builtins/Makefile.in +++ b/lib/libXfont/src/builtins/Makefile.in @@ -134,8 +134,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/fc/Makefile.in b/lib/libXfont/src/fc/Makefile.in index 4cbf441c8..8026425b4 100644 --- a/lib/libXfont/src/fc/Makefile.in +++ b/lib/libXfont/src/fc/Makefile.in @@ -134,8 +134,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/fontcache/Makefile.in b/lib/libXfont/src/fontcache/Makefile.in index f1a9b8c99..db94d362d 100644 --- a/lib/libXfont/src/fontcache/Makefile.in +++ b/lib/libXfont/src/fontcache/Makefile.in @@ -136,8 +136,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/fontfile/Makefile.in b/lib/libXfont/src/fontfile/Makefile.in index 15ec25cb2..459d5eaa2 100644 --- a/lib/libXfont/src/fontfile/Makefile.in +++ b/lib/libXfont/src/fontfile/Makefile.in @@ -138,8 +138,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/stubs/Makefile.in b/lib/libXfont/src/stubs/Makefile.in index 868eae767..9707f7777 100644 --- a/lib/libXfont/src/stubs/Makefile.in +++ b/lib/libXfont/src/stubs/Makefile.in @@ -137,8 +137,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ diff --git a/lib/libXfont/src/util/Makefile.in b/lib/libXfont/src/util/Makefile.in index 3b12134f1..1016abbaf 100644 --- a/lib/libXfont/src/util/Makefile.in +++ b/lib/libXfont/src/util/Makefile.in @@ -136,8 +136,6 @@ XFONT_BITMAP_TRUE = @XFONT_BITMAP_TRUE@ XFONT_BUILTINS_FALSE = @XFONT_BUILTINS_FALSE@ XFONT_BUILTINS_TRUE = @XFONT_BUILTINS_TRUE@ XFONT_CFLAGS = @XFONT_CFLAGS@ -XFONT_CID_FALSE = @XFONT_CID_FALSE@ -XFONT_CID_TRUE = @XFONT_CID_TRUE@ XFONT_FC_FALSE = @XFONT_FC_FALSE@ XFONT_FC_TRUE = @XFONT_FC_TRUE@ XFONT_FONTCACHE_FALSE = @XFONT_FONTCACHE_FALSE@ |