[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs do not show RU and IPA chars in monospaced font.
From: |
Oleksandr Gavenko |
Subject: |
Re: Emacs do not show RU and IPA chars in monospaced font. |
Date: |
Wed, 11 Jul 2012 00:00:42 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
On 2012-07-09, Oleksandr Gavenko wrote:
> I try set:
>
> (set-frame-font "-misc-fixed-medium-r-normal-*-13-*-*-*-*-*-iso10646-*")
>
> and for russian letter get (ugly bold large letters):
>
> xft:-Misc-Fixed-normal-normal-normal-ja-13-*-*-*-c-120-iso10646-1 (#x1FC)
>
> [SKIP]
>
> Do I need prepare bug report?
I report bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11889
After a while I read:
http://emacswiki.org/emacs/SetFonts
http://www.emacswiki.org/emacs/FontSets
http://www.emacswiki.org/emacs/DisplayingNonAsciiCharacters
and corresponding Emacs manuals.
That I leaned that I need some tools for viewing selected chars in selected
font.
For server-side fonts this can be done like:
$ xfontsel -sampleUCS 'əθʃçʧ θʒtð Hello Привет!'
For client-side font I found:
$ gucharmap
After looking for several problematic chars I found that they are missing in
13 px size for my font or look wrongly.
After playing with configurations I found font that cover all needed my me
characters.
And learned how use fontsets, here my setup:
(set-frame-font "-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
(set-fontset-font "fontset-default" 'latin
"-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
(set-fontset-font "fontset-default" 'phonetic
"-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
(set-fontset-font "fontset-default" 'cyrillic
"-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
(set-fontset-font "fontset-default" 'greek
"-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
Another quiz for me was searching of script name symbols for
'set-fontset-font'. Jumping to .c source take 'char-script-table'.
After reading manual about built-in types I get this list:
(pp (char-table-extra-slot char-script-table 0))
latin phonetic greek coptic cyrillic armenian ...
Another useful thing that help me is:
(describe-fontset "default-fontset")
(describe-fontset "standard-fontset")
(describe-fontset "startup-fontset")
So algorithm to fix font displaying simple:
* Use Emacs >= 23.x for UTF support.
* Find fonts that cover your chars (xfontsel & gucharmap).
* Set fonts as say manual. I Emacs make wrong decision for selected chars,
set font manually by 'set-fontset-font'. This func support individual char,
char range and symbolic names (which I use in this post).
================================================================
Anyone can tell me test program for client-side fonts that display string that
I pass to it? gucharmap show only individual chars (opposed to xfontsel with
'-sampleUCS'). This is inconvenient, I like to pass this string to perform
on whole text:
(defun my-print-range (start end)
(let (i)
(setq i start)
(while (< i end)
(ucs-insert i)
(setq i (1+ i))
)))
;; ASCII
(my-print-range ?\u0020 ?\u0080)
;;
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
;; Cyrillic
(my-print-range ?\u0410 ?\u0460)
;;
АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ
;; Greek
(my-print-range ?\u0391 ?\u03ca)
;; ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψω
(my-print-range ?\u0250 ?\u02d1)
;; IPA
;;
ɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏː
--
Best regards!