Coder Social home page Coder Social logo

Updated DED crashed on Ubuntu 22 about ded HOT 5 OPEN

tsoding avatar tsoding commented on May 14, 2024
Updated DED crashed on Ubuntu 22

from ded.

Comments (5)

eloj avatar eloj commented on May 14, 2024 7

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.

from ded.

eloj avatar eloj commented on May 14, 2024

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 git revert 99e9318086623 and rebuild. Not optimal, but a simple workaround.

from ded.

jayhawker6 avatar jayhawker6 commented on May 14, 2024

funny enough I am now having issues building it at all.

from ded.

jayhawker6 avatar jayhawker6 commented on May 14, 2024

Try running sed 's/\r$//' build.sh > out.sh and then running ./out.sh to build. IDK the new version is working for me, after being able to build it. Old versions did not have these issues though. @eloj try updating your packages and then building the new version. Out of date stuff probably has an update on your package manager. If not you could build that from source as well, though good luck with that.

from ded.

jayhawker6 avatar jayhawker6 commented on May 14, 2024

@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.

from ded.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.