Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9253645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:16:15+00:00 2026-06-18T11:16:15+00:00

I want to install TTF fonts on the host computer (running Windows) during installation

  • 0

I want to install TTF fonts on the host computer (running Windows) during installation of a software I make. Installing fonts on windows means 2 things :

  • Copy TTF files in c:\windows\fonts. That is easy to do.
  • Register the fonts that is : update the Windows Registry for Windows to update its font list. My question is : how can I do this with install4j ?

Thanks in advance for any help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:16:17+00:00Added an answer on June 18, 2026 at 11:16 am

    Well, I’ve done it “the hard way”, but it works. Here’s my code :

    String fontRegKey;
    if (Util.isWindows9X())
    { fontRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts"; }
    else
    { fontRegKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"; }
    String [] fontFilesNames = new String[]
        {"braille_tbfr2007_b-2.ttf","BrailleTBFr2007INSHEAb_thermo.ttf","LouisLouis.ttf","LouisLouisThermo.ttf"};
    String [] fontNames = new String[]
        {"Braille TBFr2007 INS HEA (TrueType)","Braille TBFr2007 INS HEA thermo (TrueType)",
        "LouisLouis Braille (TrueType)","LouisLouis Braille Thermo (TrueType)"};
    
    for (int i=0 ; i<fontNames.length ; i++)
    {
        boolean write = WinRegistry.setValue(RegistryRoot.HKEY_LOCAL_MACHINE, fontRegKey,fontNames[i], fontFilesNames[i]);
    }
    
    if (Util.isAtLeastWindowsXP()) //security : delete system font cache
    {
        File sd = WinFileSystem.getSystemDirectory();
        File f = new File (sd.getAbsoluteFile()+"\\FNTCACHE.dat") ;
        if (f.exists()) {f.delete();}
    }
    return true; //mandatory for the script
    

    Three final things :

    • This is script is a Run Script Action i put in the Finish screen of the installer.

    • Be sure to run this script only in windows environment because your installer will crash under other systems.

    • This seems to be unnecessary for WinXP but indispensable for Win7 for the fonts to be accessible in the font list after installation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want install android on my computer but using the sdk it fails to
I want to install a localhost server on a tablet with windows RT 32
I want to install a set of Open Type Fonts as part of my
I want to install zeromq for node.js in Windows 7 64-bit. I tried with
I want to install the MySql service with the --old-passwords flag Iv tried running
I want to install pyquery on windows. But i cant run setup.py install on
I want to install a SVN server on a Windows 7 64 bit machine
I want to install git on windows. my main interest is using it from
i want to install git server in windows xp. i have looked for solutions
I want to install Jboss app server 4.2.2. I've downloaded .zip installation from their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.