Skip to content

Commit

Permalink
Adjust font size for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
utokusa committed Oct 8, 2021
1 parent 5793e58 commit 399439c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 34 deletions.
Binary file added assets/Os251Font125Percent.ttf
Binary file not shown.
78 changes: 44 additions & 34 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,51 @@ target_compile_definitions(Os251
DONT_SET_USING_JUCE_NAMESPACE=1
)

set(BINARY_SOURCES
${CMAKE_SOURCE_DIR}/src/jsui/build/js/main.js
${CMAKE_SOURCE_DIR}/assets/Recursive-Regular.ttf

${CMAKE_SOURCE_DIR}/assets/images/left.png
${CMAKE_SOURCE_DIR}/assets/images/left_over.png
${CMAKE_SOURCE_DIR}/assets/images/left_down.png

${CMAKE_SOURCE_DIR}/assets/images/right.png
${CMAKE_SOURCE_DIR}/assets/images/right_over.png
${CMAKE_SOURCE_DIR}/assets/images/right_down.png

${CMAKE_SOURCE_DIR}/assets/images/reload.png
${CMAKE_SOURCE_DIR}/assets/images/reload_over.png
${CMAKE_SOURCE_DIR}/assets/images/reload_down.png

${CMAKE_SOURCE_DIR}/assets/presets/Default.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad3.oapreset
)

if (UNIX)
list(APPEND BINARY_SOURCES ${CMAKE_SOURCE_DIR}/assets/Recursive-Regular.ttf)
else()
list(APPEND BINARY_SOURCES ${CMAKE_SOURCE_DIR}/assets/Os251Font125Percent.ttf)
endif()

juce_add_binary_data(Os251Binaries
SOURCES
${CMAKE_SOURCE_DIR}/src/jsui/build/js/main.js
${CMAKE_SOURCE_DIR}/assets/Recursive-Regular.ttf

${CMAKE_SOURCE_DIR}/assets/images/left.png
${CMAKE_SOURCE_DIR}/assets/images/left_over.png
${CMAKE_SOURCE_DIR}/assets/images/left_down.png

${CMAKE_SOURCE_DIR}/assets/images/right.png
${CMAKE_SOURCE_DIR}/assets/images/right_over.png
${CMAKE_SOURCE_DIR}/assets/images/right_down.png

${CMAKE_SOURCE_DIR}/assets/images/reload.png
${CMAKE_SOURCE_DIR}/assets/images/reload_over.png
${CMAKE_SOURCE_DIR}/assets/images/reload_down.png

${CMAKE_SOURCE_DIR}/assets/presets/Default.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Bass/Bass3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/FX/FX3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Key/Key3.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad0.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad1.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad2.oapreset
${CMAKE_SOURCE_DIR}/assets/presets/Factory/Pad/Pad3.oapreset
)
SOURCES
${BINARY_SOURCES}
)

target_sources(Os251 PRIVATE
PluginProcessor.cpp
Expand Down
8 changes: 8 additions & 0 deletions src/views/GlobalLookAndFeel.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ class GlobalLookAndFeel : public juce::LookAndFeel_V4
colors::almostBlack,
colors::white,
}),
#if JUCE_WINDOWS
// For Windows we use edited version of Recursive-Regular.ttf
typeface (
juce::Typeface::createSystemTypefaceFor (
BinaryData::Os251Font125Percent_ttf,
BinaryData::Os251Font125Percent_ttfSize))
#else
// Recursive-Regular.ttf
typeface (
juce::Typeface::createSystemTypefaceFor (
BinaryData::RecursiveRegular_ttf,
BinaryData::RecursiveRegular_ttfSize))
#endif
{
setDefaultSansSerifTypeface (typeface);
setColourScheme (colorScheme);
Expand Down

0 comments on commit 399439c

Please sign in to comment.