-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Make FreeType select a size for fixed sized fonts #9012
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
base: master
Are you sure you want to change the base?
Conversation
8f1ace7 to
3ec8f95
Compare
|
I know this is unfinished but please make sure you follow the local coding style (brace placement, c-style cast, uppercase first letter in comment, etc.) as this really facilitate me looking at PRs. Thank you. |
Ofc, I will do that. I am used to telling others the same thing. :)
So I should use |
Yes! Thank you! |
3ec8f95 to
8ba0592
Compare
and scale it down before adding it to atlas to save on atlas space.
8ba0592 to
f8e941e
Compare
|
I have now also added downscaling using Point Sampling / Nearest Neighbor. Any TODOs left in the code now need to be resolved, before this pr is ready. Feel free to address them. The biggest TODO is https://en.wikipedia.org/wiki/Image_scaling#Box_sampling . The placement sometimes seems odd, especially mixing fonts, but I guess that relates to #8857 , which I have not yet reviewed/tested this code with. There will probably be light conflicts. edit: I also updated the images in the OP. |
Looks more correct and more in line with other parts of the code.
|
Downscaling should use bilinear filtering, should be done using its own dedicated function. It doesn't need to be fancy/optimized. |
No, bilinear looks bad when downscaling. (see https://stackoverflow.com/a/49883346 ) |
|


















This Pr implements:
This enables imgui+freetype to just use the system provided emojie fonts. (NotoColorEmoji and AppleColorEmoji)
TODO:
This should make CBDT fonts like NotoColorEmoji and AppleColorEmoji play nice. Bitmap fonts are often preferred by distributors over COLRv1, because they are more universally supported, while also being smaller than SVGinOT fonts.
see #6302
built-in font + system provided NotoColorEmoji (109px) at font size 13:
built-in font + system provided NotoColorEmoji (109px) at font size 26:
Old images
built-in font + system provided NotoColorEmoji (109px) at font size 13:
built-in font + system provided NotoColorEmoji (109px) at font size 26:
Old Old images
built-in font + system provided NotoColorEmoji (109px) at font size 13:
built-in font + system provided NotoColorEmoji (109px) at font size 26: