unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25864: 25.1; Incorrect rendering for Bengali compound character
@ 2017-02-23 22:15 Mandar Mitra
  2017-02-24 18:14 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Mandar Mitra @ 2017-02-23 22:15 UTC (permalink / raw)
  To: 25864

The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:

ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 

This sequence is rendered correctly in LibreOffice, gedit, and similar.



In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-12-21 built on lgw01-21
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Linux Mint 18.1 Serena

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 --with-xwidgets=yes 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: 
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [2 times]
funcall-interactively: End of buffer
Mark set [2 times]
funcall-interactively: End of buffer [5 times]
Mark set
command-execute: Command attempted to use minibuffer while in minibuffer

Load-path shadows:
/usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting xwidget-internal move-toolbar
gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 89025 8949)
 (symbols 48 19788 0)
 (miscs 40 90 146)
 (strings 32 14386 3625)
 (string-bytes 1 411504)
 (vectors 16 11826)
 (vector-slots 8 432064 4731)
 (floats 8 164 251)
 (intervals 56 265 0)
 (buffers 976 19)
 (heap 1024 38496 985))





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-23 22:15 bug#25864: 25.1; Incorrect rendering for Bengali compound character Mandar Mitra
@ 2017-02-24 18:14 ` Eli Zaretskii
  2017-02-25 15:05   ` Mandar Mitra
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2017-02-24 18:14 UTC (permalink / raw)
  To: Mandar Mitra; +Cc: 25864

> Date: Fri, 24 Feb 2017 03:45:46 +0530
> From: Mandar Mitra <mandar.mitra@gmail.com>
> 
> The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:
> 
> ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 
> 
> This sequence is rendered correctly in LibreOffice, gedit, and similar.

Can you show snapshots of the incorrect and correct rendering on your
system?





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-24 18:14 ` Eli Zaretskii
@ 2017-02-25 15:05   ` Mandar Mitra
  2017-02-25 15:29     ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Mandar Mitra @ 2017-02-25 15:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25864

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

Eli Zaretskii wrote (Fri, Feb 24, 2017 at 08:14:27PM +0200):
> > Date: Fri, 24 Feb 2017 03:45:46 +0530
> > From: Mandar Mitra <mandar.mitra@gmail.com>
> > 
> > The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:
> > 
> > ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 
> > 
> > This sequence is rendered correctly in LibreOffice, gedit, and similar.
> 
> Can you show snapshots of the incorrect and correct rendering on your
> system?


Attached the compound character (pronounced tra) as rendered by emacs and libreoffice.

Please let me know if you need any other details.

Thanks,
Mandar.

[-- Attachment #2: tra-emacs.png --]
[-- Type: image/png, Size: 1372 bytes --]

[-- Attachment #3: tra-loffice.png --]
[-- Type: image/png, Size: 1299 bytes --]

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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-25 15:05   ` Mandar Mitra
@ 2017-02-25 15:29     ` Eli Zaretskii
  2017-02-27 14:01       ` handa
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2017-02-25 15:29 UTC (permalink / raw)
  To: Mandar Mitra, Kenichi Handa; +Cc: 25864

> Date: Sat, 25 Feb 2017 20:35:30 +0530
> From: Mandar Mitra <mandar.mitra@gmail.com>
> Cc: 25864@debbugs.gnu.org
> 
> Eli Zaretskii wrote (Fri, Feb 24, 2017 at 08:14:27PM +0200):
> > > Date: Fri, 24 Feb 2017 03:45:46 +0530
> > > From: Mandar Mitra <mandar.mitra@gmail.com>
> > > 
> > > The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:
> > > 
> > > ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 
> > > 
> > > This sequence is rendered correctly in LibreOffice, gedit, and similar.
> > 
> > Can you show snapshots of the incorrect and correct rendering on your
> > system?
> 
> 
> Attached the compound character (pronounced tra) as rendered by emacs and libreoffice.

Thanks.

On MS-Windows, I see the character rendered by Emacs as in your
LibreOffice snapshot.  So I think the problem is specific to libotf
and m17n_flt, or maybe you need to upgrade them to their latest
versions.

I will CC Handa-san, who maintains m17n_flt, in the hope that he could
comment on the problem.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-25 15:29     ` Eli Zaretskii
@ 2017-02-27 14:01       ` handa
  2017-02-27 15:05         ` Mandar Mitra
  0 siblings, 1 reply; 18+ messages in thread
From: handa @ 2017-02-27 14:01 UTC (permalink / raw)
  To: mandar.mitra; +Cc: 25864

Hi,

Which Bengali font are you using with Emacs?
If you are not sure about it, please type C-u C-x = while putting point
(cursor) on that incorrectly rendered Bengali character.  The *Help*
buffer shows which font is used.

---
K. Handa
handa@gnu.org

In article <83o9xqqofm.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > Date: Sat, 25 Feb 2017 20:35:30 +0530
> > From: Mandar Mitra <mandar.mitra@gmail.com>
> > Cc: 25864@debbugs.gnu.org
> > 
> > Eli Zaretskii wrote (Fri, Feb 24, 2017 at 08:14:27PM +0200):
> > > > Date: Fri, 24 Feb 2017 03:45:46 +0530
> > > > From: Mandar Mitra <mandar.mitra@gmail.com>
> > > > 
> > > > The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:
> > > > 
> > > > ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 
> > > > 
> > > > This sequence is rendered correctly in LibreOffice, gedit, and similar.
> > > 
> > > Can you show snapshots of the incorrect and correct rendering on your
> > > system?
> > 
> > 
> > Attached the compound character (pronounced tra) as rendered by emacs and libreoffice.

> Thanks.

> On MS-Windows, I see the character rendered by Emacs as in your
> LibreOffice snapshot.  So I think the problem is specific to libotf
> and m17n_flt, or maybe you need to upgrade them to their latest
> versions.

> I will CC Handa-san, who maintains m17n_flt, in the hope that he could
> comment on the problem.






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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-27 14:01       ` handa
@ 2017-02-27 15:05         ` Mandar Mitra
  2017-02-28 16:25           ` handa
  0 siblings, 1 reply; 18+ messages in thread
From: Mandar Mitra @ 2017-02-27 15:05 UTC (permalink / raw)
  To: handa; +Cc: 25864

handa wrote (Mon, Feb 27, 2017 at 11:01:37PM +0900):
> Hi,
> 
> Which Bengali font are you using with Emacs?

Hi, I'm using Lohit Bengali. I have the following in my .emacs:

(set-fontset-font t (cons (decode-char 'ucs #x0980)
                          (decode-char 'ucs #x09ff))
                    (font-spec :name "Lohit Bengali" :size 16.0))

I also tried SutonnyBanglaOMJ and SoleimanLipi, both of which have the same problem. Please let me know if there's another font that I should try.

BTW, I tried this on Linux Mint 18.1 via a virtual machine, and observed the same problem. I can try this again and report the versions of libotf and m17n_flt if that helps.

Many thanks for your time!
-mandar.


> If you are not sure about it, please type C-u C-x = while putting point
> (cursor) on that incorrectly rendered Bengali character.  The *Help*
> buffer shows which font is used.
> 
> ---
> K. Handa
> handa@gnu.org
> 
> In article <83o9xqqofm.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > Date: Sat, 25 Feb 2017 20:35:30 +0530
> > > From: Mandar Mitra <mandar.mitra@gmail.com>
> > > Cc: 25864@debbugs.gnu.org
> > > 
> > > Eli Zaretskii wrote (Fri, Feb 24, 2017 at 08:14:27PM +0200):
> > > > > Date: Fri, 24 Feb 2017 03:45:46 +0530
> > > > > From: Mandar Mitra <mandar.mitra@gmail.com>
> > > > > 
> > > > > The following Bengali compound character is not rendered correctly. To reproduce, start emacs -Q, and type / paste from a character map the following text:
> > > > > 
> > > > > ত্র (0x09A4, 0x09CD, Ox09B0) should be rendered as something that looks similar to এ. 
> > > > > 
> > > > > This sequence is rendered correctly in LibreOffice, gedit, and similar.
> > > > 
> > > > Can you show snapshots of the incorrect and correct rendering on your
> > > > system?
> > > 
> > > 
> > > Attached the compound character (pronounced tra) as rendered by emacs and libreoffice.
> 
> > Thanks.
> 
> > On MS-Windows, I see the character rendered by Emacs as in your
> > LibreOffice snapshot.  So I think the problem is specific to libotf
> > and m17n_flt, or maybe you need to upgrade them to their latest
> > versions.
> 
> > I will CC Handa-san, who maintains m17n_flt, in the hope that he could
> > comment on the problem.
> 





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-27 15:05         ` Mandar Mitra
@ 2017-02-28 16:25           ` handa
  2017-02-28 19:21             ` Mandar Mitra
  0 siblings, 1 reply; 18+ messages in thread
From: handa @ 2017-02-28 16:25 UTC (permalink / raw)
  To: Mandar Mitra; +Cc: 25864

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

In article <20170227150547.GD6085@gmail.com>, Mandar Mitra <mandar.mitra@gmail.com> writes:

> handa wrote (Mon, Feb 27, 2017 at 11:01:37PM +0900):
> > Hi,
> > 
> > Which Bengali font are you using with Emacs?

> Hi, I'm using Lohit Bengali. I have the following in my .emacs:

> (set-fontset-font t (cons (decode-char 'ucs #x0980)
>                           (decode-char 'ucs #x09ff))
>                     (font-spec :name "Lohit Bengali" :size 16.0))

Thank you for the info.  I installed that font and confirmed the wrong
rendering as you wrote.

It seems that this patch should be applied to the file BENG-OTF.flt
which is included in m17n-db package.

diff --git a/FLT/BENG-OTF.flt b/FLT/BENG-OTF.flt
index 45cc554..0cc5e76 100644
--- a/FLT/BENG-OTF.flt
+++ b/FLT/BENG-OTF.flt
@@ -232,7 +232,7 @@
  (lang-forms
   (cond
    ("(.H)J" (1 :otf=beng=half+))
-   (".H" :otf=beng=blwf,half,vatu+)
+   (".+H" :otf=beng=blwf,half,vatu+)
    ("." =)))
 
  (post

I attach a version which contains the above change.  Please put that
file under ~/.m17n.d and start Emacs again.

Does it work?  Doesn't it have a bad side effect for the rendering of
other Bengali pattern?

---
K. Handa
handa@gnu.org



[-- Attachment #2: BENG-OTF.flt --]
[-- Type: application/octet-stream, Size: 7494 bytes --]

;; BENG-OTF.flt -- Font Layout Table for Bengali OpenType fonts
;; Copyright (C) 2004, 2007, 2010 AIST (H15PRO112)
;; See the end for copying conditions.

(font layouter beng-otf nil
      (version "1.6.0")
      (font (nil nil unicode-bmp :otf=beng)))

;;; <li> BENG-OTF.flt
;;;
;;; For Bengali OpenType fonts to draw the Bengali script.  

;; After-base glyph order for rendering:
;; 1. below form consonants
;; 2. below matra
;; 3. reph
;; 4. candrabindu (0981)
;; 5. post form consonants
;; 6. post matra
;; 7. anusvara (0982) and visarga (0983)

(category
 ;; X: generic
 ;; V: independent vowel
 ;; C: consonant
 ;; B: BA
 ;; Y: YA
 ;; R: RA
 ;; T: KHANDA TA
 ;; n: NUKTA
 ;; H: HALANT
 ;; m: vowel sign (pre)
 ;; b: vowel sign (below)
 ;; p: vowel sign (post)
 ;; a: vowel modifier (above)
 ;; A: vowel modifier (post)
 ;; N: ZWNJ
 ;; J: ZWJ
 (0x0980 0x09FF	?X)			; generic
 (0x0981	?a)			; SIGN CANDRABINDU
 (0x0982 0x0983	?A)			; SIGN ANUSVARA .. VISARGA
 (0x0985 0x0994	?V)			; LETTER A .. AU
 (0x0995 0x09B9	?C)			; LETTER KA .. HA
 (0x09AC	?B)			; LETTER BA
 (0x09AF	?Y)			; LETTER YA
 (0x09B0	?R)			; LETTER RA
 (0x09BC	?n)			; SIGN NUKTA
 (0x09BE	?p)			; VOWEL SIGN AA
 (0x09BF	?m)			; VOWEL SIGN I
 (0x09C0	?p)			; VOWEL SIGN II
 (0x09C1 0x09C4	?b)			; VOWEL SIGN U .. RR
 (0x09C7 0x09C8	?m)			; VOWEL SIGN E .. AI
 (0x09CD	?H)			; SIGN VIRAMA
 (0x09CE	?T)			; LETTER KHANDA TA
 (0x09D7	?p)			; AU LENGTH MARK
 (0x09DC 0x09DF	?C)			; LETTER RRA .. YYA
 (0x09E0 0x09E1	?V)			; LETTER VOCALIC RR, LL
 (0x09E2 0x09E3	?b)			; VOWEL SIGN L .. LL
 (0x09F0	?R)			; LETTER RA WITH MIDDLE DIAGONAL
 (0x09F1	?C)			; LETTER RA WITH LOWER DIAGONAL

 (0x200C	?N)			; ZWNJ
 (0x200D	?J)			; ZWJ
 (0x25CC	?X)			; DOTTED CIRCLE

 (rphf		?r)
 (pstf		?P)
 )

;; Stage 0
;; Preprocessing
(generator
 (0
  (cond
   ;; Decompose two-part vowel signs.
   ((0x09CB)
    0x09C7 0x09BE)
   ((0x09CC)
    0x09C7 0x09D7)

   ;; Many fonts still do not have KHANDA-TA.
   ((0x09CE)
    (cond
     ((font-facility 0x09CE) =)
     (".+" 0x09A4 0x09CD 0x200D)))

   ;; consonant + NUKTA
   ((0x09A1 0x09BC)
    0x09DC)
   ((0x09A2 0x09BC)
    0x09DD)
   ((0x09AF 0x09BC)
    0x09DF)

   ("." =))
  *))

;; Stage 1
;; Syllable identification
(generator
 (0
  (cond
   ;; Syllables with an independent vowel
   ("(RH)?(Vn?)((J?H[BYR])?m?b?p?n?a?A?)"
    < | (1 = =) (2 :otf=beng=nukt+) (3 = *) | >)

   ;; KHANDA-TA combines only with reph.
   ("(RH)?(T)"
    < (2 =) (1 :otf=beng=rphf+) >)

   ;; Consonant-based syllables
   ;;1        23                   4
   ("([CBYR]n?((J?H|HJ?)[CBYR]n?)*)(H[NJ]?|m?([NJ]?b)?p?n?a?A?)"
    < |
    (cond
     (".+HJ$" :otf=beng=nukt,akhn+)
     ("(.+)(H)N?$" (1 :otf=beng=nukt,akhn+) (2 =) 0x200C)
     (".+" :otf=beng=nukt,akhn+))
    | >)

   ;; Two-part vowel signs
   ((0x09C7 0x09BE)
    (cond
     ((font-facility 0x25CC) < = 0x25CC = >)
     (".+" [ 0x09CB ])))
   ((0x09C7 0x09D7)
    (cond
     ((font-facility 0x25CC) < = 0x25CC = >)
     (".+" [ 0x09CC ])))

   ;; Combining marks are displayed with a DOTTED CIRCLE.
   ("m"
    (cond
     ((font-facility 0x25CC) < = 0x25CC >)
     ("." [ = ])))
   ("[nHbpaA]"
    (cond
     ((font-facility 0x25CC) < 0x25CC = >)
     ("." [ = ])))

   ;; Isolated blwf and pstf are displayed with a DOTTED CIRCLE in the
   ;; next stage.
   ("(J)(H)([BYR])"
    < | (1 =) (3 =) (2 =) | >)

   ("." =))
  *))

;; Stage 2
;; Reorder halant for blwf and pstf
(generator
 (0
  (cond
   ;; Isolated blwf and pstf
   (" J([BYR]H) "
    (cond
     ((font-facility 0x25CC) < 0x25CC (1 :otf=beng=blwf,pstf+) >)
     (" J([BYR]H) " [ (1 :otf=beng=blwf,pstf+) ])))

   ;; Syllables with an overt halant
   (" (RHJ?)?([^ ]+)(HN) "
    | (1 = *) (2 reorder) (3 = =) |)

   ;; Syllables with a below matra
   (" (RHJ?)?([^mbpaA ]*[^mbpaANJ ])(m?[NJ]?bp?n?a?A?) "
    | (1 = *) (2 reorder) (3 = *) |)

   ;; Other syllables
   (" (RHJ?)?([^mbpaA ]+)(m?p?n?a?A?) "
    | (1 = *) (2 reorder) (3 = *) |)

   ("." =))
  *)

 (reorder
  ("(.|.+([^YJ]|JY|HJ))((J?HY)*)$"
   (1 reorder-BR *) (3 reorder-Y *)))
 
 ;; Unlike Devanagari and Gujarati, vattu in Bengali does not have a
 ;; half form.  Therefore the sequence CHRHC can be safely reordered
 ;; to CRHHC.  Same for CHBHC.
 (reorder-BR
  (cond
   ("J?(H)([BR])"
    (2 =) (1 =))
   ("." =)))

 (reorder-Y
  ("J?(H)(Y)"
   (2 =) (1 =)))
 )

;; Stage 3
;; Language forms and matra reordering
(generator
 (0
  (cond
   ;; Overt halant forms
   (" (RHJ?)?([^ ]+)(HN) "
    |
    (1 (cond ("RHJ" :otf=beng=half+)
	     ("RH" :otf=beng=rphf+)))
    (2 b4post) (2 post) (3 = =) |)

   ;; Syllables with a below matra
   ;; 1      2              3     4         5
   (" (RHJ?)?([^mb]*[^mbNJ])(mn?)?([NJ]?bn?)(p?n?a?A?) "
    | (3 = *)
    (1 (cond ("RHJ" :otf=beng=half+)
	     ("RH" :otf=beng=rphf+)))
    (2 b4post) (4 = *) (2 post) (5 = *) |)

   ;; Other syllables
   ;; 1      2          3     4
   (" (RHJ?)?([^mpaA ]*)(mn?)?(p?n?a?A?) "
    | (3 = *)
    (1 (cond ("RHJ" :otf=beng=half+)
	     ("RH" :otf=beng=rphf+)))
    (2 b4post) (2 post) (4 = *) |)

   ("." =))
  *)

 (b4post
  (cond
   ("(.H)J?(.*)"
    (1 :otf=beng=half+)
    (2 ("(.|.+([^YH]|JY|[BR]H))((YH)*)$" (1 lang-forms *))))
   ("(.|.+([^YH]|JY|[BR]H))((YH)*)"
    (1 lang-forms *))))

 (lang-forms
  (cond
   ("(.H)J" (1 :otf=beng=half+))
   (".+H" :otf=beng=blwf,half,vatu+)
   ("." =)))

 (post
  ("(.|.+([^YH]|JY|[BR]H))((YH)+)$"
   (3 :otf=beng=pstf+)))
 )

;; Stage 4
;; Final reordering #1 (Move pre-base matra after the last halant)
(generator
 (0
  (cond
   ;; 1    2         3
   (" (mn?)([^ ]+HJ?)([^H ]+) "
    | (2 = *) (1 = *) (3 = *) |)

   ("." =))
  *))

;; Stage 5
;; Final reordering #2 (Move reph after the first halant)
(generator
 (0
  (cond
   ;; Syllables with a reph and an explicit halant
   ;; 1     2  3           4
   (" (mn?)?(r)([^HP ]+HJ?)([^ ]*) "
    | (1 = *) (3 = *) (2 =) (4 = *) |)

   ;; A reph without explicit halant
   ;; 1     2  3          4
   (" (mn?)?(r)([^PpaA ]+)(P*(HN)?p?n?a?A?) "
    | (1 = *) (3 = *) (2 =) (4 = *) |)

   ("." =))
  *))

;; Stage 6
;; Nukta for matra and Presentation forms
(generator
 (0
  (cond
   (" (mn?)?([^ ]+) "
    | (1 :otf=beng=nukt,init+) (2 :otf=beng=nukt,pres,abvs,blws,psts,haln+) |)

   ("." =))
  *))

;; Stage 7
;; Remove ZWNJ/ZWJ
(generator
 (0
  (cond
   ("[NJ]")

   ("." =))
  *))

;; Stage 8
;; GPOS processing
(generator
 (0
  (cond
   (" ([^ ]+) "
    (1 :otf=beng=+abvm,blwm,dist))

   ("." =))
  *))

;; Copyright (C) 2004, 2007, 2010
;;   National Institute of Advanced Industrial Science and Technology (AIST)
;;   Registration Number H15PRO112

;; This file is part of the m17n database; a sub-part of the m17n
;; library.

;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.

;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Lesser General Public License for more details.

;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;; Local Variables:
;; mode: emacs-lisp
;; End:

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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-28 16:25           ` handa
@ 2017-02-28 19:21             ` Mandar Mitra
  2017-02-28 19:48               ` Eli Zaretskii
  2017-03-01 12:40               ` handa
  0 siblings, 2 replies; 18+ messages in thread
From: Mandar Mitra @ 2017-02-28 19:21 UTC (permalink / raw)
  To: handa; +Cc: 25864

handa wrote (Wed, Mar 01, 2017 at 01:25:30AM +0900):
> It seems that this patch should be applied to the file BENG-OTF.flt
> which is included in m17n-db package.
> 
> diff --git a/FLT/BENG-OTF.flt b/FLT/BENG-OTF.flt
> index 45cc554..0cc5e76 100644
> --- a/FLT/BENG-OTF.flt
> +++ b/FLT/BENG-OTF.flt
> @@ -232,7 +232,7 @@
>   (lang-forms
>    (cond
>     ("(.H)J" (1 :otf=beng=half+))
> -   (".H" :otf=beng=blwf,half,vatu+)
> +   (".+H" :otf=beng=blwf,half,vatu+)
>     ("." =)))
>  
>   (post
> 
> I attach a version which contains the above change.  Please put that
> file under ~/.m17n.d and start Emacs again.
> 
> Does it work?  Doesn't it have a bad side effect for the rendering of
> other Bengali pattern?

Thank you so much for your super-quick solution! Yes, it works, and "tra" is rendered as it should be. The little bit of testing did not reveal any bad side effects. In particular, I tried many consonant + ra patterns and they are all correctly rendered. If I find any other problems after using this for some more time, I will report.

Again, thank you very much for your time. Warm regards,
Mandar.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-28 19:21             ` Mandar Mitra
@ 2017-02-28 19:48               ` Eli Zaretskii
  2017-03-01 12:40               ` handa
  1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2017-02-28 19:48 UTC (permalink / raw)
  To: Mandar Mitra; +Cc: 25864-done

> Date: Wed, 1 Mar 2017 00:51:40 +0530
> From: Mandar Mitra <mandar.mitra@gmail.com>
> Cc: eliz@gnu.org, 25864@debbugs.gnu.org
> 
> > I attach a version which contains the above change.  Please put that
> > file under ~/.m17n.d and start Emacs again.
> > 
> > Does it work?  Doesn't it have a bad side effect for the rendering of
> > other Bengali pattern?
> 
> Thank you so much for your super-quick solution! Yes, it works, and "tra" is rendered as it should be. The little bit of testing did not reveal any bad side effects. In particular, I tried many consonant + ra patterns and they are all correctly rendered. If I find any other problems after using this for some more time, I will report.

Thanks to both of you, I think we can therefore close this bug report.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-02-28 19:21             ` Mandar Mitra
  2017-02-28 19:48               ` Eli Zaretskii
@ 2017-03-01 12:40               ` handa
  2017-03-01 16:24                 ` Eli Zaretskii
  1 sibling, 1 reply; 18+ messages in thread
From: handa @ 2017-03-01 12:40 UTC (permalink / raw)
  To: Mandar Mitra; +Cc: 25864

In article <20170228192140.GG6085@gmail.com>, Mandar Mitra <mandar.mitra@gmail.com> writes:

> Thank you so much for your super-quick solution! Yes, it works, and
> "tra" is rendered as it should be. The little bit of testing did not
> reveal any bad side effects. In particular, I tried many consonant +
> ra patterns and they are all correctly rendered. If I find any other
> problems after using this for some more time, I will report.

Thank you for checking the patch.  I'll commit that change to m17n-db
repository.

Perhaps something like the following paragraphs helps Bengali users.

============================================================

Emacs running on GNU/Linux system with the m17n library Ver.1.7.1 or the
earlier vesion has a problem with rendering Bengali script.  The problem
can be fixed by installing the newer version of the m17n library (if
any), or by following this procedure:

1. Locate the file BENG-OTF.flt installed on your system as part of the
m17n library.  Usually it is under the directory /usr/share/m17n.

2. Apply the following patch to BENG-OTF.flt

------------------------------------------------------------
diff --git a/FLT/BENG-OTF.flt b/FLT/BENG-OTF.flt
index 45cc554..0cc5e76 100644
--- a/FLT/BENG-OTF.flt
+++ b/FLT/BENG-OTF.flt
@@ -232,7 +232,7 @@
  (lang-forms
   (cond
    ("(.H)J" (1 :otf=beng=half+))
-   (".H" :otf=beng=blwf,half,vatu+)
+   (".+H" :otf=beng=blwf,half,vatu+)
    ("." =)))
 
  (post
------------------------------------------------------------

If you can't modify that file directly, copy it to the directory
~/.m17n.d/ (create it if it doesn't exist), and apply the patch.

============================================================

Eli, where to put that kind of information?  Under "* Runtime problems
related to font handling" of etc/PROBLEMS?  Aren't there any suitable
web-page?

---
K. Handa
handa@gnu.org





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-03-01 12:40               ` handa
@ 2017-03-01 16:24                 ` Eli Zaretskii
  2017-03-04 14:02                   ` handa
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2017-03-01 16:24 UTC (permalink / raw)
  To: handa; +Cc: 25864, mandar.mitra

> From: handa <handa@gnu.org>
> Cc: eliz@gnu.org, 25864@debbugs.gnu.org
> Date: Wed, 01 Mar 2017 21:40:14 +0900
> 
> Perhaps something like the following paragraphs helps Bengali users.
> 
> ============================================================
> 
> Emacs running on GNU/Linux system with the m17n library Ver.1.7.1 or the
> earlier vesion has a problem with rendering Bengali script.  The problem
> can be fixed by installing the newer version of the m17n library (if
> any), or by following this procedure:
> 
> 1. Locate the file BENG-OTF.flt installed on your system as part of the
> m17n library.  Usually it is under the directory /usr/share/m17n.
> 
> 2. Apply the following patch to BENG-OTF.flt
> 
> ------------------------------------------------------------
> diff --git a/FLT/BENG-OTF.flt b/FLT/BENG-OTF.flt
> index 45cc554..0cc5e76 100644
> --- a/FLT/BENG-OTF.flt
> +++ b/FLT/BENG-OTF.flt
> @@ -232,7 +232,7 @@
>   (lang-forms
>    (cond
>     ("(.H)J" (1 :otf=beng=half+))
> -   (".H" :otf=beng=blwf,half,vatu+)
> +   (".+H" :otf=beng=blwf,half,vatu+)
>     ("." =)))
>  
>   (post
> ------------------------------------------------------------
> 
> If you can't modify that file directly, copy it to the directory
> ~/.m17n.d/ (create it if it doesn't exist), and apply the patch.
> 
> ============================================================
> 
> Eli, where to put that kind of information?  Under "* Runtime problems
> related to font handling" of etc/PROBLEMS?

Yes, sounds like a good place.

> Aren't there any suitable web-page?

I'm not aware of any.  I thought the Emacs wiki might be a good
alternative, but I don't seem to be able to find any good place there.

Thanks.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
       [not found] ` <<83d1e1nexa.fsf@gnu.org>
@ 2017-03-01 16:57   ` Drew Adams
  2017-03-01 17:10     ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Drew Adams @ 2017-03-01 16:57 UTC (permalink / raw)
  To: Eli Zaretskii, handa; +Cc: 25864, mandar.mitra

> I thought the Emacs wiki might be a good
> alternative, but I don't seem to be able to find any good place there.

You can create new pages on Emacs Wiki.

You can even create new categories (the things you see on the
main/default page).  At the bottom of any topic page you can
add the names of relevant category pages.  On the category
page you can add a reference to a page in that category.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-03-01 16:57   ` Drew Adams
@ 2017-03-01 17:10     ` Eli Zaretskii
  0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2017-03-01 17:10 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25864, mandar.mitra

> Date: Wed, 1 Mar 2017 08:57:56 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 25864@debbugs.gnu.org, mandar.mitra@gmail.com
> 
> > I thought the Emacs wiki might be a good
> > alternative, but I don't seem to be able to find any good place there.
> 
> You can create new pages on Emacs Wiki.

Yes, but it makes little sense to me to add information there which is
about something two orders of magnitude trickier than anything else on
the wiki.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
       [not found]     ` <<837f48orco.fsf@gnu.org>
@ 2017-03-01 17:14       ` Drew Adams
  2017-03-01 17:50         ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Drew Adams @ 2017-03-01 17:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25864, mandar.mitra

> > > I thought the Emacs wiki might be a good
> > > alternative, but I don't seem to be able to find any good place there.
> >
> > You can create new pages on Emacs Wiki.
> 
> Yes, but it makes little sense to me to add information there which is
> about something two orders of magnitude trickier than anything else on
> the wiki.

So your problem is not, as you said, inability to "find any good place
[for it] there."  You don't think such content belongs on the wiki.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-03-01 17:14       ` Drew Adams
@ 2017-03-01 17:50         ` Eli Zaretskii
  0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2017-03-01 17:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25864, mandar.mitra

> Date: Wed, 1 Mar 2017 09:14:49 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: handa@gnu.org, 25864@debbugs.gnu.org, mandar.mitra@gmail.com
> 
> > Yes, but it makes little sense to me to add information there which is
> > about something two orders of magnitude trickier than anything else on
> > the wiki.
> 
> So your problem is not, as you said, inability to "find any good place
> [for it] there."  You don't think such content belongs on the wiki.

I thought it did, but as I see no stuff there of a similar nature, or
anything close, it seems like the wiki is not for such issues.  Thus
"no good place".





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
       [not found]         ` <<8360jsophb.fsf@gnu.org>
@ 2017-03-01 18:10           ` Drew Adams
  0 siblings, 0 replies; 18+ messages in thread
From: Drew Adams @ 2017-03-01 18:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25864, mandar.mitra

> > > Yes, but it makes little sense to me to add information there which is
> > > about something two orders of magnitude trickier than anything else on
> > > the wiki.
> >
> > So your problem is not, as you said, inability to "find any good place
> > [for it] there."  You don't think such content belongs on the wiki.
> 
> I thought it did, but as I see no stuff there of a similar nature, or
> anything close, it seems like the wiki is not for such issues.  Thus
> "no good place".

The wiki is about anything about Emacs.  It's of course up to
you whether you want to include such info there.

But just because you do not find other, similar info there is
no reason to suppose that such info does not belong on the wiki.

Users of the wiki add whatever topics they think might help
others who use or are interested in Emacs.





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-03-01 16:24                 ` Eli Zaretskii
@ 2017-03-04 14:02                   ` handa
  2017-03-04 14:31                     ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: handa @ 2017-03-04 14:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25864, mandar.mitra

In article <83d1e1nexa.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > Eli, where to put that kind of information?  Under "* Runtime problems
> > related to font handling" of etc/PROBLEMS?

> Yes, sounds like a good place.

Ok, I've just committed that change.

---
K. Handa
handa@gnu.org





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

* bug#25864: 25.1; Incorrect rendering for Bengali compound character
  2017-03-04 14:02                   ` handa
@ 2017-03-04 14:31                     ` Eli Zaretskii
  0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2017-03-04 14:31 UTC (permalink / raw)
  To: handa; +Cc: 25864, mandar.mitra

> From: handa <handa@gnu.org>
> Cc: mandar.mitra@gmail.com, 25864@debbugs.gnu.org
> Date: Sat, 04 Mar 2017 23:02:36 +0900
> 
> In article <83d1e1nexa.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > Eli, where to put that kind of information?  Under "* Runtime problems
> > > related to font handling" of etc/PROBLEMS?
> 
> > Yes, sounds like a good place.
> 
> Ok, I've just committed that change.

Thanks.





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

end of thread, other threads:[~2017-03-04 14:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 22:15 bug#25864: 25.1; Incorrect rendering for Bengali compound character Mandar Mitra
2017-02-24 18:14 ` Eli Zaretskii
2017-02-25 15:05   ` Mandar Mitra
2017-02-25 15:29     ` Eli Zaretskii
2017-02-27 14:01       ` handa
2017-02-27 15:05         ` Mandar Mitra
2017-02-28 16:25           ` handa
2017-02-28 19:21             ` Mandar Mitra
2017-02-28 19:48               ` Eli Zaretskii
2017-03-01 12:40               ` handa
2017-03-01 16:24                 ` Eli Zaretskii
2017-03-04 14:02                   ` handa
2017-03-04 14:31                     ` Eli Zaretskii
     [not found] <<87bmtl5fwx.fsf@gnu.org>
     [not found] ` <<83d1e1nexa.fsf@gnu.org>
2017-03-01 16:57   ` Drew Adams
2017-03-01 17:10     ` Eli Zaretskii
     [not found] <<<87bmtl5fwx.fsf@gnu.org>
     [not found] ` <<<83d1e1nexa.fsf@gnu.org>
     [not found]   ` <<80b987d9-9200-44af-86cf-c6b81ef13435@default>
     [not found]     ` <<837f48orco.fsf@gnu.org>
2017-03-01 17:14       ` Drew Adams
2017-03-01 17:50         ` Eli Zaretskii
     [not found] <<<<87bmtl5fwx.fsf@gnu.org>
     [not found] ` <<<<83d1e1nexa.fsf@gnu.org>
     [not found]   ` <<<80b987d9-9200-44af-86cf-c6b81ef13435@default>
     [not found]     ` <<<837f48orco.fsf@gnu.org>
     [not found]       ` <<07fd0e8a-0214-4ed3-9cc8-97cb471fdd69@default>
     [not found]         ` <<8360jsophb.fsf@gnu.org>
2017-03-01 18:10           ` Drew Adams

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).