[Tutorial] Customising a System Font

Discussion in '3DS - Tutorials' started by RosaliinaDaHacker64, Jul 14, 2017.

  1. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Hey, I'm showing how to customize a font for 3DS and install it. This requires Luma3DS and Boot9Strap.

    Please backup your NAND before proceeding. I am not responsible if you brick. :)


    ----- Simple font editing -----

    Requirements:
    FontTool
    Python (pick 2.7, not 3.6)
    GodMode9
    3dstool
    ctrtool
    make_cia
    ctr_FontConverter (can't link this SDK here)


    Let's start!

    Onto PC:
    1- Open ctr_FontConverter.exe
    2- Go to Windows Font tab for Input section
    3- Pick a font
    4- Set the size to 25 px and the Bit depth to 16 levels (A4) - important: always use 16 levels, selecting 2 levels will make texts look corrupted (garbled) in some games!
    5- On Output section, save as .bcfnt
    6- Hit Convert
    7- Move BCFNT to FontTool folder (you need 3dstool.exe, ctrtool.exe, and make_cia.exe in this folder)
    8- Open up Command Prompt or Windows PowerShell
    9- Type the following: FontTool.py -font <your output filename>.bcfnt
    10- Hit Enter
    11- Copy the .cia file to SD card
    12- Remove SD card

    Onto 3DS:
    13- Insert SD card back into 3DS
    14- Power on and hold START to launch chainloader
    15- Open GodMode9
    16- Navigate to SD card
    17- Select .cia file
    18- Go to CIA image options... > Encrypt file (...) > Encrypt inplace
    19- Reboot 3DS
    20- Open FBI
    21- Select .cia file
    22- Install it
    23- Restart your system
    24- Voila!


    ----- Advanced font editing -----

    For those who want button icons included, follow this instruction:

    Requirements:
    FontForge
    GodMode9
    Some Nintendo TrueType fonts:
    • CafeStd.ttf - a Wii U font
    Dumped from NAND using FTPiiU_Everywhere, it's located at /storage_mlc/sys/title/0005001b/10042400/content

    • nintendo_udsg-r_std_003.ttf - a Nintendo Switch font
    • nintendo_ext_003.ttf - Nintendo extended character font. Includes 3DS and Wii U extended characters (such as controller buttons). (Recommended)
    (These can be obtained off SDK... or dumped from NAND since data-mining were a thing but you cannot do it right now as it's private, so keep looking out for Switch Hacking/Homebrew community.)

    • nintendo_NTLG-DB_001.ttf - a 3DS font itself, found in Internet Browser.
    Launch GodMode9, go to CTR NAND:\title\00040030\********\content\
    * Spider - JPN: 00008802 | USA: 00009402 | EUR: 00009D02 / Skater (New 3DS) - JPN: 20008802 | USA: 20009402 | EUR: 20009D02
    pick the *.app file (there are two of 'em, select one that its filesize is larger than other), NCCH image options... > Mount image to drive
    go to G:\romfs\browser\font , Copy to 0:/gm9/out

    Important: To deal with 1.5 MB limit for BCFNT, use nintendo_ext_003.ttf as it only contains button chars, but it doesn't include Japanese chars (but not really needed, only for out-of-region HOME Menu game titles - example; マリオカート7 as Mario Kart 7.
    Otherwise export each PUA characters as .eps off 3DS or Wii U font, the import those EPS files into corresponding characters on new font. Only if you cannot acquire Nintendo Switch fonts.

    1- Open up FontForge
    2- Choose your font you want for 3DS
    3- go to Element > Merge Fonts...
    (click yes for Kerning thing)
    4- pick one of Nintendo fonts
    5- go to Private Use Area starting with U+E000 (View > Goto > drop-down menu > Private Use Area > OK / or type "uniE000" then enter)
    This is what it looks like:
    [​IMG]
    6- Select multiple symbols up to U+E07E (left/right D-pad) or rest of Switch symbols
    7- Right-Click > Transform...
    8- Choose amount of number for Move
    9- Expand the second option that says "Do Nothing" and pick Scale...
    10- Change amount of number then hit OK
    |
    Amounts to set:
    (Center of Selection) Move- X: 0 , Y: 120 | Scale- X: 195% , Y: 195%
    or

    If the font is too small, use this amount:
    (Glyph Origin) Move- X: 0 , Y: -70 | Scale- X: 200% , Y: 200%
    recommended, this fixes spacing
    If the font is too big, use this amount: Scale- X: 100% , Y: 100%
    |
    eliminate Wii U and Switch symbols if you want, they still preserve, useful for custom keyboard such as giving amiibo its name without ending up blindly typing random chars, but it won't display these for other people's eyes in Friend List

    You can also use slanted icons perfectly for Italic fonts.
    A- Highlight those PUA chars
    B- Go to File > Styles > Italic
    C- Hit OK
    11- finally Generate font.

    Here's the result


    Warning: If you are fiddling with original fonts that came pre-installed on your PC, please backup C:\Windows\Fonts to safe place.
    Go to FontForge > Element > Font info... PS Names ,
    change those fontnames to something else by adding something BEFORE font/family name (for example, family: Custom Comic Sans MS , name for human: Custom Comic Sans MS Italic), because even if you tried "Comic Sans MS 1", Windows still detects Comic Sans MS, ignoring the extra bit.
    If you don't, it will collide font/family and permanently replaces the current font when installing. Always say No if it asks you to replace current font. You don't wanna fuck up your system fonts, though.
    Now you can edit.

    Test if symbols correctly show up on FontConverter or EveryFileExplorer by copy & pasting these: 
    It shouldn't display squares and you're good to go.


    ----- Misc/Notes -----​

    If you wanna revert the font, download 3DNUS, open it up, copy this TitleID into the box: 0004009B00014002 v0
    It'll export .cia file.
    Install with FBI and done.

    @TheMachinumps posted this batch tool that converts multiple BCFNTs to CIAs which has been made easier: https://gbatemp.net/threads/tutorial-customising-a-system-font.477415/#post-7449721
    This is better: https://gbatemp.net/threads/tutorial-customising-a-system-font.477415/page-2#post-7450055


    ----- Q & A -----

    Q: Can I install font on completely stock/unhacked system?
    A: No, you need CFW.

    Q: Most button symbols such as Home icon are missing!
    A: I am trying to find the fix. But CTGP-7 has custom font with all text characters stayed intact. FontForge might be able to merge pieces of CafeStd.ttf (dumped off Wii U console) into TTF/OTF before converting to BCFNT. This is unconfirmed. I will add this tutorial here soon...or someone may help me with that.
    20 Jul: OK, @PabloMK7 came to help me starting these posts, this is pretty difficult cuz you have to deal with alpha channel (transparency) and merge the symbols from original 3DS font onto new bitmap font image (.tga), so use paint.net. I will practice a bit more and I'll add the part of tutorial here.

    21-23 Jul: I figured out how to port symbols to another font using FontForge. This method is easier than bitmap image editing which is an arse pain. Now I've added instruction, please read above.

    Q: You have some copyrighted files sh*t (FontConverter, .CIA fonts) on video description!
    A: I know, it's not allowed to directly link such warez stuff here. Idk if linking this video counts as linking to copyrighted content, I am trying to distance such stuff away from here. (pls don't take 'em down or ban meh lol)

    Q: I bricked my 3DS while trying to install font :(
    A: Your font could be corrupted or it exceeded 1.5 MB. Restore NAND with GodeMode9.
    |
    Q: I have system apps' saves (StreetPass) I wanna keep.
    A: Open GodMode9, go to CTRNAND, copy 'data' folder to SD card, restore NAND and copy 'data' folder back. JK's Save Manager might not be able to backup most system saves...
    |
    Q: But I don't have a NAND backup ;-;
    A: Do CTRTransfer method.

    Q: My custom font exceeded 1.5 MB!
    A: Switch to Image tab for Output section and save as .tga , on Image tab for Input section, open TGA (select A4 for Colour format), switch back to bcfnt / bcfna and save as BCFNT, hit Convert, this will reduce ALOT of filesize to few hundreds of KB's. Never use MsbtEditor to LZ-compress because FontTool does that for you. Trying to compress twice and install font will brick 3DS, it still counts as not being able to load font.

    Q: The texts are wide as hell!
    A: On 'Font width' tick the box for "Specify average width" and try to adjust. I picked around 20-25px to squeeze the texts.

    Q: Does it work with Citra emulator?
    A: Yes, follow this instruction to acquire custom shared_font.bin file.

    Q: I went to Super Smash Bros. and the texts look garbled!
    A: You must set bit depth to 16 levels (A4), never 2 level.


    Video tutorial (does not include adding PUA characters)


    I have custom fonts made by me. https://www.dropbox.com/sh/obzor867bmpofe1/AACaMG8ElsqmPO5PtlCwFwj5a?dl=0
     
    Last edited by RosaliinaDaHacker64, Aug 10, 2017


  2. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    352
    161
    May 3, 2017
    Canada
    Universe 7
    nice tutorial gonna try it out hopefully wont brick
     
  3. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Good luck
     
  4. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    352
    161
    May 3, 2017
    Canada
    Universe 7
    the ctr_FontConverter is in the youtube video description for anyone wondering

    — Posts automatically merged - Please don't double post! —

    i cant access the bit depth option
     
  5. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Yea, that's why I am not allowed to leave download link here.

    Your monitor screen has to be big enough to fit the window to be ablt to access bit depth, I know it's a pain. You can rotate screen by 90° by holding Alt Gr + Left/Right if it's 16:9 / widescreen.
     
    Last edited by RosaliinaDaHacker64, Jul 14, 2017
    Beerus likes this.
  6. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    352
    161
    May 3, 2017
    Canada
    Universe 7
    lol thank you!

    — Posts automatically merged - Please don't double post! —

    upload_2017-7-14_15-2-0.png got this error any idea how to fix this
     
    RosaliinaDaHacker64 likes this.
  7. MaiconErick

    MaiconErick Advanced Member

    Newcomer
    78
    4
    Jan 4, 2016
    Brazil
    Do we need to revert before updating the 3DS when a new firmware comes?
     
  8. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    745
    517
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    I for the life of me couldn't get "FontTool.py -font *.bcfnt" on its own to work for me.
    I did eventually get it to work by using "python FontTool.py -font <File Name>.bcfnt".
    Not entirely sure why it was finicky for me, but hopefully that helps someone else.

    Edit: Just finished some fonts. Great tutorial!
     
    Last edited by 8BitWonder, Jul 15, 2017
    RosaliinaDaHacker64 and Beerus like this.
  9. TheMachinumps

    TheMachinumps <insert custom title here>

    Member
    295
    145
    Oct 31, 2016
    Portugal
    yes
    You need 3dstool
     
    Beerus likes this.
  10. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Woops, I forgot to include those.

    @Beerus I added link for required executable files.
     
    Beerus likes this.
  11. TheMachinumps

    TheMachinumps <insert custom title here>

    Member
    295
    145
    Oct 31, 2016
    Portugal
    yes
    I'm just going to share this...
    Put the bcfnt files inside the fonts folder and open convert fonts.bat.
    It should convert every single bcfnt to cia. The cia files are saved to the out folder.
    It has everything, so you don't need to download any extra executables.
    Hope it makes it simpler (not that it was hard to begin with)
     

    Attached Files:

  12. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    352
    161
    May 3, 2017
    Canada
    Universe 7
    thanks for the solution i was so lost i gave up ill resum later on
     
    8BitWonder likes this.
  13. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    745
    517
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    Make sure you also have ctrtool and 3dstool (along with make_cia) in the same directory as FontTool.py. the guide didn't mention that until a little while ago.
     
  14. TheMachinumps

    TheMachinumps <insert custom title here>

    Member
    295
    145
    Oct 31, 2016
    Portugal
    yes
    FontTool doesn't use ctrtool, so you don't need that.
     
  15. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    352
    161
    May 3, 2017
    Canada
    Universe 7
    lol alright guys ill do both
     
  16. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Wow, thanks, I'll give it a shot, and I'mma add to my main post.
     
  17. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    745
    517
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    The readme of FontTool mentioned it as a requirement, so I figured to use it. ¯\_(ツ)_/¯
     
    RosaliinaDaHacker64 likes this.
  18. TheMachinumps

    TheMachinumps <insert custom title here>

    Member
    295
    145
    Oct 31, 2016
    Portugal
    yes
    Yeah, but if you look at the code, it doesn't run "ctrtool" at all. It only runs "3dstool" and "make_cia" =P
     
    8BitWonder likes this.
  19. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    595
    290
    Oct 7, 2015
    Ireland
    F:\gm9\out
    Hm, you're right, I took a look inside the Python file and used Ctrl+F lol.
     
  20. RustInPeace

    RustInPeace Samurai Cop

    Member
    2,744
    2,077
    Oct 13, 2014
    United States
    Used the Pokemon GB font, thanks for the tutorial!

    Warning: Spoilers inside!
     
    Last edited by RustInPeace, Jul 15, 2017