Recent

Author Topic: [LazFreeType]Bug in LazFreeType?  (Read 8283 times)

zamtmn

  • Hero Member
  • *****
  • Posts: 640
[LazFreeType]Bug in LazFreeType?
« 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

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: [LazFreeType]Bug in LazFreeType?
« Reply #1 on: February 22, 2013, 09:27:21 am »
Does it do that bug in latest svn ?
Conscience is the debugger of the mind

zamtmn

  • Hero Member
  • *****
  • Posts: 640
Re: [LazFreeType]Bug in LazFreeType?
« Reply #2 on: February 22, 2013, 12:13:37 pm »
Yes. svn40361

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: [LazFreeType]Bug in LazFreeType?
« Reply #3 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
Conscience is the debugger of the mind

zamtmn

  • Hero Member
  • *****
  • Posts: 640
Re: [LazFreeType]Bug in LazFreeType?
« Reply #4 on: February 22, 2013, 02:50:36 pm »
Thanks, patches fix a bug

 

TinyPortal © 2005-2018