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

Bold font size get's overridden by fontDescriptor #109

Open
bensLine opened this issue Mar 22, 2021 · 0 comments
Open

Bold font size get's overridden by fontDescriptor #109

bensLine opened this issue Mar 22, 2021 · 0 comments

Comments

@bensLine
Copy link
Contributor

When using a custom font (e.g. SourceSansPro-Bold.ttf) and configuring it as markdown.bold with custom font size 16 the library returns the font with size 12.

It turned out that font size 16 get's overwridden by the font descriptor in SwiftyMarkdown+iOS.swift:

if globalBold, let boldDescriptor = font.fontDescriptor.withSymbolicTraits(.traitBold) {
     font = UIFont(descriptor: boldDescriptor, size: 0)
}

I'd expect that the library respects the configured font size 16 and does not overwrite it.

Cheers and thanks for the library!

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

1 participant