-
Notifications
You must be signed in to change notification settings - Fork 533
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
Chinese font rendering is blurring. #28
Comments
As mentioned in Credits in Readme.md, by default Nuklear embeds stb_truetype for basic font rendering, but you're free to use e.g. freetype (there might be some examples in this repo IIRC). On the other hand, it seems |
@dumblob Thanks for your reply. I checked those two codes, is there any utils to generate from stb_truetype? So far as I see, the code is hand write line by line, not just embed directly. It seems to update is not an easy work. Am I correct? |
@AllenDang yeah, you're right - feel free to make a PR and separate stb_truetype completely (we use the Python packing script in the same folder through |
@AllenDang how are you rendering the Chinese font's. I'm having an issue from wchar_t to char conversion using the nk_label's. |
@kiwidoggie I'm using Golang binding so I guess I cannot help you one this... |
@dumblob I'm trying to update stb_truetype embeded in nuklear_font.h and I find out that I need to do a lot of function and struct naming replacement there. |
I have had issues with blurry fonts as well. Cranking up oversampling only helps a teeny tiny bit whilst costing a bunch of memory. If you have Window's OpenGL software fallback, then you are limited to max 1024 size textures. Oversampling easily shoots past that and you get black squares. I tied the font scale to a slider + bake loop and tried out different fonts and sizes in real time. This is the way I found out about it and the right values. So maybe try the same. Hope this will be fixed with the new exellent PR #53 (Although stb_truetype still does not support font hinting...) |
@AllenDang could you retest if the update of stb_truetype (see PR #53 ) solved your problem? |
English font rendering is pretty good. But Chinese character rendering is blurring.
I tried to set the oversimple other than 1, I got black squares.
The text was updated successfully, but these errors were encountered: