Closed andymatuschak closed 9 years ago
Yep, this is pretty much how I imagined this.
Also, this calls for a text-alignment property.
Suggestion, what if we always set attributedText
under the hood, instead of just text
? We can also expose an HTML-text setter and use [[NSAttributedString alloc] initWithData...
internally. Designers can them provide styled strings using that method.
https://github.com/alexfish/stylize is also relevant
Also, this calls for a text-alignment property.
Implemented in https://github.com/Khan/Prototope/pull/19
Wooo, thanks for making the text alignment pull request! Will take a look at that shortly.
I'd like to wait on exposing fancier styling until we have a better idea of how we'd use it. Would prefer something more structured than HTML (Stylize is a nice reference), but maybe HTML's the easiest/familiar thing. @may-li, @nefaurk, what do you think?
Oh, uh, I totally forgot the ghpages docs. Will do that shortly.
my only comment, mostly for docs, is that there should be an easy way to know where the 1st baseline goes for a given textlayer (i.e. is it the layer's y minus the default leading plus the descender?)
@nsfmc I'll do this tonight when I get home
Here’s an API. What do you folks think?
/cc @jbrennan @may-li @nefaurk @nsfmc @saniul