<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 2018-04-13, at 19:02, <a href="mailto:macports@parvis.nl" class="">macports@parvis.nl</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">port -dv install pango +quartz +x11<div class=""><br class=""></div><div class="">i see : <span style="font-family: 'Helvetica Neue';" class="">pango: checking which cairo font backends could be used... quartz freetype --> NO fontconfig</span></div><div class=""><span style="font-family: 'Helvetica Neue';" class=""><br class=""></span></div><div class=""><span style="font-family: 'Helvetica Neue';" class="">in the Cairo port are several andbales (edit: enables) and disables but nothing for fontconfig. could that be my problem?</span></div></div></div></blockquote></div><br class=""><div class=""><div class="">Working on my new port for munin 2.x I had trouble using DejaVuSansMono in rrdtool.</div><div class=""><br class=""></div><div class="">opensnoop shows that DejaVuSans+DejaVuSansMono are replaced by Helvetica.</div><div class=""><br class=""></div><div class="">Part of the dependency chain is: munin->rrdtool->pango->cairo->fontconfig.</div><div class=""><br class=""></div><div class="">Macports installs fonts in /opt/local/share/fonts.</div><div class="">This directory is seen only by fontconfig (defined in /opt/local/etc/fonts/fonts.conf).</div><div class=""><br class=""></div><div class="">Most software uses cairo for advanced font handling and pango for the heavy-lifting in cairo. This is called pangocairo. rrdtool has '#include <pangocairo.h>'.</div><div class=""><br class=""></div><div class="">Pango has a simple tool to show font examples:</div><div class="">pango-view --backend=<backend> --text ' iiiiwwww ' --font 'DejaVuSansMono 36' # execute in XQuartz</div><div class="">Note that backend is for pango, not for cairo.</div><div class="">With backend 'xft' or 'ft2' DejaVu shows fine.</div><div class="">With backend 'cairo' the replacement is done ('cairo' is the default backend for pango, see pangocairo).</div><div class=""><br class=""></div><div class="">The problem lies in cairo. If 'quartz' is enabled, 'fontconfig' is not used.</div><div class="">The Portfile for cairo explicitely enables 'quartz' and 'x11'.</div><div class="">With 'quartz' disabled everything works as expected.</div><div class=""><br class=""></div><div class="">I cannot oversee the consequences of disabling 'quartz' for cairo.</div><div class=""><br class=""></div><div class="">On the pango mailing list, Behdad Esfahbod offered the solution to set environment variable 'env var PANGOCAIRO_BACKEND=fc' and that works fine.</div><div class=""><br class=""></div><div class="">So I see several possible solutions:</div><div class=""><br class=""></div><div class="">1) do not force 'quartz' for cairo, but maybe hell will break loose.</div><div class=""><br class=""></div><div class="">2) add a warning for the user, like adding the following to the cairo Portfile:</div><div class=""><br class=""></div><div class=""> ui_msg "###########################################################"</div><div class=""> ui_msg "# If you installed your font with macports,"</div><div class=""> ui_msg "# and it is replaced by some other font,"</div><div class=""> ui_msg "# try to set this environment variable:</div><div class=""> ui_msg "#"</div><div class=""> ui_msg "# export PANGOCAIRO_BACKEND=fc"</div><div class=""> ui_msg "###########################################################"</div><div class=""><br class=""></div><div class="">3) add some kind of warning on all fonts (port group?)</div><div class=""><br class=""></div><div class="">Please advise.</div></div></body></html>