Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Space after comma character adds no whitespace #2835

Closed
tom-kaufman opened this issue Sep 9, 2023 · 10 comments
Closed

[BUG] Space after comma character adds no whitespace #2835

tom-kaufman opened this issue Sep 9, 2023 · 10 comments
Labels
Duplicate Stale No activity for a while Type: Support

Comments

@tom-kaufman
Copy link

tom-kaufman commented Sep 9, 2023

Expected behaviour

Space after a comma should introduce white space.

Actual behaviour

Need to add two spaces after a comma to add any white space

Steps to reproduce

Enter this text into the editor:

DeleteMe
========================

# This heading,has no space after the comma

# This heading, has a space after the comma

# This heading,  has two spaces after the comma

This text,has no space after the comma

This text, has a space after the comma

This text,  has two spaces after the comma

View the output.

Output from the debug section in the settings dialog

Expand

QOwnNotes Debug Information

General Info

Current Date: Sat Sep 9 12:57:15 2023
Version: 23.9.0
Build date: Aug 31 2023
Build number: 1051
Platform: macosx
Operating System: macOS 13.5
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: no
Settings path / key: /Users/tomkaufman/Library/Preferences/com.pbe.QOwnNotes.plist
Application database path: /Users/tomkaufman/Library/Application Support/PBE/QOwnNotes/QOwnNotes.sqlite
Application arguments: /Applications/QOwnNotes.app/Contents/MacOS/QOwnNotes
Qt Debug: 0
Locale (system): en_US
Locale (interface): empty
Primary screen resolution: 2560x1440
Screen resolution(s): 2560x1440, 2560x1440
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 6
Calendar items: 0
Enabled scripts: 0

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Spellchecking

Enabled: false
Selected language: empty
Language codes: empty
Language names: empty
Application dictionaries path: /Users/tomkaufman/Library/Application Support/PBE/QOwnNotes/dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: -1
localPath: /Users/tomkaufman/Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: no
activeNoteSubFolder name: empty
database file: /Users/tomkaufman/Notes/notes.sqlite

Cloud connections

Cloud connection Default

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Settings

AKLastEmailListRequestDateKey (QDateTime): 2023-09-09T11:18:49.457
AKLastIDMSEnvironment (qlonglong): 0
AKLastLocale (QString): en_US
ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Country (QString): US
Debug/fakeOldVersionNumber (bool): false
Debug/fileLogging (bool): false
Editor/CurrentSchemaKey (QString): EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f
Editor/autoBracketClosing (bool): true
Editor/autoBracketRemoval (bool): true
Editor/disableCursorBlinking (bool): false
Editor/editorWidthInDFMOnly (bool): true
Editor/highlightCurrentLine (bool): true
Editor/indentSize (qlonglong): 4
Editor/removeTrailingSpaces (bool): false
Editor/showLineNumbers (bool): false
Editor/useTabIndent (bool): false
Editor/vimMode (bool): false
KB_DoubleQuoteOption (QString): “abc”
KB_SingleQuoteOption (QString): ‘abc’
KB_SpellingLanguage (QVariantMap): empty
LastUpdateCheck (QDateTime): 2023-09-09T12:25:01.058
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (qlonglong): 32
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteSubFolderTreeWidgetExpandState-1 (QStringList): 700 Creative, 400 Trips, 300 Health
MainWindow/noteTextEdit.code.font (QString): Menlo,10,-1,5,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): .AppleSystemUIFont,13,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): Menlo,10,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): .AppleSystemUIFont,13,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (bool): true
MainWindow/noteTextView.refreshDebounceTime (qlonglong): 600
MainWindow/noteTextView.rtl (bool): false
MainWindow/noteTextView.underline (bool): true
MainWindow/noteTextView.useEditorStyles (bool): true
MainWindow/noteTextView.useInternalExportStyling (bool): true
MainWindow/showNotesFromAllNoteSubFolders (bool): false
NoteFolder-1/NoteTabNameList (QStringList): --snip--
NoteFolder-1/NoteTabStickinessList (QStringList): empty
NoteFolder-1/NoteTabSubFolderPathDataList (QStringList):

--snip--

NoteHistory-1 (QVariantList): <variant list with 4 item(s)>
NoteHistoryCurrentIndex-1 (qlonglong): 3
PasswordDialog/geometry (QByteArray): <binary data>
PiwikClientId (QString): <hidden>
ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data>
SearchEngineId (qlonglong): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (bool): false
StartHidden (bool): false
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (bool): false
allowNoteEditing (bool): true
allowOnlyOneAppInstance (bool): false
appMetrics/disableAppHeartbeat (bool): false
appMetrics/disableTracking (bool): false
appMetrics/notificationShown (bool): true
autoReadOnlyMode (bool): false
autoReadOnlyModeTimeout (qlonglong): 30
automaticNoteFolderDatabaseClosing (bool): false
checkSpelling (bool): false
closeTodoListAfterSave (bool): false
cryptoKey (qlonglong): <hidden>
currentNoteFolderId (qlonglong): 1
currentWorkspace (QString): initial
cursorWidth (qlonglong): 1
darkMode (bool): true
darkModeColors (bool): true
darkModeIconTheme (bool): true
darkModeTrayIcon (bool): true
defaultNoteFileExtension (QString): md
demoNotesCreated (bool): true
disableAutomaticUpdateDialog (bool): true
disableSavedSearchesAutoCompletion (bool): false
dockWasInitializedOnce (bool): true
enableNoteTree (bool): false
enableSocketServer (bool): true
enableWebAppSupport (bool): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (bool): false
gitCommitInterval (qlonglong): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (bool): true
ignoreAllExternalModifications (bool): false
ignoreAllExternalNoteFolderChanges (bool): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (bool): false
imageScaleDownMaximumHeight (qlonglong): 1024
imageScaleDownMaximumWidth (qlonglong): 1024
initialLayoutIdentifier (QString): full
insertTimeFormat (QString): empty
interfaceFontSize (qlonglong): 11
interfaceLanguage (QString): empty
internalIconTheme (bool): false
itemHeight (qlonglong): 18
legacyLinking (bool): false
localTrash/autoCleanupDays (qlonglong): 30
localTrash/autoCleanupEnabled (bool): true
localTrash/supportEnabled (bool): true
markdownHighlightingEnabled (bool): true
navigationPanelAutoSelect (bool): true
navigationPanelHideSearch (bool): false
networking/ignoreSSLErrors (bool): true
networking/proxyType (qlonglong): 2
newNoteAskHeadline (bool): false
noteEditIsCentralWidget (bool): true
noteFileExtensionList (QStringList): md, txt
noteListPreview (bool): false
noteSaveIntervalTime (qlonglong): 10
noteSubfoldersPanelDisplayAsFullTree (bool): true
noteSubfoldersPanelHideSearch (bool): false
noteSubfoldersPanelOrder (qlonglong): 0
noteSubfoldersPanelShowFullPath (bool): false
noteSubfoldersPanelShowNotesRecursively (bool): false
noteSubfoldersPanelShowRootFolderName (bool): true
noteSubfoldersPanelSort (qlonglong): 0
notesPanelOrder (qlonglong): 0
notesPanelSort (qlonglong): 1
notesPath (QString): /Users/tomkaufman/Notes
notifyAllExternalModifications (bool): false
overrideInterfaceFontSize (bool): false
ownCloud/supportEnabled (bool): false
ownCloud/todoCalendarBackend (qlonglong): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (qlonglong): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (bool): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
restoreCursorPosition (bool): false
restoreLastNoteAtStartup (bool): true
restoreNoteTabs (bool): true
savedSearches/noteFolder-1 (QStringList): Note 2023-09-09T12.53.16, Note 2023-09-09T12.25.51, Note 2023-09-08T14.02.04, Note 2023-09-08T14.01.55, Note 2023-09-07T23.57.04, Note 2023-09-07T23.49.34, Note 2023-09-07T23.49.14, Note 2023-09-07T23.49.10, Note 2023-09-07T23.40.02
showMatches (bool): true
showMenuBar (bool): false
showStatusBar (bool): true
startInReadOnlyMode (bool): false
systemIconTheme (bool): false
taggingShowNotesRecursively (bool): false
tagsPanelHideNoteCount (bool): false
tagsPanelHideSearch (bool): false
tagsPanelOrder (qlonglong): 0
tagsPanelSort (qlonglong): 0
todoCalendarSupport (bool): true
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List
toolbar/1/name (QString): mainToolBar
toolbar/1/title (QString): main toolbar
toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/2/name (QString): formattingToolbar
toolbar/2/title (QString): formatting toolbar
toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (qlonglong): 6
useNoteFolderButtons (bool): false
useUNIXNewline (bool): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): Bookmarks
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (qlonglong): 22222
workspace-initial/name (QString): Full
workspace-initial/noteSubFolderDockWidgetVisible (bool): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QStringList): initial

System environment

USER: tomkaufman
COMMAND_MODE: unix2003
__CFBundleIdentifier: com.PBE.QOwnNotes
PATH: /usr/bin:/bin:/usr/sbin:/sbin
LOGNAME: tomkaufman
SSH_AUTH_SOCK: /private/tmp/com.apple.launchd.paOKI5G0za/Listeners
HOME: /Users/tomkaufman
SHELL: /bin/zsh
TMPDIR: /var/folders/_k/mjkhz92n0xxgb2gvg_bncxbr0000gn/T/
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x0
XPC_SERVICE_NAME: application.com.PBE.QOwnNotes.1678515.1678518
XPC_FLAGS: 0x0
QT_LOGGING_RULES: qt.network.ssl.warning=false

Relevant log output in the Log panel

Expand Not included

Screenshot

qownnotes_comma

@pbek
Copy link
Owner

pbek commented Sep 10, 2023

I cannot reproduce that under Linux.

image

Is that maybe an issue with your AppleSystemUIFont? What happens if you set another editor font?

@tom-kaufman
Copy link
Author

I tested Comic Sans MS and it looks good (comma spacing-wise, at least). But I haven't seen any other apps with similar issues using the Apple font, perhaps it's worth it for you to look in to? Anyway, thanks for the help, I'll use another font for now.

@tom-kaufman
Copy link
Author

Seems related to this #1972

@pbek pbek added the Duplicate label Sep 12, 2023
@pbek
Copy link
Owner

pbek commented Sep 12, 2023

May be a macos quirks with Qt...

@njrogie
Copy link

njrogie commented Sep 22, 2023

Hi there. I came across this issue during work on an unrelated Qt Project in Qt 5.15. I encountered the error in Qt Quick using the Futura font, and it was solved by removing the kerning (setting font.kerning to false in the QML element). I don't know if that helps this situation, but for these problem fonts it seems like the kerning is malfunctioning between commas and spaces and must be removed to make the unwanted behavior go away. The only way to fix is for Qt to fix it, I think.

Edit -- I should mention I'm running Qt on Ubuntu and I'm having this issue with the Futura font on both Android and GCC-Desktop. This thread was one of the top Google results for my searching on the issue, apologies if it's not relevant. To maintain relevancy, perhaps we could generate a list of fonts known to have issues, and remove the kerning in the editor if those fonts are being used?

@pbek
Copy link
Owner

pbek commented Sep 23, 2023

Thank you for finding that out.
For the note text edit this could be done for example after here:

QFont font = Utils::Schema::schemaSettings->getEditorTextFont();

For the preview, it must be done in the CSS. https://doc.qt.io/qt-5/richtext-html-subset.html says font-kerning should be supported. @tom-kaufman or @njrogie, you could try to use Custom note preview styling from the script repository and try turning off the font kerning in the preview to test if that fixes the issue.

@lwerdna
Copy link

lwerdna commented Oct 18, 2023

I also have this issue with the default font on MacOS. After switching fonts the issue went away.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale No activity for a while label Nov 18, 2023
Copy link

github-actions bot commented Dec 3, 2023

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2023
@winterskies
Copy link

This behaviour/bug is still present for me on version 24.9.6 on macOS Sonoma 14.6.1 (23G93).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Stale No activity for a while Type: Support
Projects
None yet
Development

No branches or pull requests

5 participants