summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-25 15:12:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-25 15:33:47 +0100
commit8fa7d96f50230aead0eddcedf2bd8a591d71b5a8 (patch)
tree2f905d5b19a7661cc61c1c027a8611b82afa5e95
parent6cc1a9d90a48533532fbbb3f490550038a33eae6 (diff)
downloadserenity-8fa7d96f50230aead0eddcedf2bd8a591d71b5a8.zip
SharedGraphics: Import another 8x10 fixed-width font I made.
It's not perfect yet but it's quite nice to look at so I'll make this the system default for now. :^)
-rw-r--r--SharedGraphics/Font.cpp7
-rw-r--r--SharedGraphics/Liza8x10.h1062
2 files changed, 1067 insertions, 2 deletions
diff --git a/SharedGraphics/Font.cpp b/SharedGraphics/Font.cpp
index e3c5d1b560..9313503fe3 100644
--- a/SharedGraphics/Font.cpp
+++ b/SharedGraphics/Font.cpp
@@ -1,5 +1,8 @@
#include "Font.h"
#include "Peanut8x10.h"
+#include "Liza8x10.h"
+
+#define DEFAULT_FONT_NAME Liza8x10
static Font* s_default_font;
@@ -11,7 +14,7 @@ void Font::initialize()
Font& Font::default_font()
{
if (!s_default_font)
- s_default_font = adopt(*new Font(Peanut8x10::glyphs, Peanut8x10::glyph_width, Peanut8x10::glyph_height, Peanut8x10::first_glyph, Peanut8x10::last_glyph)).leakRef();
+ s_default_font = adopt(*new Font(DEFAULT_FONT_NAME::glyphs, DEFAULT_FONT_NAME::glyph_width, DEFAULT_FONT_NAME::glyph_height, DEFAULT_FONT_NAME::first_glyph, DEFAULT_FONT_NAME::last_glyph)).leakRef();
return *s_default_font;
}
@@ -22,7 +25,7 @@ Font::Font(const char* const* glyphs, byte glyph_width, byte glyph_height, byte
, m_first_glyph(first_glyph)
, m_last_glyph(last_glyph)
{
- m_error_bitmap = CharacterBitmap::create_from_ascii(Peanut8x10::error_glyph, m_glyph_width, m_glyph_height);
+ m_error_bitmap = CharacterBitmap::create_from_ascii(DEFAULT_FONT_NAME::error_glyph, m_glyph_width, m_glyph_height);
}
Font::~Font()
diff --git a/SharedGraphics/Liza8x10.h b/SharedGraphics/Liza8x10.h
new file mode 100644
index 0000000000..f1fbc34da3
--- /dev/null
+++ b/SharedGraphics/Liza8x10.h
@@ -0,0 +1,1062 @@
+#pragma once
+
+namespace Liza8x10 {
+
+static constexpr char first_glyph = '!';
+static constexpr char last_glyph = '~';
+static constexpr byte glyph_width = 8;
+static constexpr byte glyph_height = 10;
+
+static constexpr const char* error_glyph {
+ " #### "
+ " # # "
+ " # # "
+ " # ## # "
+ " # ## # "
+ " #### "
+ " ## "
+ " ###### "
+ " ## "
+ " ## ",
+};
+
+static constexpr const char* glyphs[] {
+
+ " ## "
+ " ## "
+ " ## "
+ " ## "
+ " ## "
+ " ## "
+ " "
+ " ## "
+ " ## "
+ " ",
+
+ " ## ## "
+ " ## ## "
+ " # # "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ",
+
+ " "
+ " # # "
+ " # # "
+ " ###### "
+ " # # "
+ " # # "
+ " # # "
+ " ###### "
+ " # # "
+ " # # ",
+
+ " "
+ " # "
+ " #### "
+ " # # # "
+ " # # "
+ " #### "
+ " # # "
+ " # # # "
+ " #### "
+ " # ",
+
+ " "
+ " ## # "
+ " ## ## "
+ " ## "
+ " ## "
+ " ## "
+ " ## ## "
+ " # ## "
+ " "
+ " ",
+
+ " "
+ " ## "
+ " # # "
+ " # # "
+ " ### "
+ " # # "
+ " # # #"
+ " # ## "
+ " ### #"
+ " ",
+
+ " ## "
+ " ## "
+ " # "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " "
+ " "
+ " "
+ " # "
+ " ##### "
+ " # "
+ " # # "
+ " "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " # "
+ " # "
+ " ##### "
+ " # "
+ " # "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ## "
+ " ## "
+ " ",
+
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ##### "
+ " "
+ " "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ## "
+ " ## "
+ " ",
+
+ " "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " #### "
+ " # ## "
+ " # # # "
+ " # # # "
+ " # # # "
+ " # # # "
+ " ## # "
+ " ## # "
+ " #### "
+ " ",
+
+ " # "
+ " ## "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ###### "
+ " ",
+
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " #### "
+ " # "
+ " # "
+ " # # "
+ " #### "
+ " ",
+
+ " # "
+ " ## "
+ " # # "
+ " # # "
+ " # # "
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " ##### "
+ " # "
+ " # "
+ " # # "
+ " #### "
+ " ",
+
+ " ## "
+ " ## "
+ " # "
+ " # "
+ " ##### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " ###### "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " ##### "
+ " # "
+ " # "
+ " ## "
+ " ## "
+ " ",
+
+ " "
+ " "
+ " "
+ " ## "
+ " ## "
+ " "
+ " ## "
+ " ## "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " ## "
+ " ## "
+ " "
+ " ## "
+ " ## "
+ " "
+ " ",
+
+ " "
+ " "
+ " ## "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ## "
+ " ",
+
+ " "
+ " "
+ " "
+ " ###### "
+ " "
+ " ###### "
+ " "
+ " "
+ " "
+ " ",
+
+ " "
+ " "
+ " ## "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ## "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # "
+ " # "
+ " ## "
+ " "
+ " ## "
+ " ## "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # ### "
+ " # # # "
+ " # # # "
+ " # ### "
+ " # "
+ " #### "
+ " ",
+
+ " ## "
+ " # # "
+ " # # "
+ " # # "
+ " ###### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " ##### "
+ " # # "
+ " # # "
+ " # # "
+ " ##### "
+ " # # "
+ " # # "
+ " # # "
+ " ##### "
+ " ",
+
+ " ### "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # # "
+ " ### "
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " ##### "
+ " # "
+ " # "
+ " # "
+ " ###### "
+ " ",
+
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " #### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " ### "
+ " # # "
+ " # "
+ " # "
+ " # ## "
+ " # # "
+ " # # "
+ " # # "
+ " ### "
+ " ",
+
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ###### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " #### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # # "
+ " ### "
+ " ",
+
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ###### "
+ " ",
+
+ " # # "
+ " ## ## "
+ " # ## # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " # # "
+ " # # "
+ " ## # "
+ " # # # "
+ " # # # "
+ " # ## "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " ### "
+ " # # "
+ " # #"
+ " # #"
+ " # #"
+ " # #"
+ " # #"
+ " # # "
+ " ### "
+ " ",
+
+ " ##### "
+ " # # "
+ " # # "
+ " ##### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " ### "
+ " # # "
+ " # #"
+ " # #"
+ " # #"
+ " # #"
+ " # # #"
+ " # # "
+ " ### #"
+ " ",
+
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # #"
+ " ",
+
+ " ## "
+ " # # "
+ " # # "
+ " # "
+ " ## "
+ " # "
+ " # # "
+ " # # "
+ " ## "
+ " ",
+
+ "####### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ## "
+ " ",
+
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # "
+ " # "
+ " ",
+
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # ## # "
+ " ## ## "
+ " # # "
+ " ",
+
+ "# # "
+ " # # "
+ " # # "
+ " # # "
+ " # "
+ " # # "
+ " # # "
+ " # # "
+ "# # "
+ " ",
+
+ "# # "
+ " # # "
+ " # # "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ###### "
+ " ",
+
+ " #### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " #### "
+ " ",
+
+ " "
+ " # "
+ " ## "
+ " ## "
+ " ## "
+ " ## "
+ " ## "
+ " # "
+ " "
+ " ",
+
+ " #### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " #### "
+ " ",
+
+ " # "
+ " # # "
+ " # # "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ###### "
+ " ",
+
+ " ## "
+ " ## "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # "
+ " ##### "
+ " # # "
+ " # # "
+ " ##### "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " # "
+ " # "
+ " # # "
+ " #### "
+ " ",
+
+ " # "
+ " # "
+ " # "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " ###### "
+ " # "
+ " # # "
+ " #### "
+ " ",
+
+ " "
+ " ### "
+ " # "
+ " #### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " "
+ " "
+ " "
+ " ##### "
+ " # # "
+ " # # "
+ " # # "
+ " ##### "
+ " # "
+ " #### ",
+
+ " # "
+ " # "
+ " # "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " "
+ " # "
+ " "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " "
+ " # "
+ " "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ## ",
+
+ " # "
+ " # "
+ " # "
+ " # # "
+ " # # "
+ " ### "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " ## "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " "
+ " "
+ " "
+ " ## ## "
+ " # # #"
+ " # # #"
+ " # # #"
+ " # #"
+ " # #"
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ",
+
+ " "
+ " "
+ " "
+ " ## "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " ## "
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " # "
+ " # ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " # "
+ " # ",
+
+ " "
+ " "
+ " "
+ " ##### "
+ " # # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ",
+
+ " "
+ " "
+ " "
+ " #### "
+ " # # "
+ " ## "
+ " ## "
+ " # # "
+ " #### "
+ " ",
+
+ " "
+ " # "
+ " # "
+ " ##### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ### "
+ " ",
+
+ " "
+ " "
+ " "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " ",
+
+ " "
+ " "
+ " "
+ " # #"
+ " # #"
+ " # #"
+ " # # "
+ " # # "
+ " # "
+ " ",
+
+ " "
+ " "
+ " "
+ " # # #"
+ " # # #"
+ " # # #"
+ " # # #"
+ " # # #"
+ " ## ## "
+ " ",
+
+
+ " "
+ " "
+ " "
+ " ## ## "
+ " # # "
+ " ## "
+ " ## "
+ " # # "
+ " ## ## "
+ " ",
+
+ " "
+ " "
+ " "
+ " # # "
+ " # # "
+ " # # "
+ " # # "
+ " #### "
+ " # "
+ " #### ",
+
+ " "
+ " "
+ " "
+ " ###### "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ###### "
+ " ",
+
+ " "
+ " ## "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ## "
+ " "
+ " ",
+
+ " "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " "
+ " ",
+
+ " "
+ " ## "
+ " # "
+ " # "
+ " # "
+ " # "
+ " # "
+ " ## "
+ " "
+ " ",
+
+ " "
+ " "
+ " "
+ " "
+ " ## # "
+ " # ## "
+ " "
+ " "
+ " "
+ " ",
+};
+
+}
+