diff --git a/CMakeLists.txt b/CMakeLists.txt index d06c029994b..26247998926 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -837,6 +837,7 @@ if( BUILD_SURGE_XT ) file(GLOB SURGE_SYNTH_JUCE_RESOURCES_GLOB assets/SurgeClassic/exported/*svg resources/fonts/Lato*ttf + resources/fonts/IndieFlower.ttf ) juce_add_binary_data( surge-xt-binary diff --git a/resources/fonts/IndieFlower.ttf b/resources/fonts/IndieFlower.ttf new file mode 100644 index 00000000000..0ee42d3a797 Binary files /dev/null and b/resources/fonts/IndieFlower.ttf differ diff --git a/resources/fonts/README-IndieFlower.txt b/resources/fonts/README-IndieFlower.txt new file mode 100644 index 00000000000..12377a7acae --- /dev/null +++ b/resources/fonts/README-IndieFlower.txt @@ -0,0 +1,2 @@ +IndieFlower is an OFL font from https://fontlibrary.org/en/font/indie-flower +authored by Kimberly Geswein. We use it here for testing purposes. diff --git a/src/common/gui/CSurgeSlider.cpp b/src/common/gui/CSurgeSlider.cpp index 93f79d60042..ee473bcda3b 100644 --- a/src/common/gui/CSurgeSlider.cpp +++ b/src/common/gui/CSurgeSlider.cpp @@ -153,7 +153,8 @@ void CSurgeSlider::draw(CDrawContext *dc) } labfont.setStyleFlags(font_style); - labfont.setHeight(font_size); + if (font_size != labfont.getHeightInPoints()) + labfont = labfont.withPointHeight(font_size); CRect size = getViewSize(); diff --git a/src/common/gui/RuntimeFont.cpp b/src/common/gui/RuntimeFont.cpp index f92f5695a96..36ec19aa2ec 100644 --- a/src/common/gui/RuntimeFont.cpp +++ b/src/common/gui/RuntimeFont.cpp @@ -26,8 +26,14 @@ namespace GUI DefaultFonts::DefaultFonts() { +#define TEST_WITH_INDIE_FLOWER 0 +#if TEST_WITH_INDIE_FLOWER + latoRegularTypeface = juce::Typeface::createSystemTypefaceFor(BinaryData::IndieFlower_ttf, + BinaryData::IndieFlower_ttfSize); +#else latoRegularTypeface = juce::Typeface::createSystemTypefaceFor(BinaryData::LatoRegular_ttf, BinaryData::LatoRegular_ttfSize); +#endif displayFont = getLatoAtSize(9); patchNameFont = getLatoAtSize(13);