fontmod.patch revision 234
234N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
234N/A# Use subject to license terms.
234N/A#
234N/A# Permission is hereby granted, free of charge, to any person obtaining a
234N/A# copy of this software and associated documentation files (the
234N/A# "Software"), to deal in the Software without restriction, including
234N/A# without limitation the rights to use, copy, modify, merge, publish,
234N/A# distribute, and/or sell copies of the Software, and to permit persons
234N/A# to whom the Software is furnished to do so, provided that the above
234N/A# copyright notice(s) and this permission notice appear in all copies of
234N/A# the Software and that both the above copyright notice(s) and this
234N/A# permission notice appear in supporting documentation.
234N/A#
234N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
234N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
234N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
234N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
234N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
234N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
234N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
234N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
234N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
234N/A#
234N/A# Except as contained in this notice, the name of a copyright holder
234N/A# shall not be used in advertising or otherwise to promote the sale, use
234N/A# or other dealings in this Software without prior written authorization
234N/A# of the copyright holder.
234N/A
234N/AReplace "type1" and "bitstream" font modules in xorg.conf files with
234N/A"freetype"
234N/A
234N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86AutoConfig.c hw/xfree86/common/xf86AutoConfig.c
234N/A--- hw/xfree86/common/xf86AutoConfig.c 2007-10-09 14:55:31.434564000 -0700
234N/A+++ hw/xfree86/common/xf86AutoConfig.c 2007-10-09 15:09:48.232453000 -0700
234N/A@@ -52,7 +52,6 @@
234N/A "\tLoad\t\"dbe\"\n" \
234N/A "\tLoad\t\"glx\"\n" \
234N/A "\tLoad\t\"freetype\"\n" \
234N/A- "\tLoad\t\"type1\"\n" \
234N/A "\tLoad\t\"record\"\n" \
234N/A "\tLoad\t\"dri\"\n" \
234N/A "\tLoad\t\"IA\"\n" \
234N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86Config.c hw/xfree86/common/xf86Config.c
234N/A--- hw/xfree86/common/xf86Config.c 2007-10-09 14:36:57.925355000 -0700
234N/A+++ hw/xfree86/common/xf86Config.c 2007-10-09 14:37:20.862848000 -0700
234N/A@@ -290,10 +290,9 @@ xf86ModulelistFromConfig(pointer **optli
234N/A ptr = xf86addNewLoadDirective(ptr, "dbe", XF86_LOAD_MODULE, NULL);
234N/A ptr = xf86addNewLoadDirective(ptr, "glx", XF86_LOAD_MODULE, NULL);
234N/A ptr = xf86addNewLoadDirective(ptr, "freetype", XF86_LOAD_MODULE, NULL);
234N/A- ptr = xf86addNewLoadDirective(ptr, "type1", XF86_LOAD_MODULE, NULL);
234N/A ptr = xf86addNewLoadDirective(ptr, "record", XF86_LOAD_MODULE, NULL);
234N/A ptr = xf86addNewLoadDirective(ptr, "dri", XF86_LOAD_MODULE, NULL);
234N/A- count = 7;
234N/A+ count = 6;
234N/A
234N/A /* Sun addition - IA extension */
234N/A ptr = xf86addNewLoadDirective(ptr, "IA", XF86_LOAD_MODULE, NULL);
234N/A@@ -304,6 +303,34 @@ xf86ModulelistFromConfig(pointer **optli
234N/A count++;
234N/A }
234N/A
234N/A+ /* Map bitstream and type1 modules to freetype */
234N/A+ if (xf86configptr->conf_modules) {
234N/A+ int freetype_found = 0;
234N/A+ int freetype_needed = 0;
234N/A+
234N/A+ modp = xf86configptr->conf_modules->mod_load_lst;
234N/A+ while (modp) {
234N/A+ if ((strcasecmp(modp->load_name, "bitstream") == 0) ||
234N/A+ (strcasecmp(modp->load_name, "type1") == 0)) {
234N/A+ modp->ignore = 1;
234N/A+ count--;
234N/A+ freetype_needed = 1;
234N/A+ xf86MsgVerb(X_INFO, 0,
234N/A+ "Module \"%s\" is no longer provided "
234N/A+ " - using \"freetype\" instead\n",
234N/A+ modp->load_name);
234N/A+ } else if (strcasecmp(modp->load_name, "freetype") == 0) {
234N/A+ freetype_found = 1;
234N/A+ }
234N/A+ modp = (XF86LoadPtr) modp->list.next;
234N/A+ }
234N/A+ if ((freetype_found == 0) && (freetype_needed == 1)) {
234N/A+ xf86addNewLoadDirective(xf86configptr->conf_modules,
234N/A+ "freetype", XF86_LOAD_MODULE, NULL);
234N/A+ count++;
234N/A+ }
234N/A+ }
234N/A+
234N/A /*
234N/A * allocate the memory and walk the list again to fill in the pointers
234N/A */