Announcement

Collapse
No announcement yet.

Registering Font adds the location to be included

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registering Font adds the location to be included

    I want to install a font but its for the game and not the installer. So i am using the Archive file directory. Under destination i use %WindowsFolder%\Fonts Then under advanced font section i register as TrueType font and include the name. Everything seems to work but i found i can't delete the font manually from the windows font folder. And the reason why is if i check the registry the data has the destination and the font name rather than just the name. I find this odd and wonder what i am doing wrong.

    The data shows as: C:\WINDOWS\Fonts\FONTNAME.otf
    But should be displaying just the name: FONTNAME.otf

    Once i rename the date section in the registery i then can delete the font as normal. Please advice how to fix this.

    OR

    Since the font is just for the game is there a script we can use to locate the font file from the primer files and get the font to install? I tried for a few hours and could never get this to work by using these methods,,,, file.install and file.copy or even file.move

    appreciate any help.


  • #2
    I want to install a font but its for the game and not the installer. So i am using the Archive file directory. Under destination i use %WindowsFolder%\Fonts Then under advanced font section i register as TrueType font and include the name.
    The proper path to install a font on the target computer is using the %FontsFolder% session variable:

    Click image for larger version

Name:	SCRN-2021-05-12-01.png
Views:	348
Size:	23.3 KB
ID:	306995

    In the File Properties dialog, on the Advanced tab, make sure the option "Register as TrueType font" is checked, then click the button captioned "Auto-Name". This procedure works for many OTF fonts, but not all. If you do not get these results, try to convert the OTF to a TTF file, then add this file instead and try again.

    Click image for larger version

Name:	SCRN-2021-05-12-02.png
Views:	137
Size:	80.0 KB
ID:	306996

    Everything seems to work but i found i can't delete the font manually from the windows font folder. And the reason why is if i check the registry the data has the destination and the font name rather than just the name. I find this odd and wonder what i am doing wrong.

    The data shows as: C:\WINDOWS\Fonts\FONTNAME.otf
    But should be displaying just the name: FONTNAME.otf

    Once i rename the date section in the registery i then can delete the font as normal. Please advice how to fix this.

    OR

    Since the font is just for the game is there a script we can use to locate the font file from the primer files and get the font to install? I tried for a few hours and could never get this to work by using these methods,,,, file.install and file.copy or even file.move
    A font should be removed using a proper method: If the font was installed as part of a software package, uninstalling the software also will uninstall the font from the system. Another option is using the Fonts dialog in Windows, search for the font, click it and select "Uninstall" on the following screen.
    Navigating to a system folder and attempting to delete a file manually is not the correct way to uninstall a font.

    Click image for larger version

Name:	SCRN-2021-05-12-03.png
Views:	110
Size:	144.4 KB
ID:	306997

    Ulrich

    Comment


    • #3
      Hi Ulrich,

      First thanks for the reply.
      Second thanks for all the info you shared. I now use TTF and noticed it automatically uses the %FontsFolder% variable and sets up the advanced options. This is great.
      So now everything is working but i still end up with the uninstaller or manually uninstalling not working. And as i shared yesterday its because of how the registry is writing the data info.
      The only way to uninstall is to update the registry. See image attached as no other fonts get added with the fonts directory. Can we fix this?

      Comment


      • #4
        Also when i correct the entry in the registry and i can manually uninstall the project uninstaller does not uninstall the font.

        Comment


        • #5
          Do you have the uninstaller's log file to share? I would like to have a look. Better yet if you could share both the setup and uninstaller log files.

          Ulrich

          Comment


          • #6
            There you go.
            Attached Files

            Comment


            • #7
              The font is not installed during setup. because it already exists in the target folder.
              Code:
              [05/13/2021 16:10:12] Skipped Archive file: C:\Windows\Fonts\FSW_MS33558.ttf (Reason: Existing file overwrite setting)
              [05/13/2021 16:10:12] Skipped Archive file: C:\Windows\Fonts\FSW_glassga.ttf (Reason: Existing file overwrite setting)
              During uninstall, only the usage counter is decremented:
              Code:
              [05/13/2021 16:12:06] Success Decrement shared file count: C:\Windows\Fonts\FSW_glassga.ttf (New count = 1)
              [05/13/2021 16:12:06] Success Decrement shared file count: C:\Windows\Fonts\FSW_MS33558.ttf (New count = 1)
              The font would now be removed by the setup originally used to deploy it, should the uninstaller be started. As there is still one count for this file, which was flagged as "shared" at some point (and incorrect), removing it during the first uninstall would be a mistake, as somebody told Windows that the file is required for another application.

              Ulrich

              Comment


              • #8
                I removed the "shared" option and now the uninstaller will uninstall the font as long as i rename the Value Data to just the name and remove the destination that was included.

                Click image for larger version

Name:	fetch?photoid=307003&type=thumb.png
Views:	131
Size:	10.8 KB
ID:	307052
                So so far the only way to have the uninstaller work is to have the installer not include the destination when it registers the font.
                If i use the old fashion method and right click the font and click install it uses only the name for the Value Data.

                So from my testing we need to fix how the register works or please advise how to get the installer to register like the default method works.

                Also even if i try to uninstall from the W10 font search method as you explained this does not work again until i update the registry Value Data.

                So i believe the Registry value Data is the issue.
                Attached Files

                Comment


                • #9
                  Thank you Ulrich for all your time. I have solved the issue. And want to share the reason it failed so you can share this in the future. You can't have a custom font that you named with an underscore for the TTF UniqueID name. And maybe the font name or the family name as well.

                  i changed FSW_glassga to FSWglassga for the font name and FSW glassga for the family name and name for humans. And last FSWglassga for the TTF UniqueID.

                  Comment

                  Working...
                  X