On Fri, Jun 30, 2023 at 7:29 PM Hin-Tak Leung <ht...@users.sourceforge.net>
wrote:

> Not really a python guy myself either,
>
First of all, thanks a lot for responding to this email.

> but I know enough python & freetype to be trusted with commit access to
> freetype-py (I think I wrote about half of their bundled examples. A few
> years ago when I decided I wanted to learn pycairo, I rewrote all their
> existing examples from PIL+numpy to pycairo... so doubling the number) -
> that's the "x.freetype.x" part you are using below. So I read some
> freetype-py issues filed too
>
I extracted your codes from freetype-py git and tried those with the
default font. However with devanaragi fonts the rending on the surface was
shifted upwards, this the glyphs displayed were cut in the middle
horizontally. Could that be due to different font parameters?

> .
>
> If I remember correctly, pygame bundles their own rather old freetype-py
> fork in their "pygame.freetype." part, and possibly also a very old private
> libfreetype too. So problems you experienced might just be because of using
> old code (as in, freetype 2.5 era...).
>
I reviewed the pygame source and it seems their "freetype" interface is
missing harfbuzz objects internally, thus, when pygame-freetype passes
requests to FT, the FT-Face do not have valid hb_* object pointers. I am
thinking of making a change in pygame interface. Do you think it will fly
and doable?

>
> You might want to check versions of both.
>
> That path /usr/share/fonts/truetype/Sarai/Sarai.ttf looks linux - Debian
> or Ubuntu? They ship some fonts of questionable quality...
>
Yes, I had picked the front from this system location. Is there any
repo. that hosts many fonts for free?

>
>
> Lastly,  shameless plug: Font Validator is your friend...
>
I shall try that.

>
> I collects FontVal reports from all shipped fonts on fedora and ubuntu
> from time to time, specifically just the rasterizer/ hinting instructions
> part as FontVal's testing. I think the report for this font (just the
> hinting instructions part) might be filed under
> https://github.com/HinTak/FontVal-Tests-at-10pt/ already, under the
> Ubuntu or the fedora branch.
>


>
>
> On Friday, 30 June 2023 at 21:18:21 GMT+8, Werner LEMBERG <w...@gnu.org>
> wrote:
>
> > 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)
>
> ...
>

Reply via email to