Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] In spite of iOS12 OpenType-SVG support, Twemoji falls back to black. #47

Open
yuki-takeichi opened this issue Aug 21, 2018 · 4 comments

Comments

@yuki-takeichi
Copy link

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:
image

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
    }

}
@13rac1
Copy link
Owner

13rac1 commented Aug 26, 2018

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/

@yuki-takeichi
Copy link
Author

@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.

image

@13rac1
Copy link
Owner

13rac1 commented Nov 1, 2018

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.

@13rac1
Copy link
Owner

13rac1 commented Nov 9, 2018

Confirmed in #50 this issue applies to MacOS also with the Mac version (aka "Apple Color Emoji" replacing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants