aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mcufontencoder/src/importtools.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mcufontencoder/src/importtools.hh')
-rw-r--r--tools/mcufontencoder/src/importtools.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/mcufontencoder/src/importtools.hh b/tools/mcufontencoder/src/importtools.hh
new file mode 100644
index 00000000..20371f22
--- /dev/null
+++ b/tools/mcufontencoder/src/importtools.hh
@@ -0,0 +1,20 @@
+// Utility functions for processing imported font files.
+
+#pragma once
+#include "datafile.hh"
+
+namespace mcufont {
+
+// Find and eliminate any duplicate glyphs by appending their char vectors.
+void eliminate_duplicates(std::vector<DataFile::glyphentry_t> &glyphtable);
+
+// Calculate the maximum bounding box of the glyphs and crop them to that.
+// Adjust fontinfo accordingly.
+void crop_glyphs(std::vector<DataFile::glyphentry_t> &glyphtable,
+ DataFile::fontinfo_t &fontinfo);
+
+// Fill in the flags (BW, monospace) automatically.
+void detect_flags(const std::vector<DataFile::glyphentry_t> &glyphtable,
+ DataFile::fontinfo_t &fontinfo);
+
+}