Lazarus

Programming => Packages and Libraries => LazUtils => Topic started by: zamtmn on February 22, 2013, 08:53:22 am

Title: [LazFreeType]Bug in LazFreeType?
Post by: zamtmn on February 22, 2013, 08:53:22 am
Сollided with incomprehensible behavior LazFreeType. The work of the module depends on the sequence loading fonts.
If load font times.ttf first (patch for \lazarus\examples\lazfreetype\mainform.pas):
Code: [Select]
Index: mainform.pas
===================================================================
--- mainform.pas (revision 40361)
+++ mainform.pas (working copy)
@@ -67,13 +67,13 @@
 
   try
     ftFont1 := TFreeTypeFont.Create;
-    ftFont1.Name := 'arial.ttf';
+    ftFont1.Name := 'c:\windows\fonts\times.ttf';
 
     ftFont2 := TFreeTypeFont.Create;
-    ftFont2.Name := 'timesi.ttf';
+    ftFont2.Name := 'c:\windows\fonts\ariali.ttf';
 
     ftFont3 := TFreeTypeFont.Create;
-    ftFont3.Name := 'verdana.ttf';
+    ftFont3.Name := 'c:\windows\fonts\arial.ttf';
   except
     on ex: Exception do
     begin
everything works.

If you load it last
Code: [Select]
Index: mainform.pas
===================================================================
--- mainform.pas (revision 40361)
+++ mainform.pas (working copy)
@@ -67,13 +67,13 @@
 
   try
     ftFont1 := TFreeTypeFont.Create;
-    ftFont1.Name := 'arial.ttf';
+    ftFont1.Name := 'c:\windows\fonts\arial.ttf';
 
     ftFont2 := TFreeTypeFont.Create;
-    ftFont2.Name := 'timesi.ttf';
+    ftFont2.Name := 'c:\windows\fonts\ariali.ttf';
 
     ftFont3 := TFreeTypeFont.Create;
-    ftFont3.Name := 'verdana.ttf';
+    ftFont3.Name := 'c:\windows\fonts\times.ttf';
   except
     on ex: Exception do
     begin
it does not appear and glyph^.outline.points^[] returns only zeros
Title: Re: [LazFreeType]Bug in LazFreeType?
Post by: circular on February 22, 2013, 09:27:21 am
Does it do that bug in latest svn ?
Title: Re: [LazFreeType]Bug in LazFreeType?
Post by: zamtmn on February 22, 2013, 12:13:37 pm
Yes. svn40361
Title: Re: [LazFreeType]Bug in LazFreeType?
Post by: circular on February 22, 2013, 01:13:20 pm
Oh maybe last patches have not been applied, see here :
http://www.lazarus.freepascal.org/index.php/topic,16399.msg114230.html#msg114230
Title: Re: [LazFreeType]Bug in LazFreeType?
Post by: zamtmn on February 22, 2013, 02:50:36 pm
Thanks, patches fix a bug
TinyPortal © 2005-2018