diff --git a/CMakeLists.txt b/CMakeLists.txt index eb7e4fa..4e73766 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,8 @@ qt_add_resources(llink assets/FLOWY-4.png assets/logo.png styles/remarkable.qss + assets/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf + assets/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. diff --git a/assets/Plus_Jakarta_Sans/OFL.txt b/assets/Plus_Jakarta_Sans/OFL.txt new file mode 100644 index 0000000..76770dd --- /dev/null +++ b/assets/Plus_Jakarta_Sans/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Plus Jakarta Sans Project Authors (https://github.com/tokotype/PlusJakartaSans) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf b/assets/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf new file mode 100644 index 0000000..1ccaf53 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf differ diff --git a/assets/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf b/assets/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf new file mode 100644 index 0000000..080a386 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf differ diff --git a/assets/Plus_Jakarta_Sans/README.txt b/assets/Plus_Jakarta_Sans/README.txt new file mode 100644 index 0000000..2413f55 --- /dev/null +++ b/assets/Plus_Jakarta_Sans/README.txt @@ -0,0 +1,77 @@ +Plus Jakarta Sans Variable Font +=============================== + +This download contains Plus Jakarta Sans as both variable fonts and static fonts. + +Plus Jakarta Sans is a variable font with this axis: + wght + +This means all the styles are contained in these files: + Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf + Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Plus Jakarta Sans: + Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLight.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-Light.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-Medium.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBold.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-Bold.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBold.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLightItalic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-LightItalic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-Italic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-MediumItalic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBoldItalic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-BoldItalic.ttf + Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBoldItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Bold.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Bold.ttf new file mode 100644 index 0000000..0ff3da5 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Bold.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-BoldItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-BoldItalic.ttf new file mode 100644 index 0000000..ebd7f01 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-BoldItalic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBold.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBold.ttf new file mode 100644 index 0000000..d22fa69 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBold.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBoldItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..74608e1 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraBoldItalic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLight.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLight.ttf new file mode 100644 index 0000000..2a72c18 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLight.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLightItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLightItalic.ttf new file mode 100644 index 0000000..0818b49 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-ExtraLightItalic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Italic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Italic.ttf new file mode 100644 index 0000000..392a6fc Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Italic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Light.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Light.ttf new file mode 100644 index 0000000..2faaa67 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Light.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-LightItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-LightItalic.ttf new file mode 100644 index 0000000..d0905c6 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-LightItalic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Medium.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Medium.ttf new file mode 100644 index 0000000..f72e9c8 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Medium.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-MediumItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-MediumItalic.ttf new file mode 100644 index 0000000..1f65ded Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-MediumItalic.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf new file mode 100644 index 0000000..a68ad8d Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBold.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBold.ttf new file mode 100644 index 0000000..e675450 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBold.ttf differ diff --git a/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBoldItalic.ttf b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBoldItalic.ttf new file mode 100644 index 0000000..83354d8 Binary files /dev/null and b/assets/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBoldItalic.ttf differ diff --git a/main.cpp b/main.cpp index 73a656c..911fd11 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include "src/MainWindow.h" #include @@ -11,6 +13,16 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); + // Load Plus Jakarta Sans fonts + int regularFontId = QFontDatabase::addApplicationFont(":/assets/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf"); + int italicFontId = QFontDatabase::addApplicationFont(":/assets/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf"); + + if (regularFontId != -1 && italicFontId != -1) { + // Set as application-wide default font + QFont appFont("Plus Jakarta Sans", 13); + a.setFont(appFont); + } + // Load reMarkable e-ink stylesheet // QFile styleFile(":/styles/remarkable.qss"); // if (styleFile.open(QFile::ReadOnly | QFile::Text)) { diff --git a/styles/remarkable.qss b/styles/remarkable.qss index 87cbd5c..ebfeeb5 100644 --- a/styles/remarkable.qss +++ b/styles/remarkable.qss @@ -16,7 +16,7 @@ QWidget { background-color: #FAFAF8; color: #1A1A1A; - font-family: "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif; + font-family: "Plus Jakarta Sans", "SF Pro Text", "Helvetica Neue", sans-serif; font-size: 13px; }