Update FontAwesome 6 -> 7
This commit is contained in:
@@ -535,8 +535,9 @@ void imgui_context::initialize_fonts()
|
||||
}
|
||||
}
|
||||
|
||||
font_awesome_regular = utils::mapped_file("assets://Font Awesome 6 Free-Regular-400.otf");
|
||||
font_awesome_solid = utils::mapped_file("assets://Font Awesome 6 Free-Solid-900.otf");
|
||||
assert(font_awesome.empty());
|
||||
font_awesome.emplace_back("assets://Font Awesome 7 Free-Regular-400.otf");
|
||||
font_awesome.emplace_back("assets://Font Awesome 7 Free-Solid-900.otf");
|
||||
|
||||
ImFontConfig config;
|
||||
config.FontDataOwnedByAtlas = false;
|
||||
@@ -550,8 +551,8 @@ void imgui_context::initialize_fonts()
|
||||
|
||||
config.MergeMode = true;
|
||||
config.GlyphMinAdvanceX = 40; // Use if you want to make the icon monospaced
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<std::byte *>(font_awesome_regular.data()), font_awesome_regular.size(), constants::gui::font_size_small, &config);
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<std::byte *>(font_awesome_solid.data()), font_awesome_solid.size(), constants::gui::font_size_small, &config);
|
||||
for (auto & fa: font_awesome)
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<std::byte *>(fa.data()), fa.size(), constants::gui::font_size_small, &config);
|
||||
}
|
||||
|
||||
std::vector<imgui_context::controller_state> imgui_context::read_controllers_state(XrTime display_time)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <imgui.h>
|
||||
#include <implot.h>
|
||||
#include <inplace_vector.hpp>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <unordered_map>
|
||||
@@ -201,8 +202,7 @@ private:
|
||||
bool show_demo_window = true;
|
||||
#endif
|
||||
|
||||
utils::mapped_file font_awesome_regular;
|
||||
utils::mapped_file font_awesome_solid;
|
||||
beman::inplace_vector::inplace_vector<utils::mapped_file, 3> font_awesome;
|
||||
void initialize_fonts();
|
||||
|
||||
std::vector<controller_state> read_controllers_state(XrTime display_time);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "imgui_internal.h"
|
||||
#include "ui_theme.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome7.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "utils/i18n.h"
|
||||
#include "utils/ranges.h"
|
||||
|
||||
#include <IconsFontAwesome6.h>
|
||||
#include <IconsFontAwesome7.h>
|
||||
#include <algorithm>
|
||||
#include <imspinner.h>
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "render/ui_widgets.h"
|
||||
|
||||
#include "imgui.h"
|
||||
#include <IconsFontAwesome6.h>
|
||||
#include <IconsFontAwesome7.h>
|
||||
#include <cmath>
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <utils/strings.h>
|
||||
#include <vulkan/vulkan_to_string.hpp>
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome7.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <spdlog/fmt/chrono.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome7.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <uni_algo/ranges_grapheme.h>
|
||||
#include <utility>
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome7.h"
|
||||
#include "imgui.h"
|
||||
#include "imgui_internal.h"
|
||||
#include "render/ui_theme.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "render/ui_widgets.h"
|
||||
#include "utils/i18n.h"
|
||||
#include "utils/ranges.h"
|
||||
#include <IconsFontAwesome6.h>
|
||||
#include <IconsFontAwesome7.h>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <glm/ext.hpp>
|
||||
|
||||
Reference in New Issue
Block a user