Re: Finding out the appropriate texture size for a font
Sagar Tiwari <[email protected]> Mon, 29 Jul 2024 20:44:04 +0530
| Newsgroups | gmane.comp.fonts.freetype.user |
|---|---|
| Message-ID | <CAJ8WsYO5O1hz73rYh6ho9j-5Vhkgnk0VUp+i_S9FYhYQuwhUjg@mail.gmail.com> |
I got it working. Thanks Werner and Alexei. On Mon, Jul 29, 2024 at 7:19=E2=80=AFPM Alexei Podtelezhnikov <apodtele@gma= il.com> wrote: > > > have to convert to pixels > > > > Can you explain how to do that? Since the bounding box is fixed, I > > presume it will somehow involve the pixel size I'm passing to to > > FT_Set_Pixel_Sizes. I've gone through the documentation and am > > still a little confused. > > I suggest using x_scale and y_scale from size->metrics. > See > https://freetype.org/freetype2/docs/reference/ft2-sizing_and_scaling.html= #ft_size_metrics > > Something like > > xMax =3D FT_MulFix(face->bbox.xMax,face->size->metrics.x_scale); > > will be given in fractional 26.6 pixels. > > Alexei > --=20 Best Regards Sagar Tiwari