* Russian numero sign
@ 2006-02-19 12:31 Paul Pogonyshev
2006-02-20 14:07 ` Benjamin Riefenstahl
2006-02-23 7:52 ` Kenichi Handa
0 siblings, 2 replies; 17+ messages in thread
From: Paul Pogonyshev @ 2006-02-19 12:31 UTC (permalink / raw)
Activate `russian-computer' input method and type S-3 (i.e. the hash
sign on US English layout.) This inputs Russian numero sign, which
looks like capital latin `N' with a small underlined circle by the
right side. (AFAIK, it was also used in French typography before.)
Now, Emacs puts this character in the buffer (output of
`describe-char'):
character: � (3696, #o7160, #xe70)
charset: cyrillic-iso8859-5 (Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144.)
code point: #x70
syntax: . which means: punctuation
category: y:Cyrillic
to input: type "#" with russian-computer
buffer code: #x8C #xF0
file code: not encodable by coding system mule-utf-8-unix
display: by this font (glyph code)
-ETL-fixed-medium-r-normal--16-160-72-72-C-80-ISO8859-5 (#xF0)
Which means that you cannot save this character into an UTF-8 file
even though UTF-8 is meant to be able to encode anything in Unicode.
There is actually a Unicode character `numero sign', U+2116, which I
can type in other desktop applications (probably through XIM) by
the same Shift-3 combo with Russian layout. When copied into Emacs,
this character is displayed as a box (i.e. no glyph for it is found)
and is described like this:
character: № (342742, #o1235326, #x53ad6, U+2116)
charset: mule-unicode-0100-24ff (Unicode characters of the range U+0100..U+24FF.)
code point: #x75 #x56
syntax: w which means: word
buffer code: #x9C #xF4 #xF5 #xD6
file code: #xE2 #x84 #x96 (encoded by coding system mule-utf-8-unix)
display: by this font (glyph code)
-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1 (#x2116)
So, is there an easy way to fix Emacs to input the Unicode character
instead of that 3696 or make them same character somehow? It is kind
of annoying that I cannot input the numero sign in an UTF-8 buffer
even though I have a key for it on the keyboard. I don't really care
if the glyph is not found, it is probably a deficiency in the font,
not Emacs, but I think UTF-8 unencodable characters is something that
should not exist at all, especially when you have the corresponding
Unicode character.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Russian numero sign
2006-02-19 12:31 Russian numero sign Paul Pogonyshev
@ 2006-02-20 14:07 ` Benjamin Riefenstahl
2006-02-22 19:49 ` Paul Pogonyshev
2006-02-23 15:22 ` Stefan Monnier
2006-02-23 7:52 ` Kenichi Handa
1 sibling, 2 replies; 17+ messages in thread
From: Benjamin Riefenstahl @ 2006-02-20 14:07 UTC (permalink / raw)
Cc: emacs-devel
Hi Paul,
Paul Pogonyshev writes:
> Activate `russian-computer' input method and type S-3 (i.e. the hash
> sign on US English layout.)
> [...]
> character: � (3696, #o7160, #xe70)
> charset: cyrillic-iso8859-5 [...]
> [...]
> There is actually a Unicode character `numero sign', U+2116, which I
> can type in other desktop applications (probably through XIM)
> [...]
> character: № (342742, #o1235326, #x53ad6, U+2116)
> charset: mule-unicode-0100-24ff [...]
Try unify-8859-on-decoding-mode, which changes the behaviour of your
input method.
Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5
is preserved during input, but still can be saved as UTF-8. Of course
you get UTF-8 when you load the file again, so you will need font
support for that anyway.
benny
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Russian numero sign
2006-02-20 14:07 ` Benjamin Riefenstahl
@ 2006-02-22 19:49 ` Paul Pogonyshev
2006-02-24 12:18 ` Benjamin Riefenstahl
2006-02-23 15:22 ` Stefan Monnier
1 sibling, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-02-22 19:49 UTC (permalink / raw)
Cc: Benjamin Riefenstahl
Benjamin Riefenstahl wrote:
> > Activate `russian-computer' input method and type S-3 (i.e. the hash
> > sign on US English layout.)
> > [...]
> > character: � (3696, #o7160, #xe70)
> > charset: cyrillic-iso8859-5 [...]
>
> > [...]
> > There is actually a Unicode character `numero sign', U+2116, which I
> > can type in other desktop applications (probably through XIM)
> > [...]
> > character: № (342742, #o1235326, #x53ad6, U+2116)
> > charset: mule-unicode-0100-24ff [...]
>
> Try unify-8859-on-decoding-mode, which changes the behaviour of your
> input method.
>
> Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5
> is preserved during input, but still can be saved as UTF-8. Of course
> you get UTF-8 when you load the file again, so you will need font
> support for that anyway.
With `unify-8859-on-decoding-mode' I get squares instead of letters (no
glyphs in the font, apparently), the second one seems to work perfectly.
Any reason it is not the default?
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Russian numero sign
2006-02-19 12:31 Russian numero sign Paul Pogonyshev
2006-02-20 14:07 ` Benjamin Riefenstahl
@ 2006-02-23 7:52 ` Kenichi Handa
2006-02-23 20:37 ` Pango-like font fallback (was Re: Russian numero sign) Paul Pogonyshev
1 sibling, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-02-23 7:52 UTC (permalink / raw)
Cc: emacs-devel
In article <200602191431.36541.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
> character: � (3696, #o7160, #xe70)
> charset: cyrillic-iso8859-5 (Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144.)
> code point: #x70
> syntax: . which means: punctuation
> category: y:Cyrillic
> to input: type "#" with russian-computer
> buffer code: #x8C #xF0
> file code: not encodable by coding system mule-utf-8-unix
> display: by this font (glyph code)
> -ETL-fixed-medium-r-normal--16-160-72-72-C-80-ISO8859-5 (#xF0)
This is very strange.
Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:
[...]
> Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5
> is preserved during input, but still can be saved as UTF-8.
But, unify-8859-on-encoding-mode should be on by default (at
least with CVS HEAD emacs).
Paul, do you turn it off intentionally? Can you reproduce
this problem by starting your emacs with "-Q"?
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Russian numero sign
2006-02-20 14:07 ` Benjamin Riefenstahl
2006-02-22 19:49 ` Paul Pogonyshev
@ 2006-02-23 15:22 ` Stefan Monnier
1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2006-02-23 15:22 UTC (permalink / raw)
> Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5
unify-8859-on-encoding-mode is already turned ON by default.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Pango-like font fallback (was Re: Russian numero sign)
2006-02-23 7:52 ` Kenichi Handa
@ 2006-02-23 20:37 ` Paul Pogonyshev
2006-02-24 1:30 ` Kenichi Handa
0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-02-23 20:37 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200602191431.36541.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> > character: � (3696, #o7160, #xe70)
> > charset: cyrillic-iso8859-5 (Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144.)
> > code point: #x70
> > syntax: . which means: punctuation
> > category: y:Cyrillic
> > to input: type "#" with russian-computer
> > buffer code: #x8C #xF0
> > file code: not encodable by coding system mule-utf-8-unix
> > display: by this font (glyph code)
> > -ETL-fixed-medium-r-normal--16-160-72-72-C-80-ISO8859-5 (#xF0)
>
> This is very strange.
>
> Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:
> [...]
> > Alternatively use unify-8859-on-encoding-mode, than cyrillic-iso8859-5
> > is preserved during input, but still can be saved as UTF-8.
>
> But, unify-8859-on-encoding-mode should be on by default (at
> least with CVS HEAD emacs).
>
> Paul, do you turn it off intentionally? Can you reproduce
> this problem by starting your emacs with "-Q"?
Uh, indeed. I think I turned it off because of poor support of
Cyrillic characters by the fonts... If I start it with `-Q',
the numero sign is automatically encodable in UTF-8 as it
should be, but the Cyrillic characters appear as boxes which is
of course even worse for me.
I wonder if Emacs could implement some smart font substitution
when a glyph is not available in a font. You can see what I
mean in e.g. recent `gnome-character-map' (it actually seems to
be a very nice trait of all GTK+/Pango programs.) My `standard'
desktop font is Bitstream Vera Sans and all common characters
are displayed in this font in GNOME Character Map. However,
certain characters are displayed in other fonts, presumably
because glyphs for them are missed from Bitstream Vera Sans.
Now, if I create a string of symbols in the Character Map and
copy it into another program, I get these results:
* GTK+ (hence Pango) programs: symbols that are displayed OK
in the Map are displayed OK here too.
* KDE/Qt programs: symbols that are displayed with the Bitstream
font in the Character Map are displayed OK (my KDE is
configured with Bitstream Vera Sans as default too), other
symbols (drawn with different fonts in the Map) are shown as
boxes. Apparently, Qt lacks font substitution just as Emacs.
* Emacs is the worst, since it uses `adobe-courier'.
So I think Pango fallback mechanism is great since many fonts
are really poor wrt number of provided glyphs. It would be
really nice if Emacs could use something symilar or even relay
font/glyph-related tasks to Pango. Not in the upcoming release,
of course, but I think it is one of the areas where improvement
is certainly needed.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-02-23 20:37 ` Pango-like font fallback (was Re: Russian numero sign) Paul Pogonyshev
@ 2006-02-24 1:30 ` Kenichi Handa
2006-03-05 20:31 ` Paul Pogonyshev
0 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-02-24 1:30 UTC (permalink / raw)
Cc: emacs-devel
In article <200602232237.54975.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> But, unify-8859-on-encoding-mode should be on by default (at
>> least with CVS HEAD emacs).
>>
>> Paul, do you turn it off intentionally? Can you reproduce
>> this problem by starting your emacs with "-Q"?
> Uh, indeed. I think I turned it off because of poor support of
> Cyrillic characters by the fonts... If I start it with `-Q',
> the numero sign is automatically encodable in UTF-8 as it
> should be, but the Cyrillic characters appear as boxes which is
> of course even worse for me.
unify-8859-on-encoding-mode is not relevant how to read (or
decode) Cyrillic characters encoded in UTF-8, nor how to
display Cyrillic characters decoded into
mule-unicode-0100-24ff charset.
Do you really mean that you solved the display problem by
turning it off?
Anyway, your display problem is because of your
adobe-courier-*-iso10646-1 font doesn't support Cyrillic
characters.
Please try to select "fontset->standard" by shift-mouse1.
It makes "fixed" the default family, thus has the higher
possibility of selecting an iso10646-1 font that support
Cyrillic.
If that doesn't help, or you don't want "fixed" the default
family, please find a family name of an iso10646-1 font that
support Cyrillic, and try this:
(set-fontset-font
"fontset-default"
'mule-unicode-0100-24ff
'("_HERE_COMES_FAMILY_NAME_" . "iso10646-1"))
> I wonder if Emacs could implement some smart font substitution
> when a glyph is not available in a font.
I implemented such a feature fairly long ago in
emacs-unicode-2 branch. Unfortunately, Emacs of CVS HEAD
lacks infrastructure to support it.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Russian numero sign
2006-02-22 19:49 ` Paul Pogonyshev
@ 2006-02-24 12:18 ` Benjamin Riefenstahl
0 siblings, 0 replies; 17+ messages in thread
From: Benjamin Riefenstahl @ 2006-02-24 12:18 UTC (permalink / raw)
Cc: emacs-devel
Hi Paul,
> Benjamin Riefenstahl wrote:
>> Alternatively use unify-8859-on-encoding-mode, than
>> cyrillic-iso8859-5 is preserved during input, but still can be
>> saved as UTF-8. Of course you get UTF-8 when you load the file
>> again, so you will need font support for that anyway.
Paul Pogonyshev writes:
> With `unify-8859-on-decoding-mode' I get squares instead of letters
> (no glyphs in the font, apparently), the second one seems to work
> perfectly.
Does it show the text, when you kill the buffer and re-load the saved
UTF-8 file?
> Any reason it is not the default?
It seems to be the default on my system but that may be because I use
a CVS version or because of my environment.
benny
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-02-24 1:30 ` Kenichi Handa
@ 2006-03-05 20:31 ` Paul Pogonyshev
2006-03-07 5:11 ` Kenichi Handa
0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-03-05 20:31 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200602232237.54975.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> >> But, unify-8859-on-encoding-mode should be on by default (at
> >> least with CVS HEAD emacs).
> >>
> >> Paul, do you turn it off intentionally? Can you reproduce
> >> this problem by starting your emacs with "-Q"?
>
> > Uh, indeed. I think I turned it off because of poor support of
> > Cyrillic characters by the fonts... If I start it with `-Q',
> > the numero sign is automatically encodable in UTF-8 as it
> > should be, but the Cyrillic characters appear as boxes which is
> > of course even worse for me.
>
> unify-8859-on-encoding-mode is not relevant how to read (or
> decode) Cyrillic characters encoded in UTF-8, nor how to
> display Cyrillic characters decoded into
> mule-unicode-0100-24ff charset.
>
> Do you really mean that you solved the display problem by
> turning it off?
No, there is a misundestanding. I meant `unify-8859-on-decoding'.
In general, Emacs shows most basic characters OK with unify-on-encoding
turned on and unify-on-decoding off, it's not like I need fancy
characters regularly. However, Pango sure does a nicer job and I hope
your changes doing similar things get merged into the Emacs trunk. That
is, if another stable version is ever released.
> Please try to select "fontset->standard" by shift-mouse1.
> It makes "fixed" the default family, thus has the higher
> possibility of selecting an iso10646-1 font that support
> Cyrillic.
This doesn't seem to have any effect. The screen flickers but displays
exactly the same fonts, no matter what I choose in the menus. Probably
because I have customized faces, not sure.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-05 20:31 ` Paul Pogonyshev
@ 2006-03-07 5:11 ` Kenichi Handa
2006-03-07 20:39 ` Paul Pogonyshev
0 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-03-07 5:11 UTC (permalink / raw)
Cc: emacs-devel
In article <200603052231.29806.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> unify-8859-on-encoding-mode is not relevant how to read (or
>> decode) Cyrillic characters encoded in UTF-8, nor how to
>> display Cyrillic characters decoded into
>> mule-unicode-0100-24ff charset.
>>
>> Do you really mean that you solved the display problem by
>> turning it off?
> No, there is a misundestanding. I meant `unify-8859-on-decoding'.
So, you turned off unify-8859-on-decoding to solve the
display problem, right?
Then I think the reason why you can't see Cyrillic
characters while unify-8859-on-decoding is on is that your
-adobe-courier-*-iso10646-1 font doesn't contain Cyrillic
glyphs.
> In general, Emacs shows most basic characters OK with unify-on-encoding
> turned on and unify-on-decoding off, it's not like I need fancy
> characters regularly. However, Pango sure does a nicer job and I hope
> your changes doing similar things get merged into the Emacs trunk. That
> is, if another stable version is ever released.
Please note that Pango and the other modern rendering
engines use TrueType font with a help of freetype/Xft and
fontconfig libraries. Emacs (and emacs-unicode-2 too)
currently doesn't use them, but there exists an ongoing
project for supporting TTF in Emacs.
>> Please try to select "fontset->standard" by shift-mouse1.
>> It makes "fixed" the default family, thus has the higher
>> possibility of selecting an iso10646-1 font that support
>> Cyrillic.
> This doesn't seem to have any effect. The screen flickers
> but displays exactly the same fonts, no matter what I
> choose in the menus. Probably because I have customized
> faces, not sure.
First of all, do you have any iso10646-1 X core fonts that
support Cyrillic characters?
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-07 5:11 ` Kenichi Handa
@ 2006-03-07 20:39 ` Paul Pogonyshev
2006-03-08 1:55 ` Kenichi Handa
0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-03-07 20:39 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200603052231.29806.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> >> unify-8859-on-encoding-mode is not relevant how to read (or
> >> decode) Cyrillic characters encoded in UTF-8, nor how to
> >> display Cyrillic characters decoded into
> >> mule-unicode-0100-24ff charset.
> >>
> >> Do you really mean that you solved the display problem by
> >> turning it off?
>
> > No, there is a misundestanding. I meant `unify-8859-on-decoding'.
>
> So, you turned off unify-8859-on-decoding to solve the
> display problem, right?
Yes. When it is off, newly typed Cyrillic characters are displayed OK.
When it is on, newly typed characters are displayed as boxes, even if
the buffer visiting an UTF-8 file already contains properly displayed
Cyrillic characters.
> Then I think the reason why you can't see Cyrillic
> characters while unify-8859-on-decoding is on is that your
> -adobe-courier-*-iso10646-1 font doesn't contain Cyrillic
> glyphs.
Yeah, I suspected that all the way :) However, Emacs can do nothing
about the fact that the fonts out there don't provide support for all
the Unicode characters (and most fonts actually provide support for
only a tiny fraction of characters...) Emacs could, however, use
multiple fonts to alleviate the problem, that's what I'm proposing
(for a future version.)
> > In general, Emacs shows most basic characters OK with unify-on-encoding
> > turned on and unify-on-decoding off, it's not like I need fancy
> > characters regularly. However, Pango sure does a nicer job and I hope
> > your changes doing similar things get merged into the Emacs trunk. That
> > is, if another stable version is ever released.
>
> Please note that Pango and the other modern rendering
> engines use TrueType font with a help of freetype/Xft and
> fontconfig libraries. Emacs (and emacs-unicode-2 too)
> currently doesn't use them, but there exists an ongoing
> project for supporting TTF in Emacs.
That is a valid reason why Emacs cannot use Pango (yet), but it
doesn't mean Emacs cannot implement similar substitution heuristic
without Pango and for a different font class. As I understand, you
did that in the `emacs-unicode-2' branch. It is not something simple,
but Emacs is not simple to begin with.
> >> Please try to select "fontset->standard" by shift-mouse1.
> >> It makes "fixed" the default family, thus has the higher
> >> possibility of selecting an iso10646-1 font that support
> >> Cyrillic.
>
> > This doesn't seem to have any effect. The screen flickers
> > but displays exactly the same fonts, no matter what I
> > choose in the menus. Probably because I have customized
> > faces, not sure.
>
> First of all, do you have any iso10646-1 X core fonts that
> support Cyrillic characters?
No idea, sorry. How do I check? As I wrote above, Emacs does
display Cyrillic characters (newly typed) when `unify-8859-on-decoding'
is off. And already existing characters are displayed no matter if
that mode is active or not.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-07 20:39 ` Paul Pogonyshev
@ 2006-03-08 1:55 ` Kenichi Handa
2006-03-08 18:16 ` Paul Pogonyshev
0 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-03-08 1:55 UTC (permalink / raw)
Cc: emacs-devel
Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> Please note that Pango and the other modern rendering
>> engines use TrueType font with a help of freetype/Xft and
>> fontconfig libraries. Emacs (and emacs-unicode-2 too)
>> currently doesn't use them, but there exists an ongoing
>> project for supporting TTF in Emacs.
> That is a valid reason why Emacs cannot use Pango (yet), but it
> doesn't mean Emacs cannot implement similar substitution heuristic
> without Pango and for a different font class. As I understand, you
> did that in the `emacs-unicode-2' branch. It is not something simple,
> but Emacs is not simple to begin with.
I drastically changed the internal structure of fontset in
emacs-unicode-2. We can't do such a change for the HEAD
(which will be the next release, I hope, soon).
>> First of all, do you have any iso10646-1 X core fonts that
>> support Cyrillic characters?
> No idea, sorry. How do I check? As I wrote above, Emacs does
> display Cyrillic characters (newly typed) when `unify-8859-on-decoding'
> is off. And already existing characters are displayed no matter if
> that mode is active or not.
% xlsfonts -fn -*-*-medium-r-normal-*-*-*-*-*-*-*-iso10646-1
gives you a list of iso10646-1 X core fonts usable from
Emacs. For instance, if this font is found...
-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
% xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
shows you the supported glyphs. Please check the block
0x000400. If you see cyrillic glyphs there, that font is
what you need. You can do this to use that font.
(set-fontset-font
"fontset-default"
'mule-unicode-0100-24ff
'("FOUNDRY-FAMILY" . "iso10646-1"))
Here FOUNDRY-FAMILY is misc-fixed in the above case.
If you surely don't have a proper iso10646-1 font, the next
method you can try is to customize utf-fragment-on-decoding
to t. Even with the default setting of
unify-8859-on-decoding/off and unify-8859-on-encoding/on, if
utf-fragment-on-decoding is on, when you read an utf-8
cyrillic file, characters and decoded into
cyrillic-iso8859-5 charsets, thus you should see glyphs with
your iso8859-5 fonts.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-08 1:55 ` Kenichi Handa
@ 2006-03-08 18:16 ` Paul Pogonyshev
2006-03-14 2:27 ` Kenichi Handa
0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-03-08 18:16 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> >> Please note that Pango and the other modern rendering
> >> engines use TrueType font with a help of freetype/Xft and
> >> fontconfig libraries. Emacs (and emacs-unicode-2 too)
> >> currently doesn't use them, but there exists an ongoing
> >> project for supporting TTF in Emacs.
>
> > That is a valid reason why Emacs cannot use Pango (yet), but it
> > doesn't mean Emacs cannot implement similar substitution heuristic
> > without Pango and for a different font class. As I understand, you
> > did that in the `emacs-unicode-2' branch. It is not something simple,
> > but Emacs is not simple to begin with.
>
> I drastically changed the internal structure of fontset in
> emacs-unicode-2. We can't do such a change for the HEAD
> (which will be the next release, I hope, soon).
Right, I mentioned in some of the previous messages that I'm not
proposing this for HEAD.
> >> First of all, do you have any iso10646-1 X core fonts that
> >> support Cyrillic characters?
>
> > No idea, sorry. How do I check? As I wrote above, Emacs does
> > display Cyrillic characters (newly typed) when `unify-8859-on-decoding'
> > is off. And already existing characters are displayed no matter if
> > that mode is active or not.
>
> % xlsfonts -fn -*-*-medium-r-normal-*-*-*-*-*-*-*-iso10646-1
>
> gives you a list of iso10646-1 X core fonts usable from
> Emacs. For instance, if this font is found...
> -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
>
> % xfd -fn -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
>
> shows you the supported glyphs. Please check the block
> 0x000400. If you see cyrillic glyphs there, that font is
> what you need. You can do this to use that font.
>
> [...]
Yes, I have Cyrillic characters in misc-fixed and don't have them in
adobe-courier.
I went to install all the fonts I could find in my Debian Sarge. And
found cronyx-courier font, which looks nice _and_ has Cyrillic
characters. However, when I customize the default face in Emacs and
set that font family, latin characters are still displayed in
adobe-courier (though Cyrillic ones are shown in cronyx-courier)...
And the customization doesn't take any effect after I restart Emacs...
Any ideas?
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-08 18:16 ` Paul Pogonyshev
@ 2006-03-14 2:27 ` Kenichi Handa
2006-06-04 10:56 ` Paul Pogonyshev
0 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-03-14 2:27 UTC (permalink / raw)
Cc: emacs-devel
In article <200603082016.37147.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
> I went to install all the fonts I could find in my Debian Sarge. And
> found cronyx-courier font, which looks nice _and_ has Cyrillic
> characters. However, when I customize the default face in Emacs and
> set that font family, latin characters are still displayed in
> adobe-courier (though Cyrillic ones are shown in cronyx-courier)...
> And the customization doesn't take any effect after I restart Emacs...
> Any ideas?
Perhaps that because you don't have
-cronyx-courier-...-iso8859-1. Emacs by default uses an
iso8859-1 font for ASCII. To change it, you must create a
proper fontset by one of these ways:
(1) In your .emacs:
(create-fontset-from-fontset-spec
"-cronyx-courier-medium-r-normal--17-*-*-*-m-*-fontset-cronyx17,
ascii:-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
Then, after you start Emacs, by selecting fontset-cronyx17
with s-mouse-1->fontset->cronyx17, Emacs change the default
fonts to cronyx-courier.
(2) Setting X resource:
When you set these resources,
Emacs.Fontset-0: -cronyx-courier-medium-r-normal--17-*-*-*-m-*-fontset-cronyx17,\
!ascii:-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1
Emacs.Font: fontset-cronyx17
you can start emacs automatically with a proper font.
Another one time way is to start Emacs as this:
% emacs -fn -cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-03-14 2:27 ` Kenichi Handa
@ 2006-06-04 10:56 ` Paul Pogonyshev
2006-06-05 12:56 ` Kenichi Handa
0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2006-06-04 10:56 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200603082016.37147.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> > I went to install all the fonts I could find in my Debian Sarge. And
> > found cronyx-courier font, which looks nice _and_ has Cyrillic
> > characters. However, when I customize the default face in Emacs and
> > set that font family, latin characters are still displayed in
> > adobe-courier (though Cyrillic ones are shown in cronyx-courier)...
> > And the customization doesn't take any effect after I restart Emacs...
> > Any ideas?
>
> Perhaps that because you don't have
> -cronyx-courier-...-iso8859-1. Emacs by default uses an
> iso8859-1 font for ASCII. To change it, you must create a
> proper fontset by one of these ways:
>
> (1) In your .emacs:
>
> (create-fontset-from-fontset-spec
> "-cronyx-courier-medium-r-normal--17-*-*-*-m-*-fontset-cronyx17,
> ascii:-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
Maybe too late to answer, but I solved it by adding the code above
and
(setq default-frame-alist
(cons (cons 'font
"-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
default-frame-alist))
in my `.emacs'.
Thanks.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-06-04 10:56 ` Paul Pogonyshev
@ 2006-06-05 12:56 ` Kenichi Handa
2006-06-05 14:07 ` Paul Pogonyshev
0 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2006-06-05 12:56 UTC (permalink / raw)
Cc: emacs-devel
In article <200606041356.41617.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> (1) In your .emacs:
>>
>> (create-fontset-from-fontset-spec
>> "-cronyx-courier-medium-r-normal--17-*-*-*-m-*-fontset-cronyx17,
>> ascii:-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
> Maybe too late to answer, but I solved it by adding the code above
> and
> (setq default-frame-alist
> (cons (cons 'font
> "-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
> default-frame-alist))
> in my `.emacs'.
Do you mean that the methods I suggested didn't work?
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Pango-like font fallback (was Re: Russian numero sign)
2006-06-05 12:56 ` Kenichi Handa
@ 2006-06-05 14:07 ` Paul Pogonyshev
0 siblings, 0 replies; 17+ messages in thread
From: Paul Pogonyshev @ 2006-06-05 14:07 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200606041356.41617.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> >> (1) In your .emacs:
> >>
> >> (create-fontset-from-fontset-spec
> >> "-cronyx-courier-medium-r-normal--17-*-*-*-m-*-fontset-cronyx17,
> >> ascii:-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
>
> > Maybe too late to answer, but I solved it by adding the code above
> > and
>
> > (setq default-frame-alist
> > (cons (cons 'font
> > "-cronyx-courier-medium-r-normal--17-*-*-*-m-*-iso10646-1")
> > default-frame-alist))
>
> > in my `.emacs'.
>
> Do you mean that the methods I suggested didn't work?
It worked, but I automated it by modifying `default-frame-alist', so
that there is no need to choose fontset by hands. (In fact, I later
abandoned cronyx courier since it is not completely fixed-width, but
that is a separate matter.) So, your code is fine except that it
requires minor manual intervention.
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2006-06-05 14:07 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-19 12:31 Russian numero sign Paul Pogonyshev
2006-02-20 14:07 ` Benjamin Riefenstahl
2006-02-22 19:49 ` Paul Pogonyshev
2006-02-24 12:18 ` Benjamin Riefenstahl
2006-02-23 15:22 ` Stefan Monnier
2006-02-23 7:52 ` Kenichi Handa
2006-02-23 20:37 ` Pango-like font fallback (was Re: Russian numero sign) Paul Pogonyshev
2006-02-24 1:30 ` Kenichi Handa
2006-03-05 20:31 ` Paul Pogonyshev
2006-03-07 5:11 ` Kenichi Handa
2006-03-07 20:39 ` Paul Pogonyshev
2006-03-08 1:55 ` Kenichi Handa
2006-03-08 18:16 ` Paul Pogonyshev
2006-03-14 2:27 ` Kenichi Handa
2006-06-04 10:56 ` Paul Pogonyshev
2006-06-05 12:56 ` Kenichi Handa
2006-06-05 14:07 ` Paul Pogonyshev
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.