* bug#4895: 23.1; Incorrect font selected
@ 2009-11-09 19:19 Andrey Paramonov
2009-11-10 1:32 ` Kenichi Handa
0 siblings, 1 reply; 8+ messages in thread
From: Andrey Paramonov @ 2009-11-09 19:19 UTC (permalink / raw)
To: bug-gnu-emacs
To reproduce:
0) emacs -Q
My .Xresources:
emacs*font: DejaVu Sans Mono-11
1) C-x C-f titledefs.dtx (attached)
Latin characters are displayed with DejaVu Sans Mono, as expected.
Cyrillic characters are not displayed properly. This is Ok yet,
because the file is encoded in cp1251.
2) C-x RET r cp1251 RET
yes RET
Latin characters are displayed with DejaVu Sans Mono, as expected.
Cyrillic characters are displayed, but not with DejaVu Sans Mono.
Looks like they are displayed with Terminus.
3) C-x RET f utf-8 RET
C-x C-w (enter filename)
C-x C-f (new filename)
All characters are displayed with DejaVu Sans Mono, as expected.
On step 2, all characters should be displayed with DejaVu Sans Mono.
I'm ready to provide any additional info,
Andrey Paramonov
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
of 2009-09-14 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ru_RU.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
===File ~/titledefs.dtx======================
% \begin{macrocode}
%<titledefs>\ProvidesFile{titledefs.rtx}
%<*titledefs>
% \end{macrocode}
%
% \subsection{Ïîñòîÿííûå ÷àñòè çàãîëîâêîâ, òèòóëüíîãî ëèñòà è òåêñòà}
%
% \DescribeMacro{\abstractname}\index{Ìàêðîñû!\verb+\abstractname+}
% Àííîòàöèÿ
% \begin{macrocode}
\def\abstractname{\cyr\CYRA\cyrn\cyrn\cyro\cyrt\cyra\cyrc\cyri\cyrya}
% \end{macrocode}
% \DescribeMacro{\titlepagename}\index{Ìàêðîñû!\verb+\titlepagename+}
% Òèòóëüíûé ëèñò
% \begin{macrocode}
\def\titlepagename{\cyr\CYRT\cyri\cyrt\cyru\cyrl\cyrsftsn\cyrn\cyrery\cyrishrt\ %
\cyrl\cyri\cyrs\cyrt}
% \end{macrocode}
% \DescribeMacro{\keywordsname}\index{Ìàêðîñû!\verb+\keywordsname+}
% \DescribeMacro{\keywordssep}\index{Ìàêðîñû!\verb+\keywordssep+}
% \DescribeMacro{\keywordslabel}\index{Ìàêðîñû!\verb+\keywordslabel+}
% Êëþ÷åâûå ñëîâà
% \begin{macrocode}
\def\keywordsname{\cyr\CYRK\cyrk\cyryu\cyrch\cyre\cyrv\cyrery\cyre\ %
\cyrs\cyrl\cyro\cyrv\cyra}
\def\keywordssep{:}
\def\keywordslabel{\keywordsname\keywordssep}
% \end{macrocode}
% \DescribeMacro{\workname}\index{Ìàêðîñû!\verb+\workname+}
% Äèññåðòàöèÿ
% \begin{macrocode}
\def\workname{\cyr\CYRD\cyri\cyrs\cyrs\cyre\cyrr\cyrt\cyra\cyrc\cyri\cyrya}
% \end{macrocode}
% \DescribeMacro{\approved}\index{Ìàêðîñû!\verb+\approved+}
% Äèññåðòàöèÿ äîïóùåíà ê çàùèòå (çàïèñü î äîïóñêå)
% \begin{macrocode}
\def\approved{\workname\ \cyrd\cyro\cyrp\cyru\cyrshch\cyre\cyrn\cyra\ %
\cyrk\ \cyrz\cyra\cyrshch\cyri\cyrt\cyre}
% \end{macrocode}
% \DescribeMacro{\appos}\index{Ìàêðîñû!\verb+\appos+}
% Äîëæíîñòü ëèöà, äîïóñêàþùåãî ê çàùèòå
% \begin{macrocode}
\def\appos{\cyr\cyrz\cyra\cyrv.\ \cyrk\cyra\cyrf\cyre\cyrd\cyrr\cyro\cyrishrt}
% \end{macrocode}
% \DescribeMacro{\groupname}\index{Ìàêðîñû!\verb+\groupname+}
% ãð. (ãðóïïà)
% \begin{macrocode}
\def\groupname{\cyr\cyrg\cyrr.}
% \end{macrocode}
% \DescribeMacro{\topicname}\index{Ìàêðîñû!\verb+\topicname+}
% \DescribeMacro{\topicsep}\index{Ìàêðîñû!\verb+\topicsep+}
% \DescribeMacro{\topiclabel}\index{Ìàêðîñû!\verb+\topiclabel+}
% Òåìà
% \begin{macrocode}
\def\topicname{\cyr\CYRT\cyre\cyrm\cyra}
\def\topicsep{:\ }
\def\topiclabel{\topicname\topicsep}
% \end{macrocode}
% \DescribeMacro{\coursename}\index{Ìàêðîñû!\verb+\coursename+}
% \DescribeMacro{\coursesep}\index{Ìàêðîñû!\verb+\coursesep+}
% \DescribeMacro{\courselabel}\index{Ìàêðîñû!\verb+\courselabel+}
% Íàïðàâëåíèå
% \begin{macrocode}
\def\coursename{\cyr\CYRN\cyra\cyrp\cyrr\cyra\cyrv\cyrl\cyre\cyrn\cyri\cyre}
\def\coursesep{:}
\def\courselabel{\coursename\coursesep}
% \end{macrocode}
% \DescribeMacro{\specname}\index{Ìàêðîñû!\verb+\specname+}
% \DescribeMacro{\specsep}\index{Ìàêðîñû!\verb+\specsep+}
% \DescribeMacro{\speclabel}\index{Ìàêðîñû!\verb+\speclabel+}
% Ñïåöèàëüíîñòü
% \begin{macrocode}
\def\specname{%
\cyr\CYRS\cyrp\cyre\cyrc\cyri\cyra\cyrl\cyrsftsn\cyrn\cyro\cyrs\cyrt\cyrsftsn}
\def\specsep{:}
\def\speclabel{\specname\specsep}
% \end{macrocode}
% \DescribeMacro{\masterprogname}\index{Ìàêðîñû!\verb+\masterprogname+}
% \DescribeMacro{\masterprogsep}\index{Ìàêðîñû!\verb+\masterprogsep+}
% \DescribeMacro{\masterproglabel}\index{Ìàêðîñû!\verb+\masterproglabel+}
% Ìàãèñòåðñêàÿ ïðîãðàììà
% \begin{macrocode}
\def\masterprogname{%
\cyr\CYRM\cyra\cyrg\cyri\cyrs\cyrt\cyre\cyrr\cyrs\cyrk\cyra\cyrya\ %
\cyrp\cyrr\cyro\cyrg\cyrr\cyra\cyrm\cyrm\cyra}
\def\masterprogsep{:}
\def\masterproglabel{\masterprogname\masterprogsep}
% \end{macrocode}
% \DescribeMacro{\studentname}\index{Ìàêðîñû!\verb+\studentname+}
% \DescribeMacro{\studentlabel}\index{Ìàêðîñû!\verb+\studentlabel+}
% Âûïîëíèë ñòóäåíò
% \begin{macrocode}
\def\studentname{\cyr\CYRV\cyrery\cyrp\cyro\cyrl\cyrn\cyri\cyrl\ %
\cyrs\cyrt\cyru\cyrd\cyre\cyrn\cyrt}
\def\studentlabel{\studentname}
% \end{macrocode}
% \DescribeMacro{\saname}\index{Ìàêðîñû!\verb+\saname+}
% \DescribeMacro{\salabel}\index{Ìàêðîñû!\verb+\salabel+}
% Íàó÷íûé ðóêîâîäèòåëü (sa -- ñîêð. îò scientific adviser)
% \begin{macrocode}
\def\saname{\cyr\CYRN\cyra\cyru\cyrch\cyrn\cyrery\cyrishrt\ %
\cyrr\cyru\cyrk\cyro\cyrv\cyro\cyrd\cyri\cyrt\cyre\cyrl\cyrsftsn}
\def\salabel{\saname}
% \end{macrocode}
% \DescribeMacro{\revname}\index{Ìàêðîñû!\verb+\revname+}
% \DescribeMacro{\revlabel}\index{Ìàêðîñû!\verb+\revlabel+}
% Ðåöåíçåíò
% \begin{macrocode}
\def\revname{\cyr\CYRR\cyre\cyrc\cyre\cyrn\cyrz\cyre\cyrn\cyrt}
\def\revlabel{\revname}
% \end{macrocode}
% \DescribeMacro{\conname}\index{Ìàêðîñû!\verb+\conname+}
% \DescribeMacro{\conlabel}\index{Ìàêðîñû!\verb+\conlabel+}
% Êîíñóëüòàíò
% \begin{macrocode}
\def\conname{\cyr\CYRK\cyro\cyrn\cyrs\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrn\cyrt}
\def\conlabel{\conname\ \cyrp\cyro\ \@conspec}
% \end{macrocode}
% \DescribeMacro{\asmanuscriptname}\index{Ìàêðîñû!\verb+\asmanuscriptname+}
% Íà ïðàâàõ ðóêîïèñè
% \begin{macrocode}
\def\asmanuscriptname{\cyr\CYRN\cyra\ \cyrp\cyrr\cyra\cyrv\cyra\cyrh\ %
\cyrr\cyru\cyrk\cyro\cyrp\cyri\cyrs\cyri}
% \end{macrocode}
% \DescribeMacro{\libcatname}\index{Ìàêðîñû!\verb+\libcatname+}
% ÓÄÊ
% \begin{macrocode}
\def\libcatname{\cyr\CYRU\CYRD\CYRK}
% \end{macrocode}
% \DescribeMacro{\consultname}\index{Ìàêðîñû!\verb+\consultname+}
% Êîíñóëüòàíòû
% \begin{macrocode}
\def\consultname{%
\cyr\CYRK\cyro\cyrn\cyrs\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrn\cyrt\cyrery:}
% \end{macrocode}
%
% \subsection{Èíòåðôåéñ äëÿ îïðåäåëåíèÿ ýëåìåíòîâ òèòóëüíîãî ëèñòà}
%
% \DescribeMacro{\institution}\index{Ìàêðîñû!\verb*+\institution+}
% Îðãàíèçàöèÿ
% \begin{macrocode}
\def\institution#1{\gdef\@institution{#1}}\institution{}
% \end{macrocode}
%
% \DescribeMacro{\spec}\index{Ìàêðîñû!\verb*+\spec+}
% Íàçâàíèå ñïåöèàëüíîñòè
% \begin{macrocode}
\def\spec#1{\gdef\@spec{#1}}\spec{}
% \end{macrocode}
% \DescribeMacro{\specnum}\index{Ìàêðîñû!\verb*+\specnum+}
% Íîìåð ñïåöèàëüíîñòè
% \begin{macrocode}
\def\specnum#1{\gdef\@specnum{#1}}\specnum{}
% \end{macrocode}
% \DescribeMacro{\course}\index{Ìàêðîñû!\verb*+\course+}
% Íàçâàíèå íàïðàâëåíèÿ
% \begin{macrocode}
\def\course#1{\gdef\@course{#1}}\course{}
% \end{macrocode}
% \DescribeMacro{\coursenum}\index{Ìàêðîñû!\verb*+\coursenum+}
% Íîìåð íàïðàâëåíèÿ
% \begin{macrocode}
\def\coursenum#1{\gdef\@coursenum{#1}}\coursenum{}
% \end{macrocode}
% \DescribeMacro{\keywords}\index{Ìàêðîñû!\verb*+\keywords+}
% Êëþ÷åâûå ñëîâà
% \begin{macrocode}
\def\keywords#1{\gdef\@keywords{#1}}\keywords{}
% \end{macrocode}
% \DescribeMacro{\title}\index{Ìàêðîñû!\verb*+\title+}
% Çàãîëîâîê
% \begin{macrocode}
\def\title#1{\gdef\@title{#1}}\title{}
% \end{macrocode}
% \DescribeMacro{\topic}\index{Ìàêðîñû!\verb*+\topic+}
% Òåìà
% \begin{macrocode}
\def\topic#1{\gdef\@topic{#1}}\topic{}
% \end{macrocode}
% \DescribeMacro{\author}\index{Ìàêðîñû!\verb*+\author+}
% Àâòîð
% \begin{macrocode}
\def\author#1{\gdef\@author{#1}}\author{}
% \end{macrocode}
% \DescribeMacro{\city}\index{Ìàêðîñû!\verb*+\city+}
% Ãîðîä
% \begin{macrocode}
\def\city#1{\gdef\@city{#1}}\city{}
% \end{macrocode}
% \DescribeMacro{\faculty}\index{Ìàêðîñû!\verb*+\faculty+}
% Ôàêóëüòåò
% \begin{macrocode}
\def\faculty#1{\gdef\@faculty{#1}}\faculty{}
% \end{macrocode}
% \DescribeMacro{\department}\index{Ìàêðîñû!\verb*+\department+}
% êàôåäðà
% \begin{macrocode}
\def\department#1{\gdef\@department{#1}}\department{}
% \end{macrocode}
% \DescribeMacro{\apname}\index{Ìàêðîñû!\verb*+\apname+}
% ÔÈÎ ëèöà, äîïóñêàþùåãî ê çàùèòå (çàâ. êàôåäðîé)
% \begin{macrocode}
\def\apname#1{\gdef\@apname{#1}}\apname{}
% \end{macrocode}
% \DescribeMacro{\libcatnum}\index{Ìàêðîñû!\verb*+\libcatnum+}
% Íîìåð ÓÄÊ
% \begin{macrocode}
\def\libcatnum#1{\gdef\@libcatnum{#1}}\libcatnum{}
% \end{macrocode}
% \DescribeMacro{\group}\index{Ìàêðîñû!\verb*+\group+}
% Àêàäåìè÷åñêàÿ ãðóïïà
% \begin{macrocode}
\def\group#1{\gdef\@group{#1}}\group{}
% \end{macrocode}
% \DescribeMacro{\masterprognum}\index{Ìàêðîñû!\verb*+\masterprognum+}
% Íîìåð ìàãèñòåðñêîé ïðîãðàììû
% \begin{macrocode}
\def\masterprognum#1{\gdef\@masterprognum{#1}}\masterprognum{}
% \end{macrocode}
% \DescribeMacro{\masterprog}\index{Ìàêðîñû!\verb*+\masterprog+}
% Íàçâàíèå ìàãèñòåðñêîé ïðîãðàììû
% \begin{macrocode}
\def\masterprog#1{\gdef\@masterprog{#1}}\masterprog{}
% \end{macrocode}
% Çíà÷åíèå |\data| ïî óìîë÷àíèþ
% \begin{macrocode}
\date{\number\year}
% \end{macrocode}
% \DescribeMacro{\yearname}\index{Ìàêðîñû!\verb*+\yearname+}
% Ñîêðàùåíèå ãîäà <<ã.>>
% \begin{macrocode}
\def\yearname{\cyr\cyrg.}
% \end{macrocode}
% \DescribeMacro{\commonsect}\index{Ìàêðîñû!\verb*+\commonsect+}
% \DescribeMacro{\postcommonsect}\index{Ìàêðîñû!\verb*+\postcommonsect+}
% Ôîðìàò çàãîëîâêîâ îáùåãî òåêñòà <<Ââåäåíèÿ>> è àâòîðåôåðàòà.
% \begin{macrocode}
\let\commonsect=\textbf
\def\postcommonsect{\ }
% \end{macrocode}
%
% \subsubsection{Íàó÷íûé ðóêîâîäèòåëü}
% \DescribeMacro{\sa}\index{Ìàêðîñû!\verb*+\sa+}
% ÔÈÎ
% \begin{macrocode}
\def\sa#1{\gdef\@sa{#1}}\sa{}
% \end{macrocode}
% \DescribeMacro{\sastatus}\index{Ìàêðîñû!\verb*+\sastatus+}
% Ó÷¸íîå çâàíèå
% \begin{macrocode}
\def\sastatus#1{\gdef\@sastatus{#1}}\sastatus{}
% \end{macrocode}
%
% \subsubsection{Ðåöåíçåíò}
% \DescribeMacro{\rev}\index{Ìàêðîñû!\verb*+\rev+}
% ÔÈÎ
% \begin{macrocode}
\def\rev#1{\gdef\@rev{#1}}\rev{}
% \end{macrocode}
% \DescribeMacro{\revstatus}\index{Ìàêðîñû!\verb*+\revstatus+}
% ó÷¸íîå çâàíèå
% \begin{macrocode}
\def\revstatus#1{\gdef\@revstatus{#1}}\revstatus{}
% \end{macrocode}
%
% \subsubsection{Êîíñóëüòàíò}
%
% \DescribeMacro{\conspec}\index{Ìàêðîñû!\verb*+\conspec+}
% Ñïåöèàëüíîñòü
% \begin{macrocode}
\def\conspec#1{\gdef\@conspec{#1}}
% \end{macrocode}
% \DescribeMacro{\con}\index{Ìàêðîñû!\verb*+\con+}
% ÔÈÎ
% \begin{macrocode}
\def\con#1{\gdef\@con{#1}}
% \end{macrocode}
% \DescribeMacro{\constatus}\index{Ìàêðîñû!\verb*+\constatus+}
% Ó÷¸íîå çâàíèå è ñòåïåíü
% \begin{macrocode}
\def\constatus#1{\gdef\@constatus{#1}}
% \end{macrocode}
%
% \subsubsection{Íàçâàíèÿ íåíóìåðóåìûõ ãëàâ}
%
% \begin{itemize}
% \item Ñîäåðæàíèå
% \DescribeMacro{\contentsname}\index{Ìàêðîñû!\verb*+\contentsname+}
% \begin{macrocode}
\AtBeginDocument{
\addto\captionsrussian{%
\def\contentsname{\cyr\CYRS\cyro\cyrd\cyre\cyrr\cyrzh\cyra\cyrn\cyri\cyre}
}
}
% \end{macrocode}
% \item Ââåäåíèå
% \DescribeMacro{\introname}\index{Ìàêðîñû!\verb*+\introname+}
% \DescribeMacro{\intro}\index{Ìàêðîñû!\verb*+\intro+}
% \begin{macrocode}
\newcommand\introname{\cyr\CYRV\cyrv\cyre\cyrd\cyre\cyrn\cyri\cyre}
\newcommand\intro{\nchapter{\introname}}
% \end{macrocode}
% \item Çàêëþ÷åíèå
% \DescribeMacro{\conclusionname}\index{Ìàêðîñû!\verb*+\conclusionname+}
% \begin{macrocode}
\newcommand\conclusionname{%
\cyr\CYRZ\cyra\cyrk\cyrl\cyryu\cyrch\cyre\cyrn\cyri\cyre
}
\newcommand\conclusion{\nchapter{\conclusionname}}
% \end{macrocode}
% \item Ñïèñîê èñïîëüçóåìûõ îáîçíà÷åíèé
% \DescribeMacro{\defsname}\index{Ìàêðîñû!\verb*+\defsname+}
% \end{itemize}
% \begin{macrocode}
\newcommand\defsname{%
{\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk\ %
\cyri\cyrs\cyrp\cyro\cyrl\cyrsftsn\cyrz\cyru\cyre\cyrm\cyrery\cyrh\ %
\cyro\cyrb\cyro\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyri\cyrishrt}
}
\newcommand\defs{\nchapter{\defsname}}
% \end{macrocode}
% Îáçîð ëèòåðàòóðû
% \DescribeMacro{\reviewname}\index{Ìàêðîñû!\verb*+\reviewname+}
% \begin{macrocode}
\newcommand\reviewname{\cyr\CYRO\cyrb\cyrz\cyro\cyrr\ %
\cyrl\cyri\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyrery}
\newcommand\review{\nchapter{\reviewname}}
% \end{macrocode}
%
% \subsubsection{Ïîëÿ òèòóëüíîãî ëèñòà}
%
% \DescribeMacro{\field}\index{Ìàêðîñû!\verb*+\field+}
% Ôîðìàò çàïèñåé äëÿ íàó÷íîãî ðóêîâîäèòåëÿ, ðåöåíçåíòà è êîíñóëüòàíòà
% \begin{macrocode}
\def\field#1{%
\csname #1label\endcsname,\\%
\csname @#1status\endcsname\>
\makebox[8.5cm][l]{\hrulefill\ \csname @#1\endcsname}
}
% \end{macrocode}
%
% \DescribeMacro{\@approved}\index{Ìàêðîñû!\verb+"\"@approved+}
% \makeatother
% Äèññåðòàöèÿ äîïóùåíà ê çàùèòå
% \begin{macrocode}
\def\@approved{
\begin{tabbing}
\hspace{8cm}\={\approved}
\\
\>\appos
\\[9pt]
\>\makebox[8.5cm][r]{\hrulefill\ \@apname}
\\[9pt]
\>\makebox[1.5cm][r]{<<\hrulefill>>}
\makebox[7cm][r]{\hrulefill\ \@date\,\yearname}
\end{tabbing}
}
% \end{macrocode}
% \DescribeMacro{\datefield}\index{Ìàêðîñû!\verb*+\datefield+}
% Ïîëå äëÿ çàïèñè äàòû. Äëÿ îòîáðàæåíèÿ ïðîèçâîëüíîãî ãîäà íóæíî
% ïðèñâîèòü çíà÷åíèå íåîáÿçàòåëüíîìó àðãóìåíòó.
% \begin{macrocode}
\providecommand\datefield[1][\number\year]{<<\rule[0pt]{1cm}{.5pt}>>\ %
\rule[0pt]{3cm}{0.5pt}\ #1~\yearname}
% \end{macrocode}
% \DescribeMacro{\mkcommonsect}\index{Ìàêðîñû!\verb*+\mkcommonsect+}
% Ãåíåðàòîð êîìàíä äëÿ îáùåãî òåêñòà äèññåðòàöèè è àâòîðåôåðàòà.
% \begin{macrocode}
\providecommand\mkcommonsect[3]{%
\@namedef{#1head}{#2}
\@namedef{#1section}{\commonsect{\expandafter\csname #1head\endcsname}\postcommonsect}
\@namedef{#1text}{#3}
}
\let\mkintrosect=\mkcommonsect
% \end{macrocode}
% \DescribeMacro{\facsimile}\index{Ìàêðîñû!\verb*+\facsimile+}
% Êîìàíäà äëÿ âêëþ÷åíèÿ ãðàôè÷åñêîãî ôàéëà ñ ïîäïèñüþ äèññåðòàíòà.
% \begin{macrocode}
\providecommand\facsimile{\vskip 6pt\includegraphics[width=3cm]{facsimile}}
%</titledefs>
% \end{macrocode}
============================================================
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2009-11-09 19:19 bug#4895: 23.1; Incorrect font selected Andrey Paramonov
@ 2009-11-10 1:32 ` Kenichi Handa
2009-11-10 6:15 ` Андрей Парамонов
0 siblings, 1 reply; 8+ messages in thread
From: Kenichi Handa @ 2009-11-10 1:32 UTC (permalink / raw)
To: cmr.Pent, 4895; +Cc: bug-gnu-emacs
In article <E1N7Zlb-0006fY-GR@neo.paramonovs>, Andrey Paramonov <pent@aparamon.msk.ru> writes:
> 0) emacs -Q
> My .Xresources:
> emacs*font: DejaVu Sans Mono-11
> 1) C-x C-f titledefs.dtx (attached)
> Latin characters are displayed with DejaVu Sans Mono, as expected.
> Cyrillic characters are not displayed properly. This is Ok yet,
> because the file is encoded in cp1251.
> 2) C-x RET r cp1251 RET
> yes RET
> Latin characters are displayed with DejaVu Sans Mono, as expected.
> Cyrillic characters are displayed, but not with DejaVu Sans Mono.
> Looks like they are displayed with Terminus.
This is because Emacs prefers a font whose registry matches
with `charset' text property.
In the above case, the default fontset has this entry for
cyrillic:
(cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic)
(nil . "ISO8859-5")
(nil . "microsoft-cp1251")
(nil . "koi8-r"))
and when you read a file with cp1251, the charset property
`cp1251' is put on the buffer text. Thus the font-selector
prefers a font whose registry is "microsoft-cp1251".
If you prefer cyrillic characters to be displayed by the
default font, you can do this in .emacs:
(set-fontset-font "fontset-default" 'cyrillic
(font-spec :registry "iso10646-1" :script 'cyrillic))
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2009-11-10 1:32 ` Kenichi Handa
@ 2009-11-10 6:15 ` Андрей Парамонов
2009-11-10 8:10 ` Kenichi Handa
0 siblings, 1 reply; 8+ messages in thread
From: Андрей Парамонов @ 2009-11-10 6:15 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 4895
Hello!
2009/11/10 Kenichi Handa <handa@m17n.org>:
> This is because Emacs prefers a font whose registry matches
> with `charset' text property.
>
> In the above case, the default fontset has this entry for
> cyrillic:
>
> (cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic)
> (nil . "ISO8859-5")
> (nil . "microsoft-cp1251")
> (nil . "koi8-r"))
>
> and when you read a file with cp1251, the charset property
> `cp1251' is put on the buffer text. Thus the font-selector
> prefers a font whose registry is "microsoft-cp1251".
>
> If you prefer cyrillic characters to be displayed by the
> default font, you can do this in .emacs:
>
> (set-fontset-font "fontset-default" 'cyrillic
> (font-spec :registry "iso10646-1" :script 'cyrillic))
>
Thanks for the explanation. Do you think it's still valid not to
prefer unicode fonts to fonts with specific registries? I believe the
unicode is dominating by now, at least for european languages.
Andrey Paramonov
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2009-11-10 6:15 ` Андрей Парамонов
@ 2009-11-10 8:10 ` Kenichi Handa
2009-11-11 10:45 ` Juri Linkov
0 siblings, 1 reply; 8+ messages in thread
From: Kenichi Handa @ 2009-11-10 8:10 UTC (permalink / raw)
To: Андрей Парамонов
Cc: 4895
In article <5f0660120911092215v48f00477l5f2c68855507ab4b@mail.gmail.com>, =?UTF-8?B?0JDQvdC00YDQtdC5INCf0LDRgNCw0LzQvtC90L7Qsg==?= <cmr.pent@gmail.com> writes:
> Thanks for the explanation. Do you think it's still valid not to
> prefer unicode fonts to fonts with specific registries? I believe the
> unicode is dominating by now, at least for european languages.
I'm not sure. At least, a while ago, bitmap fonts of legacy
registries (e.g. iso8859-X, koi8, etc) are better than
unicode bitmap fonts. I think using cp1251 fonts for
cp1251-encoded file is a good default even now. First of
all, if unicode is dominating by now, the chance of reading
cp1251 files should be rare.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2009-11-10 8:10 ` Kenichi Handa
@ 2009-11-11 10:45 ` Juri Linkov
2012-07-09 5:26 ` Chong Yidong
0 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2009-11-11 10:45 UTC (permalink / raw)
To: Kenichi Handa; +Cc: 4895, cmr.pent
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
>> Thanks for the explanation. Do you think it's still valid not to
>> prefer unicode fonts to fonts with specific registries? I believe the
>> unicode is dominating by now, at least for european languages.
>
> I'm not sure. At least, a while ago, bitmap fonts of legacy
> registries (e.g. iso8859-X, koi8, etc) are better than
> unicode bitmap fonts. I think using cp1251 fonts for
> cp1251-encoded file is a good default even now. First of
> all, if unicode is dominating by now, the chance of reading
> cp1251 files should be rare.
Unfortunately, cp1251 is still common in the documents created on
Windows. Opening such documents in Emacs on GNU/Linux often results
in a very ugly look, especially when cp1251 text is surrounded
by Latin or Unicode characters. Unicode fonts are well developed and
maintained unlike legacy cp1251 fonts that are less relevant nowadays.
Please see in the attached screenshot from part of etc/HELLO
how ugly it looks with default cp1251 and koi8-r fonts
when other text uses Unicode fonts:
[-- Attachment #2: ugly-fonts.png --]
[-- Type: image/png, Size: 36296 bytes --]
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
IIUC other applications allow font configuration based on a language
or a script that is more important for the user than a technical detail
like a charset. And they use the same Unicode font by default.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2009-11-11 10:45 ` Juri Linkov
@ 2012-07-09 5:26 ` Chong Yidong
2012-07-09 8:10 ` Juri Linkov
2012-07-09 16:41 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Chong Yidong @ 2012-07-09 5:26 UTC (permalink / raw)
To: Juri Linkov; +Cc: 4895, cmr.pent, Kenichi Handa
Juri Linkov <juri@jurta.org> writes:
>>> Thanks for the explanation. Do you think it's still valid not to
>>> prefer unicode fonts to fonts with specific registries? I believe the
>>> unicode is dominating by now, at least for european languages.
>>
>> I'm not sure. At least, a while ago, bitmap fonts of legacy
>> registries (e.g. iso8859-X, koi8, etc) are better than
>> unicode bitmap fonts. I think using cp1251 fonts for
>> cp1251-encoded file is a good default even now. First of
>> all, if unicode is dominating by now, the chance of reading
>> cp1251 files should be rare.
>
> Unfortunately, cp1251 is still common in the documents created on
> Windows. Opening such documents in Emacs on GNU/Linux often results
> in a very ugly look, especially when cp1251 text is surrounded
> by Latin or Unicode characters. Unicode fonts are well developed and
> maintained unlike legacy cp1251 fonts that are less relevant nowadays.
Presumably, unicode fonts should have even better coverage now than
three years ago, when this discussion first took place. Any objections
to making the switch?
Also, where in the code does this
>> when you read a file with cp1251, the charset property
>> `cp1251' is put on the buffer text. Thus the font-selector
>> prefers a font whose registry is "microsoft-cp1251".
occur? I took a quick look at the documentation, e.g. the docstring of
new-fontset, and couldn't find the explanation of how the font-selector
chooses the font to use from the list of font specifications. If the
list of font specifications is not given in order of priority, that
should be clearly explained somewhere.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2012-07-09 5:26 ` Chong Yidong
@ 2012-07-09 8:10 ` Juri Linkov
2012-07-09 16:41 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2012-07-09 8:10 UTC (permalink / raw)
To: Chong Yidong; +Cc: 4895, cmr.pent, Kenichi Handa
> Presumably, unicode fonts should have even better coverage now than
> three years ago, when this discussion first took place. Any objections
> to making the switch?
Yes, the current situation is better than three years ago because
there are less cp1251 fonts on GNU/Linux installations, and more fonts
with wider charset coverage that have the same look for different
charsets, so a charset selected by font-selector matters less now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4895: 23.1; Incorrect font selected
2012-07-09 5:26 ` Chong Yidong
2012-07-09 8:10 ` Juri Linkov
@ 2012-07-09 16:41 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2012-07-09 16:41 UTC (permalink / raw)
To: Chong Yidong; +Cc: 4895, cmr.pent, handa
> From: Chong Yidong <cyd@gnu.org>
> Date: Mon, 09 Jul 2012 13:26:55 +0800
> Cc: 4895@debbugs.gnu.org, cmr.pent@gmail.com, Kenichi Handa <handa@m17n.org>
>
> Also, where in the code does this
>
> >> when you read a file with cp1251, the charset property
> >> `cp1251' is put on the buffer text. Thus the font-selector
> >> prefers a font whose registry is "microsoft-cp1251".
>
> occur?
decode_coding calls produce_annotation that calls produce_charset,
which puts the 'charset' text property on the decoded text.
Then font_for_char uses this property to get the charset ID with which
it calls fontset_font, which in turn calls fontset_find_font, which
prefers fonts whose repertory matches that ID.
> I took a quick look at the documentation, e.g. the docstring of
> new-fontset, and couldn't find the explanation of how the
> font-selector chooses the font to use from the list of font
> specifications. If the list of font specifications is not given in
> order of priority, that should be clearly explained somewhere.
The documentation of fontset stuff could use a lot of improvement.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-07-09 16:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 19:19 bug#4895: 23.1; Incorrect font selected Andrey Paramonov
2009-11-10 1:32 ` Kenichi Handa
2009-11-10 6:15 ` Андрей Парамонов
2009-11-10 8:10 ` Kenichi Handa
2009-11-11 10:45 ` Juri Linkov
2012-07-09 5:26 ` Chong Yidong
2012-07-09 8:10 ` Juri Linkov
2012-07-09 16:41 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.