Open xuehuiareafred opened 4 months ago
It is my understanding that line width applies only to paths, not to text. See, e.g., from the PDF reference:
Do you (or anyone else reading this) have a different understanding?
Thanks for your reply! In my opinion "The line width parameter specifies the thickness of the line used to stroke a path" has two condition。one is the line's thickness, the other is the char's thickness. because pdfminer.six char has the attr line width, and bold char without bold font has bigger line width than common char。
line_width.pdf my test result: <PDFGraphicState: linewidth=0.12, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 第 NERFFC+HYShuSongErKW 10.449999999999932 <PDFGraphicState: linewidth=0.12, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 一 NERFFC+HYShuSongErKW 10.449999999999932 <PDFGraphicState: linewidth=0.12, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 章 NERFFC+HYShuSongErKW 10.449999999999932 <PDFGraphicState: linewidth=0.29887, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 第 NERFFC+HYShuSongErKW 10.449999999999932 <PDFGraphicState: linewidth=0.29887, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 一 NERFFC+HYShuSongErKW 10.449999999999932 <PDFGraphicState: linewidth=0.29887, linecap=2, linejoin=2, miterlimit=2, dash=None, intent=None, flatness=None, stroking color=(0, 0, 0), non stroking color=(0, 0, 0)> 章
Thank you for this helpful example. I'll investigate further.
add code: attr["linewidth"] = gs.linewidth because some char use some font but add bold, maybe use linewidth can distinguish that.
thank you!