mgansler / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
1 stars 0 forks source link

Error: gdoTextHeight: Could not set character size (GDFONTPATH=) #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. sudo apt-get install xfonts-wqy
2. feed mscgen with any code in plain ascii text
3.

What is the expected output? What do you see instead?
$ mscgen -T png -i dffa441ee1d52bda0fa447079037b2da.mscgen -o 
dffa441ee1d52bda0fa447079037b2da.mscgen.png 
Error: gdoTextHeight: Could not set character size (GDFONTPATH=)
$ cat dffa441ee1d52bda0fa447079037b2da.mscgen 
# MSC for some fictional process
msc {
  a,b,c;

  a->b [ label = "ab()" ] ;
  b->c [ label = "bc(TRUE)"];
  c=>c [ label = "process(1)" ];
  c=>c [ label = "process(2)" ];
  ...;
  c=>c [ label = "process(n)" ];
  c=>c [ label = "process(END)" ];
  a<<=c [ label = "callback()"];
  ---  [ label = "If more to run", ID="*" ];
  a->a [ label = "next()"];
  a->c [ label = "ac1()\nac2()"];
  b<-c [ label = "cb(TRUE)"];
  b->b [ label = "stalled(...)"];
  a<-b [ label = "ab() = FALSE"];
}

What version of mscgen are you using? On what operating system?
$ mscgen 2>/dev/null | grep version
Mscgen version 0.20, Copyright (C) 2010 Michael C McTernan,
$ dpkg -l | grep libgd2
ii  libgd2-xpm                       2.0.36~rc1~dfsg-6ubuntu2   GD Graphics 
Library version 2
$ uname -a
Linux ubuntu-vbox 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 
x86_64 x86_64 x86_64 GNU/Linux
$ dpkg -l | grep xfonts-wqy
rc  xfonts-wqy                       0.9.9-3.2                  WenQuanYi 
Bitmap Song CJK font for X

Please provide any additional information below, including sample input file:
Write me if any extra information is need.

Original issue reported on code.google.com by hank.d...@gmail.com on 25 Jun 2012 at 10:19

GoogleCodeExporter commented 8 years ago
I think this is a problem in the gd package rather than mscgen itself.

Assuming you wish to use this font, please ensure you are using the latest 
libgd and then try reporting to the gd project here:

https://bitbucket.org/pierrejoye/gd-libgd/issues

Alternatively as a workaround you could use EPS or SVG output from mscgen, thus 
avoiding use of Freetype fonts.

Please reopen if mscgen does need changing.

Original comment by Michael....@gmail.com on 21 Jul 2012 at 6:14

GoogleCodeExporter commented 8 years ago
I encountered the same error message as the reporter.  In my case the issue 
seems to be that the default font when mscgen is configure'd --with-freetype is 
"helvetica", while on my system (Gentoo Linux) there is "Helvetica" with a 
capital H.

I can change the default via MSCGEN_FONT and in src/main.c to "Helvetica" to 
get the expected result.  Of course changing src/main.c likely breaks all other 
systems...  So I'm unsure of the proper fix.

As a workaround I disable use of freetype, which avoids the problematic 
default.  (gentoo users disable the 'truetype' use flag for this package only).

$ grep -i helvetic src/main.c  
            snprintf(gOutputFont, bufLen, "helvetica");

$ fc-list |grep -i helvetica
Helvetica:style=Oblique
...

Versions:
libgd - 2.0.35-r3
freetype - 2.4.11
fontconfig - 2.8.0-r1

Original comment by mdavidsa...@gmail.com on 23 Jun 2013 at 10:07