After reading the help file and this forum I still can’t figure out how to use RegisterFont function.
If I copy my ttf file to the Fonts folder and register it like this
fonts_dir = Shell.GetFolder(SHF_FONTS);
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "Title Font", false);
any attempt to set properties for a paragraph using that "Title Font" name fails. So
Paragraph.SetProperties(“DiskTitle”, {FontName="Title Font"})
never works.
On the other hand, the font I’m trying to install has it’s own Typeface name (Vladimir Script) and Paragraph.SetProperties(“DiskTitle”, {FontName="Vladimir Script"}) works fine.
So my question is: is it possible to use/register font names different from the fonts’ internal Typeface names? If not, how can I get that Typeface name from a ttf file during runtime?
Thanks in advance for any information regarding my questions.
If I copy my ttf file to the Fonts folder and register it like this
fonts_dir = Shell.GetFolder(SHF_FONTS);
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "Title Font", false);
any attempt to set properties for a paragraph using that "Title Font" name fails. So
Paragraph.SetProperties(“DiskTitle”, {FontName="Title Font"})
never works.
On the other hand, the font I’m trying to install has it’s own Typeface name (Vladimir Script) and Paragraph.SetProperties(“DiskTitle”, {FontName="Vladimir Script"}) works fine.
So my question is: is it possible to use/register font names different from the fonts’ internal Typeface names? If not, how can I get that Typeface name from a ttf file during runtime?
Thanks in advance for any information regarding my questions.
Comment