-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Multilingual font rendering #1993
base: master
Are you sure you want to change the base?
Conversation
Don't Draw CL_DrawCharacterLen & CL_DrawStringLen Character
|
||
Q_snprintf( texname, sizeof( texname ), "font_%i", Font_GetTexIndex(self, ch)); | ||
|
||
if (!(id = ref.dllFuncs.GL_FindTexture(texname))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that would be really nice to have, before this gets merged, is to load the characters in the atlas texture, like mainui_cpp, to eliminate texture switching.
Maybe allocate 1024x1024 texture and fill it with characters as needed, and once it gets filled up, allocate another large texture.
And then cache the result, something I did in mainui_cpp
because drawing glyphs takes a lot of time.
put your ttf file into "3rdparty\extras\xash-extras\gfx\fonts"
Change "cl_font.c" file (FONT_COUNT, g_FontsPath, g_FontsSize) to add your ttf font