Closed chriswill0w closed 6 years ago
Yes, admittedly the Unicode 10 standard hasn't been implemented into the framework as of now, but I'll make sure to do that as soon as possible (give it a week or so). I'll also look into Emoji 5.0 specifics at the same time.
As for the 'huge blocks' commented out in the Unicode.swift
file: the code points present in the ignored code are accounted for in other methods. The commented blocks are somewhat specialised and aren't really essential to the functionality of the framework, you can read a more detailed description at line 1262 onwards in the same file.
sound great, thanks! do you have any idea why all the emojis with the skin and gender modifiers (should have been included already before Unicode 10, right?) do not seem to work? can you confirm that?
@ltblueberry0 I'll have to look into it, so give me a day or two to investigate. If you could give me specific code points at which the conversion fails, that would be very helpful.
most of these emojis are not working (same for other skin tones):
let emojica = Emojica()
somelabel.attributedText = emojica.convert(string: " ๐ฑ๐พโโ๏ธ ๐ฑ๐พ ๐ด๐พ ๐ต๐พ ๐ฒ๐พ ๐ณ๐พโโ๏ธ ๐ณ๐พ ๐ฎ๐พโโ๏ธ ๐ฎ๐พ ๐ท๐พโโ๏ธ ๐ท๐พ ๐๐พโโ๏ธ ๐๐พ ๐ต๐พโโ๏ธ ๐ต๐พ ๐ฉ๐พโโ๏ธ ๐จ๐พโโ๏ธ ๐ฉ๐พโ๐พ ๐จ๐พโ๐พ ๐ฉ๐พโ๐ณ ๐จ๐พโ๐ณ ๐ฉ๐พโ๐ ๐จ๐พโ๐ ๐ฉ๐พโ๐ค ๐จ๐พโ๐ค ๐ฉ๐พโ๐ซ ๐จ๐พโ๐ซ ๐ฉ๐พโ๐ญ ๐จ๐พโ๐ญ ๐ฉ๐พโ๐ป ๐จ๐พโ๐ป ๐ฉ๐พโ๐ผ ๐จ๐พโ๐ผ ๐ฉ๐พโ๐ง ๐จ๐พโ๐ง ๐ฉ๐พโ๐ฌ ๐จ๐พโ๐ฌ ๐ฉ๐พโ๐จ ๐จ๐พโ๐จ ๐ฉ๐พโ๐ ๐จ๐พโ๐ ๐ฉ๐พโโ๏ธ ๐จ๐พโโ๏ธ ๐ฉ๐พโ๐ ๐จ๐พโ๐ ๐ฉ๐พโโ๏ธ ๐จ๐พโโ๏ธ ๐คถ๐พ ๐
๐พ ๐ธ๐พ ๐คด๐พ ๐ฐ๐พ ๐คต๐พ ๐ผ๐พ ๐คฐ๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พ ๐๐พโโ๏ธ ๐
๐พ ๐
๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐คฆ๐พโโ๏ธ ๐คฆ๐พโโ๏ธ ๐คท๐พโโ๏ธ ๐คท๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐ด๐พ ๐๐พ ๐บ๐พ ๐ถ๐พโโ๏ธ ๐ถ๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐คธ๐พโโ๏ธ ๐คธ๐พโโ๏ธ โน๐พโโ๏ธ โน๐พ ๐คพ๐พโโ๏ธ ๐คพ๐พโโ๏ธ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐๐พโโ๏ธ ๐๐พ ๐คฝ๐พโโ๏ธ ๐คฝ๐พโโ๏ธ ๐ฃ๐พโโ๏ธ ๐ฃ๐พ ๐๐พ ๐ด๐พโโ๏ธ ๐ด๐พ ๐ต๐พโโ๏ธ ๐ต๐พ ๐คน๐พโโ๏ธ ๐คน๐พโโ๏ธ ๐๐พ")
(scroll to the right ;-))
using unmodified icons from twemoji
Thanks! I'll get back to you shortly.
some more info: for this example
let emojica = Emojica()
var test123 = emojica.convert(string: "๐ฑ๐พโโ๏ธ๐ฑ๐พ")
renders 4 images instead of two. it shows 3 images for the woman and one correct one for the man.
events:
private func replacement(for emoji: EmojiHandler) -> NSAttributedString?
-> name "1f471-1f3fe-2640" -> no image found
private func fallback(for emoji: EmojiHandler) -> NSAttributedString
-> name "2640" -> image found
-> name "1f3fe" -> image found
-> name "1f471" -> image found
private func replacement(for emoji: EmojiHandler) -> NSAttributedString?
-> name "1f471-1f3fe.png" -> image found
@ltblueberry0
All of the above should now work with the version on the master branch, and I pushed the update to Cocoapods as well.
I'll also fix the warnings as soon as possible, so don't panic.
Some of the emojis which can be found here https://getemoji.com in the section "New 2017 Emojis released in June 2017" are not detected at all or are detected as "two emojis" (face plus modifier). furthermore a lot of the people emojis with skin color modifier are detected incorrectly and rendered as two emojis (face plus modifier). How can I fix this? btw why are some huge blocks commented out in the Unicode.swift file?
I am using twemoji image files as they are supplied in the twemoji repo. I did not change the file names. Tested with iOS 11.