2006-10-03 16:17:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file FontLoader.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2008-03-20 00:00:53 +00:00
|
|
|
#ifndef FONTLOADER_H
|
|
|
|
#define FONTLOADER_H
|
2006-10-03 16:17:32 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2007-10-28 18:51:54 +00:00
|
|
|
class FontInfo;
|
2006-10-03 16:17:32 +00:00
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
2006-10-07 16:15:06 +00:00
|
|
|
class FontMetrics;
|
|
|
|
|
2006-10-03 16:17:32 +00:00
|
|
|
/// Hold info about a particular font
|
|
|
|
class FontLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
2008-03-20 00:00:53 +00:00
|
|
|
FontLoader();
|
|
|
|
/// Clears cache
|
|
|
|
~FontLoader();
|
2006-10-03 16:17:32 +00:00
|
|
|
|
|
|
|
/// Update fonts after zoom, dpi, font names, or norm change
|
2008-03-20 00:00:53 +00:00
|
|
|
// (basically by deleting all cached values)
|
|
|
|
void update();
|
2006-10-03 16:17:32 +00:00
|
|
|
|
|
|
|
/// Is the given font available ?
|
2008-03-20 00:00:53 +00:00
|
|
|
bool available(FontInfo const & f);
|
2006-10-07 16:15:06 +00:00
|
|
|
|
2007-10-28 18:51:54 +00:00
|
|
|
/// Get the Font metrics for this FontInfo
|
2008-03-20 00:00:53 +00:00
|
|
|
FontMetrics const & metrics(FontInfo const & f);
|
2006-10-03 16:17:32 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
2006-10-03 16:17:32 +00:00
|
|
|
} // namespace frontend
|
|
|
|
|
2007-04-26 04:02:55 +00:00
|
|
|
/// Implementation is in Application.cpp
|
2006-10-21 00:16:43 +00:00
|
|
|
extern frontend::FontLoader & theFontLoader();
|
|
|
|
|
|
|
|
} // namespace lyx
|
2006-10-11 17:24:46 +00:00
|
|
|
|
2008-03-20 00:00:53 +00:00
|
|
|
#endif // FONTLOADER_H
|