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

Is it possible to create a string with mixed fonts / font sizes? #62

Open
eliburke opened this issue Dec 10, 2018 · 0 comments
Open

Is it possible to create a string with mixed fonts / font sizes? #62

eliburke opened this issue Dec 10, 2018 · 0 comments

Comments

@eliburke
Copy link

I'm trying to create a string that has a mix of two font sizes, but I can't seem to make it work. Is this supported by StyledTextKit? (if not, would this be addressed by issue #61 ?)

Here's a sample of what I tried. Adding calls to save() / restore() don't affect the behavior, nor does changing the contentSizeCategory

let attrStr = StyledTextBuilder(text: "")
        .add(text: "Foo", attributes: [.font: UIFont.systemFont(ofSize: 32)])
        .add(text: "Bar", attributes: [.font: UIFont.systemFont(ofSize: 14)])
        .build()
        .render(contentSizeCategory: .unspecified)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant