Lazarus
Programming => Packages and Libraries => LazUtils => Topic started 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):
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
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
-
Does it do that bug in latest svn ?
-
Yes. svn40361
-
Oh maybe last patches have not been applied, see here :
http://www.lazarus.freepascal.org/index.php/topic,16399.msg114230.html#msg114230
-
Thanks, patches fix a bug