| 1 | /* |
|---|
| 2 | * TransFig: Facility for Translating Fig code |
|---|
| 3 | * Copyright (c) 1985 Supoj Sutantavibul |
|---|
| 4 | * Copyright (c) 1991 Micah Beck |
|---|
| 5 | * Copyright (c) 1992 Uri Blumenthal, IBM |
|---|
| 6 | * |
|---|
| 7 | * Permission to use, copy, modify, distribute, and sell this software and its |
|---|
| 8 | * documentation for any purpose is hereby granted without fee, provided that |
|---|
| 9 | * the above copyright notice appear in all copies and that both that |
|---|
| 10 | * copyright notice and this permission notice appear in supporting |
|---|
| 11 | * documentation. The authors make no representations about the suitability |
|---|
| 12 | * of this software for any purpose. It is provided "as is" without express |
|---|
| 13 | * or implied warranty. |
|---|
| 14 | * |
|---|
| 15 | * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
|---|
| 16 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
|---|
| 17 | * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
|---|
| 18 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
|---|
| 19 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|---|
| 20 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|---|
| 21 | * PERFORMANCE OF THIS SOFTWARE. |
|---|
| 22 | * |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | #define ULIMIT_FONT_SIZE 300 |
|---|
| 26 | #define DEFAULT_PICFONT 13 |
|---|
| 27 | #define PICPSFONT(F) (PICfontnames[ \ |
|---|
| 28 | PICPSfontmap[(((F)->font) <= MAXFONT(F)) ? \ |
|---|
| 29 | ((F)->font)+1 : \ |
|---|
| 30 | DEFAULT_PICFONT]]) |
|---|
| 31 | extern int v2_flag, v21_flag; |
|---|
| 32 | #define ROMAN_DEFAULT 0 |
|---|
| 33 | #define ROMAN 1 |
|---|
| 34 | #define ITALIC 2 |
|---|
| 35 | #define BOLD 3 |
|---|
| 36 | #define ITABOL 4 |
|---|
| 37 | #define HELVET 5 |
|---|
| 38 | #define HELBOL 6 |
|---|
| 39 | #define HELOBL 7 |
|---|
| 40 | #define HELBOB 8 |
|---|
| 41 | #define COUR 9 |
|---|
| 42 | #define COURBL 10 |
|---|
| 43 | #define COUROB 11 |
|---|
| 44 | #define COURBO 12 |
|---|
| 45 | #define SYMBOL 13 |
|---|
| 46 | #define BRAKET 14 |
|---|
| 47 | int PICPSfontmap[] = { |
|---|
| 48 | ROMAN_DEFAULT, ROMAN, |
|---|
| 49 | ITALIC, |
|---|
| 50 | BOLD, |
|---|
| 51 | ITABOL, |
|---|
| 52 | HELVET, |
|---|
| 53 | HELOBL, |
|---|
| 54 | HELBOL, |
|---|
| 55 | HELBOB, |
|---|
| 56 | ROMAN, |
|---|
| 57 | ITALIC, |
|---|
| 58 | BOLD, |
|---|
| 59 | ITABOL, |
|---|
| 60 | COUR, |
|---|
| 61 | COUROB, |
|---|
| 62 | COURBL, |
|---|
| 63 | COURBO, |
|---|
| 64 | HELVET, |
|---|
| 65 | HELOBL, |
|---|
| 66 | HELBOL, |
|---|
| 67 | HELBOB, |
|---|
| 68 | HELVET, |
|---|
| 69 | HELOBL, |
|---|
| 70 | HELBOL, |
|---|
| 71 | HELBOB, |
|---|
| 72 | ROMAN, |
|---|
| 73 | ITALIC, |
|---|
| 74 | BOLD, |
|---|
| 75 | ITABOL, |
|---|
| 76 | ROMAN, |
|---|
| 77 | ITALIC, |
|---|
| 78 | BOLD, |
|---|
| 79 | ITABOL, |
|---|
| 80 | SYMBOL, |
|---|
| 81 | ITALIC, |
|---|
| 82 | BRAKET |
|---|
| 83 | }; |
|---|
| 84 | char *PICfontnames[] = { |
|---|
| 85 | "R", "R", /* default */ |
|---|
| 86 | "I", |
|---|
| 87 | "B", |
|---|
| 88 | "BI", |
|---|
| 89 | "H", |
|---|
| 90 | "HB", |
|---|
| 91 | "HO", |
|---|
| 92 | "HX", |
|---|
| 93 | "C", |
|---|
| 94 | "CB", |
|---|
| 95 | "CO", |
|---|
| 96 | "CX", |
|---|
| 97 | "S", |
|---|
| 98 | "S2" |
|---|
| 99 | }; |
|---|