Results 1 to 4 of 4

Thread: Fonts

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2

    Fonts

    I am using a specific font in a program, and am stuck as to how I can easily use it on another computer without the font already installed. Can anyone tell me how to do so, preferably without telling me to make each label into a graphic.

    The two thoughts I have had are as follows:

    A) Embed the font I am using into the program
    B) Include the font in the zip pack, and include a statement in the Form_Load section that searches if the computer has the font, and if not, copies it from the AppPath to any directories named "font" on the computer.

    Any help would be greatly appreciated!!!

    Sincerely,
    VitaeThief

  2. #2
    Hyperactive Member
    Join Date
    Oct 2001
    Location
    The Netherlands
    Posts
    403
    I would do the following. Include the font as a binary file in your resource file. On the computer (like you did) check if the font exists already in the fonts dir. If not copy the font from resource to font folder.

    Use the following functions.
    LoadResData
    GetWindowsFolder

    I believe you can use the font immediatly after copieing, you don't have to register it or something like an ocx.
    There are 10 types of people, those who understand binary and those who don't

    http://merlijn.beyonix.net

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2
    So, how exactly do I encode the font as a binary file? And also, I can't work out the syntax for either of the commands you suggested.

    LoadResData
    GetWindowsFolder

    Please continue to help!

  4. #4
    Hyperactive Member
    Join Date
    Oct 2001
    Location
    The Netherlands
    Posts
    403
    With the reseditor you can simply add the file. you should load the addin. Loadresdata is an implemented vb function, if you can't find it with object browser then it probably comes with the reseditor. Getwindowsfolder is an API function you can load with api-viewer.
    There are 10 types of people, those who understand binary and those who don't

    http://merlijn.beyonix.net

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