Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read font #48

Open
deepbodra97 opened this issue May 22, 2018 · 2 comments
Open

Unable to read font #48

deepbodra97 opened this issue May 22, 2018 · 2 comments

Comments

@deepbodra97
Copy link

deepbodra97 commented May 22, 2018

I am getting this error
RuntimeError: Magick: Unable to read font (n019003l.pfb) reported by ....\magick\annotate.c:1202 (RenderFreetype)
at line 'img.draw(text)'
I have ghostscript installed

from pgmagick import Image, DrawableCircle,DrawableText
img = Image('./images/1.jpg')
circle = DrawableCircle(100, 100, 20, 20)
img.draw(circle)
img.fontPointsize(160)
text = DrawableText(30, 250, "Hello pgmagick")
img.draw(text)
img.write('./images/draw_over_image_1.png')

Help would be appreciated!

@hhatto
Copy link
Owner

hhatto commented May 22, 2018

The following is What likely to be helpful to you?
https://www.hexacosa.net/blog/detail/185/

@deepbodra97
Copy link
Author

deepbodra97 commented May 23, 2018

Thank you very much for hearing me out.
I apologize for not mentioning my OS in the issue. I have winOS

I ran this command

system_profiler -xml SPFontsDataType > fontset.xml

error:system_profiler is not recognized as an internal or external command.

executing mgkgen.py gives this error

Traceback (most recent call last):
File "mgkgen.py", line 144, in
main()
File "mgkgen.py", line 81, in main
with Popen(["system_profiler", "-xml", "SPFontsDataType"], stdout=PIPE) as proc:
File "D:\Installs\IT\Python\Python35\lib\subprocess.py", line 676, in init
restore_signals, start_new_session)
File "D:\Installs\IT\Python\Python35\lib\subprocess.py", line 957, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

By the way I was scanning through the Python Scripts of this library. I found type.mgk file with 4 lines containing typemap and include tags

type-ghostscript.mgk file has type and typemap tags for various fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants