From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Font selection algorithm / how do fonts work / what do you suggest for mono font? Date: Sun, 25 Sep 2016 18:00:39 +0300 Organization: Oleksandr Gavenko , http://defun.work/ Message-ID: <87twd46n3c.fsf@gavenkoa.example.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1474816671 20802 195.159.176.226 (25 Sep 2016 15:17:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Sep 2016 15:17:51 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 25 17:17:47 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boBBT-0003sZ-TQ for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Sep 2016 17:17:40 +0200 Original-Received: from localhost ([::1]:39306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boBBQ-0008KJ-VE for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Sep 2016 11:17:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boAvY-0003Uv-Qe for help-gnu-emacs@gnu.org; Sun, 25 Sep 2016 11:01:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boAvU-00046n-Cm for help-gnu-emacs@gnu.org; Sun, 25 Sep 2016 11:01:11 -0400 Original-Received: from [195.159.176.226] (port=39066 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boAvU-00045h-2Y for help-gnu-emacs@gnu.org; Sun, 25 Sep 2016 11:01:08 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1boAvC-0003NY-Pz for help-gnu-emacs@gnu.org; Sun, 25 Sep 2016 17:00:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 150 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:07EhtX+39BqQNC+eVS6vQFRiIkY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Mailman-Approved-At: Sun, 25 Sep 2016 11:17:03 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111381 Archived-At: Internet full of suggestion about font selection for programmers, I'd like to mention: * http://programmingfonts.org/ * http://vim.wikia.com/wiki/The_perfect_programming_font * https://www.slant.co/topics/67/~programming-fonts * http://hivelogic.com/articles/top-10-programming-fonts/ Most today recommendations end with vector fonts which is blurry and too bold to me. I have lived with ``misc-fixes`` for a long time. It is X/Xorg core fonts: http://www.cl.cam.ac.uk/%7Emgk25/ucs-fonts.html Unicode fonts and tools for X11 (from author of misc-fixed). https://www.x.org/releases/X11R7.7/doc/xorg-docs/fonts/fonts.html Core fonts description. It covers wide range of glyphs. Really large! It is a bitmap font and usually bitmap fonts have no italic/oblique slant variations, only bold weight variation. I'd like to have italic font variation because recently came across difficulty to distinct between colors if too many colors used. With help of: $ xfontsel I found that ``terminus`` come with oblique variation. Original author refused to make oblique font: http://terminus-font.sourceforge.net/ A. No. The quality is significantly lower, and preserving the font width requires overlapping characters, which are not handled very well by X11/Xft. Anyway, the modern GUIs support automatic slanting; if you are not satisfied with it, try mkitalic from FreeBSD or bdfslant from Debian. but Debian maintainer build oblique variation: $ apt-cache show xfonts-terminus-oblique Package: xfonts-terminus-oblique (Installed) Source: xfonts-terminus Maintainer: Anton Zinoviev Description-en: Oblique version of the Terminus font This package contains oblique versions of the fonts in the package xfonts-terminus. These fonts are automatically generated and at present are not supported by the upstream maintainer. They have much lower quality than the original fonts. Nevertheless they can be useful for some programs such as GNU Emacs and XEmacs. It has low quality but better than nothing. ``adobe-courier`` have oblique slant but it lacks glyphs for many needed scrips. ================================================================ I work with ASCII, cyrillic, phonetic scripts and occasionally use greek, symbol scripts. ``misc-fixes`` covers my needs. ``adobe-courier`` have no even cyrillic. ``terminus`` have cyrillic, greek but lack phonetic and symbol. Because I need italic only for code I try to combine ``terminus`` with ``misc-fixes``: http://emacs.stackexchange.com/questions/27312/default-font-has-no-slant-italic-but-i-want-to-show-italic-text/ and even crafted working solution: (set-frame-font "-*-terminus-*-*-*--14-*-*-*-c-*-*-*") (setq-default line-spacing nil) (set-fontset-font nil 'cyrillic "-*-terminus-*-*-*--14-*-*-*-c-*-*-*") (set-fontset-font nil 'greek "-*-terminus-*-*-*--14-*-*-*-c-*-*-*") (set-fontset-font nil nil "-misc-fixed-*-*-*--13-*-*-*-*-*-*-*") (set-fontset-font nil 'phonetic "-misc-fixed-*-*-*--13-*-*-*-*-*-*-*") (set-fontset-font nil 'symbol "-misc-fixed-*-*-*--13-*-*-*-*-*-*-*") ;; MODIFIER LETTER is not present in terminus, this includes ˌːˈ characters. (set-fontset-font nil '(#x02C0 . #x02FF) "-misc-fixed-*-*-*--13-*-*-*-*-*-*-*") There are also major fond distribution: $ apt-get install xfonts-jmk (set-frame-font "-jmk-Neep-*-*-*-*-15-*-*-*-c-*-*-*") which includes missing glyphs from misc-fixed but lack slant variation. Are there any other **rich** bitmap fonts available? ================================================================ My current display has 95 DPI. Do I need to consider switching to TTF font? I like look of font from GTK menus and believe that is is "DejaVu Sans" but: (set-frame-font "DejaVu Sans Mono-10") a little bolder then "DejaVu Sans". These fonts are too blurry and bold for me: (set-frame-font "Hack-10") (set-frame-font "Terminus-12") (set-frame-font "Inconsolata-11") (set-frame-font "IBM 3270-12") (set-frame-font "Space Mono-10") Is it possible to fix blurriness by fontconfig? Thin lines in: (set-frame-font "Unifont-12") ; Lack italic (set-frame-font "Liberation Mono-11") ; Lack phonetic script (set-frame-font "FreeMono-12") >From what I see two winners for my needs: FreeMono and DejaVu Sans Mono. ================================================================ Is that true that TTF fonts should have separate italic / oblique glyphs or currect rendering engines able to make them from roman slant? I see some fonts comes as several files with names Roman/Italic/Bold/BoldItalic. But other come within single file and gucharmap show italic version of font. Do that mean that such glyphs compiled into file or freetype/etc library make them from roman? ================================================================ How can I find font width? When I played with ``terminus`` / ``misc-fixed`` fonts they have different width on other values of pxlSz in xfontsel. For monospaces fonts width should be fixed )) -- http://defun.work/