<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'm trying to use DejaVu fonts in rrdtool and it fails; rrdtool depends on pango, and currently I think that pango is my bottleneck.<div class="">To verify this I found a tiny program (<a href="https://www.lemoda.net/pango/list-fonts/index.html" class="">https://www.lemoda.net/pango/list-fonts/index.html</a>) that fails to compile.</div><div class=""><br class=""></div><div class="">---</div><div class=""><div class="">#include <glib.h></div><div class="">#include <pango/pangocairo.h></div><div class=""><br class=""></div><div class="">static void</div><div class="">list_fonts ()</div><div class="">{</div><div class=""> int i;</div><div class=""> PangoFontFamily ** families;</div><div class=""> int n_families;</div><div class=""> PangoFontMap * fontmap;</div><div class=""><br class=""></div><div class=""> fontmap = pango_cairo_font_map_get_default();</div><div class=""> pango_font_map_list_families (fontmap, & families, & n_families);</div><div class=""> printf ("There are %d families\n", n_families);</div><div class=""> for (i = 0; i < n_families; i++) {</div><div class=""> PangoFontFamily * family = families[i];</div><div class=""> const char * family_name;</div><div class=""><br class=""></div><div class=""> family_name = pango_font_family_get_name (family);</div><div class=""> printf ("Family %d: %s\n", i, family_name);</div><div class=""> }</div><div class=""> g_free (families);</div><div class="">}</div><div class=""><br class=""></div><div class="">int main (int argc, char ** argv)</div><div class="">{</div><div class=""> list_fonts ();</div><div class=""> return 0;</div><div class="">}</div><div class="">---</div><div class=""><br class=""></div><div class="">with makefile:</div><div class="">---</div><div class=""><div class="">pango-list-typefaces: pango-list-typefaces.c</div><div class=""> cc -o $@ -Wall -g pango-list-typefaces.c \</div><div class=""> $(pkg-config --cflags --libs pango) \</div><div class=""> $(pkg-config --cflags --libs cairo) \</div><div class=""> $(pkg-config --cflags --libs pangocairo) \Currently </div><div class=""> $(pkg-config --cflags --libs glib-2.0)</div></div><div class="">---</div><div class=""><br class=""></div><div class="">and error:</div><div class="">---</div><div class=""><div class="">make pango-list-typefaces</div><div class="">cc pango-list-typefaces.c -o pango-list-typefaces</div><div class="">pango-list-typefaces.c:1:10: fatal error: 'glib.h' file not found</div><div class="">#include "glib.h"</div><div class=""> ^</div><div class="">1 error generated.</div></div><div class="">---</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">- What does Macports do for includes/libraries/etc, or -if nothing- what should I do to use them from Macports?</div><div class=""><br class=""></div><div class="">Currently I have glib2 installed, but there is also glib2-devel, and they conflict with each other.</div><div class="">Same for pango and pango-devel.</div><div class="">- What is the difference?</div><div class="">- Which should I use?</div><div class=""><br class=""></div><div class="">I don't know what the include path will be. </div><div class="">- How should I use 'port provides glib.h' ?</div><div class=""><br class=""></div><div class=""><br class=""></div>
<br class=""></div></body></html>