Here it is : error #1 in FT_New_Face()
I tried to compile the latest update on my Mac (OS X 10.11.1) and it fails at "#include <cairo/cairo-ft.h>"
If I change it to "#include <cairo-ft.h>" it works. Any ideas why?
Anyways, I'm getting the same error as Baillive does for what it's worth.
Edit: I did some further debugging this morning and found that using the full path to the font file in FT_New_Face will make the error go away, so it must be a problem with locating the file.
I'm not sure where Freetype is looking for relative file names, but changing #define INTERFACE_FONT "VeraMono.ttf" to "./VeraMono.ttf" will fix the problem on Mac (assuming the font is located next to the executable).
However, no text will show up in the interface. The FreeType font does seem to load properly because it reports a valid number of glyphs available etc.
I did manage to get text showing up by replacing cairo_set_font_face(c,cr_face) in cairo_init with something that didn't use that specific font:
cairo_select_font_face (c, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
Last edited by Halda; November 30th, 2015 at 16:30.
Beautiful, thanks a lot!
I was about to ask you to try more or less the same experiment, in fact I just updated the code in such a way that it builds a path. I also replaced FT_New_Face() with FT_Open_Face(), that should follow the same code path under linux and OS X. It would great if you could try again, but I believe that the same result will follow (no text visible).
If it still does not work, I will just use a default font as fallback. The problem with using the default font is that, at least under Windows, not always the monospace one is really monospace. Yet it's better than nothing I guess...
I haven't worked with any of these libraries before, but my guess would be that Cairo is to blame. Maybe the conversion from Freetype doesn't work or it needs more initialisation? Is there a way to probe the cr_face object for details? I checked the cairo_text_extents during the text rendering and it reported a height of 0, which might be a clue?
Another weird thing happening when the text won't show up is that not all lines in the interface renders:
Some further tests show that if I disable all cairo_show_text calls in expose_waveform then the lines will show up. So there's definitely something weird happening when trying to show text.
I also noticed that the line width changes to 2.0 after the failed calls to cairo_show_text (instead of the expected 1.0).
Yep, only the lines drawn before the first call to cairo_show_text(). So apparently the first misbehaving cairo_show_text() messes up the cairo context, and from that moment on nothing else is drawn. This also explains the zero height, because probably everything cairo-related is just garbage. Font file corrupted? The md5 of mine is 37d8aff129ecd7d3fc495b7239f834db.
As an experiment I tried to set cr_face to NULL and, on debian, cairo just reverts to the default. Apparently cairo_ft_font_face_create_for_ft_face() is not supposed to ever return NULL, but there is a function cairo_font_face_status(cairo_font_face *f) that should check whether an error has occurred with f. Except for this, these objects seem to be pretty opaque. There is a function cairo_font_extents() that is more or less like cairo_text_extents(), however it works on the cairo context, not on the font face itself.
Thanks a lot for this...
I tried that too and it seems to revert to some default because now text shows up.As an experiment I tried to set cr_face to NULL and, on debian, cairo just reverts to the default.
I also tested to use another random ttf file (from Microsoft) and it failed in the same way; no text shows up. Looks like something goes wrong with cairo_ft_font_face_create_for_ft_face()
Despite what sounds a lot like Chinese to me in this thread (I don't know much about computers and all), I have to say that this is about the coolest program I've seen in a while.
I wasn't even sure how to use the software, just unzipped, clicked on the nearest .exe file, ignored the Microsoft and Norton doom announcements and plugged in my mic.
Well, I don't have a mic, save for the one on the iPhone earphones:
And there you have it:
I just went through my entire watch-box and timed all of my watches.
All I did was loosen the band one notch and then slide the mic under the watch - between it's watchbox pillow and then slide it back on the pillow. Wedged between the watch and the pillow with the mic hole pressed against the watch back, just sit it down and watch the magic.
Wife: Don't you have enough watches?
Me: Don't you have enough earrings?
Wife: So, you're saying that watches are jewelry for Men?
Me: That's exactly what I'm saying.
Wife: Let's go shopping.
And that's how I got my last watch...
I tested the program with Vista and the internal microphone,it works great!......
The watch i tested was an late 1940`s Accurist with unknown service history,my question is...........if the amplitude is too low in a given watch will it not show at the top of the screen,because after 5 min or so of testing i think i saw the amplitude reading twice and then it disappeared again,somewhere between 230-240?
Edit:Ok ,cool it has something to do with volume,i tried a watch with a louder tick and it shows the amplitude
Last edited by Apollonaught; December 2nd, 2015 at 15:18.
"There are many paths leading up the mountain,but the view from the top is the same."