Home Forums Support Self-Hosted Trying to add font.

This topic contains 5 replies, has 3 voices, and was last updated by  kwoolf 2 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #19739


    Here’s what I get when I run grunt dump-dir :

    [email protected]:/var/www/html/ninja# grunt dump_dir –verbose
    Command-line options: –verbose, –gruntfile=/var/www/html/ninja/Gruntfile.js

    Reading “Gruntfile.js” Gruntfile…OK

    Registering Gruntfile tasks.
    Reading package.json…OK
    Parsing package.json…OK
    Initializing config…OK

    Registering “grunt-dump-dir” local Npm module tasks.
    Reading /var/www/html/ninja/node_modules/grunt-dump-dir/package.json…OK
    Parsing /var/www/html/ninja/node_modules/grunt-dump-dir/package.json…OK
    Loading “dump_dir.js” tasks…OK
    + dump_dir
    Loading “Gruntfile.js” tasks…OK
    + default

    Running tasks: dump_dir

    Running “dump_dir” task
    >> No “dump_dir” targets found.
    Warning: Task “dump_dir” failed. Use –force to continue.

    Aborted due to warnings.

    I’m not sure what i’m doing wrong. Any Idea ?


    Hillel Coren

    Sorry, not sure



    I can get you past this part but fonts are still not available after successful dump_dir.

    First, make sure your fonts are converted to ttf.
    Create a new folder /var/www/html/ninja/public/fonts/invoice-fonts
    Inside the invoice-fonts folder, create a folder of the name of your font, i.e. /var/www/html/ninja/public/fonts/invoice-fonts/NotoSansTC then add your ttf fonts in this folder.
    Make sure you have installed grunt in the /var/www/html/ninja directory
    Then run grunt dump_dir

    [email protected]voice-ninja-ubuntu-s-1vcpu-2gb-sgp1-01:/var/www/html/ninja/public/fonts/invoice-fonts# grunt dump_dir
    Running “dump_dir:NotoSansTC” (dump_dir) task
    File “public/js/vfs_fonts/NotoSansTC.js” created.

    Done, without errors.

    While this creates the NotoSansTC.js, the fonts are still unavailable in Invoice Ninja invoice design page. I’ve add the fonts to Ubuntu, cleared browser and server cache to no avail.

    InvoiceNinja team, please replace the ugly, ill-spaced UKai with Google’s NotoSansCJK fonts. Please! Adding a new font per your instructions is not possible.

    File ‘fonts/NotoSansTC/NotoSansTC-Black.otf’ not found in virtual file system

    Please help!

    • This reply was modified 2 months, 2 weeks ago by  kwoolf.

    Hillel Coren


    Oh wow, that’s the issue:
    | 21 | Noto Sans TC | NotoSansTC | 'Noto Sans TC', sans-serif | 300 | Noto+Sans+TC:300,400,500,700,900 | NotoSansTC-Regular.otf | NotoSansTC-Black.otf | NotoSansTC-Light.otf | NotoSansTC-Thin.otf | 1600 |

    Will update and try again

    • This reply was modified 2 months, 2 weeks ago by  kwoolf.


    So I fixed that and now the NotoSansTC can be used and shows in the invoice preview. Problem now is that the Chinese text appears normal, but English text is one letter per line vertically, making the document many pages and illegible.

    How can I tell this pdf generator how to use the English font? Letters should not be spaced vertically but horizontally. Or can I modify the font file to do this?

    • This reply was modified 2 months, 2 weeks ago by  kwoolf.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Posted in: