freetype
[Top][All Lists]
Advanced

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

Re: [ft] Fw: [ft-devel] fitting a text


From: folkert
Subject: Re: [ft] Fw: [ft-devel] fitting a text
Date: Fri, 12 Jun 2015 13:29:26 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Ok found part of the problem: I had not multiplied the pixel height
with 64 for the FT_Set_Char_Size call. Now the resulting values make
more sense:

mine:

char 95 w×h = 6.0x1.0 ascender -1.0 bearingx -1.0 kern 0
char 103 w×h = 6.0x7.0 ascender 5.0 bearingx 0.0 kern 0
char 113 w×h = 6.0x6.0 ascender 5.0 bearingx 0.0 kern 0
char 116 w×h = 3.0x6.0 ascender 6.0 bearingx 0.0 kern 0
char 101 w×h = 5.0x5.0 ascender 5.0 bearingx 0.0 kern 0
char 115 w×h = 5.0x5.0 ascender 5.0 bearingx 0.0 kern 0
char 116 w×h = 3.0x6.0 ascender 6.0 bearingx 0.0 kern 0
char 49 w×h = 6.0x7.0 ascender 7.0 bearingx 2.0 kern 0
char 50 w×h = 6.0x7.0 ascender 7.0 bearingx 1.0 kern 0
char 51 w×h = 6.0x7.0 ascender 7.0 bearingx 0.0 kern 0
bitmap dimensions w×h = 52.0×9.0

yours:

char 95 wxh = 6x1 ascender -1 bearingx -1 kern 0
char 103 wxh = 6x7 ascender 5 bearingx 0 kern 0
char 113 wxh = 6x6 ascender 5 bearingx 0 kern 0
char 116 wxh = 3x6 ascender 6 bearingx 0 kern 0
char 101 wxh = 5x5 ascender 5 bearingx 0 kern 0
char 115 wxh = 5x5 ascender 5 bearingx 0 kern 0
char 116 wxh = 3x6 ascender 6 bearingx 0 kern 0
char 49 wxh = 6x7 ascender 7 bearingx 2 kern 0
char 50 wxh = 6x7 ascender 7 bearingx 1 kern 0
char 51 wxh = 6x7 ascender 7 bearingx 0 kern 0
bitmap dimensions wxh = 52x9

That's great!

Now with rendering enabled:

char 95 w×h = 6.0x1.0 ascender -1.0 bearingx -1.0 kern 0 bitmap: 7x1 left/top: 
-1,-1
char 103 w×h = 6.0x7.0 ascender 5.0 bearingx 0.0 kern 0 bitmap: 5x7 left/top: 
0,5
char 113 w×h = 6.0x6.0 ascender 5.0 bearingx 0.0 kern 0 bitmap: 5x6 left/top: 
0,5
char 116 w×h = 3.0x6.0 ascender 6.0 bearingx 0.0 kern 0 bitmap: 3x6 left/top: 
0,6
char 101 w×h = 5.0x5.0 ascender 5.0 bearingx 0.0 kern 0 bitmap: 5x5 left/top: 
0,5
char 115 w×h = 5.0x5.0 ascender 5.0 bearingx 0.0 kern 0 bitmap: 5x5 left/top: 
0,5
char 116 w×h = 3.0x6.0 ascender 6.0 bearingx 0.0 kern 0 bitmap: 3x6 left/top: 
0,6
char 49 w×h = 6.0x7.0 ascender 7.0 bearingx 2.0 kern 0 bitmap: 2x7 left/top: 2,7
char 50 w×h = 6.0x7.0 ascender 7.0 bearingx 1.0 kern 0 bitmap: 5x7 left/top: 1,7
char 51 w×h = 6.0x7.0 ascender 7.0 bearingx 0.0 kern 0 bitmap: 5x7 left/top: 0,7

Those bitmap sizes make sense. Only those left/top: -1,-1? and 0,5 for a bitmap 
of 5x7?

On Fri, Jun 12, 2015 at 09:42:41PM +1200, Lawrence D'Oliveiro wrote:
> Another thought, you are ignoring the error return:
> 
> > (void)FT_Set_Char_Size(face, target_height * 64, 0, 100, 0);
> 
> It may be worth seeing if you are getting an error from this call.
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype


Folkert van Heusden

-- 
Multitail est un outil permettant la visualisation de fichiers de
journalisation et/ou le suivi de l'exécution de commandes. Filtrage,
mise en couleur de mot-clé, fusions, visualisation de différences
(diff-view), etc.  http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



reply via email to

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