![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
Hello, especially Hans and Kai, I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support: 1. Decomposing 2 part Matras (dependent vowels) - 0D4A, 0D4B, 0D4C for Malayalam [Test cases 2 & 4]. This is needed (at least) for Tamil also. I guess it is as simple as replacing one code point with 2 others - example: replace 0D4A with 0D46, 0D3E. See page 3 of this Unicode standard: http://www.unicode.org/charts/PDF/U0D00.pdf 2. Handling "pref" opentype feature for v2 opentype spec (script tag "mlm2"). This is required for Malayalam Ra ligature, the glyph is formed correctly but it needs to be reordered as pre-base to the base syllable [Test case 1]. (Note that the old spec "mlym" handles "Ra form" as "pstf" and no reordering required). You can observe the difference in Test case 5 - Ra form should be attached to first consonant instead of second one ("mlm2" needs glyph formed by Virama+Ra to be reordered as pre-base to first consonant, while "mlym" doesn't need to). 3. Handling "pstf" opentype feature. It works mostly [Test case 8], except when a post-base Matra follows [Test case 9]. 4. Test cases 6 & 7 shows an example where glyph formation fails when a "pstf" Ya follows. This works correctly with some other conjuncts, though. 4. font-odv.lua hard coded Devanagari Virama (094D) and Ra (0930) in certain places, which needs to use table values to handle other scripts. 5. I had to change "methods.deva" to "methods.mlym" and "methods.dev2" to "methods.mlm2" to get this working, not sure how best to handle multiple scripts. 6. There are other cases like Dot-reph (0D4E) which uses GPOS table and requires reordering as post-base to the syllable follows it, but I haven't looked into them yet. i) The font used is Rachana, which supports both "mlm2" and "mlym" specs, can be downloaded from here: http://download.savannah.gnu.org/releases/smc/fonts/malayalam-fonts-6.0/Rach... You can switch to "mlm2" and "mlym" in test case. ii) Expected rendering of this test case: http://rajeeshknambiar.fedorapeople.org/ConTeXt/context-test.png iii) Test case: ----------- 8< --------- \usemodule[font-odv] \definefontfeature[malayalam][mode=node,language=dflt,script=mlm2,akhn=yes,blwf=yes,half=yes,pres=yes,blws=yes,psts=yes,haln=no] %\definefontfeature[malayalam][mode=node,language=dflt,script=mlym,akhn=yes,blwf=yes,half=yes,pres=yes,blws=yes,psts=yes,haln=no] \starttypescript [serif] [rachana] [name] \definefontsynonym[Serif] [file:rachana][features={malayalam}] \stoptypescript \starttypescript [rachana] \definetypeface[rachana][rm][serif][rachana][default] \definetypeface[rachana][mm][math] [modern][default] \stoptypescript \setupbodyfont[rachana] \starttext 1. \char"0D15 \char"0D4D \char"0D24 \char"0D4D \char"0D30 \\ % ക്ത്ര 2. \char"0D15 \char"0D4D \char"0D24 \char"0D4D \char"0D30 \char"0D4B \\ % ക്ത്രോ 3. \char"0D38 \char"0D4D \char"0D2A \char"0D4D \char"0D30 \\ % സ്പ്ര 4. \char"0D38 \char"0D4D \char"0D2A \char"0D4D \char"0D30 \char"0D4C \\ % സ്പ്രൌ 5. \char"0D24 \char"0D4D \char"0D30 \char"0D2A \\ % ത്രപ 6. \char"0D24 \char"0D4D \char"0D38 \\ % ത്സ 7. \char"0D24 \char"0D4D \char"0D38 \char"0D4D \char"0D2F \\ % ത്സ്യ 8. \char"0D15 \char"0D4D \char"0D2F \\ % ക്യ 9. \char"0D15 \char"0D4D \char"0D2F \char"0D42 \\ % ക്യൂ \stoptext ----------- >8 --------- Let me know if you need additional information or clarifications on test cases. [Patch, test case, expected output image etc are also available here: http://rajeeshknambiar.fedorapeople.org/ConTeXt/] -- Cheers, Rajeesh http://rajeeshknambiar.wordpress.com
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 1/4/2014 10:36 PM, Rajeesh K Nambiar wrote:
Hello, especially Hans and Kai,
I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support:
in next beta (some a bit different) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Mon, Jan 6, 2014 at 10:33 PM, Hans Hagen
On 1/4/2014 10:36 PM, Rajeesh K Nambiar wrote:
Hello, especially Hans and Kai,
I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support:
in next beta (some a bit different)
Thank you very much for incorporating it! Just hit this with latest beta (same test case as before): error: .../context/tex/texmf-context/tex/context/base/font-odv.lua:1603: attempt to call global 'setfield' (a nil value)
-- Cheers, Rajeesh
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Mon, Jan 6, 2014 at 9:11 PM, Rajeesh K Nambiar
On Mon, Jan 6, 2014 at 10:33 PM, Hans Hagen
wrote: On 1/4/2014 10:36 PM, Rajeesh K Nambiar wrote:
Hello, especially Hans and Kai,
I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support:
in next beta (some a bit different)
Thank you very much for incorporating it!
Just hit this with latest beta (same test case as before):
error: .../context/tex/texmf-context/tex/context/base/font-odv.lua:1603: attempt to call global 'setfield' (a nil value)
As of yesterday's beta, I get the following error: font-odv.lua:879: attempt to index local 'start' (a number value) Probably you're still updating things, am I testing prematurely?
-- Cheers, Rajeesh
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 1/8/2014 6:50 PM, Rajeesh K Nambiar wrote:
On Mon, Jan 6, 2014 at 9:11 PM, Rajeesh K Nambiar
wrote: On Mon, Jan 6, 2014 at 10:33 PM, Hans Hagen
wrote: On 1/4/2014 10:36 PM, Rajeesh K Nambiar wrote:
Hello, especially Hans and Kai,
I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support:
in next beta (some a bit different)
Thank you very much for incorporating it!
Just hit this with latest beta (same test case as before):
error: .../context/tex/texmf-context/tex/context/base/font-odv.lua:1603: attempt to call global 'setfield' (a nil value)
As of yesterday's beta, I get the following error: font-odv.lua:879: attempt to index local 'start' (a number value)
Probably you're still updating things, am I testing prematurely?
it more looks liek some mixup of files at your end (there is no 'start' in that line) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Wed, Jan 8, 2014 at 9:36 PM, Hans Hagen
On 1/8/2014 6:50 PM, Rajeesh K Nambiar wrote:
On Mon, Jan 6, 2014 at 9:11 PM, Rajeesh K Nambiar
wrote: On Mon, Jan 6, 2014 at 10:33 PM, Hans Hagen
wrote: On 1/4/2014 10:36 PM, Rajeesh K Nambiar wrote:
Hello, especially Hans and Kai,
I have succeeded to an extent in adding Malayalam shaping to the existing Devanagari shaping. Being a complete novice in Lua and mkiv, I'm at a point where your expertise is needed to proceed further. Please find the attached patch, test case listed below and expected rendering for comparison. Additionally needed to support:
in next beta (some a bit different)
Thank you very much for incorporating it!
Just hit this with latest beta (same test case as before):
error: .../context/tex/texmf-context/tex/context/base/font-odv.lua:1603: attempt to call global 'setfield' (a nil value)
As of yesterday's beta, I get the following error: font-odv.lua:879: attempt to index local 'start' (a number value)
Probably you're still updating things, am I testing prematurely?
it more looks liek some mixup of files at your end (there is no 'start' in that line)
Hi Hans, I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
Hans
-- Regards, Rajeesh
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
I can process your example without problem even though the output doesn’t like for all cases like the text in the image. BTW: Can you attach your test file. Wolfgang
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Wed, Jan 8, 2014 at 10:39 PM, Wolfgang Schuster
Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
: I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
I can process your example without problem even though the output doesn’t like for all cases like the text in the image.
BTW: Can you attach your test file.
Thanks for checking, Wolfgang. Attached the test file.
Wolfgang
-- Regards, Rajeesh
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 08.01.2014 um 22:51 schrieb Rajeesh K Nambiar
On Wed, Jan 8, 2014 at 10:39 PM, Wolfgang Schuster
wrote: Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
: I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
I can process your example without problem even though the output doesn’t like for all cases like the text in the image.
BTW: Can you attach your test file.
Thanks for checking, Wolfgang. Attached the test file.
Remove \usemodule[font-odv], the code is part of the core and reloading it causes only problems. Wolfgang
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Wed, Jan 8, 2014 at 10:53 PM, Wolfgang Schuster
Am 08.01.2014 um 22:51 schrieb Rajeesh K Nambiar
: On Wed, Jan 8, 2014 at 10:39 PM, Wolfgang Schuster
wrote: Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
: I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
I can process your example without problem even though the output doesn’t like for all cases like the text in the image.
BTW: Can you attach your test file.
Thanks for checking, Wolfgang. Attached the test file.
Remove \usemodule[font-odv], the code is part of the core and reloading it causes only problems.
Indeed, that fixes the compilation! And 2-part matras are fine now. But the output (shaping) is not what is expected as you have observed. Notably: 1. When a pre-base matra follows the "akhn" ligatures are broken 2. "pref", "pstf" and "blwf" ligatures are not formed
-- Regards, Rajeesh
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 1/8/2014 11:02 PM, Rajeesh K Nambiar wrote:
On Wed, Jan 8, 2014 at 10:53 PM, Wolfgang Schuster
wrote: Am 08.01.2014 um 22:51 schrieb Rajeesh K Nambiar
: On Wed, Jan 8, 2014 at 10:39 PM, Wolfgang Schuster
wrote: Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
: I just did a clean install of beta to be sure and the issue persists. Indeed there is no 'start' at line 879 in my system as well. I tried on two different systems (both are 32 bit Linux). Are you able to compile the test file?
I can process your example without problem even though the output doesn’t like for all cases like the text in the image.
BTW: Can you attach your test file.
Thanks for checking, Wolfgang. Attached the test file.
Remove \usemodule[font-odv], the code is part of the core and reloading it causes only problems.
Indeed, that fixes the compilation! And 2-part matras are fine now. But the output (shaping) is not what is expected as you have observed. Notably: 1. When a pre-base matra follows the "akhn" ligatures are broken 2. "pref", "pstf" and "blwf" ligatures are not formed
you need to identify the place in the code where that has to happen after which i can have a look at it (with real minimal examples) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/f047a3b5528f6f187ac4ef1c7d81014a.jpg?s=120&d=mm&r=g)
On Thu, Jan 9, 2014 at 7:11 PM, Hans Hagen
Remove \usemodule[font-odv], the code is part of the core and reloading it causes only problems.
Indeed, that fixes the compilation! And 2-part matras are fine now. But the output (shaping) is not what is expected as you have observed. Notably: 1. When a pre-base matra follows the "akhn" ligatures are broken 2. "pref", "pstf" and "blwf" ligatures are not formed
you need to identify the place in the code where that has to happen after which i can have a look at it (with real minimal examples)
With the initial patch I had sent, these were working okay (ie, akhn,
pref, pstf and blwf ligatures were being formed).
Minimal character sequence for test case:
\char"0D26 \char"0D4D \char"0D26 \char"0D47 %%
-- Regards, Rajeesh
participants (3)
-
Hans Hagen
-
Rajeesh K Nambiar
-
Wolfgang Schuster