今天碰到了0與O的區分問題,上網翻找資料後,作些整理...
於Monospace/Fixed Width Programmer's Fonts有提到適合程式設計的字型重點:
1. Crisp clear characters. (清晰)
2. Extended characterset. (延伸字元集)
3. Good use of whitespace. (妥善使用空白字元)
4. 'l', '1' and 'i' are easily distinguished (能夠清楚分辨大寫 l、數字 1
以及小寫 i)
5. '0', 'o' and 'O' are easily distinguished (能夠清楚分辨數字 0、小寫 o
以及大寫 O)
6. forward quotes from back quotes are easily distinguished -prefer
mirrored appearance (能夠清楚分辨 ' 與 `,最好兩者的方向相反)
7. Clear punctuation characters, especially braces, parenthesis and
brackets (標點符號要清楚,尤其是大括號、中括號與方括號)
綜合以上要點,選出了兩種符合的字型:
Consolas:微軟發展的新字型,內建於Vista、Office2007、Visual Studio2005
等軟體。
Monaco:源於MAC上的字型,Return of Monaco.ttf有更多資訊。
現在Consolas已經取代Courier New成為我寫程式時最愛用的字型囉:)
Consolas.TTF http://petertom51.googlepages.com/Consolas.TTF
Monaco.TTF http://petertom51.googlepages.com/MONACO.TTF