all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: 5080@emacsbugs.donarmstrong.com
Cc: 5080@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org,
	pnemade@redhat.com, pravi.a@gmail.com, psatpute@redhat.com
Subject: bug#5080: indic text is not displayed correctly in emacs shell
Date: Fri, 04 Dec 2009 21:52:38 +0900	[thread overview]
Message-ID: <tl7ws12c355.fsf@m17n.org> (raw)
In-Reply-To: <tl7zl5zaqdf.fsf@m17n.org> (message from Kenichi Handa on Fri, 04 Dec 2009 21:13:48 +0900)

In article <tl7zl5zaqdf.fsf@m17n.org>, Kenichi Handa <handa@m17n.org> writes:

> In article <3f2beab60912040049we5870bbk9991a3eb37111b21@mail.gmail.com>, Praveen A <pravi.a@gmail.com> writes:
> > (1) font file name (if possible, with the version number)
> > 
> > lohit_ml.ttf (ttf-malayalam-fonts 1:0.5.6)
> > http://ftp.de.debian.org/debian/pool/main/t/ttf-indic-fonts/ttf-indic-fonts_0.5.6.tar.gz
> > 
> > (2) problematic character sequence
> > 
> > 0x0D23 0x0D4D 0x200D
> > 
> > (ണ ് ‍)

> Thank you for the data.  I downloaded lohit_ml.ttf and
> confirmed the bug.  I'll check what is wrong.

Please put the attached file (MLYM-OTF.flt) under ~/.m17n.d/
and try again.  If it works, move that file to
/usr/share/m17n.

---
Kenichi Handa
handa@m17n.org

--- MLYM-OTF.flt ---
;; MLYM-OTF.flt -- Font Layout Table for Malayalam OpenType font
;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009  AIST (H15PRO112)
;; See the end for copying conditions.

(font layouter mlym-otf nil
      (font (nil nil unicode-bmp :otf=mlym=akhn)))

;;; <li> MLYM-OTF.flt
;;;
;;; For Malayalam OpenType fonts to draw the reformed Malayalam script.

;; Tested with the following fonts.  All of these fonts require Halant
;; movement for syllable-final YA and VA, but not for RA and LA.

;; AnjaliOldLipi.ttf
;; Dyuthi3.ttf
;; Kalyani121.ttf
;; Meera_04.ttf
;; Rachana_04.ttf
;; RaghuMalayalamSans2.ttf
;; suruma2.ttf

(category
 ;; C: ordinary consonants (except P)
 ;; P: consonants that have a post form
 ;; H: HALANT
 ;; m: vowel sign (pre)
 ;; b: vowel sign (below)
 ;; p: vowel sign (post)
 ;; A: vowel modifier (post)
 ;; V: independent vowel
 ;; N: ZWNJ (ZERO WIDTH NON-JOINER)
 ;; J: ZWJ (ZERO WIDTH JOINER)
 ;; Z: internal use
 ;; X: generic
 (0x0D00 0x0D7F	?X)			; generic
 (0x0D00        ?Z)			; internal use
 (0x0D02 0x0D03	?A)			; SIGN ANUSVARA .. VISARGA
 (0x0D05 0x0D14	?V)			; LETTER A .. AU
 (0x0D15 0x0D39 ?C)			; LETTER KA .. HA
 (0x0D2F	?P)			; LETTER YA
 (0x0D35	?P)			; LETTER VA
 (0x0D3E 0x0D44	?p)			; VOWEL SIGN AA .. VOCALIC RR
 (0x0D46 0x0D48	?m)			; VOWEL SIGN E .. AI
 (0x0D4D	?H)			; SIGN VIRAMA
 (0x0D57	?p)			; AU LENGTH MARK
 (0x0D60 0x0D61	?V)			; LETTER VOCALIC RR .. VOCALIC LL
 (0x0D62 0x0D63 ?b)			; VOWEL SIGN VOCALIC L .. LL
 (0x0964 0x0965	?X)			; DANDA .. DOUBLE DANDA
 (0x200C	?N)			; ZWNJ
 (0x200D	?J)			; ZWJ
 )

;; Stage 0
;; Decompose two-part vowels.
(generator
 (0
  (cond
   ((0x0D4A)
    0x0D46 0x0D3E)
   ((0x0D4B)
    0x0D47 0x0D3E)
   ((0x0D4C)
    0x0D46 0x0D57)
   ("." =))
  *))

;; Stage 1
;; Syllable identification and reordering.  
;; Put the mark Z after the base consonant.
(generator
 (0
  (cond
   ;; A syllable with a left vowel sign.
   ;;1    2        3  4
   ("([CP](H[CP])*)(m)(p?A?)"
    < | (3 =) (1 move-h) (4 = *) | >)

   ;; A syllable with a right vowel sign, a below vowel sign
   ;; and/or a vowel modifier.
   ;;1    2        3
   ("([CP](H[CP])*)(bA?|pA?|A)"
    < | (1 move-h) (3 = *) | >)

   ;; Forced chillu form.
   ;;1    2        3
   ("([CP](H[CP])*)(HJ)"
    < | (1 move-h) (3 = =) | >)

   ;; A syllable with no vowel signs/modifiers, optionally followed by
   ;; an H or an HN.
   ;;1    2        3
   ("([CP](H[CP])*)(H|HN)?"
    < | (1 move-h) (3 0x0D4D) | >)

   ;; Starting with an independent vowel.
   ("VA?"
    < | (0 = *) | >)

   ("." =))
  *)


 ;; Move the halant that follows the base consonant to the end.
 (move-h
  (cond
   ;; All consonants are P's.
   ("(P)(H)([PH]*)$"
    (1 =) 0x0D00 (3 = *) (2 =))

   ;; One or more Non-P consonants.
   ("([CPH]*C)(H)([PH]+)$"
    (1 = *) 0x0D00 (3 = *) (2 =))

   ;; Otherwise, final consonant is not P.  No need to move H.
   (".+"
    = * 0x0D00)))
 )

;; Stage 2
;; Apply GSUB features.
(generator
 (0
  (cond
   ;; The tested fonts make LA's below form with 1. 'half' + 'blws',
   ;; 2. 'half' + 'pres' or 3. 'akhn'.
   ;; 1   2       3  4
   (" (m)?([CPH]*)(Z)([PHbpAJ]*) "
    | (1 =) (2 otf:mlym=akhn,half,pstf,pres,abvs,blws+) (3 =)
    (4 otf:mlym=pstf+) |)

   ("." =))
  *))

;; Stage 3
;; Second reordering.  If there are glyphs before the base, move left
;; vowel sign to the left of the base.
(generator
 (0
  (cond
   ;; 1   2       3      4
   (" (m)?([^Z ]*)([^Z])Z([^ ]*) "
    | (2 = *) (1 =) (3 =) (4 = *) |)

   ("." =))
  *))

;; Stage 4
;; Apply remaining GSUB and GPOS features to all syllables.  To get
;; correct Y.YA and V.VA conjunctions, we must apply 'psts' to the
;; entire syllable.
(generator
 (0
  (cond
   (" ([^ ]+) "
    (1 otf:mlym=akhn,psts,haln+abvm,blwm,dist))
   ("."
    [ = ]))
  *))

;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
;;   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:








  reply	other threads:[~2009-12-04 12:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 13:43 bug#5080: indic text is not displayed correctly in emacs shell Praveen A
2009-12-01  1:36 ` Kenichi Handa
2009-12-01  4:40   ` Parag Nemade
2009-12-01  5:25     ` Kenichi Handa
2009-12-01  5:39       ` Parag Nemade
2009-12-01  9:32         ` Praveen A
2009-12-01 11:18           ` Parag Nemade
2009-12-03  1:03             ` Kenichi Handa
2009-12-03  7:39               ` Parag Nemade
2009-12-03 11:24                 ` Kenichi Handa
2009-12-03 12:07                   ` Praveen A
2009-12-03 12:26                     ` Pravin Satpute
2009-12-04  2:16                     ` Kenichi Handa
2009-12-04  8:49                       ` Praveen A
2009-12-04 12:13                         ` Kenichi Handa
2009-12-04 12:52                           ` Kenichi Handa [this message]
2009-12-04 13:22                             ` Praveen A
     [not found]                           ` <3f2beab60912040510n9bc3257tdf310f0c5a10c69a@mail.gmail.com>
2009-12-07  1:13                             ` Kenichi Handa
2009-12-07  8:57                               ` Praveen A
2009-12-07 12:00                                 ` Kenichi Handa
2009-12-07 12:15                                   ` Praveen A
2009-12-07 12:29                                     ` Kenichi Handa
2009-12-07 13:03                                       ` Praveen A
2009-12-08  1:55                                         ` Kenichi Handa
2009-12-08  7:26                                           ` Praveen A
2009-12-07 12:56                                   ` Praveen A
2009-12-12 15:41                     ` Praveen A
2009-12-14  2:03                       ` Kenichi Handa
2011-09-18  9:32                       ` Lars Magne Ingebrigtsen
2011-09-20  3:26                         ` Kenichi Handa
2020-08-13  2:04                         ` Stefan Kangas
2020-11-19  2:52                           ` Stefan Kangas
2009-12-01  9:20   ` Praveen A

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tl7ws12c355.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=5080@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=pnemade@redhat.com \
    --cc=pravi.a@gmail.com \
    --cc=psatpute@redhat.com \
    /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 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.