Mac error: There was a problem with True Type font support. Circos could not render text from the font file

95 views
Skip to first unread message

Junhao Wen

unread,
Jun 26, 2023, 4:45:02 PM6/26/23
to Circos
Hi, 

I am having errors to run Circos on my Mac:

*** CIRCOS ERROR ***


      cwd: /Users/hao/Project/fujiplot


      command: /Users/hao/Software/circos-0.69-6-kanai/bin/circos -conf

      /Users/hao/Project/fujiplot/config/circos.conf -debug_group summary


  There was a problem with True Type font support. Circos could not render text

  from the font file


      /Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/cmunbmr.ttf


  Please check that gd (system graphics library) and GD (Perl's interface to gd)

  are compiled with True Type support.


  On UNIX systems, try


      gdlib-config --all


  and look for GD_FREETYPE in the 'features' line and -lfreetype in the 'libs'

  line. If these are there, it's likely that your Perl GD module needs

  recompiling.


  For help in installing libgd and/or GD, see


      http://www.perlmonks.org/?node_id=621579


  If you are having trouble debugging this error, first read the best practices

  tutorial for helpful tips that address many common problems


      http://www.circos.ca/documentation/tutorials/reference/best_practices


  The debugging facility is helpful to figure out what's happening under the

  hood


      http://www.circos.ca/documentation/tutorials/configuration/debugging


  If you're still stumped, get support in the Circos Google Group.


      http://groups.google.com/group/circos-data-visualization


  Please include this error, all your configuration, data files and the version

  of Circos you're running (circos -v).Do not email me directly -- please use

  the group.


  Stack trace:

 at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Error.pm line 425.

Circos::Error::fatal_error("font", "no_ttf", "/Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/c"...) called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Font.pm line 192

Circos::Font::get_label_size("font_file", "/Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/c"..., "size", 10, "text", "abc123") called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Font.pm line 243

Circos::Font::sanity_check() called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos.pm line 726

Circos::run("Circos", "configfile", "/Users/hao/Project/fujiplot/config/circos.conf", "_cwd", "/Users/hao/Project/fujiplot", "_argv", "-conf /Users/hao/Project/fujiplot/config/circos.conf -debug_g"..., "debug_group", ...) called at /Users/hao/Software/circos-0.69-6-kanai/bin/circos line 536

mv: rename /Users/hao/Project/fujiplot/output/circos.png to /Users/hao/Project/fujiplot/output_example/circos.png: No such file or directory




I followed the discussion but was not able to fix this. Additional info:

Output for gdlib config:

gdlib-config --all

gdlib-config: warning: this script is deprecated; please use the pkg-config file instead.

GD library  2.2.5

includedir: /usr/local/include

cflags:     -I/usr/local/include

ldflags:     -L/usr/X11/lib

libs:          -lz  -L/usr/local/lib -lpng15    -lfontconfig   -ljpeg   -lXpm -liconv

libdir:     /usr/local/lib

features:   GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FONTCONFIG GD_JPEG GD_XPM


To install FreeType:

sudo cpanm Font::FreeType 

Password:

Font::FreeType is up to date. (0.16)


To run gddiag:


perl gddiag 

allocated 20603 colors

Created color diagnostic image at gddiag.png

GD version 2.77


Can you please help with this?


Thanks 




Martin

unread,
Jun 26, 2023, 5:49:10 PM6/26/23
to Circos
Looks like your libgd (system graphics library) wasn't compiled with True Type support.

> features:   GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FONTCONFIG GD_JPEG GD_XPM

is missing GD_FREETYPE.

You need the FreeType library

https://freetype.org/

first, and then you can compile GD to include it.

Font::FreeType is a Perl module that interfaces with the FreeType library -- you still need the system FreeType library to use it.



Reply all
Reply to author
Forward
0 new messages