Skip to content

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

Description

@eliburke

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions