pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.68k stars 414 forks source link

Preview font takes after editor font #1659

Closed ghost closed 4 years ago

ghost commented 4 years ago

Expected behaviour

The preview will look different from the editor because they have different fonts.

Actual behaviour

Preview fonts are the same as editor fonts, except with headings. Screenshot (63) (Ignore the version number; it still happens in 20.3.5.)

Steps to reproduce

  1. Under "Editor fonts & colors," set two fonts. image
  2. Under "Preview," set two other fonts. image
  3. Save settings.

Output from the debug section in the settings dialog

Expand QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Sun Mar 15 01:05:56 2020` **Version**: `20.3.5` **Build date**: `Mar 14 2020` **Build number**: `5472` **Platform**: `windows` **Operating System**: `Windows 10 (10.0)` **Build architecture**: `i386` **Current architecture**: `x86_64` **Release**: `AppVeyor` **Qt Version (build)**: `5.13.2` **Qt Version (runtime)**: `5.13.2` **Portable mode**: `no` **Settings path / key**: `\HKEY_CURRENT_USER\Software\PBE\QOwnNotes` **Application database path**: `C:\Users\USER\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite` **Application arguments**: `C:\Users\USER\AppData\Local\Programs\QOwnNotes\QOwnNotes.exe` **Qt Debug**: `0` **Locale (system)**: `en_US` **Locale (interface)**: `en` **Primary screen resolution**: `1366x768` **Icon theme**: `breeze-dark-qownnotes` **Notes in current note folder**: `155` **Calendar items**: `0` **Enabled scripts**: `3` ## Server Info **serverUrl**: *empty* **appIsValid**: `no` **notesPathExists**: *empty* **connectionErrorMessage**: *empty* ## Spellchecking **Enabled**: `false` **Selected language**: `auto` **Language codes**: `en-medical, en_US` **Language names**: `American English (medical), American English (United States)` **Application dictionaries path**: `C:\Users\USER\AppData\Roaming\PBE\QOwnNotes\dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `Default` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `C:\Users\USER\Nextcloud\Notebook` **remotePath**: `Notebook` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `no` **activeNoteSubFolder name**: *empty* **database file**: `C:\Users\USER\Nextcloud\Notebook\notes.sqlite` ## Cloud connections ### Cloud connection `Default` **id**: `1` **isCurrent**: `yes` **serverUrl**: *empty* **username**: *empty* ## Enabled scripts ### Script `Insert Table of Contents (TOC)` **id**: `3` **path**: `C:\Users\USER\AppData\Roaming\PBE\QOwnNotes\scripts\insert-toc\insert-toc.qml` **variablesJson**: ``` { "tocLinks": true, "tocTitle": "Table of Contents" } ``` **identifier**: `insert-toc` **version**: `0.0.3` **minAppVersion**: `17.06.2` ### Script `Insert symbol buttons` **id**: `4` **path**: `C:\Users\USER\AppData\Roaming\PBE\QOwnNotes\scripts\symbol-buttons\symbol-buttons.qml` **variablesJson**: ``` { "symbolString": "∮" } ``` **identifier**: `symbol-buttons` **version**: `0.0.1` **minAppVersion**: `17.05.8` ### Script `Note link to clipboard` **id**: `5` **path**: `C:\Users\USER\AppData\Roaming\PBE\QOwnNotes\scripts\note-link-to-clipboard\note-link-to-clipboard.qml` **variablesJson**: *empty* **identifier**: `note-link-to-clipboard` **version**: `0.0.2` **minAppVersion**: `17.02.4` ## Settings **AboutDialog/geometry** (QByteArray): `` **ActiveNoteHistoryItem** (NoteHistoryItem): `` **Debug/fakeOldVersionNumber** (QString): `false` **Debug/fileLogging** (QString): `false` **DictionaryManagerDialog/geometry** (QByteArray): `` **DictionaryManagerDialog/mainSplitterState** (QByteArray): `` **DistractionFreeMode/isEnabled** (QString): `false` **DistractionFreeMode/menuBarGeometry** (QByteArray): `` **DistractionFreeMode/menuBarHeight** (int): `21` **DistractionFreeMode/menuBarVisible** (QString): `true` **DistractionFreeMode/windowState** (QByteArray): `` **Editor/CurrentSchemaKey** (QString): `EditorColorSchema-046e1c8d-9175-4272-81d8-203febd5bc8a` **Editor/autoBracketClosing** (QString): `true` **Editor/autoBracketRemoval** (QString): `true` **Editor/disableCursorBlinking** (QString): `true` **Editor/editorWidthInDFMOnly** (QString): `false` **Editor/highlightCurrentLine** (QString): `true` **Editor/indentSize** (int): `4` **Editor/useTabIndent** (QString): `true` **Editor/vimMode** (QString): `false` **FileDialog/LastPath** (QString): `C:/Program Files/Notepad++` **FileDialog/LastPath-ExternalEditor** (QString): `C:/Program Files/Notepad++` **IssueAssistantDialog/geometry** (QByteArray): `` **LastUpdateCheck** (QDateTime): `2020-03-15T00:14:36.106` **LocalTrashDialog/geometry** (QByteArray): `` **LogWidget/criticalLog** (QString): `true` **LogWidget/debugLog** (QString): `true` **LogWidget/fatalLog** (QString): `true` **LogWidget/infoLog** (QString): `true` **LogWidget/scriptingLog** (QString): `true` **LogWidget/statusLog** (QString): `true` **LogWidget/warningLog** (QString): `true` **MainWindow/geometry** (QByteArray): `` **MainWindow/mainToolBar.iconSize** (int): `24` **MainWindow/menuBarGeometry** (QByteArray): `` **MainWindow/noteSubFolderTreeWidgetExpandState-1** (QStringList): `projects/pre-apocalypse fic/chapters` **MainWindow/noteTextEdit.code.font** (QString): `Droid Sans Mono,16,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextEdit.font** (QString): `iA Writer Duospace,16,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.code.font** (QString): `Ubuntu Mono,20,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.font** (QString): `Open Sans,20,-1,5,50,0,0,0,0,0,Regular` **MainWindow/noteTextView.ignoreCodeFontSize** (QString): `false` **MainWindow/noteTextView.rtl** (QString): `false` **MainWindow/noteTextView.underline** (QString): `true` **MainWindow/noteTextView.useEditorStyles** (QString): `true` **MainWindow/noteTextView.useInternalExportStyling** (QString): `true` **MainWindow/showNotesFromAllNoteSubFolders** (QString): `false` **NoteFolder-1/allowDifferentNoteFileName** (QString): `true` **NoteHistory-1** (QVariantList): `` **NoteHistoryCurrentIndex-1** (int): `38` **PiwikClientId** (QString): `` **ScriptRepositoryDialog/geometry** (QByteArray): `` **ScriptRepositoryDialog/mainSplitterState** (QByteArray): `` **SearchEngineId** (int): `2` **SettingsDialog/geometry** (QByteArray): `` **SettingsDialog/mainSplitterState** (QByteArray): `` **Shortcuts/MainWindow-actionCheck_spelling** (QString): `F1` **Shortcuts/MainWindow-actionImport_notes_from_text_files** (QString): `Ctrl+O` **Shortcuts/MainWindow-actionShow_local_trash** (QString): `Ctrl+Alt+T` **Shortcuts/MainWindow-actionShow_menu_bar** (QString): `Alt+M` **Shortcuts/MainWindow-actionTypewriter_mode** (QString): `Ctrl+Shift+Backspace` **Shortcuts/MainWindow-action_Find_note** (QString): `Ctrl+G` **Shortcuts/MainWindow-action_Find_text_in_note** (QString): `Ctrl+F` **Shortcuts/MainWindow-togglePanel-notePreviewDockWidget** (QString): `Ctrl+Shift+M` **ShowSystemTray** (QString): `true` **StartHidden** (QString): `false` **UpdateDialog/geometry** (QByteArray): `` **WelcomeDialog/geometry** (QByteArray): `` **acceptAllExternalModifications** (QString): `false` **allowNoteEditing** (QString): `true` **allowOnlyOneAppInstance** (QString): `true` **appMetrics/disableAppHeartbeat** (QString): `true` **appMetrics/disableTracking** (QString): `true` **appMetrics/notificationShown** (QString): `true` **automaticNoteFolderDatabaseClosing** (QString): `true` **checkSpelling** (QString): `false` **closeTodoListAfterSave** (QString): `false` **cryptoKey** (qlonglong): `` **currentNoteFolderId** (int): `1` **currentWorkspace** (QString): `initial` **cursorWidth** (int): `1` **customNoteFileExtensionList** (QStringList): *empty* **darkMode** (QString): `true` **darkModeColors** (QString): `true` **darkModeIconTheme** (QString): `true` **darkModeTrayIcon** (QString): `true` **defaultNoteFileExtension** (QString): `md` **demoNotesCreated** (QString): `true` **disableAutomaticUpdateDialog** (QString): `true` **disableExternalDictionaries** (QString): `false` **disableSavedSearchesAutoCompletion** (QString): `false` **dockWasInitializedOnce** (QString): `true` **enableNoteTree** (QString): `false` **enableSocketServer** (QString): `false` **externalEditorPath** (QString): `C:/Program Files/Notepad++/notepad++.exe` **fullyHighlightedBlockquotes** (QString): `true` **gitCommitInterval** (int): `300` **gitExecutablePath** (QString): *empty* **gitLogCommand** (QString): *empty* **guiFirstRunInit** (QString): `true` **ignoreAllExternalModifications** (QString): `false` **ignoreAllExternalNoteFolderChanges** (QString): `false` **ignoreNoteSubFolders** (QString): `^\.` **imageScaleDown** (QString): `false` **imageScaleDownMaximumHeight** (int): `1024` **imageScaleDownMaximumWidth** (int): `1024` **initialLayoutIdentifier** (QString): `full` **insertTimeFormat** (QString): `MM/dd/yyyy hh:mm AP` **interfaceFontSize** (int): `12` **interfaceLanguage** (QString): `en` **interfaceStyle** (QString): `windowsvista` **internalIconTheme** (QString): `true` **itemHeight** (int): `16` **legacyLinking** (QString): `false` **localTrash/autoCleanupDays** (int): `30` **localTrash/autoCleanupEnabled** (QString): `true` **localTrash/supportEnabled** (QString): `true` **localTrashSplitterSizes** (QByteArray): `` **markdownHighlightingEnabled** (QString): `true` **navigationPanelHideSearch** (QString): `false` **networking/ignoreSSLErrors** (QString): `false` **networking/proxyType** (int): `2` **newNoteAskHeadline** (QString): `true` **noteEditIsCentralWidget** (QString): `true` **noteListPreview** (QString): `false` **noteSaveIntervalTime** (int): `300` **noteSubfoldersPanelDisplayAsFullTree** (QString): `true` **noteSubfoldersPanelHideSearch** (QString): `false` **noteSubfoldersPanelOrder** (int): `0` **noteSubfoldersPanelShowFullPath** (QString): `false` **noteSubfoldersPanelShowNotesRecursively** (QString): `true` **noteSubfoldersPanelShowRootFolderName** (QString): `true` **noteSubfoldersPanelSort** (int): `0` **notesPanelOrder** (int): `0` **notesPanelSort** (int): `0` **notesPath** (QString): `C:/Users/USER/Nextcloud/Notebook` **notifyAllExternalModifications** (QString): `true` **overrideInterfaceFontSize** (QString): `true` **ownCloud/supportEnabled** (QString): `false` **ownCloud/todoCalendarBackend** (int): `3` **ownCloud/todoCalendarCalDAVPassword** (QString): `` **ownCloud/todoCalendarCalDAVServerUrl** (QString): *empty* **ownCloud/todoCalendarCalDAVUsername** (QString): *empty* **ownCloud/todoCalendarCloudConnectionId** (int): `1` **ownCloud/todoCalendarDisplayNameList** (QStringList): *empty* **ownCloud/todoCalendarEnabledList** (QStringList): *empty* **ownCloud/todoCalendarEnabledUrlList** (QStringList): *empty* **ownCloud/todoCalendarUrlList** (QStringList): *empty* **ownCloudInfo/appIsValid** (QString): `false` **ownCloudInfo/connectionErrorMessage** (QString): *empty* **ownCloudInfo/notesPathExistsText** (QString): *empty* **ownCloudInfo/serverVersion** (QString): *empty* **previousWorkspace** (QString): `initial` **recentNoteFolders** (QStringList): `C:/Users/USER/Nextcloud/Notes` **restoreCursorPosition** (QString): `true` **restoreLastNoteAtStartup** (QString): `true` **savedSearches/noteFolder-1** (QStringList): `Note 140af3ce-fcf9-430d-9843-3c35f5c1a16d` **showMatches** (QString): `true` **showMenuBar** (QString): `true` **showStatusBar** (QString): `true` **skipVersion** (QString): `20.3.5` **spellCheckLanguage** (QString): `auto` **systemIconTheme** (QString): `false` **tagWasAddedToNote** (QString): `true` **taggingShowNotesRecursively** (QString): `false` **tagsPanelHideSearch** (QString): `false` **tagsPanelOrder** (int): `0` **tagsPanelSort** (int): `0` **todoCalendarSupport** (QString): `false` **toolbar/1/items** (QStringList): `action_New_note, actionSave_modified_notes, actionAllow_note_editing, actionShow_note_in_file_manager, action_Open_note_in_external_editor, , actionCheck_spelling, action_new_tag, actionSplit_note_at_cursor_position, , action_Find_note, actionFind_notes_in_all_subfolders, action_Find_text_in_note, actionReplace_in_current_note, , action_Remove_note, actionShow_local_trash, , action_Settings` **toolbar/1/name** (QString): `mainToolBar` **toolbar/1/title** (QString): `main toolbar` **toolbar/2/items** (QStringList): `actionInsert_current_time, actionInsert_table` **toolbar/2/name** (QString): `formattingToolbar` **toolbar/2/title** (QString): `formatting toolbar` **toolbar/3/items** (QStringList): `actionInsert_Link_to_note, actionInsert_image, actionInsert_attachment, actionDelete_orphaned_images, actionManage_orphaned_attachments` **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** (int): `6` **useUNIXNewline** (QString): `false` **webSocketServerService/bookmarksNoteName** (QString): `Bookmarks` **webSocketServerService/bookmarksTag** (QString): `bookmarks` **webSocketServerService/port** (int): `22222` **workspace-initial/name** (QString): `Full` **workspace-initial/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-initial/windowState** (QByteArray): `` **workspaces** (QStringList): `initial` ## System environment **ALLUSERSPROFILE**: `C:\ProgramData` **APPDATA**: `C:\Users\USER\AppData\Roaming` **CommonProgramFiles**: `C:\Program Files (x86)\Common Files` **CommonProgramFiles(x86)**: `C:\Program Files (x86)\Common Files` **CommonProgramW6432**: `C:\Program Files\Common Files` **COMPUTERNAME**: `COMPUTER` **ComSpec**: `C:\WINDOWS\system32\cmd.exe` **DriverData**: `C:\Windows\System32\Drivers\DriverData` **HOMEDRIVE**: `C:` **HOMEPATH**: `\Users\USER` **LOCALAPPDATA**: `C:\Users\USER\AppData\Local` **LOGONSERVER**: `\\COMPUTER` **NUMBER_OF_PROCESSORS**: `4` **OS**: `Windows_NT` **Path**: `C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\USER\AppData\Local\Microsoft\WindowsApps` **PATHEXT**: `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC` **PROCESSOR_ARCHITECTURE**: `x86` **PROCESSOR_ARCHITEW6432**: `AMD64` **PROCESSOR_IDENTIFIER**: `Intel64 Family 6 Model 142 Stepping 9, GenuineIntel` **PROCESSOR_LEVEL**: `6` **PROCESSOR_REVISION**: `8e09` **ProgramData**: `C:\ProgramData` **ProgramFiles**: `C:\Program Files (x86)` **ProgramFiles(x86)**: `C:\Program Files (x86)` **ProgramW6432**: `C:\Program Files` **PSModulePath**: `C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules` **PUBLIC**: `C:\Users\Public` **SESSIONNAME**: `Console` **SystemDrive**: `C:` **SystemRoot**: `C:\WINDOWS` **TEMP**: `C:\Users\USER\AppData\Local\Temp` **TMP**: `C:\Users\USER\AppData\Local\Temp` **USERDOMAIN**: `COMPUTER` **USERDOMAIN_ROAMINGPROFILE**: `COMPUTER` **USERNAME**: `USER` **USERPROFILE**: `C:\Users\USER` **windir**: `C:\WINDOWS` **__COMPAT_LAYER**: `DetectorsMessageBoxErrors`

Relevant log output in the Log panel

Expand [00:58:39] [debug] on_noteTextEditButton_clicked - 'font': QFont( "iA Writer Duospace,16,-1,5,50,0,0,0,0,0,Regular" )
pbek commented 4 years ago

In your 3rd screenshot there is a setting to turn that off. ("Use editor highlighting...")

ghost commented 4 years ago

@pbek Oh. I thought it only affected the theme; I didn't realize it also affected the font styles. I suppose I misunderstood that.

However, when I tried that, the fonts were very small, definitely not size 20. image Is this intended behavior as well?

pbek commented 4 years ago

I'll look into that. Meanwhile you could use the script to alter the preview fonts.

ghost commented 4 years ago

Yeah, I just discovered the Custom Note Preview Styling script. 😅 Anyway, thank you for your help!