Forum > LazUtils

[LazFreeType]Bug in LazFreeType?

(1/1)

zamtmn:
–°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: ---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
--- End code ---
everything works.

If you load it last

--- Code: ---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
--- End code ---
it does not appear and glyph^.outline.points^[] returns only zeros

circular:
Does it do that bug in latest svn ?

zamtmn:
Yes. svn40361

circular:
Oh maybe last patches have not been applied, see here :
http://www.lazarus.freepascal.org/index.php/topic,16399.msg114230.html#msg114230

zamtmn:
Thanks, patches fix a bug

Navigation

[0] Message Index

Go to full version