You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing Perl Module PDF::Builder 3.026 on this old Mac. One series of tests starts with a creating a TIFF image file by simply creating a caption in it, in Perl:
system("$convert -depth 1 -gravity center -pointsize 78 -size ${width}x${height} caption:\"A caption for the image\" $tiff_f");
${width} and ${height} are chosen sufficiently big that the text caption could be written into the centre of this area. But this failed reproducibly ("no images defined") on that Mac when performed from inside the MacPorts package manager. Finally I decided to invoke convert with additional "-debug all" arguments – which helped to solve: convert tries to use Arial to type the caption's text but finds on that Mac with classic background first an old Classic MacOS 9.x Font Suitcase, which is not usable. Here is an excerpt from debug output:
2025-02-01T15:33:44+00:00 0:01.921 0.450u 6.9.13 Exception convert[13451]: annotate.c/RenderFreetype/1536/Exception
unable to read font `/Library/Fonts/Arial'
2025-02-01T15:33:44+00:00 0:01.922 0.460u 6.9.13 Annotate convert[13451]: annotate.c/GetTypeMetrics/919/Annotate
Metrics: text: A; width: 0; height: 0; ascent: 0; descent: 0; max advance: 0; bounds: 0,0 0,0; origin: 0,0; pixels per em: 0,0; underline position: 0; underline thickness: 0
2025-02-01T15:33:44+00:00 0:01.935 0.470u 6.9.13 Exception convert[13451]: annotate.c/RenderFreetype/1536/Exception
unable to read font `/Library/Fonts/Arial'
2025-02-01T15:33:44+00:00 0:01.936 0.470u 6.9.13 Annotate convert[13451]: annotate.c/GetTypeMetrics/919/Annotate
Metrics: text: A caption for the image; width: 0; height: 0; ascent: 0; descent: 0; max advance: 0; bounds: 0,0 0,0; origin: 0,0; pixels per em: 0,0; underline position: 0; underline thickness: 0
2025-02-01T15:33:44+00:00 0:01.979 0.470u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/share/ImageMagick-6/colors.xml"
2025-02-01T15:33:44+00:00 0:01.980 0.470u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/lib/ImageMagick-6.9.13//config-Q16/colors.xml"
2025-02-01T15:33:44+00:00 0:01.980 0.470u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/etc/ImageMagick-6/colors.xml"
2025-02-01T15:33:44+00:00 0:01.981 0.480u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/share/doc/ImageMagick-6/colors.xml"
2025-02-01T15:33:44+00:00 0:01.981 0.480u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/var/macports/build/_Users_btest_ports_perll_p5-pdf-builder/p5.34-pdf-builder/work/.home/.config/ImageMagick/colors.xml"
2025-02-01T15:33:44+00:00 0:01.981 0.480u 6.9.13 Configure convert[13451]: configure.c/GetConfigureOptions/658/Configure
Searching for configure file: "/opt/local/var/macports/build/_Users_btest_ports_perll_p5-pdf-builder/p5.34-pdf-builder/work/.home/.magick/colors.xml"
2025-02-01T15:33:44+00:00 0:01.982 0.480u 6.9.13 Configure convert[13451]: color.c/LoadColorCache/2238/Configure
Loading color file "/opt/local/etc/ImageMagick-6/colors.xml" ...
2025-02-01T15:33:44+00:00 0:01.990 0.480u 6.9.13 Exception convert[13451]: annotate.c/RenderFreetype/1536/Exception
unable to read font `/Library/Fonts/Arial'
2025-02-01T15:33:44+00:00 0:01.992 0.480u 6.9.13 Cache convert[13451]: cache.c/DestroyPixelCache/1195/Cache
destroy A caption for the image[0]
2025-02-01T15:33:44+00:00 0:01.993 0.480u 6.9.13 Resource convert[13451]: resource.c/RelinquishMagickResource/1317/Resource
Memory: 800000B/0B/2GiB
2025-02-01T15:33:44+00:00 0:01.999 0.480u 6.9.13 Exception convert[13451]: convert.c/ConvertImageCommand/3234/Exception
no images defined `/opt/local/var/macports/build/_Users_btest_ports_perll_p5-pdf-builder/p5.34-pdf-builder/work/.tmp/nu_hjR71KY/test.tif'
convert: no images defined `/opt/local/var/macports/build/_Users_btest_ports_perll_p5-pdf-builder/p5.34-pdf-builder/work/.tmp/nu_hjR71KY/test.tif' @ error/convert.c/ConvertImageCommand/3234.
This Mac has a working Arial font file because the test succeeds when I perform it "privately" in my own account. The MacPorts package manager uses an account "macports" that is highly under-privileged, has no login shell and has an empty home directory somewhere in MacPorts's respective build area (each time a "new" one). So it does not seem to have a chance to use fontconfig.
After removing those old Font Suitcases from fonts search path this test also succeeds in MacPorts. And MacPorts is, BTW, the culprit why I have to use this elderly version of ImageMagick…
I think font handling needs an improvement. First it should try to search for a usable font in the remainder of the list of found or known fonts, second it should warn about not having found a font (so that one does get mislead into a wrong direction), and third it should try to substitute fonts as others are doing. When configuring ImageMagick asks for the places where the DejaVu or URW replacement fonts can be found. When configure finds them it could set a #define (either a general "YES" or "NO" or specific values for kind, making a difference between URW/Ghostscript Type 1 or OpenType) so that font management related subroutines know that replacements do exist…
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
ImageMagick version
6.9.13-21
Operating system, version and so on
Mac OS X 10.4.11, Tiger
Description
Hello!
I was testing Perl Module PDF::Builder 3.026 on this old Mac. One series of tests starts with a creating a TIFF image file by simply creating a caption in it, in Perl:
${width} and ${height} are chosen sufficiently big that the text caption could be written into the centre of this area. But this failed reproducibly ("no images defined") on that Mac when performed from inside the MacPorts package manager. Finally I decided to invoke convert with additional "-debug all" arguments – which helped to solve: convert tries to use Arial to type the caption's text but finds on that Mac with classic background first an old Classic MacOS 9.x Font Suitcase, which is not usable. Here is an excerpt from debug output:
This Mac has a working Arial font file because the test succeeds when I perform it "privately" in my own account. The MacPorts package manager uses an account "macports" that is highly under-privileged, has no login shell and has an empty home directory somewhere in MacPorts's respective build area (each time a "new" one). So it does not seem to have a chance to use fontconfig.
After removing those old Font Suitcases from fonts search path this test also succeeds in MacPorts. And MacPorts is, BTW, the culprit why I have to use this elderly version of ImageMagick…
I think font handling needs an improvement. First it should try to search for a usable font in the remainder of the list of found or known fonts, second it should warn about not having found a font (so that one does get mislead into a wrong direction), and third it should try to substitute fonts as others are doing. When configuring ImageMagick asks for the places where the DejaVu or URW replacement fonts can be found. When configure finds them it could set a #define (either a general "YES" or "NO" or specific values for kind, making a difference between URW/Ghostscript Type 1 or OpenType) so that font management related subroutines know that replacements do exist…
--
Pete
Beta Was this translation helpful? Give feedback.
All reactions