-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to generate a texture #3
Comments
Hominlinx, I was lucky to stumble upon the question you asked at the Harfbuzz repo, otherwise it would have been difficult to focus... So, in order to display abc中国ป็, proceed as follow:
In short, the Rendering project contains the "overall wisdom" of this repository, which consists of an evolving series of projects focusing on a particular topic. If you want to understand some key features like script itemization and BIDI, you can refer to some of the relevant projects. But again: take in count that the code is deprecated except in the the latest project... |
thank you very much for your reply, And From your pro ,I know how “how to display two languages(or more) in one string?" |
Sorry for the delay. I'm a bit swamped these days... First, let's refer to the latest / up-to-date version of the Unicode text engine, which has been integrated to the new-chronotext-toolkit. From now on, the Unicode text engine will be called the ZFont system. It co-exists side-by-side with an older, non-unicode text engine (the XFont system.) The ReloadableTexture class you mentioned is outdated. It has evolved into FontTexture, but in essence, and as you already discovered: one single OpenGL texture is used for each glyph. Why not using a large texture containing many glyphs instead?
In the future, the following enhancements are planned:
Meanwhile, and performance-wise: a batching system allows to minimize texture switching when rendering a lot of text... If you are interested in the technical side-of-things: you can check how the font-texture-atlas is implemented in the old XFont system (reminder: this is an older text-engine, not adapted to Unicode text rendering...) You can also check the code samples. Some of them are demonstrating how to work either with the ZFont or XFont systems... |
hi
thanks your project, and I want to know how to generate a texture?
there are two methods:
2.Using a large texture. such as "Hello china" and "Hello usa" are one texture. this texture contains all of the characters
I think 2 is better. and which one in your pro. thanks very much
BR
The text was updated successfully, but these errors were encountered: