0

I am trying to generate a PDF file with Maltese Cross and Circle E icons with Unicode U+2720 and U+24BA respectively.

The pdf file is generated using pdfMake library for javascript. I am using Roboto which is the default font provided by pdfMake library. I also tried using custom fonts as shown in https://pdfmake.github.io/docs/fonts/custom-fonts-client-side/ However adding font "Arial Unicode" reduced the processing speed and also increased size of the build file.

Tried something like this:

pdfMake.fonts = {
   yourFontName: {
     normal: 'fontFile.ttf',
     bold: 'fontFile2.ttf',
     italics: 'fontFile3.ttf',
     bolditalics: 'fontFile4.ttf'
   },
   anotherFontName: {
     (...)
   },

   // example of usage fonts in collection
   PingFangSC: {
     normal: ['pingfang.ttc', 'PingFangSC-Regular'],
     bold: ['pingfang.ttc', 'PingFangSC-Semibold'],
   }
}

I am expecting trying to reduce the size of build file or make the unicodes available for any other fonts.Any help would be appreciated.!!

  • Do you know for certain that these glyphs exist in the Roboto font? I've had a quick look and can not see them in the list. – Parapluie Jul 26 '19 at 18:25
  • I confirmed with fontforge that Roboto-Medium.ttf from google-roboto-fonts 20161103.2.135 contains neither ✠ nor Ⓔ. – daxim Jul 29 '19 at 09:08
  • Yes I did not get any of the two icons in Roboto. I guess I have no other option than adding heavy fonts like Arial Unicode or Lucida Sans. – Gaurish Kamat Jul 30 '19 at 11:49

0 Answers0