freetype-devel
[Top][All Lists]
Advanced

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

RE: [ft-devel] freetype2 question


From: Jon Foster
Subject: RE: [ft-devel] freetype2 question
Date: Thu, 30 Oct 2008 13:11:44 -0000

Hi,
 
> FT_Set_Char_Size(ft_face
> FTC_ImageCache_LookupScaler(
 
You can't use these 2 functions together.  If you use FTC_ImageCache_LookupScaler, then the Freetype cache API will handle setting the size on the font.  It does this with the scaler parameter you pass to FTC_ImageCache_LookupScaler.  So there is no need to call FT_Set_Char_Size - instead you should just change the scaler parameter to FTC_ImageCache_LookupScaler.
 
Kind regards,
 
Jon
 

From: address@hidden [mailto:address@hidden On Behalf Of ayoub mejri
Sent: 30 October 2008 11:02
To: address@hidden
Subject: [ft-devel] freetype2 question

Hello,
This is an explanation of my problem
 
 
the text that I parse is :
"[tagTITLE] Printing [endtagTITLE]
how to make printing."
 
- It consisting of 2 lines: the first is a Title means double sized
the second line is a simple text
 
- The algorthime is
while (getNextToken)
{
 if (tken==tagTITLE)
      FT_Set_Char_Size(ft_face, 64*
     24, 64 *24 ,600,600)
 if (tken==endtagTITLE)
      FT_Set_Char_Size(ft_face, 64*
     12, 64 *12 ,600,600)
 if(token==character)
  draw_character(x,y,character);
}
 
- in the function draw_character , I call the function
FTC_ImageCache_LookupScaler(image_cache, &scaler, ft_load_flags, glyph_index, &CacheGlyph, NULL )
 
-The scaler is always the following:
 
scaler.width =12*64;
 scaler.height = 12*64;
 scaler.pixel = 0;
 scaler.x_res = 600;
 scaler.y_res = 600;
 scaler.face_id = face_id;
 
- The result is
"Printing
how to make printing"
- The second 't' and "printing" are so big beaucause they are cached with the size 24.
I don't comprehend why some character in the second lin are with a 24 size (t,P,r,i,n,t,i,n,g)
 
Please If you can help me.


**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

reply via email to

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