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

TextShape should handle newlines and tabs #652

Open
traviskirton opened this issue Apr 16, 2016 · 0 comments
Open

TextShape should handle newlines and tabs #652

traviskirton opened this issue Apr 16, 2016 · 0 comments
Labels
Milestone

Comments

@traviskirton
Copy link
Collaborator

Here is a sample:

let newline: unichar = "\n"
if unichars[i] == newline {
    origin.x = 0.0
    origin.y += CGFloat(font.lineHeight)
}

Including:

extension unichar : UnicodeScalarLiteralConvertible {
    public typealias UnicodeScalarLiteralType = UnicodeScalar

    public init(unicodeScalarLiteral scalar: UnicodeScalar) {
        self.init(scalar.value)
    }
}

This shows proof of concept. We should figure out a more robust solution and add this feature.

@traviskirton traviskirton modified the milestone: 1.2.0 May 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant