gokien / issue-tracker

Issue tracker and general information
http://gokien.org
1 stars 2 forks source link

Use Source Code Pro as the default monospace font #44

Closed lewtds closed 11 years ago

lewtds commented 11 years ago

(was Use Droid Sans Mono as the default monospace font)

On Ubuntu-based systems (I'm not sure about plain Debian, though), the default monospace is almost invariably Courier New. While this is a fine font aesthetically, its rendering on Linux is unacceptable: font dimensions seem wrong and much thinner than other monospace fonts. It also appears very thin. This makes it horribly illegible.

I propose using Droid Sans Mono as its replacement.

We should use Source Code Pro as the default monospace font.

lewtds commented 11 years ago

Related resources:

lewtds commented 11 years ago

Hmm, there's an issue with fontconfig, Courier New and vi_VN locale. Read in detail here: http://lists.freedesktop.org/archives/fontconfig/2013-July/004826.html

lewtds commented 11 years ago

I've figured out the explanation for the comment above. Courier New is chosen because it is the first font in the matching list (at /etc/fonts/conf.d/60-latin.conf) that has full Vietnamese coverage.

$ fc-query /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf | grep vi  
        stylelang: "ca"(s) "cs"(s) "de"(s) "el"(s) "en"(s) "fi"(s) "hu"(s) "it"(s) "nl"(s) "pl"(s) "ru"(s) "sk"(s) "sl"(s) "vi"(s) "eu"(s)

On the other hand, the same query for Droid Sans Mono returns nothing.

This is strange since my experience with Droid Sans Mono shows that its support for Vietnamese is strong. Nevertheless, more investigation is needed. It seems language coverage is generated by fontconfig by matching all supported glyphs in a typeface with a language specification in src/fc-lang/vi.orth (src is the source code folder for fontconfig). The spec for Vietnamese is derived from TCVN 6909:2001.

We have some options for resolving this issue:

  1. Force Droid Sans Mono to always match (see @fuzzysource's solution here: https://gist.github.com/fuzzysource/5997491).
  2. Remove Courier New from 60-latin.conf and prepend the list with Liberation Mono or Source Code Pro (mah fav)
  3. Figure out why Droid Sans Mono don't cover full Vietnamese charset, submit a patch and backport that patch.

1 and 2 are easy to implement but I still want to pursue 3 in addition.

lewtds commented 11 years ago

I've made a visual comparision between Source Code Pro, Droid Sans Mono and Liberation Mono: http://i.imgur.com/Tb793Wd.png

IMHO, Source Code Pro has better white balance (achieved by sacrificing diacritc marks' size and placement), more uniform character size (look at Droid's 'ư' !) and overall a more organized feel.

Despite that, Source Code Pro still needs some packaging.

fuzzysource commented 11 years ago

I support Source Code Pro. It is free font.

On Mon, Jul 15, 2013 at 3:15 PM, Trung Ngo notifications@github.com wrote:

I've made a visual comparision between Source Code Pro, Droid Sans Mono and Liberation Mono: http://i.imgur.com/Tb793Wd.png

IMHO, Source Code Pro has better white balance (achieved by sacrificing diacritc marks' size and placement), more uniform character size (look at Droid's 'ư' !) and overall a more organized feel.

Despite that, Source Code Pro needs some packaging.

— Reply to this email directly or view it on GitHubhttps://github.com/gokien/issue-tracker/issues/44#issuecomment-20956558 .

Đàm Tiến Long Email: longdt90@gmail.com Twitter: https://twitter.com/#!/fuzzysource Homepage: http://fuzzysource.github.com

lewtds commented 11 years ago

Upstream suggests using the Infinality patches. That's actually pretty cool. http://lists.freedesktop.org/archives/fontconfig/2013-July/004833.html

Btw, you guys should read the whole thread, it's pretty interesting: http://lists.freedesktop.org/archives/fontconfig/2013-July/thread.html#4833

lewtds commented 11 years ago

Thanks to @hainp, we now have Source Code Pro packaged here: https://github.com/gokien/fonts-source-code-pro. Now we still need to reorder the default matching list.

lewtds commented 11 years ago

Done: https://github.com/gokien/default-settings/commit/12b7565a690dd286802610a8898ef81896c27664