Feature: use fonts generated from TTF Files#879
Conversation
This update configures cmake to instruct the compiler to use the C++23 standard. Most of the code was already compliant, but some changes to the range_map library were required to get it to compile on C++20 and later. Specifically, I removed the use of `allocator::rebind` which has been deprecated, and instead use `std::allocator_traits`. I also implemented a small number of code changes to make the compiler a little happier, though there is still plenty of scope to clean the code up more.
Cleans up the clang warning ``` Clangd: Implicit capture of 'this' with a capture default of '=' is deprecated ```
… type expand-and-fix for ZoneVector<> manual expand-and-fix for asmjit ZoneList<> ctors include deleting move ctor is 'asmjit noncopyable' removed __VA_ARGS__ from asmjit ctor deletes We do not actually use the VA ARGS functionality, and GCC is not accepting the resulting syntax. Also see https://stackoverflow.com/questions/5588855/standard-alternative-to-gccs-va-args-trick for how GCC and other compilers disagree on how to handle VA ARGS
…emplated type" This reverts commit 47e5b07.
-This was causing a parsing error on GCC when using c++20. -Instead, we can omit the template arguments since they do not need to be specified if the arguments are the same on both sides of the ctors.
-uses trex to line up glyphs and render them -FFont uses Trex's spacing information that makes alignment stuff mostly "just work" -added a very important comment to indicate that the src settings for texture rects are in 0-1 space
When we cannot render a string using the provided font, fallback to Noto Sans.
-The desired fallback font is selected when Language is changed -IBM Plex fonts are used for fallbacks as they are stylistically not too far from Lexend Deca and have good character support.
-virtual scale is ignored when using Dynamic Fonts -text is still really really small.. to be continued
-This is meant to really properly handle the text scaling. It takes into account the source subrect of the texture when determining virtual coordinates. -Appears to work on the non-Normal resolution scaling modes. -doesn't seem to work in the big text menus. -allows for the removal of many hacks.
|
Nothing. I'll remove it
…On Sat, Mar 28, 2026, 3:40 AM Niterux ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
On wadsrc/static/fonts/dynamic/New Text Document.txt
<#879?email_source=notifications&email_token=AJYRBMNNZ6RNIJ2LL3BG7TT4S6TZFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBSGU2DMMRSGAZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K64DSL5ZGK5TJMV3V6Y3MNFRWW#discussion_r3004683934>
:
What does this file do?
—
Reply to this email directly, view it on GitHub
<#879?email_source=notifications&email_token=AJYRBMLAHWB5TBR2YDQ4WPL4S6TZFA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBSGU2DMMRSGAZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2L24DSL5ZGK5TJMV3V63TPORUWM2LDMF2GS33OONPWG3DJMNVQ#pullrequestreview-4025462203>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJYRBMJGSJYKXLHZ4OLAGDD4S6TZFAVCNFSM6AAAAACQ77H37WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DAMRVGQ3DEMRQGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No, keep it. It might be important 😂 |
-SymbolsFont is now a duplicate of the ConFont, but with post fixup. -TODO: the color theming for the sliders is not working
…ls font not having color translations)
|
For those following this; a fairly recent build off this PR is available on the Experimental Releases. Please give it a shake and post feedback! |
|
gave this a go, so far it's really promising! some small bugs/thoughts: the console cursor seems to have a small 1px(?) space after hitting the spacebar, which then expands to a proper sized space when another character is added afterwards. this doesn't happen in the chat text input. it's particularly visible after "brown" and "dog" in this clip. this is a little disorienting and made me think i didn't hit the spacebar.
i don't know the intricacies of TTF rendering but i think it would be neat to have the ability to enable/disable font smoothing within uzdoom for modders/devs, what with doom being retro and all. some fonts (my goto being any of microsoft's old "core fonts for web") look particularly nice with it disabled. i'm pretty excited for this |
…hing when using dynamic fonts
…ingWidthUTF32 include trailing space advance
|
Minor issue with non-ttf rendering: Listmenu is colourless sometimes and the cursor is off-centre Screencast_20260416_215344.webm |
-Added menu where you can directly remap a static font with a dynamic one. Accessible in Font Options -> advanced font menu -cleanup of drawtext code re: dynamic fonts
-should fix some unix-specific warnings about POD w/ vararg functions
Description
Features:
Adds capability of rendering bitmap fonts rendered from ttf files.
Adds user options for font overrides, remappings, and preferences.
Font API for semantic font choice (ex: Font.GetSmallTextFont() rather than using NewSmallFont directly)
Primary use cases:
Accessibility: fonts like Atkinson Hyperlegible are substantially easier to read for some users.
Customization / modding: making it easier to control the presentation of text in UZDoom.
What this does NOT do:
-Pixel-perfect vector rendering of fonts: The fonts generate a bitmap atlas at startup.
Third party dependencies:
-FreeType
-Harfbuzz
-Trex
-simdutf
-stb_image_write
-Included font files
Checklist