Fix resources and build on Xcode.
This commit is contained in:
parent
0e51c8ab76
commit
54f84cdb8d
2 changed files with 14 additions and 1 deletions
2
ui/ph.h
2
ui/ph.h
|
|
@ -49,7 +49,7 @@ using phrase_value_array = std::array<
|
|||
std::pair<not_null<phrase*>, rpl::producer<QString>>,
|
||||
Count>;
|
||||
|
||||
template <int Count>
|
||||
template <std::size_t Count>
|
||||
void set_values(phrase_value_array<Count> &&data) {
|
||||
for (auto &[single, value] : data) {
|
||||
single->value = std::move(value);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,17 @@
|
|||
#include <QtGui/QFontInfo>
|
||||
#include <QtGui/QFontDatabase>
|
||||
|
||||
void style_InitFontsResource() {
|
||||
Q_INIT_RESOURCE(fonts);
|
||||
#ifdef Q_OS_WIN
|
||||
Q_INIT_RESOURCE(win);
|
||||
#elif defined Q_OS_MAC // Q_OS_WIN
|
||||
Q_INIT_RESOURCE(mac);
|
||||
#else // Q_OS_WIN || Q_OS_MAC
|
||||
Q_INIT_RESOURCE(linux);
|
||||
#endif // Q_OS_WIN || Q_OS_MAC || Q_OS_LINUX
|
||||
}
|
||||
|
||||
namespace style {
|
||||
namespace internal {
|
||||
namespace {
|
||||
|
|
@ -83,6 +94,8 @@ void StartFonts() {
|
|||
}
|
||||
Started = true;
|
||||
|
||||
style_InitFontsResource();
|
||||
|
||||
auto regular = LoadCustomFont(":/gui/fonts/OpenSans-Regular.ttf", "Open Sans");
|
||||
auto bold = LoadCustomFont(":/gui/fonts/OpenSans-Bold.ttf", "Open Sans", style::internal::FontBold);
|
||||
auto semibold = LoadCustomFont(":/gui/fonts/OpenSans-Semibold.ttf", "Open Sans Semibold");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue