Khan / Prototope

Swift library of lightweight interfaces for prototyping, bridged to JS
http://khan.github.io/Prototope
230 stars 18 forks source link

[WIP] Emoji layers #21

Closed saniul closed 9 years ago

saniul commented 9 years ago

Provides a simpler interface than text layer.

Jumping emojis

To do:

NachoSoto commented 9 years ago

LOL :D

jbrennan commented 9 years ago

I’m curious, how is this different than using a text layer with an emoji string?

saniul commented 9 years ago

@jbrennan: Essentially no difference, except limiting the public interface to things that are only relevant when dealing with single Characters, as opposed to multi-Character Strings.

I was thinking about adding an additional behavior, which mostly makes sense for this class and not for TextLayer: say, you change the frame of the EmojiLayer to a given value, then call updateFontSizeAutomatically, and it selects the largest font size that fits the current frame.

andymatuschak commented 9 years ago

Hm, while I appreciate the contribution, I'm not yet sure this is something we'll use enough to justify the maintenance burden. What do you think about waiting to see how much this comes up?

On Feb 17, 2015, at 9:18 AM, Saniul Ahmed notifications@github.com wrote:

@jbrennan: Essentially no difference, except limiting the public interface to things that are only relevant when dealing with single Characters, as opposed to multi-Character Strings.

I was thinking about adding an additional behavior, which mostly makes sense for this class and not for TextLayer: say, you change the frame of the EmojiLayer to a given value, then call updateFontSizeAutomatically, and it selects the largest font size that fits the current frame.

— Reply to this email directly or view it on GitHub.

saniul commented 9 years ago

Of course. I’ll close the PR for now.