coolreader icon indicating copy to clipboard operation
coolreader copied to clipboard

A way to specify default font families

Open efermi opened this issue 3 years ago • 0 comments

As there is a way to choose default font families there should be a way to specify them. Screenshot_20220408_160638 Otherwise the program picks any font deemed suitable, which may not be what the end user wants.

This inability to specify them also leads to various errors and inconsistencies in rendering (epub: epub-test-defaults.zip): Screenshot_20220408_161803 Screenshot_20220408_162011 Screenshot_20220408_162117 Notice how the programs fails to pick a proper serif font when the default isn't one and how it switches between font families depending on current default.

This problem doesn't exist in e.g. Calibre's viewer, where these settings are fixed and can be easily changed if needed: Screenshot_20220408_150025

Providing these settings can also be used, I think, to trim the built-in css rules which are littered with specific font families: instead of using something like

tt, samp, kbd, code, pre { font-family: "Droid Sans Mono", "Liberation Mono", "DeJaVu Sans Mono", "Courier New", "Courier", monospace; } 

only the monospace can be left to be resolved later according to preferences.

efermi avatar Apr 08 '22 14:04 efermi