open-src/proto/Fonts/Xsun-findfont.patch
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Mon, 12 Jun 2006 16:04:09 -0700
changeset 32 235a80428f96
permissions -rw-r--r--
6437461: Xorg modularization: common extension protocols
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
Font header changes required for Xsun to maintain libfont ABI compatibility and
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
fix for:
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     3
	4424766 Xsun should select fonts more intelligently
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
	<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4424766>
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
--- font.h	Wed Apr 19 11:54:33 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
+++ font.h	Wed Apr 19 13:54:56 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
@@ -24,6 +24,40 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
 /* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
 /* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
+/************************************************************************
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
+ * Xsun additions for preferring non-scaled bitmaps (not used in Xorg
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
+ * which has a different mechanism using font path names)
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
+ * Permission is hereby granted, free of charge, to any person obtaining a
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
+ * copy of this software and associated documentation files (the
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
+ * "Software"), to deal in the Software without restriction, including
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
+ * without limitation the rights to use, copy, modify, merge, publish,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
+ * distribute, and/or sell copies of the Software, and to permit persons
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
+ * to whom the Software is furnished to do so, provided that the above
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
+ * copyright notice(s) and this permission notice appear in all copies of
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
+ * the Software and that both the above copyright notice(s) and this
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
+ * permission notice appear in supporting documentation.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    31
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    36
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    37
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    39
+ * Except as contained in this notice, the name of a copyright holder
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
+ * shall not be used in advertising or otherwise to promote the sale, use
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
+ * or other dealings in this Software without prior written authorization
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
+ * of the copyright holder.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    43
+ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    44
+#endif /* XSUN */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    46
 #ifndef FONT_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
 #define FONT_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    48
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    49
@@ -76,6 +110,11 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    50
 #define	BadCharRange	87
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    51
 #define	BadFontFormat	88
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    52
 #define	FPEResetFailed	89	/* for when an FPE reset won't work */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    53
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    54
+#define FontNameScalable 90
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    55
+#define FontNameBitmap   91
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
+#define FontNameMatch    92
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    57
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    58
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    59
 /* OpenFont flags */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    60
 #define FontLoadInfo	0x0001
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    61
@@ -96,7 +135,11 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    62
 #define CACHING_OFF 0
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    63
 #define CACHE_16_BIT_GLYPHS 1
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    64
 #define CACHE_ALL_GLYPHS 2
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    65
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    66
+#define DEFAULT_GLYPH_CACHING_MODE CACHING_OFF
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    67
+#else
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    68
 #define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    69
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    70
 extern int glyphCachingMode;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    71
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    72
 struct _Client;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    73
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    74
--- fontproto.h	Wed Apr 19 11:54:33 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    75
+++ fontproto.h	Wed Apr 19 13:55:08 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    76
@@ -22,6 +22,41 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    77
 authorization from The XFree86 Project Inc..
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    78
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    79
 */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    80
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    81
+/************************************************************************
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    82
+ * Xsun additions for preferring non-scaled bitmaps (not used in Xorg
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    83
+ * which has a different mechanism using font path names)
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    84
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    85
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    86
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    87
+ * Permission is hereby granted, free of charge, to any person obtaining a
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    88
+ * copy of this software and associated documentation files (the
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    89
+ * "Software"), to deal in the Software without restriction, including
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    90
+ * without limitation the rights to use, copy, modify, merge, publish,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    91
+ * distribute, and/or sell copies of the Software, and to permit persons
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    92
+ * to whom the Software is furnished to do so, provided that the above
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    93
+ * copyright notice(s) and this permission notice appear in all copies of
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    94
+ * the Software and that both the above copyright notice(s) and this
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    95
+ * permission notice appear in supporting documentation.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    96
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    97
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    98
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    99
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   100
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   101
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   102
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   103
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   104
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   105
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   106
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   107
+ * Except as contained in this notice, the name of a copyright holder
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   108
+ * shall not be used in advertising or otherwise to promote the sale, use
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   109
+ * or other dealings in this Software without prior written authorization
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   110
+ * of the copyright holder.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   111
+ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   112
+#endif /* XSUN */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   113
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   114
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   115
 #ifndef _FONTPROTO_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   116
 #define _FONTPROTO_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   117
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   118
@@ -41,8 +76,14 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   119
 				  LoadGlyphsFunc load_glyphs, 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   120
 				  StartLaFunc start_list_alias_func, 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   121
 				  NextLaFunc next_list_alias_func, 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   122
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   123
+				  SetPathFunc set_path_func,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   124
+  				  FindFontFunc find_font_fonc);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   125
+#else
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   126
 				  SetPathFunc set_path_func);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   127
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   128
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   129
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   130
 extern int GetDefaultPointSize ( void );
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   131
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   132
 extern int init_fs_handlers ( FontPathElementPtr fpe, 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   133
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   134
--- fontstruct.h	Wed Apr 19 11:54:33 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   135
+++ fontstruct.h	Wed Apr 19 13:55:49 2006
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   136
@@ -23,6 +23,41 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   137
 ******************************************************************/
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   138
 /* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   139
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   140
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   141
+/************************************************************************
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   142
+ * Xsun additions for preferring non-scaled bitmaps (not used in Xorg
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   143
+ * which has a different mechanism using font path names) and preserving
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   144
+ * binary compatibility with existing Xsun/libfont ABI.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   145
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   146
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   147
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   148
+ * Permission is hereby granted, free of charge, to any person obtaining a
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   149
+ * copy of this software and associated documentation files (the
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   150
+ * "Software"), to deal in the Software without restriction, including
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   151
+ * without limitation the rights to use, copy, modify, merge, publish,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   152
+ * distribute, and/or sell copies of the Software, and to permit persons
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   153
+ * to whom the Software is furnished to do so, provided that the above
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   154
+ * copyright notice(s) and this permission notice appear in all copies of
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   155
+ * the Software and that both the above copyright notice(s) and this
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   156
+ * permission notice appear in supporting documentation.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   157
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   158
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   159
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   160
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   161
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   162
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   163
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   164
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   165
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   166
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   167
+ *
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   168
+ * Except as contained in this notice, the name of a copyright holder
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   169
+ * shall not be used in advertising or otherwise to promote the sale, use
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   170
+ * or other dealings in this Software without prior written authorization
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   171
+ * of the copyright holder.
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   172
+ */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   173
+#endif /* XSUN */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   174
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   175
 #ifndef FONTSTR_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   176
 #define FONTSTR_H
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   177
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   178
@@ -122,7 +157,10 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   179
 				unsigned long * /* count */,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   180
 				xCharInfo **    /* glyphs */);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   181
     void        (*unload_font) (FontPtr         /* font */);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   182
+#ifndef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   183
+/* Moved to the end to preserve binary compatibility. */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   184
     void        (*unload_glyphs) (FontPtr         /* font */);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   185
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   186
     FontPathElementPtr fpe;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   187
     pointer     svrPrivate;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   188
     pointer     fontPrivate;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   189
@@ -129,6 +167,10 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   190
     pointer     fpePrivate;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   191
     int		maxPrivate;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   192
     pointer	*devPrivates;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   193
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   194
+/* Moved to the end to preserve binary compatibility. */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   195
+    void        (*unload_glyphs) (FontPtr         /* font */);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   196
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   197
 }           FontRec;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   198
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   199
 #define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   200
@@ -222,6 +264,19 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   201
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   202
 typedef void (*SetPathFunc)(void);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   203
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   204
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   205
+typedef int (*FindFontFunc) ( pointer client,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   206
+			      FontPathElementPtr fpe,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   207
+			      Mask flags,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   208
+			      char* name,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   209
+			      int namelen,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   210
+			      fsBitmapFormat format,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   211
+			      fsBitmapFormatMask fmask,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   212
+			      XID id,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   213
+			      char** aliasName,
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   214
+			      FontPtr non_cachable_font);
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   215
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   216
+
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   217
 typedef struct _FPEFunctions {
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   218
     NameCheckFunc       name_check;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   219
     InitFpeFunc 	init_fpe;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   220
@@ -246,6 +301,9 @@
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   221
 			data = list of fsChar2b's */
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
     LoadGlyphsFunc	load_glyphs;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   223
     SetPathFunc		set_path_hook;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   224
+#ifdef XSUN
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   225
+    FindFontFunc	find_font;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   226
+#endif
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   227
 } FPEFunctionsRec, FPEFunctions;
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   228
 
235a80428f96 6437461: Xorg modularization: common extension protocols
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   229
 /*