acrobat - pdf /F font size size is not real size? -


i'm adding text visible signature. text that:

bt 1 0 0 1 0 1 tm  /f1 5 tf (hello world)tj et 

5 font size. how calculated?

i've check width of text it's not same:

affinetransform affinetransform = new affinetransform(); fontrendercontext frc = new fontrendercontext(affinetransform,true,true);      font font = new font("myfont", font.plain, 5); int textwidth = (int)(font.getstringbounds(text, frc).getwidth()); 

in pdrectangle, size 5 big. ideas? how 5 calculated?

@stanlyf quoted how font size meant interpreted. observe the nominal height of lines

you seem have misconception widths. mentioned in my answer former question, widths of string depends on

  • the font metrics, character widths of characters involved,
  • the font size,
  • the current character spacing value,
  • the current word spacing value,
  • the horizontal scaling,
  • the current text matrix, and
  • the current transformation matrix.

for details read specification.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -