beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luafontloader / fontforge / fontforge / configure-pfaedit.h
blob145f8b853338f9c4fd28531ee6061d7629198cbe
1 /* Copyright (C) 2002-2008 by George Williams */
2 /*
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are met:
6 * Redistributions of source code must retain the above copyright notice, this
7 * list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
13 * The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 #ifndef _CONFIG_FONTFORGE_H_
28 #define _CONFIG_FONTFORGE_H_
31 #include "ff-config.h"
33 /* Making FontForge handle more of the capabilities of type3 & svg fonts is not*/
34 /* something most people will want. It wastes space too. So I thought I'd */
35 /* make it conditional. */
36 /* */
37 /* #define FONTFORGE_CONFIG_TYPE3 */
38 /* */
39 /* It allows people to have images in a font, multiple layers, strokes, fills */
40 /* transparencies, etc. (type3 doesn't support transparency, svg doesn't do */
41 /* images) */
42 /* Can be set from configure --with-multilayer */
45 /* Making FontForge handle device tables uses up more space, so I want */
46 /* people to be able to turn it off if space is an issue and device tables */
47 /* (ability to correct rounding errors in spacing, ie. kerning, at small */
48 /* point sizes) aren't important. */
49 /* */
50 /* #define FONTFORGE_CONFIG_DEVICETABLES */
51 /* */
52 /* Can be set from configure --with-devicetables */
55 /* Apple suggests using a sfnt version of 'true' for fonts designed for use */
56 /* only on a mac (windows refuses such fonts). I generally prefer to have a */
57 /* font work everywhere, so normally ff produces fonts with version 1.0 */
58 /* Set this if you want Apple only fonts (produced when Apple mode is set and*/
59 /* Opentype mode is unset in the Generate Fonts-Options dialog). */
60 /* */
61 /* #define FONTFORGE_CONFIG_APPLE_ONLY_TTF */
62 /* */
65 /* Nobody else puts apple unicode encodings into the name table. So I probably*/
66 /* shouldn't either. But if someone wants them... */
67 /* */
68 /* #define FONTFORGE_CONFIG_APPLE_UNICODE_NAMES */
69 /* */
72 /* Sometimes I want to create a glyph which is a word, and this command */
73 /* makes that easy */
74 /* */
75 /* #define FONTFORGE_CONFIG_PASTEAFTER */
76 /* */
77 /* The paste after command pastes the contents of the clipboard into the */
78 /* current glyph, translates that by the advance width of the current glyph */
79 /* and increments the advance width by the advance width of the clipboard */
80 /* */
81 /* Can be set from configure --enable-pasteafter */
85 /* Someone asked for encoding GB12345. Neither libiconv nor iconv supports it.*/
86 /* */
87 /* #define FONTFORGE_CONFIG_GB12345 */
88 /* */
89 /* Can be set from configure --enable-gb12345 */
92 /* I doubt anyone but me will be interested in the tile path command, so I */
93 /* don't include code for it by default, but if you do want it simply define */
94 /* the following macro */
95 /* */
96 /* #define FONTFORGE_CONFIG_TILEPATH */
97 /* */
98 /* The tile path command lets you specify a tile which will then be laid out */
99 /* along a path. It could be used to make a font whose stems were filled with*/
100 /* celtic knotwork, or bamboo segments, for example. */
101 /* It's sort of an extension to the Expand Stroke command, only it strokes */
102 /* with a pattern */
103 /* */
104 /* Can be set from configure --enable-tilepath */
107 /* There used to be a property _XFREE86_GLYPH_RANGES (in bdf/pcf) fonts which */
108 /* gave a quick view about what glyphs were in a bdf font. From what I gather*/
109 /* this property has been dropped because it was redundant. If you would */
110 /* like FontForge to generate it */
111 /* */
112 /* #define FONTFORGE_CONFIG_BDF_GLYPH_RANGES */
113 /* */
116 /* I used to use an approximation method when converting cubic to quadratic */
117 /* splines which was non-symmetric. In some cases it produced better results */
118 /* than the current approach. This flag restores the old algorithm. */
119 /* */
120 /* #define FONTFORGE_CONFIG_NON_SYMMETRIC_QUADRATIC_CONVERSION */
121 /* */
124 /* Harald Harders would like to be able to generate a PFM file without */
125 /* creating a font along with it. I don't see the need for this, but he pro- */
126 /* vided a patch. Setting this flag will enable his patch */
127 /* */
128 /* #define FONTFORGE_CONFIG_WRITE_PFM */
129 /* */
132 /* Prior to late Sept of 2003 FontForge converted certain mac feature/settings*/
133 /* into opentype-like tags. Some features could be converted directly but for*/
134 /* a few I made up tags. Now FontForge is capable of using the mac feature */
135 /* settings directly. If you set this flag then when FontForge loads in an sfd*/
136 /* file with these non-standard opentype tags, it will convert them into the */
137 /* appropriate mac feature/setting combinations. */
138 /* */
139 /* #define FONTFORGE_CONFIG_CVT_OLD_MAC_FEATURES */
140 /* */
143 /* Normally fontforge uses float (32 bit real data type) to store position */
144 /* and transformation data. If you prefer you may use double (64 bit real) */
145 /* instead. The extra precision is usually not needed, but the extra space */
146 /* can be a problem with large (CJK, UNICODE) fonts. */
147 /* */
148 /* #define FONTFORGE_CONFIG_USE_DOUBLE */
149 /* #define FONTFORGE_CONFIG_USE_LONGDOUBLE */
150 /* */
153 /* In addition to placing snippets of charstrings into subrs, I tried adding */
154 /* whole glyphs (when that was possible). To my surprise, it made things */
155 /* worse in one of my test cases, and barely registered an improvement in */
156 /* another. So I think we're better off without it. But I don't understand */
157 /* why things are worse so I'm leaving the code in to play with */
158 /* */
159 /* #define FONTFORGE_CONFIG_PS_REFS_GET_SUBRS */
160 /* */
163 /* Werner wants to be able to see the raw (unscaled) data for the location of */
164 /* points (in the points window of the debugger). I'm not sure that is */
165 /* generally a good idea (I think it makes the dlg look unsymetric). */
166 /* */
167 /* #define FONTFORGE_CONFIG_SHOW_RAW_POINTS */
168 /* */
170 /* On most systems fontforge uses the alt or meta key as a mouse press modifier*/
171 /* on the mac that would mean the option key. But the mac usually uses option*/
172 /* keypress to mean mouse button 2, and so option isn't available. Let's use */
173 /* capslock instead. */
174 /* */
175 /* #define FONTFORGE_CONFIG_CAPSLOCK_FOR_ALT */
176 /* */
177 /* This has three states: */
178 /* Undefined (or 0) => use meta/alt key */
179 /* 2 => Use either meta/alt or capslock */
180 /* otherwise => use capslock */
181 /* */
182 /* Can be set from configure --with-capslock-for-alt */
185 /* Use horizontal, rather than vertical, tabsets for the Font and glyph Info */
186 /* dialogs. This is what things used to look like. */
187 /* */
188 /* #define FONTFORGE_CONFIG_INFO_HORIZONTAL */
189 /* */
191 /* ************************************************************************** */
192 /* *********************** Set by configure script ************************** */
193 /* ************************************************************************** */
195 /* The following are expected to be set by the configure script, but I suppose*/
196 /* you could set them here too */
198 /* If your system does not have a working ldopen (to do dynamic binding of */
199 /* shared libaries) then set NODYNAMIC */
201 /* If you are on a Mac then set __Mac */
202 /* If you are on a windows box with cygwin set __CygWin */
204 /* If you are on a Mac where cursors are restricted to 16x16 pixel boxes then */
205 /* set _CursorsMustBe16x16 */
207 /* If you are on cygwin where even the modifier keys autorepeat then set */
208 /* _ModKeysAutoRepeat */
210 /* If you are on cygwin where some of the drawmode funtions (like AND) don't */
211 /* work then set _BrokenBitmapImages */
213 /* FontForge knows about 4 different keyboard settings, a windows keyboard, a */
214 /* mac keyboard, a mac keyboard under SUSE linux, and a sun keyboard */
215 /* When it starts up FontForge assumes that the keyboard is some default type*/
216 /* You can override the type by setting _Keyboard to */
217 /* 0 -- windows */
218 /* 1 -- mac running mac osx */
219 /* 3 -- mac running SUSE linux (7.1) */
220 /* 2 -- sparc */
221 /* Basically this affects the text that appears in menus. The sun keyboard */
222 /* uses meta where the windows one uses alt, and the mac use command and */
223 /* option. */
225 /* If there are no freetype header files then define _NO_FREETYPE */
226 /* If the freetype library has the bytecode debugger then define FREETYPE_HAS_DEBUGGER */
227 /* If there is no mmap system call then define _NO_MMAP */
229 /* If there is no ungif library (or if it is out of date) define _NO_LIBUNGIF */
230 /* If there is no png (or z) library define _NO_LIBPNG */
231 /* If there libpng is version 1.2 define _LIBPNG12 */
232 /* If there is no jpeg library define _NO_LIBJPEG */
233 /* If there is no tiff library define _NO_LIBTIFF */
234 /* If there is no xml2 library define _NO_LIBXML */
235 /* If there is no uninameslist library define _NO_LIBUNINAMESLIST */
237 /* If any of the above libraries exists, but only in static form (on a system */
238 /* with a dynamic loader) then define _STATIC_LIBUNGIF, etc. */
240 /* If there is no snprintf define _NO_SNPRINTF */
242 /* If the XInput extension is not available define _NO_XINPUT */
243 /* If the Xkb extension is not available define _NO_XKB */
245 /* If the compiler supports long long define _HAS_LONGLONG */
248 /* ************************************************************************** */
249 /* ******************************** Obsolete ******************************** */
250 /* ************************************************************************** */
252 /******* I decided to turn this on and remove all uses of the flag ************/
253 /* I thought it would be fun to write a generalized non linear transformation */
254 /* routine. I'm not sure that it's very useful though. It can be used to do */
255 /* perspective transformations and such */
256 /* */
257 /* #define FONTFORGE_CONFIG_NONLINEAR */
258 /* */
259 /* This command takes two strings which specify general expressions in x and y*/
260 /* and applies the specified transformations to the splines. Note: Each */
261 /* spline is transformed into a new spline, but some transformations require */
262 /* that a spline be broken into components and each of those transformed eg: */
263 /* "x' = x, y' = y+sin(x)" would not produce anything useful when applied to */
264 /* a long line segment like [0,100]...[100,100], but if that were broken up */
265 /* into sub-segments each pi long the results would be much better */
268 /******* Don't need this any longer as copy layer 2 layer is always available */
269 /* Yoshiki Hayashi wants a copy background to foreground command in the */
270 /* outline view. Setting this flag will enable his patch */
271 /* */
272 /* #define FONTFORGE_CONFIG_COPY_BG_TO_FG */
273 /* */
276 /* ************************************************************************** */
277 /* **************************** Numeric Settings **************************** */
278 /* ************************************************************************** */
281 /* The number of files displayed in the "File->Recent" menu */
282 #define RECENT_MAX 10
284 /* The number of tabs allowed in the outline glyph view of former glyphs */
285 #define FORMER_MAX 10
287 /* The maximum number of layers allowed in a normal font (this includes the */
288 /* default foreground and background layers) -- this does not limit type3 */
289 /* fonts */
290 #define BACK_LAYER_MAX 256
294 #ifdef __MINGW32__
295 #include <stdio.h>
296 extern FILE *_cairo_win32_tmpfile( void );
297 #define tmpfile() _cairo_win32_tmpfile()
298 #endif /* __MINGW32__ */
301 #endif