diff --git a/scripts/installer_win/surge-x86.iss b/scripts/installer_win/surge-x86.iss index ced151879c7..6417b347215 100644 --- a/scripts/installer_win/surge-x86.iss +++ b/scripts/installer_win/surge-x86.iss @@ -55,7 +55,7 @@ Name: Data; Description: Data Files; Types: full compact custom; Flags: fixed [Files] Source: {#SURGE_SRC}\resources\data\*; DestDir: {commonappdata}\Surge XT\; Components: Data; Flags: recursesubdirs; Excludes: "*.git,windows.wt,configuration.xml,paramdocumentation.xml"; - +Source: {#SURGE_SRC}\resources\fonts\Lato-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato"; Flags: onlyifdoesntexist uninsneveruninstall ;; these lines are used by Azure pipelines - if you want to build the installer locally, comment them out! Source: {#SURGE_BIN}\surge_xt_products\Surge XT (32-bit).vst3\*; DestDir: {commoncf32}\VST3\Surge Synth Team\; Components: VST3; Flags: ignoreversion recursesubdirs Source: {#SURGE_BIN}\surge_xt_products\Surge XT Effects (32-bit).vst3\*; DestDir: {commoncf32}\VST3\Surge Synth Team\; Components: EffectsVST3; Flags: ignoreversion skipifsourcedoesntexist recursesubdirs diff --git a/scripts/installer_win/surge.iss b/scripts/installer_win/surge.iss index fa3a744101c..a0b8f540e9e 100644 --- a/scripts/installer_win/surge.iss +++ b/scripts/installer_win/surge.iss @@ -57,6 +57,7 @@ Name: Data; Description: Data Files; Types: full compact custom; Flags: fixed [Files] Source: {#SURGE_SRC}\resources\data\*; DestDir: {commonappdata}\Surge XT\; Components: Data; Flags: recursesubdirs; Excludes: "*.git,windows.wt,configuration.xml,paramdocumentation.xml"; +Source: {#SURGE_SRC}\resources\fonts\Lato-Regular.ttf; DestDir: "{fonts}"; Components: Data; FontInstall: "Lato"; Flags: onlyifdoesntexist uninsneveruninstall Source: {#SURGE_BIN}\surge_xt_products\Surge XT.vst3\*; DestDir: {commoncf64}\VST3\Surge Synth Team\; Components: VST3; Flags: ignoreversion recursesubdirs Source: {#SURGE_BIN}\surge_xt_products\Surge XT Effects.vst3\*; DestDir: {commoncf64}\VST3\Surge Synth Team\; Components: EffectsVST3; Flags: ignoreversion skipifsourcedoesntexist recursesubdirs Source: {#SURGE_BIN}\surge_xt_products\Surge XT.exe; DestDir: {commonpf64}\Surge Synth Team\; Components: SA; Flags: ignoreversion diff --git a/src/gui/RuntimeFont.cpp b/src/gui/RuntimeFont.cpp index 41212ad1f68..94dbf119304 100644 --- a/src/gui/RuntimeFont.cpp +++ b/src/gui/RuntimeFont.cpp @@ -25,6 +25,17 @@ namespace GUI DefaultFonts::DefaultFonts() { +#if WINDOWS + /* On windows in memory fonts use GDI and OS fonts use D2D so if we have + * LATO in the OS use that + */ + auto ft = juce::Font::findAllTypefaceNames(); + for (const auto &q : ft) + if (q == "Lato") + useOSLato = true; + +#endif + #define TEST_WITH_INDIE_FLOWER 0 #if TEST_WITH_INDIE_FLOWER latoRegularTypeface = juce::Typeface::createSystemTypefaceFor( @@ -46,7 +57,14 @@ DefaultFonts::~DefaultFonts(){}; juce::Font DefaultFonts::getLatoAtSize(float size, juce::Font::FontStyleFlags style) const { - return juce::Font(latoRegularTypeface).withPointHeight(size).withStyle(style); + if (useOSLato) + { + return juce::Font("Lato", 10, 0).withPointHeight(size).withStyle(style); + } + else + { + return juce::Font(latoRegularTypeface).withPointHeight(size).withStyle(style); + } } juce::Font DefaultFonts::getFiraMonoAtSize(float size) const diff --git a/src/gui/RuntimeFont.h b/src/gui/RuntimeFont.h index 441e4e7600d..d5ffe4f9083 100644 --- a/src/gui/RuntimeFont.h +++ b/src/gui/RuntimeFont.h @@ -16,6 +16,8 @@ struct DefaultFonts : public juce::DeletedAtShutdown juce::Font::FontStyleFlags style = juce::Font::FontStyleFlags::plain) const; juce::Font getFiraMonoAtSize(float size) const; + bool useOSLato{false}; + juce::Font displayFont; juce::Font patchNameFont; juce::Font lfoTypeFont; diff --git a/src/gui/widgets/ModulatableSlider.cpp b/src/gui/widgets/ModulatableSlider.cpp index d0517989e48..530441606b5 100644 --- a/src/gui/widgets/ModulatableSlider.cpp +++ b/src/gui/widgets/ModulatableSlider.cpp @@ -117,7 +117,7 @@ void ModulatableSlider::updateLocationState() // This calculation is a little dicey but is correct labelRect = juce::Rectangle() .withX(handleX0) - .withY(trayh / 2) + .withY(trayh / 2 + 1) .withHeight(trayh) .withWidth(range) .withTrimmedRight(1)