The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,678 other followers

EditorLineEnds.ttr – what is it?

Posted by jpluimers on 2011/09/29

Sometimes when you start Delphi 2005..2010 multiple times, you get an error message similar to this:

[Error]
Cannot create file "C:\DOCUME~1\username\LOCALS~1\Temp\EditorLineEnds.ttr". The process cannot access the file because it is being used by another process.
[OK]

Edit: It looks like some people have issues with Delphi 2006 and higher in combination with Windows 7  and higher and KB2982791 or KB2993651 installed. I only do for Delphi 2006 (for 2007 and higher I use the IdeFixPack from Andreas Hausladen). Thomas Mueller wrote a workaround which works in Delphi 2006 and up: Delphi 2007 error: “Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr” – Stack Overflow.

Since there are are a few QC entries on the EditorLineEnds.ttr file: what is it?

In fact, there are two files in that %TEMP% directory: EditorLineEnds.ttr and EditorLineEnds.for

EditorLineEnds.ttr is a TrueType font (you can copy it to EditorLineEnds.ttf and view it using the font viewer that Windows has built-in).

EditorLineEnds.for is actually a FON file not with a bitmap FON, but redirecting (using the FONTDIR and FONTRES entries, also supported by the Odin Font support and the Python mkwinfont utility) to an external font resource in EditorLineEnds.ttr.

Since a FON file is stored as a Portable Executable file format, it is loadable as a Windows module (and you can use TDUMP with the -e parameter to dump it as a Windows executable). I think  the EditorLineEnds.ttr can be in the same directory as the EditorLineEnds.for file, but the EditorLineEnds.for file actually specifies the complete path to the EditorLineEnds.ttr file.

I’m not sure why Delphi generates these resources on-the-fly, as it would have been about as easy to install this font as a regular Windows font.

Since the TrueType font has been created by Allen Bauer in 2002, and modified in 2004. He is still at the Delphi team, so he might comment :)

Both files are loaded using the CreateScalableFontResource API call, which makes it hard to sandbox the Delphi IDE.

You can view the content with the d4p fonts.exe TrueType/OpenType font viewer: it contains 4 glyphs; 0x030, 0x031, x0031, 0x32.

You can dump the contents of a TrueType font using the TTFDump tool provided by the Microsoft Tyography Internal Tools.

The EditorLineEnds.ttr includes these tables (with links to Apple/Adobe), of which these tables are supported by Windows:

It lacks these tables:

  • cvt /cvt : Control Value Table
  • DSIG/DSIG: Digital Signature

Some strings from the EditorLineEndings.ttr file:

  • © 2002 Borland Software Corporation
  • Editor Line Endings
  • Regular
  • Borland Software Corp.
  • Line Ending Font
  • EditorLineEnds
  • Version 1.00; August 16, 2002
  • LineEnds is a trademark of Borland Software Corporation
  • Typeface
  • Version 1.01; March 26, 2004
  • Borland Software Corp – Allen Bauer
  • Font designed for display line break styles in Delphi IDE Editor
  • http://www.borland.com

Another odd thing is: I have never seen the glyphs provided  in the EditorLineEnds.ttf file inside the IDE.

So if anyone knows where this is actually being used: please let me know :)

–jeroen

Edit:

https://wiert.me/2011/09/29/editorlineends-ttr-what-is-it/ +Jeroen Wiert Pluimers Do you have the solution for this already? I recently encountered this using Delphi 2007.
It looks like this happens especially with Delphi 2007 and below, and it won’t be fixed as it is too hard to reproduce (sigh).
The work around is to wait until Delphi has been fully started, then restart the second instance.
I could not reproduce this in Delphi XE6 any more. So they might have fixed it without noticing (:

2 Responses to “EditorLineEnds.ttr – what is it?”

  1. Eric said

    Go to Editor Options, and check show tabs, show space, show line break. You’ll then see them :-)

    • jpluimers said

      Ha, thanks for pointing that out to me. I knew it had to be straight forward, and somehow a tiny voice in the back of my head was whispering “it is dead simple, stupid!”. Thanks for showing how simple it actually is :)
      –jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: