Comments (5)
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.
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.
funny enough I am now having issues building it at all.
from ded.
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.
@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)
- Suggestion: Reduce zoom levels once the text becomes big HOT 1
- it's not an issue, just a question HOT 1
- build.sh gives error HOT 4
- Rainbow effect HOT 2
- Misspelling
- ./build_msvc.bat is not working HOT 2
- Can't go to the previous folder, in the file browser HOT 1
- GL issues on macOS 11.7.2 HOT 8
- build.sh using CRLF line terminators HOT 4
- `da_move` could lead to undesired side effects HOT 1
- Could not load glyph of a character with code 32 HOT 1
- // TODO: URL Detection. maybe LOL
- Execution Error: HOT 1
- dollar signs are rendered... interestingly... HOT 3
- How fix src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’? HOT 4
- Failed to compile simple_color.frag on mac OS Ventura 13.2.1 HOT 1
- file_size() gives crazy big values back HOT 7
- ERROR: Could not initialize GLEW! HOT 16
- [RESOLVED with PR #42]#error: "TODO: type_of_file() is not implemented for Windows" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ded.