Fonts

These interfaces are used to implement clients for centralised font configuration.

namespace fonts

Enums

enum font_mode_t

Values:

enumerator font_mode_common_items
enumerator font_mode_common_labels
enumerator font_mode_custom
enumerator font_mode_system
enum font_type_t

Values:

enumerator font_type_items
enumerator font_type_labels
enum font_type_flag_t

Values:

enumerator font_type_flag_items
enumerator font_type_flag_labels
class common_callback

Use this class if you wish to use the common fonts rather than implementing client

Public Functions

virtual void on_font_changed(uint32_t changed_items_mask) const = 0
class manager : public service_base

One implementation in Columns UI - do not reimplement!

Public Functions

virtual void get_font(const GUID &p_guid, LOGFONT &p_out) const = 0

Retrieves the font for the given client.

virtual void get_font(const font_type_t p_type, LOGFONT &p_out) const = 0

Retrieves common fonts.

virtual void set_font(const GUID &p_guid, const LOGFONT &p_font) = 0

Sets your font as ‘Custom’ and to p_font.

virtual void register_common_callback(common_callback *p_callback) = 0
virtual void deregister_common_callback(common_callback *p_callback) = 0
inline HFONT get_font(const GUID &p_guid) const

Helper

inline HFONT get_font(const font_type_t p_type) const

Helper

FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(manager)
class manager_v2 : public service_base

Experimental version of the font management API with custom DPI support.

One implementation in Columns UI - do not reimplement!

Public Functions

virtual LOGFONT get_client_font(GUID guid, unsigned dpi = USER_DEFAULT_SCREEN_DPI) const = 0

Retrieve the font for the given client.

virtual LOGFONT get_common_font(font_type_t type, unsigned dpi = USER_DEFAULT_SCREEN_DPI) const = 0

Retrieve a common font.

virtual void set_client_font(GUID guid, const LOGFONT &font, int point_size_tenths) = 0

Set your font as ‘Custom’ and to the specified font.

virtual void register_common_callback(common_callback *callback) = 0
virtual void deregister_common_callback(common_callback *callback) = 0
inline HFONT get_client_font_handle(GUID guid, unsigned dpi = USER_DEFAULT_SCREEN_DPI) const
inline HFONT get_common_font_handle(const font_type_t type, unsigned dpi = USER_DEFAULT_SCREEN_DPI) const
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(manager_v2)
class helper

Helper to simplify retrieving the font for a specific client.

Public Functions

inline void get_font(LOGFONT &p_out) const
inline HFONT get_font() const
inline helper(GUID p_guid)
class client : public service_base

Public Functions

virtual const GUID &get_client_guid() const = 0
virtual void get_name(pfc::string_base &p_out) const = 0
virtual font_type_t get_default_font_type() const = 0
virtual void on_font_changed() const = 0
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(client)

Public Static Functions

static bool create_by_guid(const GUID &p_guid, ptr &p_out)
template<class tClass>
class factory : public service_factory_t<tClass>