55

How can I change a font name (not the ttf filename, but the actual font name)?

For example, I want to rename "Tahoma" to "Tahoma7".

My goal is to rename the Tahoma font installed on Windows 7 and install it on Windows XP under different name, so I will have both Tahoma fonts installed on a single operating system. The two fonts are slightly different, and I'd like to have them both.

8 Answers 8

33

FontForge may be of use:

FontForge -- An outline font editor that lets you create your own postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap (bdf, FON, NFNT) fonts, or edit existing ones. Also lets you convert one format to another. FontForge has support for many macintosh font formats.

4
  • Thanks. It helps. I have used other free font editor Type 2.2, but it doesn't matter. Commented Mar 16, 2010 at 16:02
  • Using Win7 SP1 it keeps crashing on me. It also couldn't navigate to a different drive other than C: and didn't have an intuitive save as type setup. Commented Sep 23, 2014 at 18:28
  • 3
    @VoteCoffee You can type <driveletter>: in the open dialog and press enter, this opens up the open dialog of a different drive. (Not too intuitive, I just found it accidentally and it seemed useful to share) Commented Nov 4, 2014 at 10:03
  • 2
    Free / Open Source! Commented Feb 25, 2016 at 14:31
21

TTX is a command line tool and can be make it pretty simple to change a font's name. There's a tutorial on how to do exactly that here: http://www.fontgeek.net/blog/?p=343

Download TTX as part of fonttools

-

Updated Answer

To rename the internal font name of a TrueType font (.ttf) without installing GUI-based third-party software, you can use Python and the fonttools library.

  1. Install fonttools:

    pip install fonttools
    
  2. Create a Python Script: Create a script named rename_font.py:

    cat <<EOF > rename_font.py
    from fontTools.ttLib import TTFont
    import sys
    
    def rename_font(input_path, output_path, new_name):
        font = TTFont(input_path)
        for record in font['name'].names:
            if record.nameID in [1, 4, 6]:  # Family name, Full name, PostScript name
                record.string = new_name.encode(record.getEncoding())
        font.save(output_path)
    
    if __name__ == "__main__":
        if len(sys.argv) != 4:
            print("Usage: rename_font.py <input_path> <output_path> <new_name>")
            sys.exit(1)
        rename_font(sys.argv[1], sys.argv[2], sys.argv[3])
    EOF
    

Example Usage

python rename_font.py Tahoma.ttf Tahoma7.ttf "Tahoma7"
8
  • 1
    The project has been removed. Commented Nov 19, 2018 at 18:24
  • 4
    @Gruber it can be found here: github.com/fonttools/fonttools Commented Jan 1, 2019 at 12:32
  • Is it legal to change the name of the font? Commented Apr 29, 2019 at 18:56
  • Tutorial link is dead Commented Feb 4, 2023 at 12:41
  • Wayback Machine Commented Feb 4, 2023 at 14:21
7

You can use Typograf for that.

Navigate to the folder where font is located, select .ttf file, click Properties. Properties window will appear:

enter image description here

Change font names (font family, full name, Postscript name etc) as required and click "Save as..." button.

6
  • works nicely - and quick install Commented Apr 6, 2011 at 6:44
  • 11
    Horrible, terrible UI, and the buttons move to try and trick you into buying it Commented Aug 31, 2012 at 22:19
  • 14
    -1 This shareware isn't worth the money Commented Jan 29, 2013 at 12:38
  • 1
    The close dialog box is too much annoying Commented Feb 27, 2016 at 12:06
  • 1
    The version I just downloaded no longer seems to have the ability to click on the above fields to edit them. Commented Oct 20, 2022 at 5:01
3

Per this answer on StackOverflow:

  • Import your font file in the online Glyphrstudio font editor
  • Click the hamburger icon on the top left
  • Select font setting and change title and meta data from there
1
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places. Commented Aug 11, 2022 at 6:29
2
  1. Download and install FontForge.
  2. Right-click and “Run as Administrator” on this installation file.
  3. Click through the prompts and install a shortcut on your desktop.
  4. To run FontForge, right click on the shortcut and select “Run as Administrator.”
  5. Find the font you want to edit, highlight it, and click “OK.”
  6. Click Element > Font Info
  7. Change the Font Name, Family Name, and Name For Humans as needed
    • Font Name should be: FamilyNameVariationName-Weight. For example: EncodeSansCondensed-ExtraBold or DMSans36pt-ExtraLight. If there is no Variation: AlegreyaSans-SemiBold.
    • Family Name should be the main name with no modifiers. For example, the Family Name of CrimsonDisplay-LightItalic, CrimsonDisplay-Black, and CrimsonText-Regular is Crimson.
    • Name for Humans should be the same as Font Name.
  8. Click “Ok” after making those changes.
  9. To save it, go to File > Generate Fonts.
  10. Select the folder you’d like to save it to.
  11. Select TrueType from the dropdown and click “Generate.”
  12. You may get some errors. If you are knowledgeable about fonts and FontForge, correct them if you’d like. Otherwise, simple press “Generate” to continue.
  13. The new TTF file will appear in the directory you saved it in. You may close FontForge without saving the SFD file.
0

The fastest way is to use a Python script to edit the .ttf files. This script here prepends, appends, or renames the font filename, the font name, and doesn't rename font files that have already been renamed. Use pip install fontTools and then run the script python rename_fonts.py inside the directory with font files. ctrl-f "Free", make your edits, and then batch rename all files in the directory where the script is.

# Example Usage
# python rename_font.py
# rename all .ttf font files in this directory and sub-directories to "Free {original name}" and the font name to "Free {og name}"

import os
import sys
from fontTools.ttLib import TTFont

def rename_font(input_path):
    filename = os.path.basename(input_path)
    dirname = os.path.dirname(input_path)

if filename.startswith("Free "):
    print(f"Skipping already renamed font: {filename}")
    return

font = TTFont(input_path)
name_ids_to_update = [1, 4, 6, 16, 17]  # Update key name IDs

original_name = None
for record in font["name"].names:
    if record.nameID == 1:  # Family Name
        try:
            encoding = "utf-16-be" if record.platformID == 3 else record.getEncoding()
            original_name = record.string.decode(encoding)
            break
        except Exception:
            continue

if not original_name:
    original_name = os.path.splitext(filename)[0]

if original_name.startswith("Free"):
    new_filename = f"Free {filename}"
    new_path = os.path.join(dirname, new_filename)
    os.rename(input_path, new_path)
    print(f"Renamed file to match font name: {new_filename}")
    return  # Skip further processing


new_name = f"Free {original_name}"  # Prepend "Free"

for record in font["name"].names:
    if record.nameID in name_ids_to_update:
        try:
            encoding = "utf-16-be" if record.platformID == 3 else record.getEncoding()
            record.string = new_name.encode(encoding)
        except Exception as e:
            print(f"Error updating nameID {record.nameID} for {input_path}: {e}")
output_path = os.path.join(dirname, f"Free {filename}")
font.save(output_path)
print(f"Renamed font saved as: {output_path}")

def find_and_rename_fonts(directory):
    for root, _, files in os.walk(directory):
        for file in files:
            if file.lower().endswith(".ttf"):
                font_path = os.path.join(root, file)
                rename_font(font_path)

if __name__ == "__main__":
    target_directory = sys.argv[1] if len(sys.argv) > 1 else "."
    find_and_rename_fonts(target_directory)
-3

Microsoft Windows's Font properties editor is free and available at www.microsoft.com (no DKIM).

It will do the job.

4
-4

It does not appear you can do this. I opened the tahoma.ttf file in a hex editor and the version information (including the font family name) is encrypted with something from VeriSign, Inc., specifically VeriSign Time Stamping Services CA. I see the files are different versions, but I can't visually see any difference.

3
  • Difference is in the Unicode part (national fonts) Commented Mar 16, 2010 at 15:10
  • 3
    It's not encryption but signing: a digital signature. Commented Mar 16, 2010 at 19:59
  • It is not encypted. I have successfully edited the font. Commented Mar 17, 2010 at 7:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.