Results 1 to 6 of 6

Thread: Install Font

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    362

    Install Font

    I've got a request to add some new font to all workstations running my VB6 application.
    I found several samples showing the code with APIs, Registry access.
    But I just tried to add the font manually and got this result:
    When I copy the font from USB card to Windows/Fonts folder I see "Installing ..." (Font name is following). After I made a copy and open Word document I see the font in the list of fonts.
    I tested this process on Windows 7 and Windows 10. Works on both.
    Does it mean I do not need to do anything, just copy the required font from the source (server/email/USB drive) into Windows/Fonts folder?

    Thank you

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Install Font

    This sort of makes me cringe.

    The proper way is to right-click the font file in Explorer and choose the Install option. But since so many people screwed machines up trying to dump such files into the Fonts folder this way... in recent versions of Windows the actual Fonts folder is protected and Shell32 (Explorer) presents a virtual view of the installed fonts and intercepts any attempts to dump files there, installing them instead.

    In other news... you can turn your PC off by bashing it with a hammer hard enough, enough times.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    362

    Re: Install Font

    There are about 150 users and there is no way to make all of them follow instructions such as "Open such and such location, copy it to your workstation, make a right click...". I know it from my experience. Many are toooo busy to even read instructions. I wanted to automate it by writing some simple code to copy file from the server to the user workstation without interracting with registry, without using APIs etc. And if I see that some easy process works why do I have to use some more complex way? If follow yor idea maybe we have to avoid using Windows at all and start using DOS, maybe even more native method like writing 0s and 1s?
    My question was to find out if the method I described will work always.
    Sorry if I offended you.
    Thank you

  4. #4
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,730

    Re: Install Font

    i don't like forcing people to install anything. instead i just use the API AddFontResourceEx and place the fonts i want to use in a subfolder of the project.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    362

    Re: Install Font

    Any explanation why the simple method (copy/paste) is not good please?

  6. #6
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,730

    Re: Install Font

    of course you can copy/paste.
    problems:
    - when a system is new or reinstalled the fonts could be lost, and you need to redo the copy/paste.
    - you need to do the copy/paste to every machine and it could take time, if you want to add a new font you need to repeat this to all machines.

    having the font installed on runtime, you have more options and flexibility.
    like autoupdates, automatic font download etc.
    the font will not be installed on the system, they will only be available in your project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width