cgv
Loading...
Searching...
No Matches
font_server.h
1#pragma once
2
3#include <cgv/base/base.h>
4#include <cgv/base/register.h>
5#include <cgv/media/font/font.h>
6#include <cgv/media/font/lib_begin.h>
7
8namespace cgv {
9 namespace media {
10 namespace font {
11
13class CGV_API font_server : public cgv::base::base, public cgv::base::server
14{
15public:
17 virtual font_ptr find_font(const std::string& font_name) = 0;
19 virtual font_ptr find_font_by_prefix(const std::string& font_name_prefix) = 0;
21 virtual font_ptr default_font(bool mono_space);
23 virtual void enumerate_font_names(std::vector<const char*>& font_names) = 0;
24};
25
28
29#if _MSC_VER >= 1400
30CGV_TEMPLATE template class CGV_API data::ref_ptr<font_server>;
31#endif
32
33
35extern CGV_API font_server_ptr get_font_server();
37extern CGV_API void register_font_server(font_server_ptr fs);
38
39 }
40 }
41}
42
43#include <cgv/config/lib_end.h>
base class for all classes that can be registered with support for dynamic properties (see also secti...
Definition base.h:75
provides the methods to create and search for fonts
Definition font_server.h:14
virtual void enumerate_font_names(std::vector< const char * > &font_names)=0
enumerate the names of all installed fonts
virtual font_ptr find_font(const std::string &font_name)=0
find an installed font by name
virtual font_ptr find_font_by_prefix(const std::string &font_name_prefix)=0
find an installed font by name prefix
void register_font_server(font_server_ptr fs)
install a font server, call this in the on_register method of the server implementation
font_server_ptr get_font_server()
return the currently installed font server or 0 if no font server available
font_ptr default_font(bool mono_space)
return platform dependend default font
Definition font.cxx:57
data::ref_ptr< font_server > font_server_ptr
ref counted pointer to font server
Definition font_server.h:27
the cgv namespace
Definition print.h:11
interfaces that add provides very basic functionality.
Definition register.h:203