Description: Make Tulip load fonts from Debian's font packages rather bundled copies.
Author: James Turton <james@somecomputer.xyz>
Last-Update: 2020-04-11
--- a/library/tulip-ogl/src/TulipMaterialDesignIcons.cpp
+++ b/library/tulip-ogl/src/TulipMaterialDesignIcons.cpp
@@ -45,16 +45,18 @@
 // code generated by generate_md_init_cpp_code.sh
 #include "TulipInitMaterialDesignIcons.cpp"
 
+#define DEBIAN_MDI_FONT_DIR "/usr/share/fonts-materialdesignicons-webfont/fonts"
+
 std::string TulipMaterialDesignIcons::getTTFLocation() {
-  return string(tlp::TulipBitmapDir).append("materialdesignicons-webfont.ttf");
+  return DEBIAN_MDI_FONT_DIR "/materialdesignicons-webfont.ttf";
 }
 
 std::string TulipMaterialDesignIcons::getWOFFLocation() {
-  return string(tlp::TulipBitmapDir).append("materialdesignicons-webfont.woff");
+  return DEBIAN_MDI_FONT_DIR "/materialdesignicons-webfont.woff";
 }
 
 std::string TulipMaterialDesignIcons::getWOFF2Location() {
-  return string(tlp::TulipBitmapDir).append("materialdesignicons-webfont.woff2");
+  return DEBIAN_MDI_FONT_DIR "/materialdesignicons-webfont.woff2";
 }
 
 bool TulipMaterialDesignIcons::isIconSupported(const std::string &iconName) {
--- a/library/tulip-ogl/bitmaps/CMakeLists.txt
+++ b/library/tulip-ogl/bitmaps/CMakeLists.txt
@@ -1,6 +1,4 @@
-INSTALL(FILES fontb.ttf
-              font.ttf
-              fa-brands-400.ttf
+INSTALL(FILES fa-brands-400.ttf
               fa-brands-400.woff
               fa-brands-400.woff2
               fa-regular-400.ttf
@@ -9,9 +7,6 @@
               fa-solid-900.ttf
               fa-solid-900.woff
               fa-solid-900.woff2
-              materialdesignicons-webfont.ttf
-              materialdesignicons-webfont.woff
-              materialdesignicons-webfont.woff2
               halfCylinderTexture.png
               cylinderTexture.png
               roundTexture.png
