AuburnSounds / printed

Generate PDF/SVG/HTML with D, with a Canvas-style API. Now with a flow document emitter.
36 stars 7 forks source link

In example, bad character spacing in PDF output #7

Closed p0nce closed 6 years ago

p0nce commented 6 years ago

Need a /W entry in the CIDFont object, to fill that we need a way to enumerate character ranges in opentype.d

/W 
[  120
  [ 400
  325
  500
 ]
     7080
  8032
  1000
 ]
p0nce commented 6 years ago

The problem was that in PDF glyphs are implicitely expressed in a glyph space totalling 1000 units for 1em. But 1em = font.ascent inside the font which is certainly not always 1000