What exactly does RegisterFont do?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • VikTOP
    Forum Member
    • Dec 2004
    • 2

    What exactly does RegisterFont do?

    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.
  • tmancey
    Forum Member
    • Mar 2007
    • 26

    #2
    Originally posted by VikTOP View Post
    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.
    Did anybody from Indigo tell you how to do this please?

    Comment

    Working...
    X