You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Carlos Villegas <ca...@uniscope.jp> on 2014/01/14 12:43:36 UTC

thai stacking diacritics

Hi,

We're trying to produce some thai output with FOP but FOP doesn't seem 
to be adjusting the diacritics.
In the following sample, there are two characters separated by a space, 
the first character has one diacritic, the second character has two 
diacritics. I'm not sure if it gets through the mail.
Anyway, the diacritics of the first character should be moved down to 
the same level as the first diacritics of the second character
I'm using ArialUnicodeMS font but I also tried with TH Sarabun and 
Tahoma. I tried several combinations of language and script but none 
worked, so I left it with no settings in the sample. I'm using FOP 1.1.
One interesting thing I noticed, some "above the character" diacritics 
can be stacked above other diacritics or not, whereas others can only 
occur as first one (bottom one) of the stack. That's my understanding, 
I'm not a thai speaker. In some fonts, the diacritics that can be in 
several "above" positions come in the font in the high position. So if 
they occur alone, they need to be adjusted down. That's the case in 
ArialUnicode. In other fonts like Tahoma, all the diacritics come in the 
font at the same "height", the low position, so when stacking, one of 
the diacritics need to be move up.

Any idea if this can be made to work with current FOP.

<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-family="ArialUnicode" margin-top="1cm">
ท้ นื้
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>


Carlos

Re: thai stacking diacritics

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

according to FOP complex script page [1]
Thai script is not fully supported in FOP 1.1.
I don't know if the complex script author (Glenn Adam) plans to add it
soon,  but feedback is always welcome, and userland wishes can help to
determine priority of improvments.

[1] http://xmlgraphics.apache.org/fop/1.1/complexscripts.html#supported_scripts

2014/1/14 Carlos Villegas <ca...@uniscope.jp>:
> Hi,
>
> We're trying to produce some thai output with FOP but FOP doesn't seem to be
> adjusting the diacritics.
> In the following sample, there are two characters separated by a space, the
> first character has one diacritic, the second character has two diacritics.
> I'm not sure if it gets through the mail.
> Anyway, the diacritics of the first character should be moved down to the
> same level as the first diacritics of the second character
> I'm using ArialUnicodeMS font but I also tried with TH Sarabun and Tahoma. I
> tried several combinations of language and script but none worked, so I left
> it with no settings in the sample. I'm using FOP 1.1.
> One interesting thing I noticed, some "above the character" diacritics can
> be stacked above other diacritics or not, whereas others can only occur as
> first one (bottom one) of the stack. That's my understanding, I'm not a thai
> speaker. In some fonts, the diacritics that can be in several "above"
> positions come in the font in the high position. So if they occur alone,
> they need to be adjusted down. That's the case in ArialUnicode. In other
> fonts like Tahoma, all the diacritics come in the font at the same "height",
> the low position, so when stacking, one of the diacritics need to be move
> up.
>
> Any idea if this can be made to work with current FOP.
>
> <?xml version="1.0" encoding="utf-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="A4">
> <fo:region-body />
> </fo:simple-page-master>
> </fo:layout-master-set>
>
> <fo:page-sequence master-reference="A4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block font-size="32pt" font-family="ArialUnicode" margin-top="1cm">
> ท้ นื้
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
>
> Carlos



-- 
pascal

Re: thai stacking diacritics

Posted by Glenn Adams <gl...@skynav.com>.
I had no problem with this once I changed the font family name in your file
to read "Arial Unicode MS", in order to match the name in the arialuni.ttf
file. See the attached output. I've also tested Thai with the following MS
fonts:

Angsana New                     angsa.ttf
AngsanaUPC                      angsau.ttf
Browallia New                   browa.ttf
BrowalliaUPC                    browau.ttf
Cordia New                      cordia.ttf
CordiaUPC                       cordiau.ttf
DilleniaUPC                     upcdl.ttf
DokChampa                       dokchamp.ttf
IrisUPC                         upcil.ttf
JasmineUPC                      upcjl.ttf
KodchiangUPC                    upckl.ttf
Leelawadee                      leelawad.ttf
LilyUPC                         upcll.ttf

I'm using the current trunk build, but 1.1 should have no problems here.



On Tue, Jan 14, 2014 at 4:43 AM, Carlos Villegas <ca...@uniscope.jp> wrote:

> Hi,
>
> We're trying to produce some thai output with FOP but FOP doesn't seem to
> be adjusting the diacritics.
> In the following sample, there are two characters separated by a space,
> the first character has one diacritic, the second character has two
> diacritics. I'm not sure if it gets through the mail.
> Anyway, the diacritics of the first character should be moved down to the
> same level as the first diacritics of the second character
> I'm using ArialUnicodeMS font but I also tried with TH Sarabun and Tahoma.
> I tried several combinations of language and script but none worked, so I
> left it with no settings in the sample. I'm using FOP 1.1.
> One interesting thing I noticed, some "above the character" diacritics can
> be stacked above other diacritics or not, whereas others can only occur as
> first one (bottom one) of the stack. That's my understanding, I'm not a
> thai speaker. In some fonts, the diacritics that can be in several "above"
> positions come in the font in the high position. So if they occur alone,
> they need to be adjusted down. That's the case in ArialUnicode. In other
> fonts like Tahoma, all the diacritics come in the font at the same
> "height", the low position, so when stacking, one of the diacritics need to
> be move up.
>
> Any idea if this can be made to work with current FOP.
>
> <?xml version="1.0" encoding="utf-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="A4">
> <fo:region-body />
> </fo:simple-page-master>
> </fo:layout-master-set>
>
> <fo:page-sequence master-reference="A4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block font-size="32pt" font-family="ArialUnicode" margin-top="1cm">
> ท้ นื้
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
>
> Carlos
>