diff --git a/chrome/content/zotero/preferences/preferences_general.xhtml b/chrome/content/zotero/preferences/preferences_general.xhtml index 4a439de8f0..aa6a58a6ce 100644 --- a/chrome/content/zotero/preferences/preferences_general.xhtml +++ b/chrome/content/zotero/preferences/preferences_general.xhtml @@ -189,6 +189,13 @@ + + diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index a60f540e8b..48e639666e 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -202,6 +202,7 @@ class ReaderInstance { showAnnotations: true, useDarkModeForContent: Zotero.Prefs.get('reader.contentDarkMode'), fontFamily: Zotero.Prefs.get('reader.ebookFontFamily'), + hyphenation: Zotero.Prefs.get('reader.ebookHyphenate'), onOpenContextMenu: () => { // Functions can only be passed over wrappedJSObject (we call back onClick for context menu items) this._openContextMenu(this._iframeWindow.wrappedJSObject.contextMenuParams); @@ -527,7 +528,8 @@ class ReaderInstance { Zotero.Prefs.registerObserver('fontSize', this._handleFontSizeChange), Zotero.Prefs.registerObserver('tabs.title.reader', this._handleTabTitlePrefChange), Zotero.Prefs.registerObserver('reader.contentDarkMode', this._handleContentDarkModeChange), - Zotero.Prefs.registerObserver('reader.ebookFontFamily', this._handleFontFamilyChange), + Zotero.Prefs.registerObserver('reader.ebookFontFamily', this._handleEbookPrefChange), + Zotero.Prefs.registerObserver('reader.ebookHyphenate', this._handleEbookPrefChange), ]; return true; @@ -858,8 +860,9 @@ class ReaderInstance { this._internalReader.useDarkModeForContent(Zotero.Prefs.get('reader.contentDarkMode')); }; - _handleFontFamilyChange = () => { + _handleEbookPrefChange = () => { this._internalReader.setFontFamily(Zotero.Prefs.get('reader.ebookFontFamily')); + this._internalReader.setHyphenate(Zotero.Prefs.get('reader.ebookHyphenate')); }; _dataURLtoBlob(dataurl) { diff --git a/chrome/locale/en-US/zotero/preferences.ftl b/chrome/locale/en-US/zotero/preferences.ftl index fc518bd844..16fdb799d4 100644 --- a/chrome/locale/en-US/zotero/preferences.ftl +++ b/chrome/locale/en-US/zotero/preferences.ftl @@ -24,6 +24,8 @@ preferences-reader-open-snapshots-using = Open snapshots using preferences-reader-open-in-new-window = .label = Open files in new windows instead of tabs preferences-reader-ebook-font = Ebook font: +preferences-reader-ebook-hyphenate = + .label = Enable automatic hyphenation preferences-color-scheme = Color Scheme: preferences-color-scheme-auto = diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 333f15d35b..df2d111dcf 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -1438,7 +1438,6 @@ pdfReader.phraseNotFound = Phrase not found pdfReader.find = Find pdfReader.close = Close pdfReader.showThumbnails = Show Thumbnails -pdfReader.showAnnotations = Show Annotations pdfReader.showOutline = Show Outline pdfReader.findPrevious = Find the previous occurrence of the phrase pdfReader.findNext = Find the next occurrence of the phrase @@ -1448,6 +1447,13 @@ pdfReader.toggleContextPane = Toggle Context Pane pdfReader.highlightAll = Highlight all pdfReader.matchCase = Match case pdfReader.wholeWords = Whole words +pdfReader.epubAppearance = Appearance +pdfReader.epubAppearance.lineHeight = Line height +pdfReader.epubAppearance.wordSpacing = Word spacing +pdfReader.epubAppearance.letterSpacing = Letter spacing +pdfReader.epubAppearance.lineHeight.revert = Use default line height +pdfReader.epubAppearance.wordSpacing.revert = Use default word spacing +pdfReader.epubAppearance.letterSpacing.revert = Use default letter spacing spellCheck.checkSpelling = Check Spelling spellCheck.addRemoveDictionaries = Add/Remove Dictionaries… diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index 4855dfb51d..50cb8e37f4 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -224,6 +224,7 @@ pref("extensions.zotero.tabs.title.reader", "titleCreatorYear"); // Reader pref("extensions.zotero.reader.contentDarkMode", true); pref("extensions.zotero.reader.ebookFontFamily", "Georgia, serif"); +pref("extensions.zotero.reader.ebookHyphenate", true); // Set color scheme to auto by default pref("browser.theme.toolbar-theme", 2); diff --git a/reader b/reader index d90650c912..be7deca7ce 160000 --- a/reader +++ b/reader @@ -1 +1 @@ -Subproject commit d90650c9125ef68488ffadfe737c9d9715555d73 +Subproject commit be7deca7cebdb6d14a9bb4440b5b09edc456338b