revert old changes
This commit is contained in:
21
openVulkanoCpp/Host/Linux/SystemFontResolver.cpp
Normal file
21
openVulkanoCpp/Host/Linux/SystemFontResolver.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Host/SystemFontResolver.hpp"
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
namespace OpenVulkano
|
||||||
|
{
|
||||||
|
std::string SystemFontResolver::GetSystemFontPath(const std::string& fontName)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<std::string, std::string> SystemFontResolver::ReadSystemFonts()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,9 +16,6 @@
|
|||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <filesystem>
|
|
||||||
#include <functional>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
namespace OpenVulkano
|
namespace OpenVulkano
|
||||||
{
|
{
|
||||||
@@ -397,38 +394,4 @@ namespace OpenVulkano
|
|||||||
{
|
{
|
||||||
return InterfaceOrientation::Landscape; // TODO?
|
return InterfaceOrientation::Landscape; // TODO?
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SystemInfo::GetSystemFontPath(const std::string& fontName)
|
|
||||||
{
|
|
||||||
// fontName -> fontPath
|
|
||||||
static std::map<std::string, std::string> fontFilesMapping;
|
|
||||||
if (fontFilesMapping.empty())
|
|
||||||
{
|
|
||||||
const std::filesystem::path fontsDir = "/usr/share/fonts/truetype";
|
|
||||||
std::function<void(const std::filesystem::path)> GetFontFiles;
|
|
||||||
GetFontFiles = [&](const std::filesystem::path& dir)
|
|
||||||
{
|
|
||||||
for (const auto& file : std::filesystem::directory_iterator(dir))
|
|
||||||
{
|
|
||||||
if (file.is_directory())
|
|
||||||
{
|
|
||||||
GetFontFiles(dir / file);
|
|
||||||
}
|
|
||||||
else if (file.path().extension() == ".ttf")
|
|
||||||
{
|
|
||||||
// store font name without extension
|
|
||||||
fontFilesMapping[file.path().stem()] = file.path();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
GetFontFiles(fontsDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fontFilesMapping.contains(fontName))
|
|
||||||
{
|
|
||||||
return fontFilesMapping.at(fontName);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
21
openVulkanoCpp/Host/MacOS/SystemFontResolver.cpp
Normal file
21
openVulkanoCpp/Host/MacOS/SystemFontResolver.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Host/SystemFontResolver.hpp"
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
namespace OpenVulkano
|
||||||
|
{
|
||||||
|
std::string SystemFontResolver::GetSystemFontPath(const std::string& fontName)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<std::string, std::string> SystemFontResolver::ReadSystemFonts()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -202,9 +202,4 @@ namespace OpenVulkano
|
|||||||
{
|
{
|
||||||
return InterfaceOrientation::Landscape; //TODO?
|
return InterfaceOrientation::Landscape; //TODO?
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SystemInfo::GetSystemFontPath(const std::string& fontName)
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
21
openVulkanoCpp/Host/iOS/SystemFontResolver.cpp
Normal file
21
openVulkanoCpp/Host/iOS/SystemFontResolver.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Host/SystemFontResolver.hpp"
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
namespace OpenVulkano
|
||||||
|
{
|
||||||
|
std::string SystemFontResolver::GetSystemFontPath(const std::string& fontName)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<std::string, std::string> SystemFontResolver::ReadSystemFonts()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -288,9 +288,4 @@ namespace OpenVulkano
|
|||||||
}
|
}
|
||||||
return InterfaceOrientation::Landscape;
|
return InterfaceOrientation::Landscape;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SystemInfo::GetSystemFontPath(const std::string& fontName)
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user