freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Outline decompose scaling


From: Werner LEMBERG
Subject: Re: [ft] Outline decompose scaling
Date: Thu, 19 Jun 2014 06:55:43 +0200 (CEST)

> Yeah!I finally figured it out. shift and delta were not set. But now
> I don't understand why in the examples number 64 is used to
> downscale the coordinates?

FreeType normally returns coordinates to be multiples if 1/64th
pixels, called `26.6 fractional points'.

> I mean how do I set my text to be of size 20px when using the
> outlines?  Given that the resolution is 72 dpi.  Should I divide 72
> by 2048 and use that product to scale down the path points?

For `FT_Set_Char_Size', the horizontal and vertical resolution
parameters are integers (72 for your example), and the width and
height parameters must be given in 1/64th pixels (20*64).

If you really need integer coordinates, you have to divide all
coordinate values by 64 in the returned `FT_Outline' structure.

Maybe you can point out where the documentation fails to explain
this...


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]