remove IconFontCppHeaders module, new update imicons script

This commit is contained in:
BlackMATov
2020-10-30 07:27:11 +07:00
parent 7cfc8fdac6
commit 6794286d38
10 changed files with 45 additions and 40 deletions

3
.gitmodules vendored
View File

@@ -40,9 +40,6 @@
[submodule "modules/pnpoly.h"]
path = modules/pnpoly.h
url = https://github.com/BlackMATov/pnpoly.h
[submodule "modules/IconFontCppHeaders"]
path = modules/IconFontCppHeaders
url = https://github.com/juliettef/IconFontCppHeaders
[submodule "modules/yoga"]
path = modules/yoga
url = https://github.com/facebook/yoga

View File

@@ -16,8 +16,8 @@
#include <3rdparty/imgui/imgui_stdlib.h>
#include <3rdparty/imgui/imgui_internal.h>
#include <3rdparty/icons/icon_fa.h>
#include <3rdparty/icons/icon_md.h>
#include <3rdparty/imicons/icons_fa.h>
#include <3rdparty/imicons/icons_md.h>
namespace e2d::imgui_utils
{

View File

@@ -12,25 +12,34 @@ mkdir -p $SOURCES_DIR
mkdir -p $HEADERS_RDPARTY_DIR
mkdir -p $SOURCES_RDPARTY_DIR
HEADERS_ICONS_DIR=$HEADERS_RDPARTY_DIR/icons
SOURCES_ICONS_DIR=$SOURCES_RDPARTY_DIR/icons
SOURCES_ICONS_BUILD_DIR=$SOURCES_RDPARTY_DIR/icons/build
HEADERS_IMICONS_DIR=$HEADERS_RDPARTY_DIR/imicons
SOURCES_IMICONS_DIR=$SOURCES_RDPARTY_DIR/imicons
SOURCES_IMICONS_BUILD_DIR=$SOURCES_IMICONS_DIR/build
mkdir -p $HEADERS_ICONS_DIR
cp -fv $MODULES_DIR/IconFontCppHeaders/IconsFontAwesome5.h $HEADERS_ICONS_DIR/icon_fa.h
cp -fv $MODULES_DIR/IconFontCppHeaders/IconsMaterialDesign.h $HEADERS_ICONS_DIR/icon_md.h
mkdir -p $HEADERS_IMICONS_DIR
mkdir -p $SOURCES_IMICONS_DIR
mkdir -p $SOURCES_IMICONS_BUILD_DIR
mkdir -p $SOURCES_ICONS_BUILD_DIR
cp -fv $MODULES_DIR/imgui/misc/fonts/binary_to_compressed_c.cpp $SOURCES_ICONS_BUILD_DIR/binary_to_compressed_c.cpp
wget -N -O $SOURCES_ICONS_BUILD_DIR/fa_solid_900.ttf https://github.com/FortAwesome/Font-Awesome/raw/master/webfonts/fa-solid-900.ttf
wget -N -O $SOURCES_ICONS_BUILD_DIR/fa_regular_400.ttf https://github.com/FortAwesome/Font-Awesome/raw/master/webfonts/fa-regular-400.ttf
wget -N -O $SOURCES_ICONS_BUILD_DIR/materialicons_regular.ttf https://github.com/google/material-design-icons/raw/master/iconfont/MaterialIcons-Regular.ttf
cp -fv $MODULES_DIR/imgui/misc/fonts/binary_to_compressed_c.cpp $SOURCES_IMICONS_BUILD_DIR/binary_to_compressed_c.cpp
pushd $SOURCES_IMICONS_BUILD_DIR
wget -q --show-progress -N https://github.com/FortAwesome/Font-Awesome/raw/master/webfonts/fa-solid-900.ttf
wget -q --show-progress -N https://github.com/FortAwesome/Font-Awesome/raw/master/webfonts/fa-regular-400.ttf
wget -q --show-progress -N https://github.com/google/material-design-icons/raw/master/font/MaterialIcons-Regular.ttf
wget -q --show-progress -N https://raw.githubusercontent.com/juliettef/IconFontCppHeaders/master/IconsFontAwesome5.h
wget -q --show-progress -N https://raw.githubusercontent.com/juliettef/IconFontCppHeaders/master/IconsMaterialDesign.h
pushd $SOURCES_ICONS_BUILD_DIR
clang++ binary_to_compressed_c.cpp -o binary_to_compressed_c
./binary_to_compressed_c fa_solid_900.ttf fa_solid_900 > ../fa_solid_900.h
./binary_to_compressed_c fa_regular_400.ttf fa_regular_400 > ../fa_regular_400.h
./binary_to_compressed_c materialicons_regular.ttf materialicons_regular > ../materialicons_regular.h
./binary_to_compressed_c fa-solid-900.ttf fa_solid > fa_solid.bin.h
./binary_to_compressed_c fa-regular-400.ttf fa_regular > fa_regular.bin.h
./binary_to_compressed_c MaterialIcons-Regular.ttf md_regular > md_regular.bin.h
popd
rm -rf $SOURCES_ICONS_BUILD_DIR
cp -fv $SOURCES_IMICONS_BUILD_DIR/fa_solid.bin.h $SOURCES_IMICONS_DIR
cp -fv $SOURCES_IMICONS_BUILD_DIR/fa_regular.bin.h $SOURCES_IMICONS_DIR
cp -fv $SOURCES_IMICONS_BUILD_DIR/md_regular.bin.h $SOURCES_IMICONS_DIR
cp -fv $SOURCES_IMICONS_BUILD_DIR/IconsFontAwesome5.h $HEADERS_IMICONS_DIR/icons_fa.h
cp -fv $SOURCES_IMICONS_BUILD_DIR/IconsMaterialDesign.h $HEADERS_IMICONS_DIR/icons_md.h
rm -rf $SOURCES_IMICONS_BUILD_DIR

View File

@@ -1,7 +1,7 @@
// File: 'fa_regular_400.ttf' (34092 bytes)
// File: 'fa-regular-400.ttf' (34092 bytes)
// Exported using binary_to_compressed_c.cpp
static const unsigned int fa_regular_400_compressed_size = 22305;
static const unsigned int fa_regular_400_compressed_data[22308/4] =
static const unsigned int fa_regular_compressed_size = 22305;
static const unsigned int fa_regular_compressed_data[22308/4] =
{
0x0000bc57, 0x00000000, 0x2c850000, 0x00000400, 0x00010037, 0x000d0000, 0x00030080, 0x54464650, 0xb5968d4d, 0x85000076, 0x2c158210, 0x4544471c,
0x002a0046, 0x840000a0, 0x2c0f82f0, 0x2f534f1e, 0x53924132, 0x0100001b, 0x360f8258, 0x616d6360, 0xc8a0c770, 0x040000f4, 0x0300000c, 0x736167da,

View File

@@ -1,7 +1,7 @@
// File: 'fa_solid_900.ttf' (193780 bytes)
// File: 'fa-solid-900.ttf' (193780 bytes)
// Exported using binary_to_compressed_c.cpp
static const unsigned int fa_solid_900_compressed_size = 137436;
static const unsigned int fa_solid_900_compressed_data[137436/4] =
static const unsigned int fa_solid_compressed_size = 137436;
static const unsigned int fa_solid_compressed_data[137436/4] =
{
0x0000bc57, 0x00000000, 0xf4f40200, 0x00000400, 0x00010037, 0x000d0000, 0x00030080, 0x54464650, 0xb5968d4d, 0xf4020074, 0x281582d8, 0x4544471c,
0x032a0046, 0x200f82cd, 0x2c0f82b8, 0x2f534f1e, 0x56824332, 0x010000a0, 0x360f8258, 0x616d6360, 0x254d1970, 0x100000eb, 0x0c0000d4, 0x736167ae,

View File

@@ -1,7 +1,7 @@
// File: 'materialicons_regular.ttf' (128180 bytes)
// File: 'MaterialIcons-Regular.ttf' (128180 bytes)
// Exported using binary_to_compressed_c.cpp
static const unsigned int materialicons_regular_compressed_size = 84439;
static const unsigned int materialicons_regular_compressed_data[84440/4] =
static const unsigned int md_regular_compressed_size = 84439;
static const unsigned int md_regular_compressed_data[84440/4] =
{
0x0000bc57, 0x00000000, 0xb4f40100, 0x00000400, 0x00010037, 0x000f0000, 0x00030080, 0x45444770, 0x00000446, 0x8b010053, 0x28158208, 0x4f504724,
0xef18e053, 0x200f829c, 0x280f822c, 0x55534736, 0xa9d2e442, 0x230f8251, 0x69000064, 0x2f291d82, 0x22730a32, 0x01000063, 0x2b1f8278, 0x616d6360,

View File

@@ -11,9 +11,9 @@
#include "dbgui_impl/widgets/input_widget.hpp"
#include "dbgui_impl/widgets/window_widget.hpp"
#include <3rdparty/icons/fa_solid_900.h>
#include <3rdparty/icons/fa_regular_400.h>
#include <3rdparty/icons/materialicons_regular.h>
#include <3rdparty/imicons/fa_regular.bin.h>
#include <3rdparty/imicons/fa_solid.bin.h>
#include <3rdparty/imicons/md_regular.bin.h>
namespace e2d
{
@@ -258,8 +258,8 @@ namespace e2d
{
static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0};
io.Fonts->AddFontFromMemoryCompressedTTF(
fa_solid_900_compressed_data,
math::numeric_cast<int>(fa_solid_900_compressed_size),
fa_solid_compressed_data,
math::numeric_cast<int>(fa_solid_compressed_size),
13.f,
&icons_config, icons_ranges);
}
@@ -267,8 +267,8 @@ namespace e2d
{
static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0};
io.Fonts->AddFontFromMemoryCompressedTTF(
fa_regular_400_compressed_data,
math::numeric_cast<int>(fa_regular_400_compressed_size),
fa_regular_compressed_data,
math::numeric_cast<int>(fa_regular_compressed_size),
13.f,
&icons_config, icons_ranges);
}
@@ -276,8 +276,8 @@ namespace e2d
{
static const ImWchar icons_ranges[] = { ICON_MIN_MD, ICON_MAX_MD, 0};
io.Fonts->AddFontFromMemoryCompressedTTF(
materialicons_regular_compressed_data,
math::numeric_cast<int>(materialicons_regular_compressed_size),
md_regular_compressed_data,
math::numeric_cast<int>(md_regular_compressed_size),
13.f,
&icons_config, icons_ranges);
}