all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to get the connected forms of Syriac letters?
@ 2014-12-15 21:12 Fabian Rieger
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Rieger @ 2014-12-15 21:12 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a method to make Emacs show the connected (initial, medial, 
final) forms of Syriac letters?
I'm using the Unicode-OpenType Meltho fonts, in Iceweasel/Firefox this 
works fine, but Emacs gives nothing but the isolated forms.
    The shaping of Arabic seems to work fine (I can't read it, but the 
letters change to isolated forms and back when a space is added or 
deleted inside a copyed word).
    My fonts:

       (set-default-font "DejaVu Sans Mono 20")
       (set-fontset-font "fontset-default" 'syriac
                 "Serto Jerusalem 30")
       (set-fontset-font "fontset-default" 'arabic
                 "Scheherazade 24")

I tried with Debian Wheezy + Emacs 24.4.50.1 (from londo.ganneff.de) & 
25.0.50.1 built with configure option --with-m17n-flt 
(/usr/share/m17n/SYRC-OTF.flt looks promising but doesn't seem to help) 
following
    www.emacswiki.org/emacs-fr/EmacsSnapshotAndDebian
The problem already was there with win2k & Emacs 24.3 a year ago ...

Thanks

Fabian






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

* Re: How to get the connected forms of Syriac letters?
       [not found] <mailman.16150.1418679134.1147.help-gnu-emacs@gnu.org>
@ 2014-12-15 22:32 ` Benjamin Riefenstahl
  2014-12-16 15:37   ` Eli Zaretskii
       [not found]   ` <mailman.16194.1418744256.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Benjamin Riefenstahl @ 2014-12-15 22:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Fabian,

Fabian Rieger writes:
> Is there a method to make Emacs show the connected (initial, medial,
> final) forms of Syriac letters?

I use something like this in my .emacs with Emacs 24.4.1 on Debian
Jessie:

    ;; Tell Emacs to actually use shaping for Syriac (via m17n).
    ;; \u0700-\u074F: Syriac
    ;; \u0640: TATWEEL
    ;; \u200D: ZWJ
    (set-char-table-range
     composition-function-table
     '(?\u0700 . ?\u074F)
     (list ["[\u0700-\u074F\u0640\u200D]+" 0 font-shape-gstring]))

    (defun benny-setup-fonts (frame)
      (set-fontset-font t (?\u0700 . ?\u074F) "Serto Mardin 16" frame))

    ;; Run font setup whenever a new frame is constructed.
    (add-to-list 'after-make-frame-functions 'benny-setup-fonts)

    ;; Run font setup now if we already have a frame.
    (let ((frame (selected-frame)))
      (if frame (benny-setup-fonts frame)))

benny


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

* Re: How to get the connected forms of Syriac Letters?
@ 2014-12-16 11:00 Fabian Rieger
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Rieger @ 2014-12-16 11:00 UTC (permalink / raw)
  To: help-gnu-emacs

Benjamin Riefenstahl wrote
 > I use something like this in my .emacs with Emacs 24.4.1 on Debian
 > Jessie:
 >
 >     ;; Tell Emacs to actually use shaping for Syriac (via m17n).
 >     ;; \u0700-\u074F: Syriac
 >     ;; \u0640: TATWEEL
 >     ;; \u200D: ZWJ
 >     (set-char-table-range
 >      composition-function-table
 >      '(?\u0700 . ?\u074F)
 >      (list ["[\u0700-\u074F\u0640\u200D]+" 0 font-shape-gstring]))
 >
 >     (defun benny-setup-fonts (frame)
 >       (set-fontset-font t (?\u0700 . ?\u074F) "Serto Mardin 16" frame))
 >
 >     ;; Run font setup whenever a new frame is constructed.
 >     (add-to-list 'after-make-frame-functions 'benny-setup-fonts)
 >
 >     ;; Run font setup now if we already have a frame.
 >     (let ((frame (selected-frame)))
 >       (if frame (benny-setup-fonts frame)))

Hi Benny,

that solved the problem. I just had to replace

    (set-fontset-font t (?\u0700 . ?\u074F) ...

with

    (set-fontset-font t (cons (decode-char 'ucs ?\x0700)
  			     (decode-char 'ucs ?\x074F) ...

(The reason for this maybe I'll try to understand next week ...)
and now Syriac really looks fine.

Thanks for your help.

Fabian



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

* Re: How to get the connected forms of Syriac letters?
  2014-12-15 22:32 ` How to get the connected forms of Syriac letters? Benjamin Riefenstahl
@ 2014-12-16 15:37   ` Eli Zaretskii
       [not found]   ` <mailman.16194.1418744256.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-12-16 15:37 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
> Date: Mon, 15 Dec 2014 23:32:53 +0100
> 
>     ;; Tell Emacs to actually use shaping for Syriac (via m17n).
>     ;; \u0700-\u074F: Syriac
>     ;; \u0640: TATWEEL
>     ;; \u200D: ZWJ
>     (set-char-table-range
>      composition-function-table
>      '(?\u0700 . ?\u074F)
>      (list ["[\u0700-\u074F\u0640\u200D]+" 0 font-shape-gstring]))

Yes, this is missing from the basic Emacs setup, I will add it
shortly.

But why did you need to mention TATWEEL and ZWJ there?  (And if ZWJ is
needed, then why not ZWNJ as well?)



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

* Re: How to get the connected forms of Syriac letters?
       [not found]   ` <mailman.16194.1418744256.1147.help-gnu-emacs@gnu.org>
@ 2014-12-16 19:32     ` Benjamin Riefenstahl
  2014-12-16 20:19       ` Eli Zaretskii
       [not found]       ` <mailman.16227.1418762647.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Benjamin Riefenstahl @ 2014-12-16 19:32 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii writes:
> But why did you need to mention TATWEEL and ZWJ there?  (And if ZWJ is
> needed, then why not ZWNJ as well?)

Continuing the experiment, I tried ZWNJ (\u200C).  I get a control
character for this similar to the default ZWJ, but when I add it to the
set-char-table-range expressions it works.  So you are right, we should
add that too.


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

* Re: How to get the connected forms of Syriac letters?
  2014-12-16 19:32     ` Benjamin Riefenstahl
@ 2014-12-16 20:19       ` Eli Zaretskii
       [not found]       ` <mailman.16227.1418762647.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-12-16 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
> Date: Tue, 16 Dec 2014 20:32:40 +0100
> 
> Eli Zaretskii writes:
> > But why did you need to mention TATWEEL and ZWJ there?  (And if ZWJ is
> > needed, then why not ZWNJ as well?)
> 
> Continuing the experiment, I tried ZWNJ (\u200C).  I get a control
> character for this similar to the default ZWJ, but when I add it to the
> set-char-table-range expressions it works.  So you are right, we should
> add that too.

But how is this related to the Syriac script?



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

* Re: How to get the connected forms of Syriac letters?
       [not found]       ` <mailman.16227.1418762647.1147.help-gnu-emacs@gnu.org>
@ 2014-12-16 22:38         ` Benjamin Riefenstahl
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Riefenstahl @ 2014-12-16 22:38 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii writes:
>> > But why did you need to mention TATWEEL and ZWJ there?  (And if ZWJ is
>> > needed, then why not ZWNJ as well?)

> But how is this related to the Syriac script?

Ah, I'm sorry, I thought that was understood.

Syriac (and Mandaic) are similar to Arabic script in type, i.e. cursive
scripts where characters adapt according to context ("shaping").  They
re-use the TATWEEL for justification, and also ZWJ and ZWNJ to force or
prevent shaping.

See <http://en.wikipedia.org/wiki/Syriac_script> and
<http://en.wikipedia.org/wiki/Mandaic_script>.

Syriac script is supported by fonts, by libm17n and by Uniscribe.
Support for Mandaic script is just starting, although it has been in
Unicode for some years.


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

* Re: How to get the connected forms of Syriac Letters?
       [not found] <mailman.16173.1418727837.1147.help-gnu-emacs@gnu.org>
@ 2014-12-18  1:26 ` Stefan Monnier
  2014-12-18 21:42   ` Benjamin Riefenstahl
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2014-12-18  1:26 UTC (permalink / raw)
  To: help-gnu-emacs

>    (set-fontset-font t (?\u0700 . ?\u074F) ...
                        ^^
                        '
-- Stefan


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

* Re: How to get the connected forms of Syriac Letters?
  2014-12-18  1:26 ` How to get the connected forms of Syriac Letters? Stefan Monnier
@ 2014-12-18 21:42   ` Benjamin Riefenstahl
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Riefenstahl @ 2014-12-18 21:42 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier writes:
>>    (set-fontset-font t (?\u0700 . ?\u074F) ...
>                         ^^
>                         '

Indeed, sorry.



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

end of thread, other threads:[~2014-12-18 21:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.16150.1418679134.1147.help-gnu-emacs@gnu.org>
2014-12-15 22:32 ` How to get the connected forms of Syriac letters? Benjamin Riefenstahl
2014-12-16 15:37   ` Eli Zaretskii
     [not found]   ` <mailman.16194.1418744256.1147.help-gnu-emacs@gnu.org>
2014-12-16 19:32     ` Benjamin Riefenstahl
2014-12-16 20:19       ` Eli Zaretskii
     [not found]       ` <mailman.16227.1418762647.1147.help-gnu-emacs@gnu.org>
2014-12-16 22:38         ` Benjamin Riefenstahl
     [not found] <mailman.16173.1418727837.1147.help-gnu-emacs@gnu.org>
2014-12-18  1:26 ` How to get the connected forms of Syriac Letters? Stefan Monnier
2014-12-18 21:42   ` Benjamin Riefenstahl
2014-12-16 11:00 Fabian Rieger
  -- strict thread matches above, loose matches on Subject: below --
2014-12-15 21:12 How to get the connected forms of Syriac letters? Fabian Rieger

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.