Jacopo Sciampi
Jacopo Sciampi

Reputation: 3443

Some letters overlap using TJ

I've a basic example from a PDF i'm editing.

The code

 /P <</MCID 0>> BDC q                          
0.000008871 0 595.32 841.92 re                 
W* n                                           
BT                                             
/F1 12 Tf                                      
1 0 0 1 56.64 759.96 Tm                        
/GS7 gs                                        
0 g                                            
/GS8 gs                                        
0 G                                            
[(n)4(a)4(m)4(e)] TJ                           
ET                                             
Q                                              
q                                              
0.000008871 0 595.32 841.92 re                 
W* n                                           
BT                                             
/F1 12 Tf                                      
1 0 0 1 109.7 759.96 Tm                        
0 g                                            
0 G                                            
[( )] TJ                                       
ET                                             
Q    

works prefectly, producing "name" without quotes when I open the pdf.

Sadly, if I change the n with a c, something happens:

enter image description here

Same thing happen if i write [(N)4(a)4(m)4(e)] TJ (capital N) or with [\(Name)] TJ What am I doing wrong?

Upvotes: 0

Views: 43

Answers (1)

johnwhitington
johnwhitington

Reputation: 2783

Perhaps your font is subset, and so does not have a glyph for c. Your PDF viewer may be substituting a glyph from another standard font, but obeying the given metadata width for the c glyph in the font dictionary for your subset font, which will be 0 for a missing glyph. Hence the overwriting.

Edit: this should have been a comment, not an answer. Sorry.

Upvotes: 1

Related Questions