Igor 

I was wondering the following: ? But TextStyle is not about strikefont?

Stef

On 04 Apr 2014, at 02:55, Igor Stasenko <[email protected]> wrote:

> Okay, i think i got it..
> 
> Here is what happens:
> - the font size is usually specified in points, not x@y points, but 
> typographical points,
> which is 
> 1/72 inch
> 
> 
> TextStyle pointsToPixels: 14
> 
> TextStyle pointsToPixels: 14 => 18.666666666666668
> 
> pointsToPixels: points
>     ^points * self pixelsPerInch / 72.0
> 
> 
> but in Athens, i , stupid idiot, completely forgot about that, 
> and use point size directly, to scale up font ..
> but the point is that this scaling performed in font units (EMs).
> 
> so, to actually scale font correctly, i must use same TextStyle 
> pointsToPixels: .. 
> as Freetype package using..
> 
> there is one caveat, that if you really want to see exactly , say 16 points 
> sized font on your screen,
> it is not possible without knowing the display resolution - how many pixels 
> in one inch (hence
> #pixelsPerInch ).
> Unfortunately, our VMs don't give us a way to determine DPI of display..
> and so, it is always 96 :/
>  
> pheww....
> 
> fromFreetypeFont: aFont cairoFace: face
> .....
> 
>   -  fontMatrix scaleBy: aFont pointSize.
> 
>  +  fontMatrix scaleBy: (TextStyle pointsToPixels: aFont pointSize).
> 
> problem solved ... (i hope) :)
> 
> -- 
> Best regards,
> Igor Stasenko.


Reply via email to