diff --git a/.gitignore b/.gitignore index 8f4dc499..d9ddf04e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ clients/sfzprint /vst/download/ +/editor/external/fluentui-system-icons/ + # gh-pages unstaged files: _api/ _site/ diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 33f99afe..952a0e98 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -13,7 +13,7 @@ set(EDITOR_RESOURCES icon_white@2x.png knob48.png knob48@2x.png - Fonts/fluentui-system-regular-20.ttf + Fonts/sfizz-fluentui-system-r20.ttf Fonts/Roboto-Regular.ttf PARENT_SCOPE) diff --git a/editor/resources/Fonts/fluentui-system-regular-20.ttf b/editor/resources/Fonts/sfizz-fluentui-system-r20.ttf similarity index 77% rename from editor/resources/Fonts/fluentui-system-regular-20.ttf rename to editor/resources/Fonts/sfizz-fluentui-system-r20.ttf index 4e838582..dc27711e 100644 Binary files a/editor/resources/Fonts/fluentui-system-regular-20.ttf and b/editor/resources/Fonts/sfizz-fluentui-system-r20.ttf differ diff --git a/editor/src/editor/Editor.cpp b/editor/src/editor/Editor.cpp index 43b012bb..b936065f 100644 --- a/editor/src/editor/Editor.cpp +++ b/editor/src/editor/Editor.cpp @@ -497,7 +497,7 @@ void Editor::Impl::createFrameContents() }; auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) { STextButton* btn = new STextButton(bounds, this, tag, glyph); - btn->setFont(new CFontDesc("Fluent System Regular W20", fontsize)); + btn->setFont(new CFontDesc("Sfizz Fluent System R20", fontsize)); btn->setTextColor(theme->icon); btn->setHoverColor(theme->iconHighlight); btn->setFrameColor(CColor(0x00, 0x00, 0x00, 0x00)); diff --git a/scripts/generate_ui_fonts.sh b/scripts/generate_ui_fonts.sh new file mode 100755 index 00000000..8b0f48f2 --- /dev/null +++ b/scripts/generate_ui_fonts.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +if ! test -d "src"; then + echo "Please run this in the project root directory." + exit 1 +fi + +root="`pwd`" +fonts="$root/editor/resources/Fonts" + +if test ! -d editor/external/fluentui-system-icons; then + cd editor/external + git clone https://github.com/sfztools/fluentui-system-icons.git + cd fluentui-system-icons +else + cd editor/external/fluentui-system-icons + git checkout master + git pull origin master +fi + +./generate_icons_font.py -s regular -w 20 -n 'Sfizz Fluent System R20' \ + -o "$fonts/sfizz-fluentui-system-r20.ttf" diff --git a/scripts/innosetup.iss.in b/scripts/innosetup.iss.in index 7c845a4b..4ac737bd 100644 --- a/scripts/innosetup.iss.in +++ b/scripts/innosetup.iss.in @@ -50,7 +50,7 @@ Name: "vst3"; Description: "VST3 plugin"; Types: full custom; [Files] Source: "sfizz.lv2\Contents\Binary\sfizz.dll"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2\Contents\Binary"; Flags: ignoreversion Source: "sfizz.lv2\Contents\Binary\sfizz_ui.dll"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2\Contents\Binary"; Flags: ignoreversion -Source: "sfizz.lv2\Contents\Resources\*"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2\Contents\Resources" +Source: "sfizz.lv2\Contents\Resources\*"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2\Contents\Resources"; Flags: recursesubdirs Source: "sfizz.lv2\manifest.ttl"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2" Source: "sfizz.lv2\sfizz.ttl"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2" Source: "sfizz.lv2\sfizz_ui.ttl"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2" @@ -58,9 +58,12 @@ Source: "sfizz.lv2\lgpl-3.0.txt"; Components: main; DestDir: "{app}" Source: "sfizz.lv2\LICENSE.md"; Components: main; DestDir: "{app}" Source: "sfizz.vst3\desktop.ini"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3" Source: "sfizz.vst3\Contents\@VST3_PACKAGE_ARCHITECTURE@-win\sfizz.vst3"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3\Contents\@VST3_PACKAGE_ARCHITECTURE@-win"; Flags: ignoreversion -Source: "sfizz.vst3\Contents\Resources\*"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3\Contents\Resources" +Source: "sfizz.vst3\Contents\Resources\*"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3\Contents\Resources"; Flags: recursesubdirs Source: "sfizz.vst3\Plugin.ico"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3" Source: "sfizz.vst3\gpl-3.0.txt"; Components: main; DestDir: "{app}" +; Note(sfizz): OS older than Windows 10 require UI fonts to be installed system-wide +Source: "sfizz.vst3\Contents\Resources\Fonts\sfizz-fluentui-system-r20.ttf"; DestDir: "{fonts}"; FontInstall: "Sfizz Fluent System R20"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4 +Source: "sfizz.vst3\Contents\Resources\Fonts\Roboto-Regular.ttf"; DestDir: "{fonts}"; FontInstall: "Roboto Regular"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4 ;Source: "setup\vc_redist.x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall ; NOTE: Don't use "Flags: ignoreversion" on any shared system files