Comments (12)
png/svg fonts is working using patched wr_glyph_rasterizer
.
from emacs-ng.
Isn't this down to automatic composition not being implemented ?
from emacs-ng.
from emacs-ng.
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.
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.
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:
-
Make sure wr_glyph_rasterizer fontdue backend works well with WebRender's distribute_across_threads
-
Patch fontdue to work with ttf_parser's glyph_raster_image and glyph_svg_image. This is for color emojis.
Working since declantsien@0e8429e -
Patch fontdue for font shaping(ligatures etc) support
mooman219/fontdue#127 -
What about WebRender Mono FontRenderMode
-
Some WR FontInstanceFlags is not implemented, also we haven't use them in Emacs
There are some font concepts I am not sure whether there are involved here.
- Font kerning ? https://github.com/keiya01/font-kerning.git
- Glyph cache using GPU(atlas?) https://github.com/ryanisaacg/elefont.git
- Text layout is not necessary since Emacs redisplay is doing all the calculation?
...
from emacs-ng.
perhaps Cosmic text?
from emacs-ng.
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.
from emacs-ng.
Allsortrs by yeslogic seems to be a powerful shaping library
from emacs-ng.
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.
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)
- Build error Arch Linux - also the same "workaround". HOT 6
- Building with docker results cargo: command not found error HOT 2
- Nix CI on macOS is broken HOT 1
- emacs fails to load on intel iris with surfman HOT 1
- Dependency Dashboard
- impl internal boder for emacs wr renderer HOT 1
- Check WR ligatures support status HOT 1
- implicit declaration of function 'Fx_hide_tip' is invalid in C99
- signal: 4, SIGILL: illegal instruction
- CI Pull upstream is broken
- Improve Image support for WR build
- Disable child frame for winit and configure alternative UI for popular Elisp packages.
- Add child frame support for winit
- Add xwidget support for WR using Servo
- Release source with vendored rust sources for offline build
- Add `alpha-background` support for Winit/WR
- Modeline/Button is missing border, input box is missing background. See screenshot 1
- Image view scratches image when scaling screenshot 2,
- The released deb files are broken
- Integration tokio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-ng.