]> git.lyx.org Git - lyx.git/blob - src/frontends/FontLoader.h
Ronen's patch for lfun language set
[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 FONTLOADER_H
13 #define FONTLOADER_H
14
15 namespace lyx {
16
17 class FontInfo;
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         /// Clears cache
30         ~FontLoader();
31
32         /// Update fonts after zoom, dpi, font names, or norm change
33         // (basically by deleting all cached values)    
34         void update();
35
36         /// Is the given font available ?
37         bool available(FontInfo const & f);
38
39         /// Get the Font metrics for this FontInfo
40         FontMetrics const & metrics(FontInfo const & f);
41 };
42
43
44 } // namespace frontend
45
46 /// Implementation is in Application.cpp
47 extern frontend::FontLoader & theFontLoader();
48
49 } // namespace lyx
50
51 #endif // FONTLOADER_H