Comments (8)
After ManimCommunity/ManimPango#28 it should be possible to use ManimPango :)
from moderngl-window.
After ManimCommunity/ManimPango#28 it should be possible to use ManimPango :)
Yep! That would be fun to try out. After this is done :)
from moderngl-window.
If I may join this conversation, does text rendering have to be a feature of moderngl? Would user code be able to alternatively use any particular other (python) library to draw text into a bitmap, then embed it in a texture provided to moderngl for actual rendering? or will that fall short of handling all the concerns inherent to getting clean text on a display?
Text rendering will never be a part of moderngl. You can of course use any library you want to implement this yourself. This repository is not moderngl, but moderngl-window. it's a windowing and utility library for moderngl.
Making a good text renderer in moderngl would have the same challenges as any other library or language. I did already make a bitmapped text renderer and the plan was at least to use freetype-py to get something started. It would use the (incomplete) texture atlas in the master branch (or a specific variant for glyphs)
from moderngl-window.
Doing some research previously I found that rendering freetype glyphs is not enough for correct text rendering; you to use Harfbuzz for shaping Unicode code point sequences, which gives positioned glyphs from the font including chains of accents. Harfbuzz is the only complete open source implementation of this and almost everything uses it.
I don't know if freetype-py uses Harfbuzz itself, but there are Python bindings for Harfbuzz available.
from moderngl-window.
Considering adding a simple bitmapped monospaced text rendere using veramono just so we have something for now.
from moderngl-window.
If I may join this conversation, does text rendering have to be a feature of moderngl? Would user code be able to alternatively use any particular other (python) library to draw text into a bitmap, then embed it in a texture provided to moderngl for actual rendering? or will that fall short of handling all the concerns inherent to getting clean text on a display?
from moderngl-window.
Thanks for commenting and I guess I had missed the most related thread in moderngl which was probably moderngl/moderngl#203.
I guess you mean that perhaps (or at most) moderngl would go one step in the direction of enabling better text rendering performance by implementing a texture atlas, which would allow user code to choose a font library such as freetype-py and throw its outputs into the atlas. And that one can currently, without such a feature added in moderngl, and at the cost of (especially in dynamic scenes) incurring less than optimal performance, cast fonts rendered with other libraries, into a plain moderngl texture if they are okay with having less optimal performance.
And that this all without something like harfbuzz, would probably work in a visually correct, or in a visually pleasing way, only for orthographically feature-poor languages like English and not for many/most other of the world's languages that have character adjoining rules and/or accents that need to be laid out in specific orders from their unicode representations.
Maybe I'm a bit behind on rendering pipelines and architectures though, so I may well suffice with what I learned from your earlier comment.
from moderngl-window.
Just wanted to comment in this thread that to get towards state of the art font rendering you need harfbuzz, sure, but you should be looking towards something like msdf-atlas-gen to generate the atlases.
from moderngl-window.
Related Issues (20)
- run_window_config_instance
- Modifying node matrix doesn't change rendered model HOT 4
- allow to manage pygame2 USEREVENT HOT 3
- Pygame2 error: 'Event' object has no attribute 'state' HOT 5
- Examples have been flipped and have inverted color channels HOT 7
- why is resolution twice the window_size ? HOT 2
- Pypi source distribution not published for 2.4.2 HOT 2
- Add Support for Animations HOT 1
- load_scene has incorrect mesh name HOT 1
- Key press event not registered HOT 6
- Deprecate Pyrr in favour of PyGLM HOT 2
- PIL versions <10.0.1 vulnerability HOT 2
- Resizing window from within WindowConfig after initialization HOT 2
- Window resize is laggy and doesn't resize viewport HOT 1
- x is flipped for everything (scene and etc) HOT 2
- How to customize context creation? HOT 2
- integration imgui image, rendering to background vs imgui window is flipped HOT 2
- detecting left shift and left ctrl alone HOT 2
- Unhandled exception when click ESC to exit program HOT 4
- VAO instance cache may be invalid HOT 5
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 moderngl-window.