Fonts 在Inno安装程序中安装具有多种样式的字体

Fonts 在Inno安装程序中安装具有多种样式的字体,fonts,styles,installation,inno-setup,Fonts,Styles,Installation,Inno Setup,假设有一种字体具有多种样式。类似于,NewFontNormal.ttf,NewFontBold.ttf,NewFontItalic.ttf等等。安装后,我可以在fonts文件夹中嵌入所有样式的NewFont,这样我可以安装谁 我尝试了以下脚本,但不起作用: [Files] Source: "NewFontBold.TTF"; DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall Source: "NewFontIta

假设有一种字体具有多种样式。类似于,NewFontNormal.ttf,NewFontBold.ttf,NewFontItalic.ttf等等。安装后,我可以在fonts文件夹中嵌入所有样式的NewFont,这样我可以安装谁

我尝试了以下脚本,但不起作用:

[Files]
Source: "NewFontBold.TTF"; DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall  
Source: "NewFontItalic.TTF"; DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall  
Source: "NewFontNormal.TTF"; InstallFont:"NewFont" DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall  
如果为所有字体文件条目编写了InstallFont,则不会得到正确的结果


非常感谢您的任何想法。

如果您想单独安装每种字体,则需要在脚本中添加所有类似的条目

[Files]
Source: "OZHANDIN.TTF"; DestDir: "{fonts}"; FontInstall: "Oz Handicraft BT"; Flags: onlyifdoesntexist uninsneveruninstall
如果要将字体NewFontNormal.ttf、NewFontBold.ttf、NewFontItalic.ttf等安装为单个字体(NewFont)

为此,您需要手动创建单一字体,然后在“文件”部分中结合fontinstall使用此新字体文件

另外,请参阅inno安装程序的文件部分中的FontInstall参数