Titanium JIRA Archive
Alloy (ALOY)

[ALOY-559] Alloy optimisation breaks functionality

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-04-27T00:56:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsXML
Labelsn/a
ReporterIan Tearle
AssigneeTony Lukasavage
Created2013-03-12T16:50:37.000+0000
Updated2014-01-28T23:55:19.000+0000

Description

Upon building Alloy is optimising files which breaks their functionality especially in this circumstance relating to font character handling. This function needs to be written this way so that TiIconicFont can read it properly and JS doesn't turn it into Emoji. function SSSocial(options) { switch (Ti.Platform.osname) { case 'iphone': case 'ipad': this.fontfamily = 'SSSocialRegular'; break; case 'android': this.fontfamily = 'SSSocialRegular'; } this.charcode = { 'stack overflow':'\uF672', 'github octocat':'\uF671', 'githuboctocat':'\uF671', 'stackoverflow':'\uF672', 'google plus':'\uF613', 'kickstarter':'\uF681', 'foursquare':'\uF690', 'googleplus':'\uF613', 'instagram':'\uF641', 'pinterest':'\uF650', 'posterous':'\uF623', 'wordpress':'\uF621', 'thumbs up':'\uD83D\uDC4D', 'dribbble':'\uF660', 'facebook':'\uF610', 'linkedin':'\uF612', 'thumbsup':'\uD83D\uDC4D', 'google +':'\uF613', 'readmill':'\uF652', 'envelope':'\u2709', 'twitter':'\uF611', 'behance':'\uF661', 'dropbox':'\uF653', 'youtube':'\uF630', 'octocat':'\uF671', 'google+':'\uF613', 'approve':'\uD83D\uDC4D', 'spotify':'\uF6B1', 'last fm':'\uF6B2', 'blogger':'\uF622', 'flickr':'\uF640', 'tumblr':'\uF620', 'paypal':'\uF680', 'lastfm':'\uF6B2', 'github':'\uF670', 'svpply':'\uF651', 'email':'\u2709', 'skype':'\uF6A0', 'vimeo':'\uF631', 'mail':'\u2709', 'rdio':'\uF6B0', 'like':'\uD83D\uDC4D', 'rss':'\uE310' }; } SSSocial.prototype.getCharcode = function(options) { if (options === 'delete') { options = 'del'; } return this.charcode[options]; } module.exports = SSSocial; https://gist.github.com/iantearle/5144379

Comments

  1. Tony Lukasavage 2013-03-20

    Ian, you mentioned that you found a solution to this in the developer community. Is this still a problem for you?
  2. Tony Lukasavage 2013-04-27

    The developer indicated in a Q&A post that he resolved his own problem. I will re-open if this needs to be addressed further.

JSON Source