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:
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.
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.
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 :)
You can view the content with the d4p fonts.exe TrueType/OpenType font viewer: it contains 4 glyphs; 0x030, 0x031, x0031, 0x32.
- OS/2: OS/2 and Windows Metrics
(with the vendor ID BORL. BORL used to be the NASDAQ symbol for Borland stock)
- cmap/cmap: Character To Index Map
- gasp/gasp: Grid-fitting And Scan-conversion Procedure
- glyf/glyf: Glyph Data
- head/head: Font Header
- hhea/hhea: Horizontal Header
- hmtx/hmtx: Horizontal Metrics
- loca/loca: Index To Location Table
- maxp/maxp: Maximum Profile
- name/name: Naming Table
- post/post: PostScript Metrics
It lacks these tables:
Some strings from the EditorLineEndings.ttr file:
- © 2002 Borland Software Corporation
- Editor Line Endings
- Borland Software Corp.
- Line Ending Font
- Version 1.00; August 16, 2002
- LineEnds is a trademark of Borland Software Corporation
- Version 1.01; March 26, 2004
- Borland Software Corp – Allen Bauer
- Font designed for display line break styles in Delphi IDE Editor
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 :)