Alex Schroeder | 11 Sep 15:54
X-Face

Re: emacs-bidi: arabic

TAKAHASHI Naoto <ntakahas <at> m17n.org> writes:

>> When I enable auto composition, then there is no font available (I use
>> the m17 font tarball you suggest on the web site).  The characters are
>> all hollow boxes.  When I disable font-lock-mode, it works again --
>
> What do you mean by "it works again"?  Does "works" mean "Arabic
> characters are displayed"?  If so, when did it "work" before?  Before
> you enabled auto-composition?

Sorry for the poor wording.  When I type the characters, the glyphs
are displayed.  When I enable auto-composition, the glyphs are
replaced by rectangles.  When I call M-x font-lock-mode, the glyphs
are displayed again -- but without composition.  I guess this means
when I disable font-lock-mode, auto-composition is disabled as well.
This seems logical in retrospect, but confused me at the time, because
the menu item remained checked.  Perhaps font-lock should set
composition-lock-mode as well.  That is, if I read the keymap
correctly.  As you say on the web page that the latest font-lock stuff
gives you trouble, this is probably not urgent.

>> How can I check wether the right fonts are used?
>
> M-x describe-fontset

This seems to have a standard value, except for the few Neep Alt
mentionings.

Fontset: -*-*-medium-r-*-*-20-*-*-*-c-*-fontset-startup
CHARSET or CHAR RANGE	FONT NAME
(Continue reading)

TAKAHASHI Naoto | 13 Sep 04:35

Re: Re: emacs-bidi: arabic

Alex Schroeder writes:

> Perhaps the correct question to ask is "How do I check wether the
> characters in the given range are really in font X?"

AFAIK, you can't.  It is beyond the ability of (the current) Emacs
Lisp.

> When I do this, composition results in glyphs being displayed -- yay!

Congratulations.

> One other problem pops up then, however.  Something with the frame
> size and font positioning is wrong.  The resulting frame is 227 normal
> (latin number) characters long.  For each lating character, there is a
> lot of whitespace above and below, such that latin text seems to be
> double spaced.  I can provide screenshots if you are interested.

1. Emacs calculates the frame size based on the FONTBOUNDINGBOX of its
   ASCII font.

2. You requested Emacs to use the m17n font not only for Arabic but
   for all characters, including ASCII.

3. The m17n fonts are proportional fonts.  Some glyphs are very wide
   and some glyphs are very tall.  Therefore its FONTBOUNDINGBOX is
   very big.

> Perhaps I did something wrong when installing the m17n fonts, or there
> is some bad interaction with my X?
(Continue reading)

Alex Schroeder | 13 Sep 18:47
X-Face

Re: Re: emacs-bidi: arabic

TAKAHASHI Naoto <ntakahas <at> m17n.org> writes:

>   (set-fontset-font
>    "fontset-default"
>    (cons (decode-char 'ucs #x0600) (decode-char 'ucs #x06ff)) ; arabic
>    "-m17n-*--20-*-iso10646-1")

Thanks for your instructions.  This works great.

Alex.
--

-- 
I will be in Istanbul next week.

Gmane