Skip to content

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

@eliburke

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions