Fixed broken build after compoer fonts merge (#288)

This commit is contained in:
Tiktack
2024-07-18 21:02:03 +02:00
committed by GitHub
parent cf2f0ec936
commit 641454fa14
2 changed files with 11 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ namespace Wino.Views
IRecipient<ApplicationThemeChanged>,
IRecipient<SaveAsPDFRequested>
{
private readonly IFontService _fontService = App.Current.Services.GetService<IFontService>();
private readonly IPreferencesService _preferencesService = App.Current.Services.GetService<IPreferencesService>();
private readonly IDialogService _dialogService = App.Current.Services.GetService<IDialogService>();
private bool isRenderingInProgress = false;
@@ -271,10 +271,10 @@ namespace Wino.Views
private async Task UpdateReaderFontPropertiesAsync()
{
await ExecuteScriptFunctionAsync("ChangeFontSize", _fontService.GetCurrentReaderFontSize());
await ExecuteScriptFunctionAsync("ChangeFontSize", _preferencesService.ReaderFontSize);
// Prepare font family name with fallback to sans-serif by default.
var fontName = _fontService.GetCurrentReaderFont();
var fontName = _preferencesService.ReaderFont;
// If font family name is not supported by the browser, fallback to sans-serif.
fontName += ", sans-serif";