Archive: Install Postscript Type 1 Fonts


Install Postscript Type 1 Fonts
  Hello,

I have a big problem.

I have to install Postscript fonts for Windows 2000/XP - Systems.

I have three Files : fontXy.AFM, fontXy.INF, fontXy.PFB.

Have anybody experience with installing Type 1 Fonts?

I convert the files in PFM....

This example doesn´t work:


CopyFiles "PFM\fontXy.PFM" $FONTS

System
::Call "GDI32::AddFontResourceA(t) i ('fontXy.PFM | fontXy.PFB ') .s"
>SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0
>

Is that the exact code you're using?
CopyFiles "PFMfontXy.PFM" $FONTS
This says that the file name is "PFMfontXy.PFM" not "fontXy.PFM".

-Stu


oh sorry, the right version is:
CopyFiles "fontXy.PFM" $FONTS

But is it required to copy the file to the fonts-Directory? But how do the other operation know where the location of the fontresource is?


Yes I'm pretty sure it's necessary because AddFontResourceA does not want full paths to font files; it only wants the font file names themselves. Try removing the last space:
System::Call "GDI32::AddFontResourceA(t) i ('fontXy.PFM | fontXy.PFB') .s"

-Stu


ok, now it works but I don´t know why.

CopyFiles "$EXEDIR\fontXy.PFB" $FONTS
CopyFiles "$EXEDIR\fontXy.PFM" $FONTS
SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0

With Windows XP it works but why? Have someone an idea? The fonts are installed and usable...


Probably because you've added $EXEDIR to the source file. It's always better to use the full path with CopyFiles to make sure it will work.


yes that´s right, but it also works without. But my confusion is because a copy-command activate a function that also the fonts are listed in the registry an in the fonts-table. So the function

System::Call "GDI32::AddFontResourceA(t)

ist obsolete!

I also test it with True Type Fonts (ttf) and it´s the same. There is no need for the function...

Okay, one limitation: It only works from win2000 ...