Skip to content
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

plainText(_ text: String) overrides heading settings. Is that working the way its meant to? #25

Open
bryan1anderson opened this issue Apr 3, 2022 · 3 comments

Comments

@bryan1anderson
Copy link

bryan1anderson commented Apr 3, 2022

I have some markdown text like this:

This is my title

And this is my body

And when I use the plaintText(_ text: String) to provide a font for the plain body text, it overrides the header font changes value and forces all text from the entire string an displays it with the same font

@bryan1anderson
Copy link
Author

I think essentially I can't apply a font to the body without overriding all headers. Foreground color seems to override as well.

This is kind of a bummer for me. I'd be happy to help make some commits to improve this functionality but would greatly appreciate a little bit of direction before I dive into it

@dasautoooo
Copy link
Owner

Hi @bryan1anderson ,

The plaintText(_ text: String) method is the basic building block of all text-based elements, so the changes to this will eventually affect all text components. It is suggest that apply you custom behavior to the specific element; for example, if you want to change the header font, just apply the font modifier to the header block delegate method.

Foreground color seems to override as well.

Can you explain this in depth?

Thanks anyway!

@bryan1anderson
Copy link
Author

bryan1anderson commented Apr 13, 2022

I wanted to apply a font to the body.
For now this works:

                        Parma(markdown, render: ListRender())
                            .font(footnoteFont)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants