]> git.lyx.org Git - lyx.git/blob - src/frontends/NoGuiFontLoader.h
Fix bug 1749. CAUTION: lyx2lyx not fully working yet (see FIXMEs).
[lyx.git] / src / frontends / NoGuiFontLoader.h
1 // -*- C++ -*-
2 /**
3  * \file NoGuiFontLoader.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_NO_GUI_FONTLOADER_H
13 #define LYX_NO_GUI_FONTLOADER_H
14
15 #include "frontends/FontLoader.h"
16
17 #include "frontends/NoGuiFontMetrics.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 /// Dummy FontLoader for command-line output.
23 class NoGuiFontLoader: public FontLoader
24 {
25 public:
26         ///
27         NoGuiFontLoader() {}
28         ///
29         virtual ~NoGuiFontLoader() {}
30
31         /// Update fonts after zoom, dpi, font names, or norm change
32         virtual void update() {};
33
34         /// Is the given font available ?
35         virtual bool available(Font const &) { return false; };
36
37         /// Get the Font metrics for this Font
38         virtual FontMetrics const & metrics(Font const &) { return metrics_; }
39
40 private:
41         ///
42         NoGuiFontMetrics metrics_;
43 };
44
45 } // namespace frontend
46 } // namespace lyx
47
48 #endif // LYX_NO_GUI_FONTLOADER_H