[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use "autofitter" with TTF
From: |
Werner LEMBERG |
Subject: |
Re: How to use "autofitter" with TTF |
Date: |
Fri, 30 Jun 2023 13:17:42 +0000 (UTC) |
> I have the output with TRACE7, it's quite big, should I post it here
> or if you suggest other sharing means?
This is probably not necessary; mentioning the debugging support was
basically meant for your own education.
> I am posting my script if you want to try at your end
Thanks, but I'm not a Python guy, so I won't test this by myself.
> font = pygame.freetype.Font("/usr/share/fonts/truetype/Sarai/Sarai.ttf", 50)
I haven't found this font in the internet. What I could find,
however, was a font called `Sarai Regular.ttf` (from 2007, version
1.0). The number 50 indicates the PPEM value, right? If so, hinting
doesn't matter much, provided the hints are OK[*]: at such large sizes
it is normally rather irrelevant whether you use hinting or not since
the difference is very small.
Anyway, attached you can see three images of `Sarai Regular`, showing
the output of `ftview` at a size of 16ppem:
* after pressing key 'B' to show TrueType hinting
* after pressing key 'C' to show 'light' (i.e., auto) hinting
* pressing 'h' to switch off hinting.
As far as I can tell, the auto-hinted version looks quite good.
Werner
[*] It's not OK for this particular font, for example, look at glyph
'glyph177' (glyph index 182), which distorts the horizontal bar.