source: tags/initial/fig2dev/dev/texfonts.h

Last change on this file was 2, checked in by oldcode, 24 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/*
2 * TransFig: Facility for Translating Fig code
3 * Copyright (c) 1985 Supoj Sutantavibul
4 * Copyright (c) 1991 Micah Beck
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation. The authors make no representations about the suitability
11 * of this software for any purpose.  It is provided "as is" without express
12 * or implied warranty.
13 *
14 * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 *
22 */
23
24static char             *texfontnames[] = {
25                        "rm",           /* default */
26                        "rm",                   /* roman */
27                        "bf",                   /* bold */
28                        "it",                   /* italic */
29                        "sf",                   /* sans serif */
30                        "tt"                    /* typewriter */
31                };
32
33/* The selection of font names may be site dependent.
34 * Not all fonts are preloaded at all sizes.
35 */
36
37static char             texfontsizes[] = {
38                       11,            /* default */
39                       5, 5, 5, 5,    /* 1-4: small fonts */
40                       5,                       /* five point font */
41                       6, 7, 8, /* etc */
42                       9, 10, 11,
43                       12, 12, 14,
44                       14, 14, 17,
45                       17, 17, 20,
46                       20, 20, 20, 20, 25,
47                       25, 25, 25, 29,
48                       29, 29, 29, 29,
49                       34, 34, 34, 34,
50                       34, 34, 34, 41,
51                       41, 41
52                        };
53
54#define MAXFONTSIZE     42
55
56#define TEXFONT(F)      (texfontnames[((F) <= MAX_FONT) ? (F) : (MAX_FONT-1)])
57#define TEXFONTSIZE(S)  (texfontsizes[((S) <= MAXFONTSIZE) ? round(S)\
58                                                                : (MAXFONTSIZE-1)])
59#define TEXFONTMAG(T)   TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : mag))
60
Note: See TracBrowser for help on using the repository browser.