diff --git a/apps/code/python_toolbox.h b/apps/code/python_toolbox.h index 11fd046c2..af7427879 100644 --- a/apps/code/python_toolbox.h +++ b/apps/code/python_toolbox.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include namespace Code { diff --git a/apps/regression/graph_controller.cpp b/apps/regression/graph_controller.cpp index ac1c1fe55..348cc0ebd 100644 --- a/apps/regression/graph_controller.cpp +++ b/apps/regression/graph_controller.cpp @@ -1,7 +1,7 @@ #include "graph_controller.h" #include "../shared/poincare_helpers.h" #include "../apps_container.h" -#include +#include #include using namespace Poincare; diff --git a/kandinsky/Makefile b/kandinsky/Makefile index cfece4c9e..dfa0cde24 100644 --- a/kandinsky/Makefile +++ b/kandinsky/Makefile @@ -14,7 +14,6 @@ objs += $(addprefix kandinsky/src/,\ ion_context.o\ point.o\ rect.o\ - text.o\ ) objs += kandinsky/src/external/lz4/lz4.o diff --git a/kandinsky/include/kandinsky/text.h b/kandinsky/include/kandinsky/text.h deleted file mode 100644 index 5fdb98bf4..000000000 --- a/kandinsky/include/kandinsky/text.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef KANDINSKY_TEXT_H -#define KANDINSKY_TEXT_H - -#include -#include "../src/large_font.h" -#include "../src/small_font.h" - -class KDText { -public: - enum class FontSize { - Small, - Large - }; - constexpr static int k_tabCharacterWidth = 4; - static KDSize stringSize(const char * text, FontSize size = FontSize::Large); - constexpr static KDSize charSize(FontSize size = FontSize::Large) { - return size == FontSize::Large ? KDSize(BITMAP_LargeFont_CHARACTER_WIDTH, BITMAP_LargeFont_CHARACTER_HEIGHT) : KDSize(BITMAP_SmallFont_CHARACTER_WIDTH, BITMAP_SmallFont_CHARACTER_HEIGHT); - } -}; - -#endif diff --git a/kandinsky/src/text.cpp b/kandinsky/src/text.cpp deleted file mode 100644 index 63b47b36b..000000000 --- a/kandinsky/src/text.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include -#include "small_font.h" -#include "large_font.h" - -KDSize KDText::stringSize(const char * text, FontSize size) { - if (text == nullptr) { - return KDSizeZero; - } - KDSize commonCharSize = charSize(size); - KDSize stringSize = KDSize(0, commonCharSize.height()); - while (*text != 0) { - KDSize cSize = KDSize(commonCharSize.width(), 0); - if (*text == '\t') { - cSize = KDSize(k_tabCharacterWidth*commonCharSize.width(), 0); - } - if (*text == '\n') { - cSize = KDSize(0, commonCharSize.height()); - } - stringSize = KDSize(stringSize.width()+cSize.width(), stringSize.height()+cSize.height()); - text++; - } - return stringSize; -} diff --git a/poincare/include/poincare/integral_layout.h b/poincare/include/poincare/integral_layout.h index 7e8aeaa2d..8633d7b63 100644 --- a/poincare/include/poincare/integral_layout.h +++ b/poincare/include/poincare/integral_layout.h @@ -3,7 +3,7 @@ #include #include -#include +#include namespace Poincare {