diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift index 1a7468497..4766b8924 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift @@ -149,7 +149,7 @@ import WebKit } }() - let fontFamily = fontFamilyValue.flatMap { WebFont(rawValue: $0) } ?? .inter + let fontFamily = fontFamilyValue.flatMap { WebFont(rawValue: $0) } ?? .system webView.loadHTMLString( WebReaderContent( @@ -308,22 +308,24 @@ import WebKit } }() - let fontFamily = fontFamilyValue.flatMap { WebFont(rawValue: $0) } ?? .inter + let fontFamily = fontFamilyValue.flatMap { WebFont(rawValue: $0) } ?? .system - webView.loadHTMLString( - WebReaderContent( - item: item, - articleContent: articleContent, - isDark: NSApp.effectiveAppearance.name == NSAppearance.Name.darkAqua, - fontSize: fontSize(), - lineHeight: lineHeight(), - maxWidthPercentage: maxWidthPercentage(), - fontFamily: fontFamily, - prefersHighContrastText: prefersHighContrastText - ) - .styledContent, - baseURL: ViewsPackage.bundleURL + let htmlString = WebReaderContent( + item: item, + articleContent: articleContent, + isDark: NSApp.effectiveAppearance.name == NSAppearance.Name.darkAqua, + fontSize: fontSize(), + lineHeight: lineHeight(), + maxWidthPercentage: maxWidthPercentage(), + fontFamily: fontFamily, + prefersHighContrastText: prefersHighContrastText ) + .styledContent + +// webView.loadFileURL(ViewsPackage.bundleURL, allowingReadAccessTo: ViewsPackage.bundleURL) + // macOS isn't loading the resources at the baseURL here for some reason + // maybe it needs the `allowingReadAccessTo` permission? + webView.loadHTMLString(htmlString, baseURL: ViewsPackage.bundleURL) } } diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift index aa354ef88..c5b22ec30 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift @@ -51,6 +51,7 @@ struct WebReaderContent {
+
HIIIIII