• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Font not suitable to distinguish l and 1

 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Small l and 1 look almost identical in code-blocks. Is this a javaranch-issue or a firefox-linux? There should be a more coderfriendly font, because I used 'l' in my example, and it looked like 1 all over the place. Of course, in longer identifiers like 'long' it's easy distinguishable.

Example:

can you read that? Yes, if I increase the font, I see a small difference at the top.
My shell uses a font, where small L ist printed like that:

The font-dialog says, the name is 'monospace' which sounds very generic.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're right, the glyphs look the same in the font used in Firefox on this MacBook. But the "ones" are red, and the "ells" are black, so it's not all that hard for me to tell the difference.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can go into your browser settings and change the default font for monospace.

Eric
 
Trailboss
Posts: 23780
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A famous obfuscator trick:



The second one has twice as many "els" as the first.

 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:You can go into your browser settings and change the default font for monospace.



Does not work (Javaranch looks the same as before) for me, and might reduce the redabiltity of everything else. Did you try it?

A famous obfuscator trick:



famous!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found
* 12lLiI| Andale_Mono
* 12lLiI| DejaVuSansMono
* 12lLiI| FreeMono
* 12lLiI| LiberationMono-Regular
* 12lLiI| TlwgMono

as to be seen here: http://home.arcor.de/hirnstrom/images/mono-fonts.html (if you happen to have those fonts too ) on my system, and specified Andale Mono for monospaced-fonts in the settings - without much success. Other Webpages now look different - not a nice font, imho, but the l/1 is done right. The others look nearly the same, and seem to differ in size and bold/not bold, while defined the same way (size=14).
 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, added an image, so it makes sense.
 
reply
    Bookmark Topic Watch Topic
  • New Topic