diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d4ee21..164011d 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,8 +189,8 @@ elseif(APPLE)
BUNDLE True
MACOSX_BUNDLE_GUI_IDENTIFIER com.erroratline0.infinipaint
MACOSX_BUNDLE_BUNDLE_NAME infinipaint
- MACOSX_BUNDLE_BUNDLE_VERSION "0.3.0"
- MACOSX_BUNDLE_SHORT_VERSION_STRING "0.3.0"
+ MACOSX_BUNDLE_BUNDLE_VERSION "0.3.1"
+ MACOSX_BUNDLE_SHORT_VERSION_STRING "0.3.1"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/macosinstall/Info.plist
)
add_custom_command(TARGET infinipaint POST_BUILD
@@ -361,7 +361,7 @@ if(APPLE OR WIN32)
set(CPACK_PACKAGE_NAME "infinipaint")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "3")
- set(CPACK_PACKAGE_VERSION_PATCH "0")
+ set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_VENDOR "ErrorAtLine0")
set(CPACK_PACKAGE_CONTACT "erroratline0@gmail.com")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
diff --git a/data/fonts/Amiri-Regular.ttf b/data/fonts/Amiri-Regular.ttf
new file mode 100644
index 0000000..df5e1df
Binary files /dev/null and b/data/fonts/Amiri-Regular.ttf differ
diff --git a/data/fonts/NotoKufiArabic-VariableFont_wght.ttf b/data/fonts/NotoKufiArabic-VariableFont_wght.ttf
deleted file mode 100644
index 9d71153..0000000
Binary files a/data/fonts/NotoKufiArabic-VariableFont_wght.ttf and /dev/null differ
diff --git a/data/third_party_licenses/Noto Kufi Arabic b/data/third_party_licenses/Amiri.txt
similarity index 96%
rename from data/third_party_licenses/Noto Kufi Arabic
rename to data/third_party_licenses/Amiri.txt
index 8dd72cd..4f0bc3c 100644
--- a/data/third_party_licenses/Noto Kufi Arabic
+++ b/data/third_party_licenses/Amiri.txt
@@ -1,4 +1,4 @@
-Copyright 2022 The Noto Project Authors (https://github.com/notofonts/arabic)
+Copyright 2010-2022 The Amiri Project Authors (https://github.com/aliftype/amiri).
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:
diff --git a/linuxinstall/com.infinipaint.infinipaint.metainfo.xml b/linuxinstall/com.infinipaint.infinipaint.metainfo.xml
index ee145a4..2de8645 100644
--- a/linuxinstall/com.infinipaint.infinipaint.metainfo.xml
+++ b/linuxinstall/com.infinipaint.infinipaint.metainfo.xml
@@ -59,6 +59,18 @@
com.infinipaint.infinipaint.desktop
+
+
+ Minor update:
+
+ - Add right click popup menu for selection and text editing
+ - Fixed crash when pasting rich text in GUI textbox
+ - Added mouse double click and triple click text selection
+ - Can now type tabs into textboxes
+ - Replaced an embedded font
+
+
+
Major update:
diff --git a/macosinstall/Info.plist b/macosinstall/Info.plist
index 398dc37..a07b6f0 100755
--- a/macosinstall/Info.plist
+++ b/macosinstall/Info.plist
@@ -13,9 +13,9 @@
CFBundleSpokenName
InfiniPaint
CFBundleVersion
- 0.3.0
+ 0.3.1
CFBundleShortVersionString
- 0.3.0
+ 0.3.1
CFBundlePackageType
APPL
NSHumanReadableCopyright
diff --git a/src/FontData.cpp b/src/FontData.cpp
index a67d365..717f468 100644
--- a/src/FontData.cpp
+++ b/src/FontData.cpp
@@ -57,7 +57,7 @@ FontData::FontData()
map["Roboto"] = defaultFontMgr->makeFromFile("data/fonts/Roboto-variable.ttf");
collection = sk_make_sp();
- collection->setDefaultFontManager(defaultFontMgr, std::vector{SkString{"Roboto"}, SkString{"Noto Emoji"}, SkString{"Noto Kufi Arabic"}});
+ collection->setDefaultFontManager(defaultFontMgr, std::vector{SkString{"Roboto"}, SkString{"Noto Emoji"}, SkString{"Amiri"}});
if(localFontMgr)
collection->setDynamicFontManager(localFontMgr);
std::string s = "🙂";
@@ -74,7 +74,7 @@ const std::vector& FontData::get_default_font_families() const {
defaultFontFamilies.emplace_back("Roboto");
if(fallbackOnEmoji)
defaultFontFamilies.emplace_back("Noto Emoji");
- defaultFontFamilies.emplace_back("Noto Kufi Arabic");
+ defaultFontFamilies.emplace_back("Amiri");
}
return defaultFontFamilies;
}
@@ -83,7 +83,7 @@ void FontData::push_default_font_families(std::vector& fontFamilies) c
fontFamilies.emplace_back("Roboto");
if(fallbackOnEmoji)
fontFamilies.emplace_back("Noto Emoji");
- fontFamilies.emplace_back("Noto Kufi Arabic");
+ fontFamilies.emplace_back("Amiri");
}
FontData::~FontData() {
diff --git a/src/RichText/TextBox.cpp b/src/RichText/TextBox.cpp
index 03e5771..09fd015 100644
--- a/src/RichText/TextBox.cpp
+++ b/src/RichText/TextBox.cpp
@@ -174,28 +174,31 @@ void TextBox::process_key_input(Cursor& cur, InputKey in, bool ctrl, bool shift,
}
void TextBox::process_mouse_left_button(Cursor& cur, const Vector2f& pos, int clickCount, bool held, bool shift) {
- if(!held)
- lastClicksWhileHeld = clickCount;
- else
- lastClicksWhileHeld = std::max(lastClicksWhileHeld, clickCount);
+ if(clickCount == 1)
+ lastClicksAtCursorPos = 1;
+ else if(clickCount >= 2) {
+ lastClicksAtCursorPos++;
+ if(lastClicksAtCursorPos > 3)
+ lastClicksAtCursorPos = 1;
+ }
- if(lastClicksWhileHeld || held) {
+ if(clickCount || held) {
rebuild();
Cursor oldCursor = cur;
cur.pos = get_text_pos_closest_to_point(pos);
if(lastClicksCursorPos != cur.pos && clickCount) {
- lastClicksWhileHeld = std::min(1, lastClicksWhileHeld);
+ lastClicksAtCursorPos = 1;
lastClicksCursorPos = cur.pos;
}
cur.selectionBeginPos = cur.pos;
- if(lastClicksWhileHeld && !shift) {
+ if(lastClicksAtCursorPos && !shift) {
if(!cur.selectionEndPosBeforeHeld.has_value()) {
cur.selectionEndPos = cur.selectionBeginPos;
cur.selectionEndPosBeforeHeld = cur.selectionEndPos;
}
- if(lastClicksWhileHeld == 3) {
+ if(lastClicksAtCursorPos == 3) {
cur.selectionEndPos = cur.selectionEndPosBeforeHeld.value();
if(cur.selectionBeginPos < cur.selectionEndPos) {
cur.selectionBeginPos.fTextByteIndex = 0;
@@ -206,7 +209,7 @@ void TextBox::process_mouse_left_button(Cursor& cur, const Vector2f& pos, int cl
cur.selectionEndPos.fTextByteIndex = 0;
}
}
- else if(lastClicksWhileHeld == 2) {
+ else if(lastClicksAtCursorPos == 2) {
cur.selectionEndPos = cur.selectionEndPosBeforeHeld.value();
if(cur.selectionBeginPos < cur.selectionEndPos) {
cur.selectionBeginPos = move(Movement::LEFT_WORD_TIGHT, cur.selectionBeginPos);
diff --git a/src/RichText/TextBox.hpp b/src/RichText/TextBox.hpp
index bcf186c..8ad0dd5 100644
--- a/src/RichText/TextBox.hpp
+++ b/src/RichText/TextBox.hpp
@@ -186,7 +186,7 @@ class TextBox {
unsigned tabWidth = 4;
std::shared_ptr fontData;
- int lastClicksWhileHeld = 0;
+ int lastClicksAtCursorPos = 0;
TextPosition lastClicksCursorPos{0, 0};
struct ParagraphData {
diff --git a/src/VersionConstants.hpp b/src/VersionConstants.hpp
index 38862ae..5c1d065 100644
--- a/src/VersionConstants.hpp
+++ b/src/VersionConstants.hpp
@@ -11,6 +11,6 @@ namespace VersionConstants {
constexpr int SAVEFILE_HEADER_LEN = 12; // DO NOT CHANGE THIS HEADER LENGTH
const std::string CURRENT_SAVEFILE_HEADER = "INFPNT000004"; // Change whenever the save file is incompatible with the previous version
- const std::string CURRENT_VERSION_STRING = "0.3.0";
- constexpr VersionNumber CURRENT_VERSION_NUMBER(0, 3, 0);
+ const std::string CURRENT_VERSION_STRING = "0.3.1";
+ constexpr VersionNumber CURRENT_VERSION_NUMBER(0, 3, 1);
}
diff --git a/windowsinstall/infinipaint.manifest b/windowsinstall/infinipaint.manifest
index 714a3a8..551b7d0 100644
--- a/windowsinstall/infinipaint.manifest
+++ b/windowsinstall/infinipaint.manifest
@@ -1,6 +1,6 @@
-
+