bpp-core  2.2.0
XFigPostscriptFontManager.cpp
Go to the documentation of this file.
1 //
2 // File: XFigPostscriptFontManager.cpp
3 // Created by: Julien Dutheil
4 // Created on: Wed Dec 30 2009
5 // From file: FontManager.h
6 //
7 
8 /*
9 Copyright or © or Copr. CNRS, (November 17, 2004)
10 
11 This software is a computer program whose purpose is to provide utilitary
12 classes. This file belongs to the Bio++ Project.
13 
14 This software is governed by the CeCILL license under French law and
15 abiding by the rules of distribution of free software. You can use,
16 modify and/ or redistribute the software under the terms of the CeCILL
17 license as circulated by CEA, CNRS and INRIA at the following URL
18 "http://www.cecill.info".
19 
20 As a counterpart to the access to the source code and rights to copy,
21 modify and redistribute granted by the license, users are provided only
22 with a limited warranty and the software's author, the holder of the
23 economic rights, and the successive licensors have only limited
24 liability.
25 
26 In this respect, the user's attention is drawn to the risks associated
27 with loading, using, modifying and/or developing or reproducing the
28 software by the user in light of its specific status of free software,
29 that may mean that it is complicated to manipulate, and that also
30 therefore means that it is reserved for developers and experienced
31 professionals having in-depth computer knowledge. Users are therefore
32 encouraged to load and test the software's suitability as regards their
33 requirements in conditions enabling the security of their systems and/or
34 data to be ensured and, more generally, to use and operate it in the
35 same conditions as regards security.
36 
37 The fact that you are presently reading this means that you have had
38 knowledge of the CeCILL license and that you accept its terms.
39 */
40 
42 
43 using namespace bpp;
44 
46 {
47  // Add "official" font codes, from 0 to 34:
49  registerFont_(Font("Times", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 0); //Roman
53  registerFont_(Font("AvantGarde", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 4); //Book
54  registerFont_(Font("AvantGarde", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 5); //Book Oblique
55  registerFont_(Font("AvantGarde", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 6); //Demi
56  registerFont_(Font("AvantGarde", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 7); //Demi Oblique
57  registerFont_(Font("Bookman", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 8); //Light
58  registerFont_(Font("Bookman", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 9); //Light Italic
59  registerFont_(Font("Bookman", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 10); //Demi
60  registerFont_(Font("Bookman", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 11); //Demi Italic
62  registerFont_(Font("Courier", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 13); //Oblique
63  registerFont_(Font("Courier", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 14); //Bold
64  registerFont_(Font("Courier", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 15); //Bold Oblique
66  registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 17); //Oblique
67  registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 18); //Bold
68  registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 19); //Bold Oblique
69  registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 20); //Narrow
70  registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 21); //Narrow Oblique
71  registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 22); //Narrow Bold
72  registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 23); //Narrow Bold Oblique
73  registerFont_(Font("New Century Schoolbook", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 24); //Roman
74  registerFont_(Font("New Century Schoolbook", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 25); //Italic
75  registerFont_(Font("New Century Schoolbook", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 26); //Bold
76  registerFont_(Font("New Century Schoolbook", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 27); //Bold Italic
77  registerFont_(Font("Palatino", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 28); //Roman
78  registerFont_(Font("Palatino", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 29); //Italic
79  registerFont_(Font("Palatino", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 30); //Bold
80  registerFont_(Font("Palatino", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 31); //Bold Italic
82  registerFont_(Font("Zapf Chancery Medium", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 33); //Italic
83  registerFont_(Font("Zapf Dingbats", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 34);
84 }
85 
static const short int WEIGHT_NORMAL
Definition: Font.h:171
static const short int STYLE_NORMAL
Definition: Font.h:168
Data structure for fonts.
Definition: Font.h:56
This class allows to perform a correspondence analysis.
void registerFont_(const Font &font, int code)
Definition: FontManager.h:138
static const short int STYLE_ITALIC
Definition: Font.h:169
static const short int WEIGHT_BOLD
Definition: Font.h:172