Opened 16 years ago
Closed 14 years ago
#18647 closed defect (fixed)
ImageMagick: font path is incorrect
Reported by: | jeremyhu (Jeremy Huddleston Sequoia) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.0 |
Keywords: | Cc: | davis@…, febeling@… | |
Port: | ImageMagick |
Description
$ convert -font Times-Roman -pointsize 12 label:Test out.png convert: unable to read font `/opt/local/lib/ImageMagick-6.4.8/config//opt/local/share/ghostscript/fonts/n021003l.pfb' @ annotate.c/RenderFreetype/1315. convert: unable to read font `/opt/local/lib/ImageMagick-6.4.8/config//opt/local/share/ghostscript/fonts/n021003l.pfb' @ annotate.c/RenderFreetype/1315. convert: unable to read font `/opt/local/lib/ImageMagick-6.4.8/config//opt/local/share/ghostscript/fonts/n021003l.pfb' @ annotate.c/RenderFreetype/1315.
Attachments (1)
Change History (18)
comment:1 Changed 16 years ago by jeremyhu (Jeremy Huddleston Sequoia)
comment:2 Changed 16 years ago by jeremyhu (Jeremy Huddleston Sequoia)
setting up symlinks works for me, so it's not as urgent as I thought... but this should still be addressed
comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Status: | new → assigned |
---|
I can confirm the problem but I don't know what to do about it so I asked the Magick-bugs mailing list.
comment:6 Changed 16 years ago by djimi@…
Jeremyhu: What symlink is necessary for a workaround? Thanks in advance.
comment:7 Changed 16 years ago by jeremyhu (Jeremy Huddleston Sequoia)
djimi: Well, it's looking for the font in: /opt/local/lib/ImageMagick-6.4.8/configopt/local/share/ghostscript/fonts/n021003l.pfb
So just do:
sudo ln -s /opt /opt/local/lib/ImageMagick-6.4.8/config/opt
Notice that the "6.4.8" is now "6.5.0" I think...
comment:9 Changed 15 years ago by ned@…
I have two machines with Macports installed. The fonts are right on one, but not on the other. They both have ghostscript and ImageMagick installed.
The one where the installation is wrong happens to have had another installation of gs in /usr/local/bin/gs:
$ which -a gs /usr/local/bin/gs /opt/local/bin/gs
This machine is also missing a number of fonts in /opt/local/bin/gs/fonts that the other one has. But it has these fonts in /usr/local/share/ghostscript/fonts.
I suspect that some configure script found the installation of ghostscript in /usr/local and got confused.
The Macports install should prepend the /opt/local path, I think...
comment:10 Changed 14 years ago by takanori@…
Although recent gs doesn't contain old-styled Type 1 URW-Fonts any more, port:urw-fonts still provides these font files.
So the easiest way to avoid this problem is make ImageMagick use port:urw-fonts.
Changed 14 years ago by takanori@…
Attachment: | ImageMagick-takanori.diff added |
---|
A patch to fix this problem.
comment:11 follow-up: 12 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)
That just masks the problem.
comment:12 Changed 14 years ago by takanori@…
Replying to jeremyhu@…:
That just masks the problem.
This might be a workaround, but it can solve this long term problem actually.
Why don't you write a patch if you have a complaint.
comment:13 follow-up: 14 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)
because I worked around it already and don't have time to invest in something like this. If you're going to fix it, fix it right. Otherwise, leave it broken.
comment:14 Changed 14 years ago by takanori@…
Replying to jeremyhu@…:
If you're going to fix it, fix it right. Otherwise, leave it broken.
Nonsense. You don't have any decision rights.
Only the port maintainers can decide whether the suggested patch is accepted or rejected.
comment:15 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | font path is incorrect in Imagemagick → ImageMagick: font path is incorrect |
---|
I'm happy to add a port:urw-fonts dependency to ImageMagick if that prevents people from encountering an error. I hadn't seen the error myself (except when I tried in response to this ticket), because I don't do font things with ImageMagick, and also I already have urw-fonts installed because it's a dependency of graphviz, which I always have installed.
The issue in this ticket that the paths specified are nonsensical (e.g. /opt/local/lib/ImageMagick-6.4.8/configopt/local/share/ghostscript/fonts/n021003l.pfb) seems to have been resolved upstream by now; I can no longer reproduce that. But even with urw-fonts installed, I still get the following error, so I don't think adding a urw-fonts dependency is a solution:
convert: unable to read font `/opt/local/share/ghostscript/fontsx/n021003l.pfb' @ error/annotate.c/RenderFreetype/1059. convert: unable to read font `/opt/local/share/ghostscript/fontsx/n021003l.pfb' @ error/annotate.c/RenderFreetype/1059. convert: unable to read font `/opt/local/share/ghostscript/fontsx/n021003l.pfb' @ error/annotate.c/RenderFreetype/1059.
Looking back at the thread I opened with the ImageMagick developers, it doesn't seem to have reached a conclusion. I may have forgotten to respond. It seemed to have ended with the developers saying ImageMagick should be using FontConfig if it's there, and ImageMagick in MacPorts does use FontConfig, so I still don't know why anything is trying to read these PFB fonts instead of the TrueType ones provided by Mac OS X.
comment:16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Ah, sorry, I see your patch also sets --with-gs-font-dir=${prefix}/share/fonts/urw-fonts
which I haven't tried yet.
comment:17 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Yes, that does work, and the generated image now has reasonable-looking text too, instead of being squished to half the width like it was for me before. Thanks. Updated the port in r74188. If we find a better solution later we can always change it.
btw, it's wrong in convert -list fonts: