danfickle / danfickle/openhtmltopdf
Allow adding glyphs to the default font
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 423
- PR merge metrics
- No merged PRs in 30d
Description
Currently I have to add the following code using JSoup to add a new "font-family"
document.head().append("body` { font-family: 'noto', sans-serif;}");
Then I have to add the following loaders
.useFont(() -> Thread.currentThread().getContextClassLoader().getResourceAsStream("fonts/NotoSansCJKtc-Regular.ttf"), "noto")
.useFont(() -> Thread.currentThread().getContextClassLoader().getResourceAsStream("fonts/NotoSans-Regular.ttf"), "noto")
I was wondering if we can get away from defining "noto" and just add the CJK font glyphs as a fallback to the default font?
Presently `useFont` only provides a `fontFamily` parameter as a string. Perhaps `useFont` that does not provide a fontFamily can be used to provide extra glyphs to the default font so we don't need to add `font-family`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.