1 // 2 // This header file contains the lookup table used for converting between 3 // FCIs (font characterization integers) and font names for the standard 4 // 35 type 1 fonts. 5 // 6 // Copyright (C) 2005-2010 Alan W. Irwin 7 // 8 // This file is part of PLplot. 9 // 10 // PLplot is free software; you can redistribute it and/or modify 11 // it under the terms of the GNU Library General Public License as published 12 // by the Free Software Foundation; either version 2 of the License, or 13 // (at your option) any later version. 14 // 15 // PLplot is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU Library General Public License for more details. 19 // 20 // You should have received a copy of the GNU Library General Public License 21 // along with PLplot; if not, write to the Free Software 22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 // 24 25 // This file only relevant to device drivers (currently just pdf and 26 // ps) that use Type1 fonts. 27 28 // There are no good choices for script fonts for Type1 so default to 29 // the Helvetica (sans) variants in that case. 30 31 // Default to Helvetica (sans) variants for symbol fonts to follow 32 // what is done for all modern unicode-aware TrueType font devices. 33 34 // N.B. if the glyph lookup comes up blank for any of the fonts below, 35 // then an additional search of the Type1 Symbol font glyphs is 36 // implemented in the Type1 device drivers as a fallback. 37 38 // N.B. When updating this table by hand be sure to keep it in 39 // ascending order in fci! 40 41 #define N_Type1Lookup 30 42 static const FCI_to_FontName_Table Type1Lookup[N_Type1Lookup] = { 43 { PL_FCI_MARK | 0x000, (const unsigned char *) "Helvetica" }, 44 { PL_FCI_MARK | 0x001, (const unsigned char *) "Times-Roman" }, 45 { PL_FCI_MARK | 0x002, (const unsigned char *) "Courier" }, 46 { PL_FCI_MARK | 0x003, (const unsigned char *) "Helvetica" }, 47 { PL_FCI_MARK | 0x004, (const unsigned char *) "Helvetica" }, 48 { PL_FCI_MARK | 0x010, (const unsigned char *) "Helvetica-Oblique" }, 49 { PL_FCI_MARK | 0x011, (const unsigned char *) "Times-Italic" }, 50 { PL_FCI_MARK | 0x012, (const unsigned char *) "Courier-Oblique" }, 51 { PL_FCI_MARK | 0x013, (const unsigned char *) "Helvetica-Oblique" }, 52 { PL_FCI_MARK | 0x014, (const unsigned char *) "Helvetica-Oblique" }, 53 { PL_FCI_MARK | 0x020, (const unsigned char *) "Helvetica-Oblique" }, 54 { PL_FCI_MARK | 0x021, (const unsigned char *) "Times-Italic" }, 55 { PL_FCI_MARK | 0x022, (const unsigned char *) "Courier-Oblique" }, 56 { PL_FCI_MARK | 0x023, (const unsigned char *) "Helvetica-Oblique" }, 57 { PL_FCI_MARK | 0x024, (const unsigned char *) "Helvetica-Oblique" }, 58 { PL_FCI_MARK | 0x100, (const unsigned char *) "Helvetica-Bold" }, 59 { PL_FCI_MARK | 0x101, (const unsigned char *) "Times-Bold" }, 60 { PL_FCI_MARK | 0x102, (const unsigned char *) "Courier-Bold" }, 61 { PL_FCI_MARK | 0x103, (const unsigned char *) "Helvetica-Bold" }, 62 { PL_FCI_MARK | 0x104, (const unsigned char *) "Helvetica-Bold" }, 63 { PL_FCI_MARK | 0x110, (const unsigned char *) "Helvetica-BoldOblique" }, 64 { PL_FCI_MARK | 0x111, (const unsigned char *) "Times-BoldItalic" }, 65 { PL_FCI_MARK | 0x112, (const unsigned char *) "Courier-BoldOblique" }, 66 { PL_FCI_MARK | 0x113, (const unsigned char *) "Helvetica-BoldOblique" }, 67 { PL_FCI_MARK | 0x114, (const unsigned char *) "Helvetica-BoldOblique" }, 68 { PL_FCI_MARK | 0x120, (const unsigned char *) "Helvetica-BoldOblique" }, 69 { PL_FCI_MARK | 0x121, (const unsigned char *) "Times-BoldItalic" }, 70 { PL_FCI_MARK | 0x122, (const unsigned char *) "Courier-BoldOblique" }, 71 { PL_FCI_MARK | 0x123, (const unsigned char *) "Helvetica-BoldOblique" }, 72 { PL_FCI_MARK | 0x124, (const unsigned char *) "Helvetica-BoldOblique" }, 73 }; 74