iOS can't scale emoji characters


#1

iOS replaces Emoji characters with fixed-size colored graphics, so trying to scale them with font-size won’t work。We use the following solution,but it is quite complicated .

***************************JS************************

     function _handleEmoji(data,key){  
                key = key || "content";
                if(ionic.Platform.isIOS()){
                    data[key] = $sce.trustAsHtml(data[key].replace(/\ud83c[\udd00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff]|[\u2600-\u2800]|[\u200D]|[\uFE0F]|[\u231A-\u23FF]/g, function (emoji) {
                        return '<span class="scale-emoji">' + emoji + '</span>';
                    }));
                }
            }  

***************************HTML***********************

         <p ng-bind-html="item.content"></p>

***************************CSS************************

    .platform-ios .scale-emoji {
        transform: scale(2, 2);
        -webkit-transform: scale(2, 2);
        display: inline-block;
        margin: 0 0.16rem;
        background: none;
   }