View Issue Details

IDProjectCategoryView StatusLast Update
0023887LazarusLCLpublic2013-03-20 17:19
ReporterAndrey ZubarevAssigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWin86_64OSwindows7OS Version
Product Version1.0.7 (SVN)Product Build 
Target VersionFixed in Version1.1 (SVN) 
Summary0023887: unable open ttf file in the system fonts folder
Descriptionnot open ttf file in the system fonts folder.
because of an invalid open mode, it does not work:

uses EasyLazFreeType;
...
var ttfFont: TFreeTypeFont;
...
ttfFont:=TFreeTypeFont.Create;
ttfFont.Name:='C:\Windows\Fonts\ARIAL.TTF';
..
TagsNo tags attached.
Fixed in Revision40591
LazTarget-
WidgetsetWin32/Win64
Attached Files
  • ttfile.pas.patch (422 bytes)
    Index: ttfile.pas
    ===================================================================
    --- ttfile.pas	(revision 40277)
    +++ ttfile.pas	(working copy)
    @@ -736,7 +736,7 @@
        end;
     
        try
    -     FStream := TFileStream.Create(FName, fmOpenRead);
    +     FStream := TFileStream.Create(FName, fmOpenRead or fmShareDenyNone);
          FOpen := True;
          FBase := 0;
          if FStoredSize = -1 then FStoredSize := FStream.Size;
    
    ttfile.pas.patch (422 bytes)

Activities

Andrey Zubarev

2013-02-15 00:01

reporter  

ttfile.pas.patch (422 bytes)
Index: ttfile.pas
===================================================================
--- ttfile.pas	(revision 40277)
+++ ttfile.pas	(working copy)
@@ -736,7 +736,7 @@
    end;
 
    try
-     FStream := TFileStream.Create(FName, fmOpenRead);
+     FStream := TFileStream.Create(FName, fmOpenRead or fmShareDenyNone);
      FOpen := True;
      FBase := 0;
      if FStoredSize = -1 then FStoredSize := FStream.Size;
ttfile.pas.patch (422 bytes)

Maxim Ganetsky

2013-03-04 21:53

developer   ~0066007

Last edited: 2013-03-04 21:54

View 2 revisions

Cannot reproduce. Your code doesn't seem to fail in trunk Lazarus on Windows XP SP3 32 bit. Can you provide complete compilable test project which fails?

Andrey Zubarev

2013-03-04 22:48

reporter   ~0066009

Yes, no longer reproduce. Perhaps decided later patches from Circular.

Maxim Ganetsky

2013-03-04 23:13

developer   ~0066010

Last edited: 2013-03-04 23:14

View 2 revisions

This bug appears to be fixed in the meantime.

Thanks for the quick response.

Andrey Zubarev

2013-03-19 08:42

reporter   ~0066390

The appearance of the error depends on running parallel programs. I noticed that when running EPLAN P8 error occurs when you try to open the system font. The patch fixes the problem.

Maxim Ganetsky

2013-03-19 21:58

developer   ~0066411

Please test and close if ok. Thanks for the hint.

Issue History

Date Modified Username Field Change
2013-02-15 00:01 Andrey Zubarev New Issue
2013-02-15 00:01 Andrey Zubarev File Added: ttfile.pas.patch
2013-03-04 21:53 Maxim Ganetsky LazTarget => -
2013-03-04 21:53 Maxim Ganetsky Note Added: 0066007
2013-03-04 21:53 Maxim Ganetsky Assigned To => Maxim Ganetsky
2013-03-04 21:53 Maxim Ganetsky Status new => feedback
2013-03-04 21:54 Maxim Ganetsky Note Edited: 0066007 View Revisions
2013-03-04 22:48 Andrey Zubarev Note Added: 0066009
2013-03-04 22:48 Andrey Zubarev Status feedback => assigned
2013-03-04 23:13 Maxim Ganetsky Note Added: 0066010
2013-03-04 23:13 Maxim Ganetsky Status assigned => resolved
2013-03-04 23:13 Maxim Ganetsky Fixed in Version => 1.1 (SVN)
2013-03-04 23:13 Maxim Ganetsky Resolution open => fixed
2013-03-04 23:14 Maxim Ganetsky Note Edited: 0066010 View Revisions
2013-03-04 23:25 Andrey Zubarev Status resolved => closed
2013-03-19 08:42 Andrey Zubarev Note Added: 0066390
2013-03-19 08:42 Andrey Zubarev Status closed => assigned
2013-03-19 08:42 Andrey Zubarev Resolution fixed => reopened
2013-03-19 21:58 Maxim Ganetsky Fixed in Revision => 40591
2013-03-19 21:58 Maxim Ganetsky Note Added: 0066411
2013-03-19 21:58 Maxim Ganetsky Status assigned => resolved
2013-03-19 21:58 Maxim Ganetsky Resolution reopened => fixed
2013-03-20 17:19 Andrey Zubarev Status resolved => closed