Skip navigation
AngeloIT
Currently Being Moderated

Embedding Truetype fonts into PDF Document

May 2, 2013 10:33 AM

Hi all,

 

I have a question for you :

 

I have a class in VB6 to make my PDF documents,

with this class i have the possibility to enter text of

Type 1 and text of Truetype fonts in the PDF Document,

by the specifications of the font:

 

i.e.:

to be able to enter text in Regular Times New Roman, I must to provide these specifications :

 


an array with the widths of all the characters, precisely :

 

 

Array(250, 333, 408, 500, 500, 833, 778, 180, 333, 333, 500, 564, 250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564, 564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889, 722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333, 469, 500, _

                     333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778, 500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480, 541, 778, 500, 778, 333, 500, 444, 1000, 500, 500, 333, 1000, 556, 333, 889, 778, 611, 778, 778, 333, 333, 444, 444, 350, 500, 1000, 333, 980, 389, 333, 722, 778, 444, 722, _

                     250, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 333, 760, 500, 400, 549, 300, 300, 333, 576, 453, 250, 333, 300, 310, 500, 750, 750, 750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722, 556, 500, _

                     444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500, 500, 500, 500, 500, 500, 549, 500, 500, 500, 500, 500, 500, 500, 500)

 

And some parameters :

 

 

/Flags 34

/FontBBox [-250 -216 1200 1000]

/MissingWidth 333

/StemV 73

/StemH 73

/ItalicAngle 0

/CapHeight 891

/XHeight 446

/Ascent 891

/Descent -216

/Leading 149

/MaxWidth 1000

/AvgWidth 401

 

The question : Where I can find these specifications for other truetype fonts, like Tahoma, MS Sans Serif ecc..?

 

thanks in advance for any replies!

 


 
Replies
  • Currently Being Moderated
    May 2, 2013 11:25 AM   in reply to AngeloIT

    You will need to use appropriate VB or Windows API calls to load the font and read the information from it.  And then also copy the full .ttf/.otf into the PDF.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points