> I want to convert the "height" value from FT_FaceRec to pixels. IIUC
> this can be done like this:
>
> double lineHeight =
> (double) FT_MulFix(face->height,
> face->size->metrics.y_scale) / (double) 64;
>
> Is that right?
Yes.
> Since the value will typically be a fractional value I was also
> wondering whether I should apply any rounding using floor() or
> ceil() here. For example, when opening Arial in 28pt, the above
> formula yields 32.203125 pixels. So should I use 32 pixels or 33
> pixels as the line height in this case?
I suggest simple rounding; the above then changes to
double lineHeight =
(double) (FT_MulFix(face->height,
face->size->metrics.y_scale) +32)
/ (double) 64;
Werner
_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype