adding multiple font support

This commit is contained in:
2023-12-14 19:13:41 +01:00
parent a0a764d6a2
commit c7e59cbbeb
20 changed files with 131 additions and 86 deletions

32
src/utils/combine_hash.h git.filemode.normal_file
View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* combine_hash.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/14 16:16:06 by maldavid #+# #+# */
/* Updated: 2023/12/14 16:47:39 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_HASH__
#define __MLX_HASH__
#include <cstddef>
#include <functional>
namespace mlx
{
inline void hashCombine([[maybe_unused]] std::size_t& seed) noexcept {}
template <typename T, typename... Rest>
inline void hashCombine(std::size_t& seed, const T& v, Rest... rest)
{
std::hash<T> hasher;
seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
hashCombine(seed, rest...);
}
}
#endif

View File

@@ -6,16 +6,18 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/11 16:20:25 by maldavid #+# #+# */
/* Updated: 2023/12/08 19:13:00 by kbz_8 ### ########.fr */
/* Updated: 2023/12/14 16:54:12 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_DOGICA_TTF__
#define __MLX_DOGICA_TTF__
#include <vector>
constexpr const unsigned int dogica_ttf_len = 33860;
constexpr const unsigned char dogica_ttf[dogica_ttf_len] = {
static const std::vector<unsigned char> dogica_ttf = {
0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x80, 0x00, 0x03, 0x00, 0x60,
0x46, 0x46, 0x54, 0x4d, 0x8f, 0xe1, 0x5b, 0x60, 0x00, 0x00, 0x84, 0x28,
0x00, 0x00, 0x00, 0x1c, 0x47, 0x44, 0x45, 0x46, 0x00, 0x15, 0x00, 0x14,