Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001215graphvizDotpublic2007-12-13 17:112011-04-28 04:03
Assigned ToArif Bilgin 
PlatformOSx86-Windows-XP Media Center EditOS Version
Summary0001215: Pango-WARNING **: couldn't load font "BabelSans.ttf Not-Rotated 8.5", falling

Using a true type font BabelSans (or others, same result) leads to following error :
(dot.exe:220): Pango-WARNING **: couldn't load font "BabelSans.ttf Not-Rotated 8.5", falling back to "Sans Not-Rotated 8
.5", expect ugly output.

The dot file renders correctly at my work machine, but not on my home machine
(XP vs XP Media Center).

Apparently this is a problem linked to pango.
In GIMP 2.2.17 they had also a bug :
'work around for Pango appending " Not-Rotated" to font names'

Note : The BabelSans.ttf file is in the same dir as the dot file.
Tried many possible renaming : no work around.

Hope this helps.
Steps To Reproduce

strict digraph "sample graph" {
  graph [
    //top to bottom
  node [
  edge [

  "16" -> "8";
  "5" -> "16";
  "11" -> "34";
  "22" -> "11";
  "28" -> "14";
  "17" -> "52";
  "6" -> "3";
  "34" -> "17";
  "40" -> "20";
  "7" -> "22";
  "13" -> "40";
  "2" -> "1";
  "52" -> "26";
  "8" -> "4";
  "14" -> "7";
  "3" -> "10";
  "9" -> "28";
  "20" -> "10";
  "26" -> "13";
  "4" -> "2";
  "10" -> "5";
Additional Information

[vincent] I tried with font installed and font not installed.
I tried with and without the ttf extension.
Nothing changed. I managed to get a rendering once,
but the font was not antialiased properly, so the
result was quite bad. Yet the font seemed to be
found and used (I recognized it in the rendering).

As one of you asked, I checked the version I had at work.
It was 2.12.

I upgraded my work install to 2.16. I could not get it to work.
Something like "This program could not be executed". Sorry,
I forgot to take the file where I copied the message (and I am
now on weekend till monday :-) ) I had installed the third-party
libraries (unzipped appropriate files in my installed lib and include dir).

So I went back to 2.12 at work. Works perfectly.
I also installed 2.12 at home, and now it works perfectly.
I guess something changed in the font rendering between 2.12 and 2.16,
as I did not change anything in my dot file : works straight
out of the box with fontname="BabelSans" in 2.12.

So I will stick to that version. But it may be necessary to inquire about
that "Not-Rotated" appending by pango, and its rendering.

[erg] I wanted to check on the Graphviz version on your home machine, because if it was also 2.16, I was going to
be very confused.

The problem is that with 2.16, Graphviz on Windows moved to fontconfig for handling font name resolution.
(The Unix version has been using this for quite a while.) Unfortunately, fontconfig doesn't necessarily accept
a font file name like BabelSans.ttf. With fontconfig, you have to register your font with the system.

This is fairly simple to do:
  cd to your home directory
  mkdir .fonts
  copy or move BabelSans.ttf into the .fonts directory
  run the fc-cache program

Then you can use fontname=BabelSans in your dot file.

I recommend updating to 2.16.1 first, if for no other reason than it provides the fc-cache program.

I'm hoping we can provide some kind to patch to provide backward compatibility.

Sorry for the inconvenience and thanks for the bug report.
TagsNo tags attached.
VERSION     2.16
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => Arif Bilgin

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker