Upped version number, improved text selection, and replaced noto kufi arabic with amiri
This commit is contained in:
parent
716f9222dc
commit
6b9a0562f6
11 changed files with 37 additions and 22 deletions
|
|
@ -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")
|
||||
|
|
|
|||
BIN
data/fonts/Amiri-Regular.ttf
Normal file
BIN
data/fonts/Amiri-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -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:
|
||||
|
|
@ -59,6 +59,18 @@
|
|||
<launchable type="desktop-id">com.infinipaint.infinipaint.desktop</launchable>
|
||||
|
||||
<releases>
|
||||
<release version="0.3.1" date="2025-12-02">
|
||||
<description>
|
||||
<p>Minor update:</p>
|
||||
<ul>
|
||||
<li>Add right click popup menu for selection and text editing</li>
|
||||
<li>Fixed crash when pasting rich text in GUI textbox</li>
|
||||
<li>Added mouse double click and triple click text selection</li>
|
||||
<li>Can now type tabs into textboxes</li>
|
||||
<li>Replaced an embedded font</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.3.0" date="2025-11-23">
|
||||
<description>
|
||||
<p>Major update:</p>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<key>CFBundleSpokenName</key>
|
||||
<string>InfiniPaint</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.3.0</string>
|
||||
<string>0.3.1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.3.0</string>
|
||||
<string>0.3.1</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ FontData::FontData()
|
|||
map["Roboto"] = defaultFontMgr->makeFromFile("data/fonts/Roboto-variable.ttf");
|
||||
|
||||
collection = sk_make_sp<skia::textlayout::FontCollection>();
|
||||
collection->setDefaultFontManager(defaultFontMgr, std::vector<SkString>{SkString{"Roboto"}, SkString{"Noto Emoji"}, SkString{"Noto Kufi Arabic"}});
|
||||
collection->setDefaultFontManager(defaultFontMgr, std::vector<SkString>{SkString{"Roboto"}, SkString{"Noto Emoji"}, SkString{"Amiri"}});
|
||||
if(localFontMgr)
|
||||
collection->setDynamicFontManager(localFontMgr);
|
||||
std::string s = "🙂";
|
||||
|
|
@ -74,7 +74,7 @@ const std::vector<SkString>& 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<SkString>& 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() {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class TextBox {
|
|||
unsigned tabWidth = 4;
|
||||
std::shared_ptr<FontData> fontData;
|
||||
|
||||
int lastClicksWhileHeld = 0;
|
||||
int lastClicksAtCursorPos = 0;
|
||||
TextPosition lastClicksCursorPos{0, 0};
|
||||
|
||||
struct ParagraphData {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="0.3.0.0" processorArchitecture="*" name="com.infinipaint.infinipaint" type="win32" />
|
||||
<assemblyIdentity version="0.3.1.0" processorArchitecture="*" name="com.infinipaint.infinipaint" type="win32" />
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<!-- Enable UTF-8 -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue