help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Font selection algorithm / how do fonts work / what do you suggest for m


From: Oleksandr Gavenko
Subject: Font selection algorithm / how do fonts work / what do you suggest for mono font?
Date: Sun, 25 Sep 2016 18:00:39 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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 <address@hidden>
  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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]