all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* No malayalam glyphs in language/mlm-util.el
  2003-02-14 11:00     ` Kenichi Handa
@ 2003-02-14 14:35       ` Robert J. Chassell
  2003-02-14 19:58         ` Raja R Harinath
  0 siblings, 1 reply; 24+ messages in thread
From: Robert J. Chassell @ 2003-02-14 14:35 UTC (permalink / raw)
  Cc: rkrishnan

Today's CVS snapshot, Fri, 2003 Feb 14  13:31 UTC
GNU Emacs 21.3.50.146 (i686-pc-linux-gnu, X toolkit)
started with

     /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

The HELLO file now displays all its glyphs OK, including Hindi and
Tamil; but I see empty boxes when I visit

    emacs/lisp/language/mlm-util.el

This file provides support for composing malayalam characters, which
are Indian.

Ramakrishnan Muthukrishnan <rkrishnan@debian.org> told me about the problem.
He, too, is using CVS.

Ramakrishnan also says that running `C-u C-x =' (what-cursor-position
with a prefix arg)

    on the boxes says that emacs is using some Adobe-*-*... font.

although when I do the same I am told

       font: -ETL-Fixed-Medium-R-Normal--16-160-72-72-C-80-ISO10646-1

According to 

    (shell-command "xlsfonts -fn '*-ISO10646-1'" nil nil)

I have: 

    -etl-fixed-medium-r-normal--16-160-72-72-c-80-iso10646-1

which is the same as the font that `what-cursor-position' tells me is
in mlm-util.el, except for being lower case.

What should I do?

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-14 14:35       ` No malayalam glyphs in language/mlm-util.el Robert J. Chassell
@ 2003-02-14 19:58         ` Raja R Harinath
  2003-02-14 21:50           ` Robert J. Chassell
  0 siblings, 1 reply; 24+ messages in thread
From: Raja R Harinath @ 2003-02-14 19:58 UTC (permalink / raw)


Hi,

"Robert J. Chassell" <bob@rattlesnake.com> writes:

> Today's CVS snapshot, Fri, 2003 Feb 14  13:31 UTC
> GNU Emacs 21.3.50.146 (i686-pc-linux-gnu, X toolkit)
> started with
>
>      /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'
>
> The HELLO file now displays all its glyphs OK, including Hindi and
> Tamil; but I see empty boxes when I visit
>
>     emacs/lisp/language/mlm-util.el
>
> This file provides support for composing malayalam characters, which
> are Indian.

AFAI can make out, the variables 'malayalam-consonant' and the regexp
in 'malayalam-composable-pattern' use Unicode.  You need an Unicode
font that has glyphs in that range.  If your default font doesn't
have the correct stuff, you'll need in your .emacs

  (set-fontset-font (query-fontset (frame-parameter nil 'font))
      (cons (decode-char 'ucs ?\x0D00) (decode-char 'ucs ?\x0D7f))
      (cons "monotype-arial unicode ms" "iso10646-1"))

You can use any font that has Malayalam, and has it at the _right_
unicode code points, not some arbitrary encoding.  (Maybe emacs can
handle fonts with ISCII charset tables there.  I don't know.)  The
ISFOC TTF fonts that you already have don't appear to have the right
Unicode charset table (not surprising, since that appears to be the
whole point of ISFOC).

Scrolling further, you should see that 'mlm-char-glyph' has empty
boxes on the LHS of the table, but there must be proper glyphs on the
RHS -- those RHS entries are from the "malayalam-cdac" fonts.

Overall, the whole workflow of editing Unicode encoded Indic documents
in Emacs is not very smooth yet.

HTH,
- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-14 19:58         ` Raja R Harinath
@ 2003-02-14 21:50           ` Robert J. Chassell
  2003-02-14 22:20             ` Raja R Harinath
  0 siblings, 1 reply; 24+ messages in thread
From: Robert J. Chassell @ 2003-02-14 21:50 UTC (permalink / raw)
  Cc: emacs-devel

Still no success.

Still using, today's CVS snapshot, Fri, 2003 Feb 14 13:31 UTC GNU
Emacs 21.3.50.146 (i686-pc-linux-gnu, X toolkit) started with

     /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

   > ...I see empty boxes when I visit
   >
   >     emacs/lisp/language/mlm-util.el

   AFAI can make out, the variables 'malayalam-consonant' and the regexp
   in 'malayalam-composable-pattern' use Unicode.  You need an Unicode
   font that has glyphs in that range.  If your default font doesn't
   have the correct stuff, you'll need in your .emacs

     (set-fontset-font (query-fontset (frame-parameter nil 'font))
         (cons (decode-char 'ucs ?\x0D00) (decode-char 'ucs ?\x0D7f))
         (cons "monotype-arial unicode ms" "iso10646-1"))

I just started a fresh Emacs, evaluated that expression in it, and visited
emacs/lisp/language/mlm-util.el

No success.  Same problem as before: empty boxes.


   You can use any font that has Malayalam, ...

Such as...?    please tell me a URL that I can download.

After downloading and unpacking into directory foobar/, 
I presume I then do:

    mkfontdir
    xset fp+ /usr/X11R6/lib/X11/fonts/foobar/
    xset fp rehash

Is that right?

(If that is right and you tell me a URL and it all works, I will
write up a short example of what to do.)


   Scrolling further, you should see that 'mlm-char-glyph' has empty
   boxes on the LHS of the table, but there must be proper glyphs on the
   RHS -- those RHS entries are from the "malayalam-cdac" fonts.

Yes, that is the case:  empty boxes on the left hand side and proper
glyphs on the RHS


   Overall, the whole workflow of editing Unicode encoded Indic documents
   in Emacs is not very smooth yet.

In this case, the bug seems to be a lack of the kind of documentation
that I (and others like me) will notice, understand, and follow.

In particular, the current bug is documentation on why, when, and how
to install fonts.  This is is not an Emacs question, but is more
general.  However, if Emacs lacks fonts, it breaks.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-14 21:50           ` Robert J. Chassell
@ 2003-02-14 22:20             ` Raja R Harinath
  2003-02-15  0:43               ` Robert J. Chassell
  0 siblings, 1 reply; 24+ messages in thread
From: Raja R Harinath @ 2003-02-14 22:20 UTC (permalink / raw)
  Cc: emacs-devel

"Robert J. Chassell" <bob@rattlesnake.com> writes:

> Still no success.
>
> Still using, today's CVS snapshot, Fri, 2003 Feb 14 13:31 UTC GNU
> Emacs 21.3.50.146 (i686-pc-linux-gnu, X toolkit) started with
>
>      /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'
>
>    > ...I see empty boxes when I visit
>    >
>    >     emacs/lisp/language/mlm-util.el
>
>    AFAI can make out, the variables 'malayalam-consonant' and the regexp
>    in 'malayalam-composable-pattern' use Unicode.  You need an Unicode
>    font that has glyphs in that range.  If your default font doesn't
>    have the correct stuff, you'll need in your .emacs
>
>      (set-fontset-font (query-fontset (frame-parameter nil 'font))
>          (cons (decode-char 'ucs ?\x0D00) (decode-char 'ucs ?\x0D7f))
>          (cons "monotype-arial unicode ms" "iso10646-1"))
>
> I just started a fresh Emacs, evaluated that expression in it, and visited
> emacs/lisp/language/mlm-util.el
>
> No success.  Same problem as before: empty boxes.

It wasn't clear my previous mail: but the second cons refers to the
font name.  I used as an example the font "Arial Unicode MS": a TTF
font that came with Microsoft Office 2000.  Sorry about using an
non-free font as an example.

>    You can use any font that has Malayalam, ...
>
> Such as...?    please tell me a URL that I can download.

Try

  http://malayalamlinux.sourceforge.net/input-methods/
  http://malayalamlinux.sourceforge.net/input-methods/malayalam.ttf

(That site had no indication about the freedom of usage of the font.
So, the situation is not really much better.)

> After downloading and unpacking into directory foobar/, 
> I presume I then do:
>
>     mkfontdir
>     xset fp+ /usr/X11R6/lib/X11/fonts/foobar/
>     xset fp rehash
>
> Is that right?
>
> (If that is right and you tell me a URL and it all works, I will
> write up a short example of what to do.)

If there is no 'fonts.scale' file in that directory, create it with
the following contents inside the ---8<--- lines.

---8<--- fonts.scale
1
malayalam.ttf -misc-malayalam-medium-r-normal--0-0-0-0-p-0-iso10646-1
---8<---

If there's already a fonts.scale in that directory, add 1 to the
number on top of that file, and append the "malayalam.ttf -misc-...-1"
line to it.

Then run in that directory

  $ mkfontdir
  $ xset fp+ `pwd`
  $ xset fp rehash

Then, add the following to your .emacs:

      (set-fontset-font (query-fontset (frame-parameter nil 'font))
          (cons (decode-char 'ucs #x0D00) (decode-char 'ucs #x0D7f))
          (cons "misc-malayalam" "iso10646-1"))

HTH
- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-14 22:20             ` Raja R Harinath
@ 2003-02-15  0:43               ` Robert J. Chassell
  2003-02-15  3:16                 ` Ramakrishnan M
                                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Robert J. Chassell @ 2003-02-15  0:43 UTC (permalink / raw)
  Cc: emacs-devel

Success!

Thank you!  I can now see all the fonts in

    emacs/lisp/language/mlm-util.el

You gave good instructions.  I copied the fonts from  savannah.nongnu.org

Here is what I did.   This should go into the documentation somewhere.

Handa-san, please add this in the best place.  Thank you.


----------------\

Here is an example of how Robert J. Chassell fetched and installed
the fonts for malayalam, and Indic language.

First, as user `root', execute these commands:

    cd /usr/X11R6/lib/X11/fonts/
    mkdir malayalam
    cd malayalam

    wget -c http://savannah.nongnu.org/download/smc/free-mal-fonts.pkg/1.1/free-mal-fonts.tar.gz

    tar tvzf free-mal-fonts.tar.gz           # see what you have
    tar xvzf free-mal-fonts.tar.gz           # untar into a sub-directory

    chown -R root.root .
    chmod -R ugo+rw .

    cd /usr/X11R6/lib/X11/fonts/malayalam/free-mal-fonts

Now, you must make sure there is a 'fonts.scale' in the
malayalam/free-mal-fonts/ directory.

Raja R Harinath <harinath@cs.umn.edu> writes:

    If there is no 'fonts.scale' file in that directory, create it with
    the following contents inside the ---8<--- lines.

    ---8<--- fonts.scale
    1
    malayalam.ttf -misc-malayalam-medium-r-normal--0-0-0-0-p-0-iso10646-1
    ---8<---

[the following is not needed if copying the fonts from savannah.nongnu.org]

    If there's already a fonts.scale in that directory, add 1 to the
    number on top of that file, and append the "malayalam.ttf -misc-...-1"
    line to it.


After creating the `fonts.scale' file, in
/usr/X11R6/lib/X11/fonts/malayalam/free-mal-fonts/
execute these commands in that directory:

    mkfontdir
    xset fp+ `pwd`
    xset fp rehash

Then, add the following to your ~/.emacs file; you can be a non-root user:

      (set-fontset-font (query-fontset (frame-parameter nil 'font))
          (cons (decode-char 'ucs #x0D00) (decode-char 'ucs #x0D7f))
          (cons "misc-malayalam" "iso10646-1"))

Now as a non-root user, you can visit

    emacs/lisp/language/mlm-util.el

in GNU Emacs and see all the fonts.

----------------/

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15  0:43               ` Robert J. Chassell
@ 2003-02-15  3:16                 ` Ramakrishnan M
  2003-02-15  3:34                 ` Ramakrishnan M
  2003-02-15 15:40                 ` Robert J. Chassell
  2 siblings, 0 replies; 24+ messages in thread
From: Ramakrishnan M @ 2003-02-15  3:16 UTC (permalink / raw)
  Cc: emacs-devel

 || On Sat, 15 Feb 2003 00:43:21 +0000 (UTC)
 || "Robert J. Chassell" <bob@rattlesnake.com> wrote: 

 rjc> Success!
 rjc> Thank you!  I can now see all the fonts in

 rjc>     emacs/lisp/language/mlm-util.el

 rjc> You gave good instructions.  I copied the fonts from  savannah.nongnu.org

Actually I have these fonts already in my system and had been using it with the 
emacs-unicode branch and it works properly there.

I still don't see the unicode characters. I see the glyph to be displayed (as
i have those CDAC fonts with me TTKarthika-*-*...) for the composition of unicode
characters(I forgot to mention this before). But I still get

 -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO10646-1

when I do C-u C-x = on those boxes.
-- 
    Ramakrishnan M              (http://www.hackGNU.org/)
    Use Free Software -- Help stamp out Software Hoarding!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15  0:43               ` Robert J. Chassell
  2003-02-15  3:16                 ` Ramakrishnan M
@ 2003-02-15  3:34                 ` Ramakrishnan M
  2003-02-15 15:40                 ` Robert J. Chassell
  2 siblings, 0 replies; 24+ messages in thread
From: Ramakrishnan M @ 2003-02-15  3:34 UTC (permalink / raw)
  Cc: emacs-devel


 rjc>       (set-fontset-font (query-fontset (frame-parameter nil 'font))
 rjc>           (cons (decode-char 'ucs #x0D00) (decode-char 'ucs #x0D7f))
 rjc>           (cons "misc-malayalam" "iso10646-1"))

I just found that (frame-parameter nil 'font) returns "Adobe...." and the
(query-fontset ..) returns nil. Any ideas?

-- 
    Ramakrishnan M              (http://www.hackGNU.org/)
    Use Free Software -- Help stamp out Software Hoarding!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15  0:43               ` Robert J. Chassell
  2003-02-15  3:16                 ` Ramakrishnan M
  2003-02-15  3:34                 ` Ramakrishnan M
@ 2003-02-15 15:40                 ` Robert J. Chassell
  2003-02-15 16:00                   ` Ramakrishnan M
  2 siblings, 1 reply; 24+ messages in thread
From: Robert J. Chassell @ 2003-02-15 15:40 UTC (permalink / raw)
  Cc: gnu

Today's CVS snapshot, Sat, 2003 Feb 15  14:17 UTC
GNU Emacs 21.3.50.149 (i686-pc-linux-gnu, X toolkit)

Yesterday, I wrote:

    Thank you!  I can now see all the fonts in

        emacs/lisp/language/mlm-util.el

I spoke too soon!  I can see the fonts when I manually evaluate, 

  (set-fontset-font (query-fontset (frame-parameter nil 'font))
                    (cons (decode-char 'ucs #x0D00) (decode-char 'ucs #x0D7f))
                    (cons "misc-malayalam" "iso10646-1"))

but when I put that expression in my ~/.emacs file, start a new
instance of Emacs, and then visit

  /usr/local/src/emacs/lisp/language/mlm-util.el

I do not see the fonts; I see empty boxes.

But if I manually evaluate the Emacs Lisp expression above while
looking at the `mlm-util.el' in another buffer, the empty boxes
change to proper glyphs.

I am not certain what is going on, but it looks to me that the
`set-fontset-font' function is modifying the first fontset, but that
modification is not done during the loading of the ~/.emacs file.

First, I tried putting the Emacs Lisp expression at the end of my
~/.emacs file, so it would be evaluated last, but that did not solve
the problem.

Then I wrote this hook and put it into my  ~/.emacs file:

    (add-hook 'find-file-hook
              (function (lambda ()
                          (set-fontset-font
                           (query-fontset (frame-parameter nil 'font))
                           (cons (decode-char 'ucs #x0D00)
                                 (decode-char 'ucs #x0D7f))
                           (cons "misc-malayalam" "iso10646-1")))))


This succeeds.  That is to say, with this hook, when I visit the
`mlm-util.el' file, I see the proper glyphs.

But the use of such a hook is an ugly way to solve the problem.

What should I do?

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15 15:40                 ` Robert J. Chassell
@ 2003-02-15 16:00                   ` Ramakrishnan M
  2003-02-15 17:54                     ` Benjamin Riefenstahl
       [not found]                     ` <1045400184.16187.694.camel@uma>
  0 siblings, 2 replies; 24+ messages in thread
From: Ramakrishnan M @ 2003-02-15 16:00 UTC (permalink / raw)
  Cc: emacs-devel

 || On Sat, 15 Feb 2003 10:40:55 -0500 (EST)
 || "Robert J. Chassell" <bob@rattlesnake.com> wrote: 

 rjc> I spoke too soon!  I can see the fonts when I manually evaluate, 

 rjc>   (set-fontset-font (query-fontset (frame-parameter nil 'font))
 rjc>                     (cons (decode-char 'ucs #x0D00) (decode-char 'ucs #x0D7f))
 rjc>                     (cons "misc-malayalam" "iso10646-1"))

It is worser here. When I evaluate this manual, I get the following in
Backtrace buffer.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  set-fontset-font(nil (335904 . 336063) ("misc-malayalam" . "iso10646-1"))
  eval((set-fontset-font (query-fontset (frame-parameter nil ...)) (cons (decode-char ... 3328) (decode-char ... 3455)) (cons "misc-malayalam" "iso10646-1")))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)

Also when I do M-x describe-fontset (default, used by the current frame) ENTER

I get 

  current frame is using a font, not a fontset

Is this in anyway related?

[BTW, I am not subscribed to emacs-devel, if anyone found a solution, please
copy me. Thanks]
-- 
    Ramakrishnan M              (http://www.hackGNU.org/)
    Use Free Software -- Help stamp out Software Hoarding!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15 16:00                   ` Ramakrishnan M
@ 2003-02-15 17:54                     ` Benjamin Riefenstahl
  2003-02-15 18:29                       ` Raja R Harinath
                                         ` (2 more replies)
       [not found]                     ` <1045400184.16187.694.camel@uma>
  1 sibling, 3 replies; 24+ messages in thread
From: Benjamin Riefenstahl @ 2003-02-15 17:54 UTC (permalink / raw)
  Cc: emacs-devel

Hi,


gnu@vsnl.net (Ramakrishnan M) writes:

> Also when I do M-x describe-fontset (default, used by the current
> frame) ENTER I get
> 
>   current frame is using a font, not a fontset

This appears for me also, if I start Emacs without any font
configuration.  When I set the font in my ~/.Xdefaults (as I usually
do) I have a fontset, even with emacs -q.

Even when I start emacs -q without an ~/.Xdefaults, I still have two
fontsets defined (they are just not set), named "fontset-standard" and
"fontset-default".  And of these two "fontset-default" seems to be
identical to the default font actually used in this situation.  So you
could probably do:

 (let ((fontset (query-fontset (frame-parameter nil 'font))))
    (when (not fontset)
       (setq fontset "fontset-default")
       (set-default-font fontset))
    (set-fontset-font fontset
                      (cons (decode-char 'ucs #x0D00)
                            (decode-char 'ucs #x0D7f))
                      (cons "misc-malayalam" "iso10646-1")))


Hope this helps, benny

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15 17:54                     ` Benjamin Riefenstahl
@ 2003-02-15 18:29                       ` Raja R Harinath
  2003-02-16  5:27                       ` Ramakrishnan M
  2003-02-20 11:09                       ` Kenichi Handa
  2 siblings, 0 replies; 24+ messages in thread
From: Raja R Harinath @ 2003-02-15 18:29 UTC (permalink / raw)


Hi,

Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> writes:

>  (let ((fontset (query-fontset (frame-parameter nil 'font))))
>     (when (not fontset)
>        (setq fontset "fontset-default")
>        (set-default-font fontset))

Or use the following (totally untested):

  (let* ((frame-font (frame-parameter nil 'font))
         (current-fontset (query-fontset frame-font)))
    (unless current-fontset
       (setq current-fontset (create-fontset-from-ascii-font frame-font))
       (set-default-font current-fontset))
    ;; ... rest of code using current-fontset
    )  

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15 17:54                     ` Benjamin Riefenstahl
  2003-02-15 18:29                       ` Raja R Harinath
@ 2003-02-16  5:27                       ` Ramakrishnan M
  2003-02-17  6:26                         ` Kenichi Handa
  2003-02-20 11:09                       ` Kenichi Handa
  2 siblings, 1 reply; 24+ messages in thread
From: Ramakrishnan M @ 2003-02-16  5:27 UTC (permalink / raw)
  Cc: emacs-devel

 || On 15 Feb 2003 18:54:46 +0100
 || Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> wrote: 

 br>  (let ((fontset (query-fontset (frame-parameter nil 'font))))
 br>     (when (not fontset)
 br>        (setq fontset "fontset-default")
 br>        (set-default-font fontset))
 br>     (set-fontset-font fontset
 br>                       (cons (decode-char 'ucs #x0D00)
 br>                             (decode-char 'ucs #x0D7f))
 br>                       (cons "misc-malayalam" "iso10646-1")))

I did the above. Still no success! I still cannot see the characters 
in mlm-util.el

-- 
    Ramakrishnan M              (http://www.hackGNU.org/)
    Use Free Software -- Help stamp out Software Hoarding!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-16  5:27                       ` Ramakrishnan M
@ 2003-02-17  6:26                         ` Kenichi Handa
  2003-02-17 14:41                           ` Stefan Monnier
  0 siblings, 1 reply; 24+ messages in thread
From: Kenichi Handa @ 2003-02-17  6:26 UTC (permalink / raw)
  Cc: emacs-devel

I'm sorry that I can't respond quickly.  Apart from the
fontset mysterious, I forgot to tell that you have to set
scalable-fonts-allowed to t (the default is nil) to use
TrueType fonts directly.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-17  6:26                         ` Kenichi Handa
@ 2003-02-17 14:41                           ` Stefan Monnier
  2003-02-18 11:51                             ` Kenichi Handa
  0 siblings, 1 reply; 24+ messages in thread
From: Stefan Monnier @ 2003-02-17 14:41 UTC (permalink / raw)
  Cc: emacs-devel

> fontset mysterious, I forgot to tell that you have to set
> scalable-fonts-allowed to t (the default is nil) to use
> TrueType fonts directly.

That should only be necessary if you also have non-scalable versions
of the same font.


	Stefan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
       [not found]                       ` <1045406040.597.28.camel@debian>
@ 2003-02-17 20:36                         ` Richard Stallman
  2003-02-17 23:43                           ` Kenichi Handa
  0 siblings, 1 reply; 24+ messages in thread
From: Richard Stallman @ 2003-02-17 20:36 UTC (permalink / raw)
  Cc: Arun M

I visited CDAC today and met with its head, Dr Arora.
It looks like there is a good chance they will make their fonts free.

In the mean time, I am forwarding info about existing free
fonts for India scripts, send by Arun:

http://www.gnu.org.in/software/software.html#akruti

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-17 20:36                         ` Richard Stallman
@ 2003-02-17 23:43                           ` Kenichi Handa
  0 siblings, 0 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-17 23:43 UTC (permalink / raw)
  Cc: emacs-devel

In article <E18ks0O-0004Vg-00@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:
> I visited CDAC today and met with its head, Dr Arora.
> It looks like there is a good chance they will make their fonts free.

That's a very good news.   Thank you for taking time for it.

> In the mean time, I am forwarding info about existing free
> fonts for India scripts, send by Arun:

> http://www.gnu.org.in/software/software.html#akruti

I checked those fonts.  As I wrote, it seems that it's not
difficult to use those fonts.  With emacs-unicode, as I have
implemented auto-composition mode, it's possible to support
both of them, i.e. users can switch fonts dynamically.  But
with the current emacs, users have to select which fonts to
use at startup time.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-17 14:41                           ` Stefan Monnier
@ 2003-02-18 11:51                             ` Kenichi Handa
  2003-02-19  6:16                               ` Kenichi Handa
       [not found]                               ` <87smugyh08.fsf@vsnl.net>
  0 siblings, 2 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-18 11:51 UTC (permalink / raw)
  Cc: emacs-devel

In article <200302171441.h1HEfdi26989@rum.cs.yale.edu>, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

>>  fontset mysterious, I forgot to tell that you have to set
>>  scalable-fonts-allowed to t (the default is nil) to use
>>  TrueType fonts directly.

> That should only be necessary if you also have non-scalable versions
> of the same font.

Ah!  Sure.  I forgot that I set scalable-fonts-allowed to
"-morisawa-.*".  So, the font selector doesn't fallback to
the other scalable fonts.  Hmmm, even in that case, the font
selector should try all the other scalable fonts.  Actually,
I did that in emacs-unicode a while ago, and forgot about
that completely.  :-(

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-18 11:51                             ` Kenichi Handa
@ 2003-02-19  6:16                               ` Kenichi Handa
       [not found]                               ` <87smugyh08.fsf@vsnl.net>
  1 sibling, 0 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-19  6:16 UTC (permalink / raw)
  Cc: monnier+gnu/emacs

In article <200302181151.UAA17618@etlken.m17n.org>, Kenichi Handa <handa@m17n.org> writes:
> Ah!  Sure.  I forgot that I set scalable-fonts-allowed to
> "-morisawa-.*".  So, the font selector doesn't fallback to
> the other scalable fonts.  Hmmm, even in that case, the font
> selector should try all the other scalable fonts.  Actually,
> I did that in emacs-unicode a while ago, and forgot about
> that completely.  :-(

I've just installed that change in HEAD.

---
Ken'ichi HANDA
handa@m17n.org

2003-02-19  Kenichi Handa  <handa@m17n.org>

	* xfaces.c (try_alternative_families): Try all scalable fonts if
	Vscalable_fonts_allowed is not Qt.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-15 17:54                     ` Benjamin Riefenstahl
  2003-02-15 18:29                       ` Raja R Harinath
  2003-02-16  5:27                       ` Ramakrishnan M
@ 2003-02-20 11:09                       ` Kenichi Handa
  2003-02-20 12:26                         ` Juanma Barranquero
  2003-02-21 21:43                         ` Richard Stallman
  2 siblings, 2 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-20 11:09 UTC (permalink / raw)
  Cc: emacs-devel

In article <m37kc1whsp.fsf@cicero.benny.turtle-trading.net>, Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> writes:
> gnu@vsnl.net (Ramakrishnan M) writes:

>>  Also when I do M-x describe-fontset (default, used by the current
>>  frame) ENTER I get
>>  
>>    current frame is using a font, not a fontset

> This appears for me also, if I start Emacs without any font
> configuration.  When I set the font in my ~/.Xdefaults (as I usually
> do) I have a fontset, even with emacs -q.

I have just installed a change with which M-x
describe-fontset will describe the default fontset if the
current frame is not using a fontset.

By the way, I'll explain a bit more about the fontsets.

Emacs creates these fontset at startup time.

(1) The default fontset ("fontset-default").

This fontset is not used directly as a frame font.  It is to
provide fallback font information.  When a frame is not
using a fontset, or a frame's fontset doesn't contain font
information about a specific character, the fonts specified
in the default fontset is used.

So, in most cases, changing the definition of the fontset is
effective.

(2) The standard fontset ("fontset-standard").

This is a fontset of 16-dot fonts for non-ASCII characters
most widely installed.  By using this fontset, the
possibility of seeing many non-ASCII characters in a
balanced size is very high.

(3) The startup fontset ("fontset-startup").

If you specify a font by "-fn" command line argument or by X
resource "Font", Emacs creates this fontset by the function
create-fontset-from-ascii-font, and uses it for the initial
frame.  In this case, the fontset specifies only a font for
ASCII characters.  So, the fonts for non-ASCII characters
are decided by the default fontset.  But on selecting a
font, the family of the ASCII fonts is respected.

If no font is specified, Emacs uses this font (on Unix/GNU
Linux):
    -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
In this case, the initial frame doesn't use a fontset, thus
the fonts for non-ASCII characters are decidd by the default
fontset too.

(4) The fontsets created from the X resource "Fontset-N".

When you have X resource "Fontset-N" (N is 0, 1, 2, ...),
Emacs creates the corresponding fontset as described in the
node "Defining Fontsets" of Emacs info.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-20 11:09                       ` Kenichi Handa
@ 2003-02-20 12:26                         ` Juanma Barranquero
  2003-02-20 12:50                           ` Kenichi Handa
  2003-02-21 21:43                         ` Richard Stallman
  1 sibling, 1 reply; 24+ messages in thread
From: Juanma Barranquero @ 2003-02-20 12:26 UTC (permalink / raw)


On Thu, 20 Feb 2003 20:09:16 +0900 (JST), Kenichi Handa <handa@m17n.org> wrote:

> By the way, I'll explain a bit more about the fontsets.

Speaking of fontsets, with this change:

  Revision 1.74 - Thu Feb 20 08:40:35 2003 UTC (3 hours, 34 minutes ago) by handa 
  Branch: MAIN 
  CVS Tags: HEAD 

  (check_fontset_name): If NAME is nil, return the default fontset.

Emacs doesn't load on windowing mode on Windows because term/w32-win.el
contains:

  (set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS"))
  (set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS"))
  (set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS"))
  (set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))

It's easy enough to change these t to nil, but, why the change?

AFAICS, (set-fontset-font [t|nil]...) is not used anywhere on Emacs
except by term/w32-win.el, and not surprisingly so, as the docs don't
mention the posibility of NAME being other than a string...

                                                           /L/e/k/t/u

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-20 12:26                         ` Juanma Barranquero
@ 2003-02-20 12:50                           ` Kenichi Handa
  0 siblings, 0 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-20 12:50 UTC (permalink / raw)
  Cc: emacs-devel

In article <20030220131831.A3E0.LEKTU@terra.es>, Juanma Barranquero <lektu@terra.es> writes:
>   (check_fontset_name): If NAME is nil, return the default fontset.

> Emacs doesn't load on windowing mode on Windows because term/w32-win.el
> contains:

>   (set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS"))
>   (set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS"))
>   (set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS"))
>   (set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))

> It's easy enough to change these t to nil, but, why the change?

> AFAICS, (set-fontset-font [t|nil]...) is not used anywhere on Emacs
> except by term/w32-win.el, and not surprisingly so, as the docs don't
> mention the posibility of NAME being other than a string...

Oops, sorry.  Long ago, for already forgotten reason, I
introduced the feature of using t for the default fontset,
but, it seems that the necessity disappeared before I
documented it.

I think nil is better than t for specifying the default
fontset.

I've just documented that NAME nil means the default fontset
in functions of fontset.c, and fixed term/w32-win.el.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
  2003-02-20 11:09                       ` Kenichi Handa
  2003-02-20 12:26                         ` Juanma Barranquero
@ 2003-02-21 21:43                         ` Richard Stallman
  1 sibling, 0 replies; 24+ messages in thread
From: Richard Stallman @ 2003-02-21 21:43 UTC (permalink / raw)
  Cc: emacs-devel

    By the way, I'll explain a bit more about the fontsets.

    Emacs creates these fontset at startup time.

Could you write text about these for the Emacs Manual
or the Emacs Lisp Manual?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
@ 2003-02-22 11:22 Ramakrishnan M
  0 siblings, 0 replies; 24+ messages in thread
From: Ramakrishnan M @ 2003-02-22 11:22 UTC (permalink / raw)


Ah.. I finally could see malayalam. Thanks to all of you
who helped me get this working. I did the following in
~/.emacs

(if (eq 'x window-system)
    (let ((fontset (query-fontset (frame-parameter nil 'font))))
      (when (not fontset)
	(setq fontset "fontset-default")
	(set-default-font fontset))
      (set-fontset-font fontset
			(cons (decode-char 'ucs #x0D00)
			      (decode-char 'ucs #x0D7f))
			(cons "misc-malayalam" "iso10646-1"))))

Now, my question is, can the whole thing be automated such
that when I just add a font to the system, it gets automatically
added to the fontset-default ? 

Thanks once again to everyone. I will now try to compose some
malayalam text and see whether there are any problems with the
way it renders malayalam.

best regards
-- 
    Ramakrishnan M              (http://www.hackGNU.org/)
    Use Free Software -- Help stamp out Software Hoarding!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: No malayalam glyphs in language/mlm-util.el
       [not found]                               ` <87smugyh08.fsf@vsnl.net>
@ 2003-02-24  1:46                                 ` Kenichi Handa
  0 siblings, 0 replies; 24+ messages in thread
From: Kenichi Handa @ 2003-02-24  1:46 UTC (permalink / raw)
  Cc: monnier+gnu/emacs

In article <87smugyh08.fsf@vsnl.net>, gnu@vsnl.net (Ramakrishnan M) writes:
> Ah.. I finally could see malayalam. Thanks to all of you
> who helped me get this working. I did the following in
> ~/.emacs

> (if (eq 'x window-system)
>     (let ((fontset (query-fontset (frame-parameter nil 'font))))
>       (when (not fontset)
> 	(setq fontset "fontset-default")
> 	(set-default-font fontset))
>       (set-fontset-font fontset
> 			(cons (decode-char 'ucs #x0D00)
> 			      (decode-char 'ucs #x0D7f))
> 			(cons "misc-malayalam" "iso10646-1"))))

I think you can simply do this:

(if (featurep 'fontset)
    (set-fontset-font "fontset-default"
		      (cons (decode-char 'ucs #x0D00)
			    (decode-char 'ucs #x0D7f))
		      (cons "misc-malayalam" "iso10646-1")))

> Now, my question is, can the whole thing be automated such
> that when I just add a font to the system, it gets automatically
> added to the fontset-default ? 

There are fonts that have malayalam glyphs other than
"misc-malayalam", e.g. the font distribute here.
	http://openlab.jp/efont/dist/unicode-bdf/
They don't have "misc-malayalam" name but can be used in
Emacs as well.

So, even if Emacs finds "misc-malayalam" font, it doesn't
mean a user want to use it.

The problem of "iso10646-1" fonts is that, inspite of that
registy name, they don't contain the whole glyphs for
iso10646.  To select a proper font for for a specific
character automatically, Emacs has to check contents of each
font.  The current Emacs doesn't have this facility.  As I
implemented it for emacs-unicode, I'd like to ask people to
wait for emacs-unicode.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2003-02-24  1:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-22 11:22 No malayalam glyphs in language/mlm-util.el Ramakrishnan M
  -- strict thread matches above, loose matches on Subject: below --
2003-02-11 18:01 no font shown with tamil.el Robert J. Chassell
2003-02-12 20:33 ` Richard Stallman
2003-02-13 23:47   ` Kenichi Handa
2003-02-14 11:00     ` Kenichi Handa
2003-02-14 14:35       ` No malayalam glyphs in language/mlm-util.el Robert J. Chassell
2003-02-14 19:58         ` Raja R Harinath
2003-02-14 21:50           ` Robert J. Chassell
2003-02-14 22:20             ` Raja R Harinath
2003-02-15  0:43               ` Robert J. Chassell
2003-02-15  3:16                 ` Ramakrishnan M
2003-02-15  3:34                 ` Ramakrishnan M
2003-02-15 15:40                 ` Robert J. Chassell
2003-02-15 16:00                   ` Ramakrishnan M
2003-02-15 17:54                     ` Benjamin Riefenstahl
2003-02-15 18:29                       ` Raja R Harinath
2003-02-16  5:27                       ` Ramakrishnan M
2003-02-17  6:26                         ` Kenichi Handa
2003-02-17 14:41                           ` Stefan Monnier
2003-02-18 11:51                             ` Kenichi Handa
2003-02-19  6:16                               ` Kenichi Handa
     [not found]                               ` <87smugyh08.fsf@vsnl.net>
2003-02-24  1:46                                 ` Kenichi Handa
2003-02-20 11:09                       ` Kenichi Handa
2003-02-20 12:26                         ` Juanma Barranquero
2003-02-20 12:50                           ` Kenichi Handa
2003-02-21 21:43                         ` Richard Stallman
     [not found]                     ` <1045400184.16187.694.camel@uma>
     [not found]                       ` <1045406040.597.28.camel@debian>
2003-02-17 20:36                         ` Richard Stallman
2003-02-17 23:43                           ` Kenichi Handa

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.