Font rendering is a complex and subtle process, and one that has been
implemented a number of times. In your case, PIL and Windows look different
because they are using completely different font rendering engines. Windows
uses its built-in rendering, and PIL is using the Freetype it was compiled
with.
I don’t know how each environment interprets its “size” parameter, but even if
you get them interpreted the same, the rendering will simply be different. The
way to get the same pixels as Notepad is to launch Notepad and grab the
screen.
Perhaps if you explain more about why you want the same rendering as Notepad,
we’ll have creative solutions to your problem.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)