On Wed, Jun 28, 2023 at 10:35 AM Werner LEMBERG <w...@gnu.org> wrote:

>
> > I am a beginner and interested to contribute to this project.
>
> Great!
>
> > I am exploring how to set "glyph-to-script-map" property for
> > "autofitter" with Devanagari TTF fonts.  I explored the code in
> > depth and realize that for TTF this property is not implemented.  Is
> > this conclusion correct?
>
> Nope.  How did you come to that conclusion?
>
Thank God I was wrong! :) I probably had jumped to conclusion too soon
after looking at the truetype/ttdriver.c +157, since it did not include a
conditional to process  "glyph-to-script-map" further autofit/afhints.c
confused me.

>
> > Furthermore, it seems that the above property works only for .CFF
> > fonts.
>
> This isn't correct, either.

Again Thank God!

> The auto-hinter is completely agnostic of
> whether glyphs use second-order (TTF) or third-order (CFF) Bézier
> curves.
>
In the CFF code I found FT_HINTING_ADOBE at base/ftobjs.c +992. I misread
the codes and jumped to incorrect conclusions.

>
> What exactly do you want to achieve?  If FreeType gets linked with
> HarfBuzz (which you should always do), the `glyph-to-script-map`
> property should be correctly set automatically – for SFNT-based font
> formats, that is, which is both used by TTFs and CFFs.  However, you
> won't find any other font formats today that can be universally used
> on all platforms.
>
I want pygame->freetype->render_to() interface to render devnagari text
with autofitting. That is not happening currently, and I am traversing the
entire stack to get it done properly. I am not sure where the gap is?
If you can give me any example code in the freetype code base which details
the usage of "autofitter", that would be great.

PS: I am open to contribute to this project despite where this discussion
goes.

>
>
>     Werner
>

Reply via email to