Comments (4)
Text shaping is hard, but it's basically a solved problem if you put together harfbuzz, fribidi and libunibreak. OTOH what Kevin does is even harder, so I'm glad that his focus isn't wasted on that particular rabit hole.
Great to see the 1.0 release!
from fastuidraw.
Hi,
I am quite hesitant to make Harfbuzz a requirement to build the library; Perhaps I make (another) separate library, libFastUIDraw-Harfbuzz that has a class (or function) that has what you are looking for:
- Creates a PainterAttributeData from the arguments of a drawTextRun()
- provides the getGlyphPosition() above
- provide an interface to get a sequence of glyphs and positions from a drawTextRun() argument set
- and whatever else.
Note that Painter would NOT have a drawTextRun() routines; this is because if it did, every time it would be called would require glyph selection and layout which can be quite CPU intensive. Instead by having the PainterAttributeData object available, the layout and glyph selection computation would not need to be redone.
This is quite a bit of work, so it will take quite a bit of time to implement. I also need to work on rendering glyphs as well as the curve_pair renderer is not 100% robust.
from fastuidraw.
Make sense. Thanks.
from fastuidraw.
There is a very basic text layout thingy in demos:
https://github.com/01org/fastuidraw/blob/master/demos/common/text_helper.hpp
which one can copy into one's project and use; it is a very -basic- layout gizmo: it does not even do kerning(!)
from fastuidraw.
Related Issues (20)
- Artifacts in painter-path-test-GL-release HOT 7
- Artifacts with shader-based anti-aliasing filling HOT 31
- Static Build HOT 21
- Regression: shader failed to compile HOT 1
- Missing include? HOT 1
- Demos don't compile out of the box for wayland HOT 5
- Build system does not find SDL headers on vanilla Arch Linux HOT 5
- GCC 8.2.0 cross-compile GLES HOT 2
- Innocent typo? HOT 1
- make check should generate error on missing dependencies HOT 2
- Prefix NGL exe with ./ on Linux in Makefile HOT 2
- make check: SDL2 image error unclear. HOT 4
- Some questions... HOT 2
- Segmentation fault in test using GLFW HOT 2
- Could not set the background color HOT 5
- Possible high cpu usage drawing lines ? HOT 13
- State of chromium integration HOT 2
- Evaluating fastuidraw for VCV Rack HOT 6
- New SPIR SPV_INTEL_vector_compute extension
- How can I compile in 64bit? HOT 1
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 fastuidraw.