* Chinese punctuation symbol can't be displayed on windows 2000.
@ 2008-12-12 10:57 anhnmncb
2008-12-14 2:58 ` anhnmncb
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: anhnmncb @ 2008-12-12 10:57 UTC (permalink / raw
To: emacs-devel
I've tested the same .emacs with windows xp, vista, only 2000 has this
issue, Chinese fonts are ok, but Chinese punctuations.
-----------------------
For example:
character: 。 (12290, #o30002, #x3002)
preferred charset: unicode (Unicode (ISO10646))
code point: 0x3002
syntax: _ which means: symbol
category: c:Chinese h:Korean j:Japanese |:line breakable
While filling, we can break a line at this character.
buffer code: #xE3 #x80 #x82
file code: #xE3 #x80 #x82 (encoded by coding system utf-8)
display: no font available
Character code properties: customize what to show
name: IDEOGRAPHIC FULL STOP
old-name: IDEOGRAPHIC PERIOD
general-category: Po (Punctuation, Other)
-----------------------
I also notice that if I replace the system's courer and simsun fonts
with vista's, then issue was gone.
My relavent setting for font is following:
-----------------------
(set-frame-font "Courier New-10")
(add-to-list 'default-frame-alist '(font . "Courier New-10"))
(set-fontset-font (frame-parameter nil 'font)
'han (font-spec :family "SimSun") nil 'prepend)
(set-fontset-font (frame-parameter nil 'font)
'symbol (font-spec :family "SimSun") nil 'prepend)
(set-fontset-font (frame-parameter nil 'font)
'cjk-misc (font-spec :family "SimSun") nil 'prepend)
(set-fontset-font (frame-parameter nil 'font)
'bopomofo (font-spec :family "SimSun") nil 'prepend)
(set-fontset-font (frame-parameter nil 'font)
'unicode (font-spec :family "SimSun") nil 'append))
-----------------------
My emacs version:
GNU Emacs 23.0.60.1 (i386-mingw-nt5.0.2195) of 2008-12-06 on mybox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-12 10:57 Chinese punctuation symbol can't be displayed on windows 2000 anhnmncb
@ 2008-12-14 2:58 ` anhnmncb
2008-12-14 15:21 ` Jason Rumney
2008-12-17 3:04 ` anhnmncb
2008-12-17 9:02 ` anhnmncb
2 siblings, 1 reply; 11+ messages in thread
From: anhnmncb @ 2008-12-14 2:58 UTC (permalink / raw
To: emacs-devel
Could anyone help me to figure it out please? I have no any clue :(
anhnmncb (2008-12-12 18:57 +0800) wrote:
> I've tested the same .emacs with windows xp, vista, only 2000 has this
> issue, Chinese fonts are ok, but Chinese punctuations.
>
> -----------------------
> For example:
>
> character: 。 (12290, #o30002, #x3002)
> preferred charset: unicode (Unicode (ISO10646))
> code point: 0x3002
> syntax: _ which means: symbol
> category: c:Chinese h:Korean j:Japanese |:line breakable
> While filling, we can break a line at this character.
> buffer code: #xE3 #x80 #x82
> file code: #xE3 #x80 #x82 (encoded by coding system utf-8)
> display: no font available
>
> Character code properties: customize what to show
> name: IDEOGRAPHIC FULL STOP
> old-name: IDEOGRAPHIC PERIOD
> general-category: Po (Punctuation, Other)
> -----------------------
>
> I also notice that if I replace the system's courer and simsun fonts
> with vista's, then issue was gone.
>
> My relavent setting for font is following:
>
> -----------------------
> (set-frame-font "Courier New-10")
> (add-to-list 'default-frame-alist '(font . "Courier New-10"))
>
> (set-fontset-font (frame-parameter nil 'font)
> 'han (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'symbol (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'cjk-misc (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'bopomofo (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'unicode (font-spec :family "SimSun") nil 'append))
> -----------------------
>
> My emacs version:
>
> GNU Emacs 23.0.60.1 (i386-mingw-nt5.0.2195) of 2008-12-06 on mybox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-14 2:58 ` anhnmncb
@ 2008-12-14 15:21 ` Jason Rumney
2008-12-15 0:05 ` anhnmncb
0 siblings, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2008-12-14 15:21 UTC (permalink / raw
To: anhnmncb; +Cc: emacs-devel
anhnmncb wrote:
>> I've tested the same .emacs with windows xp, vista, only 2000 has this
>> issue, Chinese fonts are ok, but Chinese punctuations.
>>
>> I also notice that if I replace the system's courer and simsun fonts
>> with vista's, then issue was gone.
>>
This seems to suggest that the Windows 2000 version of the font is
failing to claim support for the cjk-misc block of characters.
What does the following report when you evaluate it from the *scratch*
buffer? (press C-j after entering it)
(list-fonts (font-spec :script "cjk-misc"))
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-14 15:21 ` Jason Rumney
@ 2008-12-15 0:05 ` anhnmncb
2008-12-15 13:38 ` Jason Rumney
0 siblings, 1 reply; 11+ messages in thread
From: anhnmncb @ 2008-12-15 0:05 UTC (permalink / raw
To: emacs-devel
On 2008-12-14, Jason Rumney wrote:
> anhnmncb wrote:
>>> I've tested the same .emacs with windows xp, vista, only 2000 has this
>>> issue, Chinese fonts are ok, but Chinese punctuations.
>>>
>>> I also notice that if I replace the system's courer and simsun fonts
>>> with vista's, then issue was gone.
>>>
>
> This seems to suggest that the Windows 2000 version of the font is
> failing to claim support for the cjk-misc block of characters.
> What does the following report when you evaluate it from the *scratch*
> buffer? (press C-j after entering it)
>
> (list-fonts (font-spec :script "cjk-misc"))
It says nil.
--
Regards,
anhnmncb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-15 0:05 ` anhnmncb
@ 2008-12-15 13:38 ` Jason Rumney
2008-12-15 15:33 ` anhnmncb
0 siblings, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2008-12-15 13:38 UTC (permalink / raw
To: anhnmncb; +Cc: emacs-devel
anhnmncb wrote:
>> (list-fonts (font-spec :script "cjk-misc"))
>>
>
> It says nil.
So Emacs will not automatically find a font that covers cjk-misc, you'll
have to tell it explicitly what font to use. Going back to your font
settings:
(set-fontset-font (frame-parameter nil 'font)
'cjk-misc (font-spec :family "SimSun") nil 'prepend)
What happens if you change this to:
(set-fontset-font "fontset-default" 'cjk-misc (font-spec :family "SimSun"))
ie: Explicitly override the default fontset, rather than trying to
figure out the fontset from the frame.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-15 13:38 ` Jason Rumney
@ 2008-12-15 15:33 ` anhnmncb
0 siblings, 0 replies; 11+ messages in thread
From: anhnmncb @ 2008-12-15 15:33 UTC (permalink / raw
To: emacs-devel
On 2008-12-15, Jason Rumney wrote:
> anhnmncb wrote:
>
>>> (list-fonts (font-spec :script "cjk-misc"))
>>>
>>
>> It says nil.
> So Emacs will not automatically find a font that covers cjk-misc, you'll
> have to tell it explicitly what font to use. Going back to your font
> settings:
>
> (set-fontset-font (frame-parameter nil 'font)
> 'cjk-misc (font-spec :family "SimSun") nil 'prepend)
>
>
> What happens if you change this to:
>
> (set-fontset-font "fontset-default" 'cjk-misc (font-spec :family "SimSun"))
>
> ie: Explicitly override the default fontset, rather than trying to
> figure out the fontset from the frame.
It doesn't help at all :(
--
Regards,
anhnmncb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-12 10:57 Chinese punctuation symbol can't be displayed on windows 2000 anhnmncb
2008-12-14 2:58 ` anhnmncb
@ 2008-12-17 3:04 ` anhnmncb
2008-12-17 9:02 ` anhnmncb
2 siblings, 0 replies; 11+ messages in thread
From: anhnmncb @ 2008-12-17 3:04 UTC (permalink / raw
To: emacs-devel
anhnmncb (2008-12-12 18:57 +0800) wrote:
> I've tested the same .emacs with windows xp, vista, only 2000 has this
> issue, Chinese fonts are ok, but Chinese punctuations.
>
> -----------------------
> For example:
>
> character: 。 (12290, #o30002, #x3002)
> preferred charset: unicode (Unicode (ISO10646))
> code point: 0x3002
> syntax: _ which means: symbol
> category: c:Chinese h:Korean j:Japanese |:line breakable
> While filling, we can break a line at this character.
> buffer code: #xE3 #x80 #x82
> file code: #xE3 #x80 #x82 (encoded by coding system utf-8)
> display: no font available
>
> Character code properties: customize what to show
> name: IDEOGRAPHIC FULL STOP
> old-name: IDEOGRAPHIC PERIOD
> general-category: Po (Punctuation, Other)
> -----------------------
>
> I also notice that if I replace the system's courer and simsun fonts
> with vista's, then issue was gone.
>
> My relavent setting for font is following:
>
> -----------------------
> (set-frame-font "Courier New-10")
> (add-to-list 'default-frame-alist '(font . "Courier New-10"))
>
> (set-fontset-font (frame-parameter nil 'font)
> 'han (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'symbol (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'cjk-misc (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'bopomofo (font-spec :family "SimSun") nil 'prepend)
> (set-fontset-font (frame-parameter nil 'font)
> 'unicode (font-spec :family "SimSun") nil 'append))
> -----------------------
>
> My emacs version:
>
> GNU Emacs 23.0.60.1 (i386-mingw-nt5.0.2195) of 2008-12-06 on mybox
Ping. What info should I need to provide for you to get rid of it? It is
too annoying to let me live in emacs :(
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-12 10:57 Chinese punctuation symbol can't be displayed on windows 2000 anhnmncb
2008-12-14 2:58 ` anhnmncb
2008-12-17 3:04 ` anhnmncb
@ 2008-12-17 9:02 ` anhnmncb
2008-12-17 9:53 ` liu shukui
2 siblings, 1 reply; 11+ messages in thread
From: anhnmncb @ 2008-12-17 9:02 UTC (permalink / raw
To: emacs-devel
Jason Rumney (2008-12-17 05:19 +0000) wrote:
> Quoting anhnmncb <anhnmncb@sina.com>:
>
>> Ping. What info should I need to provide for you to get rid of it? It is
>> too annoying to let me live in emacs :(
>
> I think the problem is in w32font_has_char in w32font.c. Try replacing the
> entire body of that function with:
>
> {
> return -1;
> }
>
> The problem is that function places too much faith in the character range
> support claimed by fonts. Previously I changed it to return -1 (uncertain) when
> a font claims to cover a Unicode range, because many fonts claim coverage, but
> do not cover all characters in that range. Now according to your report, there
> are fonts shipped with Windows 2000 that do not claim support for the cjk-misc
> range, even if they (partially at least) cover it. So it seems there are no
> circumstances left where we can be sure whether a character is or is not
> included in a font without opening the font.
It solves the issue, and I find that emacs now can display most of fonts
that can not even when on xp and vista.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-17 9:02 ` anhnmncb
@ 2008-12-17 9:53 ` liu shukui
2008-12-17 10:27 ` anhnmncb
0 siblings, 1 reply; 11+ messages in thread
From: liu shukui @ 2008-12-17 9:53 UTC (permalink / raw
To: anhnmncb; +Cc: emacs-devel
Has this change committed to the cvs?
On Wed, Dec 17, 2008 at 5:02 PM, anhnmncb <anhnmncb@sina.com> wrote:
> Jason Rumney (2008-12-17 05:19 +0000) wrote:
>
>> Quoting anhnmncb <anhnmncb@sina.com>:
>>
>>> Ping. What info should I need to provide for you to get rid of it? It is
>>> too annoying to let me live in emacs :(
>>
>> I think the problem is in w32font_has_char in w32font.c. Try replacing the
>> entire body of that function with:
>>
>> {
>> return -1;
>> }
>>
>> The problem is that function places too much faith in the character range
>> support claimed by fonts. Previously I changed it to return -1 (uncertain) when
>> a font claims to cover a Unicode range, because many fonts claim coverage, but
>> do not cover all characters in that range. Now according to your report, there
>> are fonts shipped with Windows 2000 that do not claim support for the cjk-misc
>> range, even if they (partially at least) cover it. So it seems there are no
>> circumstances left where we can be sure whether a character is or is not
>> included in a font without opening the font.
>
> It solves the issue, and I find that emacs now can display most of fonts
> that can not even when on xp and vista.
>
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-17 9:53 ` liu shukui
@ 2008-12-17 10:27 ` anhnmncb
2008-12-17 14:44 ` Jason Rumney
0 siblings, 1 reply; 11+ messages in thread
From: anhnmncb @ 2008-12-17 10:27 UTC (permalink / raw
To: emacs-devel
liu shukui (2008-12-17 17:53 +0800) wrote:
> Has this change committed to the cvs?
>
No, I modified the src file by myself. It solves not only the Chinese
punctuation displaying but also some other chinese font displaying that
annoying me so long. I dont know why it should not be this by default,
any reason?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Chinese punctuation symbol can't be displayed on windows 2000.
2008-12-17 10:27 ` anhnmncb
@ 2008-12-17 14:44 ` Jason Rumney
0 siblings, 0 replies; 11+ messages in thread
From: Jason Rumney @ 2008-12-17 14:44 UTC (permalink / raw
To: anhnmncb; +Cc: emacs-devel
anhnmncb wrote:
> No, I modified the src file by myself. It solves not only the Chinese
> punctuation displaying but also some other chinese font displaying that
> annoying me so long. I dont know why it should not be this by default,
> any reason?
>
I have checked it in now. It can probably be improved for truetype fonts
by looking up the cmap table directly. But I am not sure if that will
be any more efficient than requiring fonts to be opened so encode_char
can be used.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-12-17 14:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 10:57 Chinese punctuation symbol can't be displayed on windows 2000 anhnmncb
2008-12-14 2:58 ` anhnmncb
2008-12-14 15:21 ` Jason Rumney
2008-12-15 0:05 ` anhnmncb
2008-12-15 13:38 ` Jason Rumney
2008-12-15 15:33 ` anhnmncb
2008-12-17 3:04 ` anhnmncb
2008-12-17 9:02 ` anhnmncb
2008-12-17 9:53 ` liu shukui
2008-12-17 10:27 ` anhnmncb
2008-12-17 14:44 ` Jason Rumney
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.