]> git.lyx.org Git - lyx.git/blob - src/frontends/FontLoader.h
rename LyXFont to Font except in tex2lyx
[lyx.git] / src / frontends / FontLoader.h
1 // -*- C++ -*-
2 /**
3  * \file FontLoader.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_FONTLOADER_H
13 #define LYX_FONTLOADER_H
14
15 namespace lyx {
16
17 class Font;
18
19 namespace frontend {
20
21 class FontMetrics;
22
23 /// Hold info about a particular font
24 class FontLoader
25 {
26 public:
27         ///
28         FontLoader() {}
29         ///
30         virtual ~FontLoader() {}
31
32         /// Update fonts after zoom, dpi, font names, or norm change
33         virtual void update() = 0;
34
35         /// Is the given font available ?
36         virtual bool available(Font const & f) = 0;
37
38         /// Get the Font metrics for this Font
39         virtual FontMetrics const & metrics(Font const & f) = 0;
40 };
41
42
43 } // namespace frontend
44
45 /// Implementation is in Application.cpp
46 extern frontend::FontLoader & theFontLoader();
47
48 } // namespace lyx
49
50 #endif // QFONT_LOADER_H