twemoji-color-font
twemoji-color-font copied to clipboard
[Question] In spite of iOS12 OpenType-SVG support, Twemoji falls back to black.
iOS 12 and macOS 10.14 Mojave support OpenType-SVG font in UIKit level, but TwitterColorEmojiSVGinOT can't be rendered correctly.
See Attachment 1 below. The label on the top of the screen uses TwitterColorEmojiSVGinOT, and the one on the bottom uses another OpenType-SVG font. The top label unintentionally falls back to black otherwise the bottom one is rendered correctly.
Do you have any ideas why it happens?
Thank you.
Attachment 1:
Source code:
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel!
@IBOutlet weak var label2: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
guard let twemoji = UIFont(name: "TwitterColorEmojiSVGinOT", size: 40) else {
fatalError()
}
label.font = UIFontMetrics.default.scaledFont(for: twemoji)
guard let abelone = UIFont(name: "Abelone", size: 40) else {
fatalError()
}
label2.font = abelone
}
}
Huh. Interesting. Can you try my other SVGinOT fonts? Note: I don't use a Mac, so this isn't something I can test easily.
http://xerographer.github.io/reinebow/
@13rac1
Can you try my other SVGinOT fonts?
Reinebow-SVGinOT.ttf
can be rendered correctly. See below.
I'd appreciate if you suggest possible solutions.
Feel free to ask me to try other font files if you want.
It occurs to me. Which version of the font are you using? The standard or the OSX/MacOS version? I've got no way to test this, and have been hoping someone else had an idea.
Confirmed in #50 this issue applies to MacOS also with the Mac version (aka "Apple Color Emoji" replacing)