Giter Club home page Giter Club logo

Comments (8)

jfkthame avatar jfkthame commented on July 25, 2024

In principle, the "correct" thing to test would be to paint each supported character on a using the web font, and then compare the rendering to the original SVG image. (It won't be pixel-perfect, in general, for a number of reasons, but should be close enough that we can verify it with a "fuzzy match" of some kind.)

Another thing that might be useful would be to generate a test page that simply renders the glyphs from the converted font and the original SVGs side-by-side in a long table, for visual comparison.

from twemoji-colr.

timdream avatar timdream commented on July 25, 2024

The browser JS has no access to rendered SVG, only chrome JS has that access. I will work on a visual comparison & a if-render-differently-than-system-emoji test script first.

from twemoji-colr.

timdream avatar timdream commented on July 25, 2024

The browser JS has no access to rendered SVG, only chrome JS has that access.

This is wrong. ctx.drawImage() should be able to take a same origin img with an svg source, although I have not successfully make it work for some reason...

from twemoji-colr.

jfkthame avatar jfkthame commented on July 25, 2024

Hmm. I think we're up against another issue here, too... it seems that Gecko's text rendering doesn't support layered-color fonts. (Nor does it support SVG-in-OT glyphs, so that alternative implementation wouldn't help.)

If I try rendering emoji with Segoe UI Emoji in , for example, I just get the B/W glyphs. (And currently, the EmojiOne font created here doesn't include B/W glyphs at all, so it would just render blank.) Similarly, Firefox Emoji renders B/W glyphs only (and its B/W glyphs are not usable as they stand).

Looks like we need to address that in Gecko before a -based test will be possible here. And in any case, it's a bug we ought to fix. Though how color-font technologies such as color layers or SVG-in-OT ought to interact with text features (e.g. fill patterns) may be a question...

from twemoji-colr.

jfkthame avatar jfkthame commented on July 25, 2024

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1274936 for the Gecko issue.

from twemoji-colr.

timdream avatar timdream commented on July 25, 2024

WIP can be found at #6 -- Not sure why GitHub did not reference the two issues.

from twemoji-colr.

timdream avatar timdream commented on July 25, 2024

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1274936 for the Gecko issue.

Thanks for filing!

from twemoji-colr.

timdream avatar timdream commented on July 25, 2024

Fixed by #6 and subsequent commits. Don't over do it!

from twemoji-colr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.