HOW to register a "bold italic" font

Posted by: rmoulin on 17 October 2019, 5:28 pm EST

    • Post Options:
    • Link

    Posted 17 October 2019, 5:28 pm EST

    When we export a PDF document, we use registerFont to provide the fonts.

    it works perfectly for “normal”, “bold” and “italic” fonts but not for “bold italic” font.

    Do you know how we can do ?

    Tapez un message

  • Posted 20 October 2019, 6:17 pm EST

    Hi,

    For bold italic font you need to register font with boldItalic property. Please refer to the following code snippet:

    var font = {
        normal: "base64 string of regular font",
        bold: "base64 string of bold font",
        italic: "base64 string of italic font",
        boldItalic: "base64 of bold italic font
    };
    GC.Spread.Sheets.PDF.PDFFontsManager.registerFont("fontName", font);
    

    Regards

    Sharad

  • Posted 21 October 2019, 1:29 am EST

    Thank you, it works.

    We have a problem with the Helvetica font, it does not register like other fonts.

    Do you have a solution ?

    best regard

  • Posted 21 October 2019, 4:36 pm EST

    We are glad to be able to help.

    Please let us know the exact issue you facing with the font? Also, could you share the font file with which you are facing the issue? If the font file is a private/paid font and you cannot share it on the public forum then you may create a case at our private support portal(https://supportone.componentone.com) and share the file.

  • Posted 22 October 2019, 7:49 pm EST

    Here the font.

    Best regards

  • Posted 22 October 2019, 7:50 pm EST

  • Posted 23 October 2019, 5:51 pm EST

    We are able to replicate the issue using the attached font file and hence we have forwarded it to the concerned team for further investigation of the issue. The internal tracking ID for the issue is SJS-2236. We will keep you posted with any updates regarding the same.

    Also, Helvetica is one of the standard/pre-defined fonts, so you don’t need to register it again. Following is a list of all predefined fonts:

    ‘Courier’

    ‘Courier-Bold’

    ‘Courier-Oblique’

    ‘Courier-BoldOblique’

    ‘Helvetica’

    ‘Helvetica-Bold’

    ‘Helvetica-Oblique’

    ‘Helvetica-BoldOblique’

    ‘Symbol’

    ‘Times-Roman’

    ‘Times-Bold’

    ‘Times-Italic’

    ‘Times-BoldItalic’

    ‘ZapfDingbats’

  • Posted 29 October 2019, 7:27 pm EST

    Hi,

    The dev team has confirmed that the .ttc font file is currently not supported by SpreadJS.As a workaround, you would have to convert .ttc to .ttf, you could get the online converter from google. For example this one: https://transfonter.org/ttc-unpack

    Regards

  • Posted 25 November 2019, 6:16 pm EST

    Hi,

    Thanks for the answer, and the .otf font files are they supported ?

    Here is a font that does not work.

    Regards

  • Posted 25 November 2019, 6:16 pm EST

    otf font

  • Posted 25 November 2019, 6:17 pm EST

    vonique 92.otf

  • Posted 26 November 2019, 7:15 pm EST

    Hi,

    SpreadJS supports .ttf and .otf fonts. Could you please share the font file for us to test?

    Regards

  • Posted 26 November 2019, 9:41 pm EST

    Hi,

    vonique92.otf works now, we can close

  • Posted 27 November 2019, 3:36 pm EST

    Thank you for informing us about the same.

  • Posted 23 January 2020, 4:20 am EST

    My customers ask for a TTC support while they are using a lot of TTC on Mac. I tried to register the TTC font but it returns an error. I see in the pdfKit you’re using that they support embedding of TTC fonts, is there any chance you support TTC in a near future?

  • Posted 23 January 2020, 6:03 pm EST

    Hi,

    I’ve added an enhancement request on your behalf to support TTC fonts. The internal tracking ID for the issue is SJS-3270. We will let you know about any updates regarding the same.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels