From: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
Cc: emacs-devel@gnu.org
Subject: Re: TUTORIAL.bg and windows-1251
Date: Wed, 14 Jan 2004 13:42:28 +0200 [thread overview]
Message-ID: <40052B24.2030803@fmi.uni-sofia.bg> (raw)
In-Reply-To: <200401130407.NAA13705@etlken.m17n.org>
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
Kenichi Handa wrote:
> In article <3FFED268.3020908@fmi.uni-sofia.bg>, Ognyan Kulev <ogi@fmi.uni-sofia.bg> writes:
>
>>Just copy&paste in both directions works fine. But how can I be sure
>>that the text is encoded with microsoft-cp1251, not with iso10646-1?
>>What program would show the difference?
>
>
> If (encode-coding-string CYRILLIC_STRING
> 'ctext-with-extensions) produces a string that contains
> "microsoft-cp1251", it means that Emacs is using
> microsoft-cp1251 extended seqement in X selection. And if
> copy&paste works fine, that means that the encoding is in a
> correct format.
I tested with encode-coding-string and all is OK.
> Hmmm strange. What is the result of this?
>
> (x-resolve-font-name "*-microsoft-cp1251")
We can exchange mails this way for another month, so I decided to dive
into the Source ;-) It seems override-fontspec hasn't enough
"priority". To see what I mean, take a look at the attached patch.
After applying it, microsoft-cp1251 is used in rendering.
Regards,
ogi
[-- Attachment #2: fontset.diff --]
[-- Type: text/x-patch, Size: 1920 bytes --]
Index: fontset.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fontset.c,v
retrieving revision 1.83
diff -u -p -r1.83 fontset.c
--- fontset.c 7 Jan 2004 00:21:53 -0000 1.83
+++ fontset.c 14 Jan 2004 11:36:24 -0000
@@ -254,6 +254,9 @@ lookup_overriding_fontspec (frame, c)
{
Lisp_Object tail;
+ printf ("lookup_overriding_fontspec %#x\n", c);
+ fflush (stdout);
+
for (tail = Voverriding_fontspec_alist; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object val, target, elt;
@@ -300,11 +303,17 @@ fontset_ref_via_base (fontset, c)
if (SINGLE_BYTE_CHAR_P (*c))
return FONTSET_ASCII (fontset);
+#if 0
elt = Qnil;
if (! EQ (FONTSET_BASE (fontset), Vdefault_fontset))
elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
if (NILP (elt))
elt = lookup_overriding_fontspec (FONTSET_FRAME (fontset), *c);
+#else
+ elt = lookup_overriding_fontspec (FONTSET_FRAME (fontset), *c);
+ if (NILP (elt) && ! EQ (FONTSET_BASE (fontset), Vdefault_fontset))
+ elt = FONTSET_REF (FONTSET_BASE (fontset), *c);
+#endif
if (NILP (elt))
elt = FONTSET_REF (Vdefault_fontset, *c);
if (NILP (elt))
@@ -592,6 +601,7 @@ fontset_font_pattern (f, id, c)
Lisp_Object fontset, elt;
struct font_info *fontp;
+#if 0
elt = Qnil;
if (fontset_id_valid_p (id))
{
@@ -607,6 +617,21 @@ fontset_font_pattern (f, id, c)
XSETFRAME (frame, f);
elt = lookup_overriding_fontspec (frame, c);
}
+#else
+ {
+ Lisp_Object frame;
+
+ XSETFRAME (frame, f);
+ elt = lookup_overriding_fontspec (frame, c);
+ }
+ if (NILP (elt) && fontset_id_valid_p (id))
+ {
+ fontset = FONTSET_FROM_ID (id);
+ xassert (!BASE_FONTSET_P (fontset));
+ fontset = FONTSET_BASE (fontset);
+ elt = FONTSET_REF (fontset, c);
+ }
+#endif
if (NILP (elt))
elt = FONTSET_REF (Vdefault_fontset, c);
[-- Attachment #3: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2004-01-14 11:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 18:56 TUTORIAL.bg and windows-1251 Ognyan Kulev
2003-11-15 12:19 ` Ognyan Kulev
2003-11-26 7:33 ` Ognyan Kulev
2003-11-15 14:24 ` Jason Rumney
2003-11-17 7:21 ` Kenichi Handa
2003-11-18 15:49 ` Ognyan Kulev
2003-11-24 23:55 ` Kenichi Handa
2003-11-26 7:16 ` Ognyan Kulev
2003-11-26 7:47 ` Kenichi Handa
2003-11-26 8:30 ` Ognyan Kulev
2003-11-26 13:17 ` Kenichi Handa
2003-11-26 14:08 ` Ognyan Kulev
2003-12-03 8:34 ` Kenichi Handa
2003-12-04 16:28 ` Ognyan Kulev
2003-12-04 23:28 ` Kenichi Handa
2003-12-31 15:06 ` Ognyan Kulev
2003-12-31 15:54 ` Eli Zaretskii
2004-01-05 4:20 ` Kenichi Handa
2004-01-05 4:14 ` Kenichi Handa
2004-01-06 12:03 ` YAMAMOTO Mitsuharu
2004-01-07 0:25 ` Kenichi Handa
2004-01-07 1:32 ` YAMAMOTO Mitsuharu
2004-01-07 16:22 ` Ognyan Kulev
2004-01-07 23:58 ` Kenichi Handa
2004-01-09 16:10 ` Ognyan Kulev
2004-01-13 4:07 ` Kenichi Handa
2004-01-14 11:42 ` Ognyan Kulev [this message]
2004-01-14 12:10 ` Kenichi Handa
2004-01-17 19:31 ` Ognyan Kulev
2004-01-19 0:34 ` Kenichi Handa
2004-01-21 6:45 ` Ognyan Kulev
2004-01-21 10:52 ` Kenichi Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40052B24.2030803@fmi.uni-sofia.bg \
--to=ogi@fmi.uni-sofia.bg \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).