Git Product home page Git Product logo

Comments (12)

declantsien avatar declantsien commented on May 26, 2024 2

png/svg fonts is working using patched wr_glyph_rasterizer.
swappy-20230402_212837
swappy-20230402_212305

from emacs-ng.

2e0byo avatar 2e0byo commented on May 26, 2024

Isn't this down to automatic composition not being implemented ?

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

Hit this WR bug. WebRender currently does not work with Noto Color Emoji.

2023-03-15T02:04:03.872358Z ERROR wr_glyph_rasterizer::platform::unix::font: Unable to set glyph size and transform: 23
2023-03-15T02:04:03.872373Z DEBUG wr_glyph_rasterizer::platform::unix::font:    [662] for size 16.0 and scale (1.0, 1.0) from font FontKey(IdNamespace(1), 5)
2023-03-15T02:04:03.872393Z ERROR wr_glyph_rasterizer::platform::unix::font: Unable to set glyph size and transform: 23
2023-03-15T02:04:03.872404Z DEBUG wr_glyph_rasterizer::platform::unix::font:    [260158] for size 16.0 and scale (1.0, 1.0) from font FontKey(IdNamespace(1), 5)```

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

Code path for color font is not limited to glyph automatic composite.
It used for glyph_type::CHAR_GLYPH too.

Better if WebRender GlyphInstance adds supports for this, otherwise we have to manually draw font png/svg images.

While waiting for WebRender adding support for Color Font. I am happy with just disable Noto Color Emoji for now.

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

I recently realized that WebRender has a hard C dependencies (freetype2/harfbuzz), while we'd prefer font stack using Rust(fontdb/ttf_parser/rustybuzz/fontdue/swash etc).

I've experimenting with replacing WebRender wr_glyph_rasterizer with fontdue. It turns out doable. My WebRender branch using fontdue is here and ng branch here.

Tasks:

There are some font concepts I am not sure whether there are involved here.

from emacs-ng.

rice7th avatar rice7th commented on May 26, 2024

perhaps Cosmic text?

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

perhaps Cosmic text?

Cosmic text doesn't really fit into Emacs IMO. Emacs layout text itself.
However the glyph rendering library swash they use is what we need which also support complex text shaping.
I manage to make the emoji and shaping working here #564.

Choosing swash over fontdue which I mentioned in other comments, is that fontdue doesn't support emoji rendering, also we have to find another rust shaping library.

Interestingly, we have this elisp OTF/TTF font loader and renderer which is inspired by fontdue.

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

swappy-20240305_104850

from emacs-ng.

rice7th avatar rice7th commented on May 26, 2024

Allsortrs by yeslogic seems to be a powerful shaping library

from emacs-ng.

declantsien avatar declantsien commented on May 26, 2024

Allsortrs by yeslogic seems to be a powerful shaping library

I think we wouldn't mind having a new Emacs font driver implemented in Allsort!
If someone is willing to write the code for it 🙂

from emacs-ng.

rice7th avatar rice7th commented on May 26, 2024

Oh well I don't have that much experience with font shaping libraries 😅 but if I find enough time maybe this summer I can give it a look

from emacs-ng.

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.