Allow more fonts in preview (FR/Bug Report hybrid?)
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 537
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 4
Description
### ⚠️ This issue respects the following points: ⚠️
- [x] This is a **enhancement/feature request**. Not a [bug or question](https://github.com/gsantner/markor/issues/new/choose).
- [x] The topic is **not** already reported at [Issues](https://github.com/gsantner/markor/issues?q=#js-issues-search). _(I've searched it)_.
- [x] Markor **is** up to date. See [Releases](https://github.com/gsantner/markor/tags) for the latest version. Updates are available from [F-Droid](https://f-droid.org/en/packages/net.gsantner.markor/) and GitHub.
- [x] The wanted feature/enhancement is not present in the latest development version (git master). (Please [download](https://nightly.link/gsantner/markor/workflows/build-android-project/master) and try the test version of Markor, named **Marder**. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor's settings are not touched. If your desired feature is present, you don't need to open this issue. The change will be part of the next Markor update.)
### Description
I’m looking for a way to set the font of the preview view to something other than the default, because its italics have bad character set coverage.
So I’ve set `font-family` in the “Inject head” setting, but nothing seems to have any effect except for `sans-serif`, `serif`, and `monospace`.
1. Can the preview view be made to allow **referring to system fonts by name**?
2. Can the preview view be altered so that **the user can specify a font for `serif`, `sans-serif`, and `monospace`**?
3. Can you do both?
### Information
Android version: 15 (Motorola’s OEM ROM)
Device: Motorola Moto g64
App Version: Markor 2.16.1, Marder 2.16.1-1040
### Source
F-Droid
### Format / File type
Not specific
### Additional info / Log
[The code](https://github.com/gsantner/markor/blob/81d040a369bc1fae465700ee62337b765903fecf/app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java#L88) seems to set the font in `body`, but neither overriding the font there nor its descendants seems to work.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java around line 88 and reproduce the preview behavior using the Inject head setting. Determine how preview font-family values are handled on the reported Android setup; done means the agreed system-font and/or generic-family configuration works in the preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100