Font: Courier New Size: 9 is flawed for programming and other serious documents

I just ran into the stranges code:

var Lan1 : SomeType; begin Lanl.SomeFunction();

The compiler nagged it couldn't find the variable. So I copied the code into textpad which uses slightly bigger font. Thanks to the bigger font I noticed the difference between 1 and l. Otherwise it was hard to catch and I might have believed it may have been s ome strange unicode symbol.

Turns out the courier new font at size 9 is simply flawed for programming, the 1 and l is exactly the same. Even at higher sizes the difference is min or, 1 pixel or so. Perhaps not use this font anymore for programming or mak e a slight change to it so the 1 and l remains different at hopefully all f ont sizes !

(My current Delphi 10.2 development environment uses it ! Not sure if this is the default or if I set it like that ! ;))

Euhm my recommendation is to write all C/C++ code for confuscating contests with 1 and l symbols only for futher complexifieing analysis of code ! LOL .

I also took the courtesy of adding this warning to the wikipedia about cour ier new, feel free to start a wiki war with me and others ! LOL =D

formatting link

My soon to be famous text added is:

" Warning This font is not suited for programming or any other serious documentation. The numeric one and small letter L look to similiar example: 1 vs l On some development environments it's exactly the same depending on font si ze, for example at size 9 the one pixel difference is gone. "

Bye, Skybuck.

P.S.: When I discovered this bug I went like: "HOOOOLLYYYSHIIIT"

Then later: "PPPPPPFFFFFFffffff"

Also I am not the first to have found this, there are a few other mentions found by google !

P.S.2: For fun let me know if your current newsgroup/mail reader has this p roblem too, or your development environment, or document editor would be fu nny to know ! =D

P.S.3: I wonder if a NASA or ESA space lander will someday crash because of a wrong l vs 1 ! LOL. Perhaps by uploading a wrong script or wrong math fo rmulas ;) :)

P.S.4: I recommend writing a computer program that does a visual inspection of all symbols vs all symbols (for all font sizes) (and even all fonts !) and do a pixel by pixel comparision to detect any other similiar problems o r perhaps too few pixel differences !

Reply to
skybuck2000
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.