New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define custom fonts #18
Comments
@georgbachmann If you're rendering it as an attributed string, you should format it using There are a lot of examples on StackOverflow as well for customizing attributed strings (e.g. rendering from html w/ custom fonts, etc) so I'd encourage exploring there first. This is just meant to be a presentation agnostic converter. Duplicates #14 |
Sure, I am already reformatting the attributed string to match the style I need. I was just wondering if it's possible to create the attributed string already the way I want it to be. That would be the better solution I guess than having to reformat afterwards. Also that way I can only assume which type of text (h1, h2, h3, ...) I am changing based on the font it currently uses, which is not that super sexy, is it? |
@georgbachmann Your best bet is to read the man pages for the underlying library cmark; there are unfortunately very limited options at present Alternatively, rendering it as HTML may be faster and easier to style (but it depends on your UI rendering performance needs) |
Please see the new AST functionality for rendering and customizing attributed strings: #132 |
Is there any way to define custom fonts to use for the output?
I'd need attributed strings where I can define which base-font to use, also which font for h1, h2, ...
Is that anyhow possible? I've seen you basically just give the input to cmark, but couldn't find any possibility to customize any font :(
Am I just missing something here?
The text was updated successfully, but these errors were encountered: