yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
font_loader.h
Go to the documentation of this file.
1#ifndef YAZE_APP_PLATFORM_FONTLOADER_H
2#define YAZE_APP_PLATFORM_FONTLOADER_H
3
4#include <string>
5#include <vector>
6
7#include "absl/status/status.h"
8#include "imgui/imgui.h"
9
10namespace yaze {
11
12struct FontConfig {
13 const char* font_path;
14 float font_size;
15 ImFontConfig im_font_config;
16 ImFontConfig jp_conf_config;
17};
18
19struct FontState {
20 std::vector<FontConfig> fonts;
21};
22
24
25absl::Status LoadPackageFonts();
26
27absl::Status ReloadPackageFont(const FontConfig& config);
28
29// Sets ImGui::GetIO().FontDefault to the font at `index`. Out-of-range
30// indices fall back to Fonts[0]. Safe to call before fonts are loaded
31// (in that case it no-ops).
32void SetActiveFontIndex(int index);
33
34absl::Status LoadFontFromMemory(const std::string& name,
35 const std::string& data, float size_pixels);
36
38
39} // namespace yaze
40
41#endif // YAZE_APP_PLATFORM_FONTLOADER_H
absl::Status ReloadPackageFont(const FontConfig &config)
absl::Status LoadPackageFonts()
void LoadSystemFonts()
absl::Status LoadFontFromMemory(const std::string &name, const std::string &data, float size_pixels)
void SetActiveFontIndex(int index)
FontState font_registry
Definition font_loader.h:23
ImFontConfig jp_conf_config
Definition font_loader.h:16
ImFontConfig im_font_config
Definition font_loader.h:15
const char * font_path
Definition font_loader.h:13
std::vector< FontConfig > fonts
Definition font_loader.h:20