-
Notifications
You must be signed in to change notification settings - Fork 76
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
Updated DED crashed on Ubuntu 22 #67
Comments
Same here. My guess it's that libfreetype-dev is too old for the new SDF font rendering stuff. My Mint install comes with v2.11, and the new documented minimum is 2.13. For me it works again if I |
funny enough I am now having issues building it at all. |
Try running |
No, there are no updated packages. My dist is built on Ubuntu 22.04 LTS (Jammy), which comes with freetype 2.11, and will only see security updates. Obviously I can build from freetype from source. I was just giving OP the easiest way forward. Anyway, I went back to investigate, and it's indeed a bug with the space character (32) specifically, so you can do the following and get nicely scaled and rendered SDF fonts even on the older libfreetype: diff --git a/src/free_glyph.c b/src/free_glyph.c
index 041a2a3..1df8f36 100644
--- a/src/free_glyph.c
+++ b/src/free_glyph.c
@@ -4,7 +4,7 @@
void free_glyph_atlas_init(Free_Glyph_Atlas *atlas, FT_Face face)
{
- FT_Int32 load_flags = FT_LOAD_RENDER | FT_LOAD_TARGET_(FT_RENDER_MODE_SDF);
+ #define load_flags (i > 32 ? FT_LOAD_RENDER | FT_LOAD_TARGET_(FT_RENDER_MODE_SDF) : FT_LOAD_RENDER)
for (int i = 32; i < 128; ++i) {
if (FT_Load_Char(face, i, load_flags)) {
fprintf(stderr, "ERROR: could not load glyph of a character with code %d\n", i); I noticed it takes a lot longer to start up -- multiple seconds before you can type -- but it does work. |
@eloj This solution seems to work like a charm for me as well, though it does take significantly longer to load. @vultureofficial try those fixes and see if it works for you as well. Perhaps this change should be merged into main? I'm not sure here. |
I recently built DED with the new changes (clipboard and runtime shader updates) but it crashes when I try to open a file or even the text editor itself.
The previous version worked like a charm. If anyone can help I would really appreciate it. Thanks to Tsoding for this wonderful project.
The text was updated successfully, but these errors were encountered: