bpp-core  2.1.0
XFigPostscriptFontManager.cpp
Go to the documentation of this file.
00001 //
00002 // File: XFigPostscriptFontManager.cpp
00003 // Created by: Julien Dutheil
00004 // Created on: Wed Dec 30 2009
00005 // From file: FontManager.h
00006 //
00007 
00008 /*
00009 Copyright or © or Copr. CNRS, (November 17, 2004)
00010 
00011 This software is a computer program whose purpose is to provide utilitary
00012 classes. This file belongs to the Bio++ Project.
00013 
00014 This software is governed by the CeCILL  license under French law and
00015 abiding by the rules of distribution of free software.  You can  use, 
00016 modify and/ or redistribute the software under the terms of the CeCILL
00017 license as circulated by CEA, CNRS and INRIA at the following URL
00018 "http://www.cecill.info". 
00019 
00020 As a counterpart to the access to the source code and  rights to copy,
00021 modify and redistribute granted by the license, users are provided only
00022 with a limited warranty  and the software's author,  the holder of the
00023 economic rights,  and the successive licensors  have only  limited
00024 liability. 
00025 
00026 In this respect, the user's attention is drawn to the risks associated
00027 with loading,  using,  modifying and/or developing or reproducing the
00028 software by the user in light of its specific status of free software,
00029 that may mean  that it is complicated to manipulate,  and  that  also
00030 therefore means  that it is reserved for developers  and  experienced
00031 professionals having in-depth computer knowledge. Users are therefore
00032 encouraged to load and test the software's suitability as regards their
00033 requirements in conditions enabling the security of their systems and/or 
00034 data to be ensured and,  more generally, to use and operate it in the 
00035 same conditions as regards security. 
00036 
00037 The fact that you are presently reading this means that you have had
00038 knowledge of the CeCILL license and that you accept its terms.
00039 */
00040 
00041 #include "XFigPostscriptFontManager.h"
00042 
00043 using namespace bpp;
00044 
00045 XFigPostscriptFontManager::XFigPostscriptFontManager()
00046 {
00047   // Add "official" font codes, from 0 to 34:
00048   registerFont_(Font("Default", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), -1);
00049   registerFont_(Font("Times", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 0); //Roman
00050   registerFont_(Font("Times", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 1);
00051   registerFont_(Font("Times", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 2);
00052   registerFont_(Font("Times", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 3);
00053   registerFont_(Font("AvantGarde", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 4); //Book
00054   registerFont_(Font("AvantGarde", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 5); //Book Oblique
00055   registerFont_(Font("AvantGarde", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 6); //Demi
00056   registerFont_(Font("AvantGarde", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 7); //Demi Oblique
00057   registerFont_(Font("Bookman", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 8); //Light
00058   registerFont_(Font("Bookman", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 9); //Light Italic
00059   registerFont_(Font("Bookman", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 10); //Demi
00060   registerFont_(Font("Bookman", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 11); //Demi Italic
00061   registerFont_(Font("Courier", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 12);
00062   registerFont_(Font("Courier", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 13); //Oblique
00063   registerFont_(Font("Courier", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 14); //Bold
00064   registerFont_(Font("Courier", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 15); //Bold Oblique
00065   registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 16);
00066   registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 17); //Oblique
00067   registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 18); //Bold
00068   registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 19); //Bold Oblique
00069   registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 20); //Narrow
00070   registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 21); //Narrow Oblique
00071   registerFont_(Font("Helvetica", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 22); //Narrow Bold
00072   registerFont_(Font("Helvetica", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 23); //Narrow Bold Oblique
00073   registerFont_(Font("New Century Schoolbook", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 24); //Roman
00074   registerFont_(Font("New Century Schoolbook", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 25); //Italic
00075   registerFont_(Font("New Century Schoolbook", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 26); //Bold
00076   registerFont_(Font("New Century Schoolbook", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 27); //Bold Italic
00077   registerFont_(Font("Palatino", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 28); //Roman
00078   registerFont_(Font("Palatino", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 29); //Italic
00079   registerFont_(Font("Palatino", Font::STYLE_NORMAL, Font::WEIGHT_BOLD, 12), 30); //Bold
00080   registerFont_(Font("Palatino", Font::STYLE_ITALIC, Font::WEIGHT_BOLD, 12), 31); //Bold Italic
00081   registerFont_(Font("Symbol", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 32);
00082   registerFont_(Font("Zapf Chancery Medium", Font::STYLE_ITALIC, Font::WEIGHT_NORMAL, 12), 33); //Italic
00083   registerFont_(Font("Zapf Dingbats", Font::STYLE_NORMAL, Font::WEIGHT_NORMAL, 12), 34);
00084 }
00085 
 All Classes Namespaces Files Functions Variables Typedefs Friends