Re: [XeTeX] problem rendering unicode Devanagari dependent vowel signs and ligatures

2011-02-04 Thread Leo Brouwer
>
> To me, it looks like the effects of Script=Devanagari are at least partly
> font-dependent.  With Sanskrit 2003, I need to have the Script setting
> present, or it doesn't bother with conjuncts; it just sticks viramas
> everywhere.  Precisely the *opposite* is true with Devanagari MT.
>
> I've attached source (UTF-8) and output, for completeness's sake.  As you
> can see, I was also curious if Mapping=velthuis-sanskrit made any
> different.  Conclusion: Not with these fonts, at least.


Yes, I was a little hasty yesterday: in Windows the mapping also doesn't
make a difference.  As David has pointed out, this doesn't seem to be a
difference in fonts, but in the font rendering system, AAT vs. OpenType.
There's a legitimate OpenType version of Devanagari MT made for IBM, but
having been converted it behaves exactly the same as Sanskrit 2003, or any
of the other ttf fonts. The OpenType script tag "deva" needs to be added for
these fonts to render conjuncts, but with the tag removed, dotted
circles disappear!

To clarify, my original question was not about Devanagari MT, but about
fonts specifically designed in OpenType. Of these, I've only been able to
get shiDeva, Nakula, and Sahadeva to render the conjunct "trya" correctly in
Xetex (many fonts also have trouble with other conjuncts, but "trya" renders
incorrectly for every font I've come across except these 3). As most of
these fonts do render "trya" correctly in word processors, it seems to be a
Xetex-specific issue.

So it looks like AAT Devanagari MT is best suited for my needs (which I
imagine are quite common amongst people doing critical editions in
Sanskrit): unicode Devanagari with a real bold font, proper Sanskrit
conjuncts, and dependent vowels displaying on their own without requiring
macros.

According to wikipedia it may be possible to use AAT fonts in Linux.
Unfortunately I don't have my Linux laptop with me right now, but I will try
this weekend and report back.

Leo


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] \XeTeXglyphbounds question

2011-02-04 Thread Adam Twardoch (List)
On 11-02-04 18:37, Adam Twardoch (List) wrote:
> So, ideally something like \XeTeXboxbounds would be great: work the same
> way as \XeTeXglyphbounds but for a box (taking 1, 2, 3, 4 as parameter,
> and a box). 
Of course, if \XeTeXglyphmetrics=1, \XeTeXboxbounds2 (top) and
\XeTeXboxbounds4 (bottom) should each report 0, while if
\XeTeXglyphmetrics=0, \XeTeXboxbounds2 and \XeTeXboxbounds4 would report
precisely the differences that I'm obtaining by comparing \ht and \dp of
two boxes set with alternating value of \XeTeXglyphmetrics. That would
be the logical consequence, I think.

A.


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] \XeTeXglyphbounds question

2011-02-04 Thread Adam Twardoch (List)
On 11-02-04 14:27, Jonathan Kew wrote:
> Unfortunately, I don't think there's currently any way to do that. (Well, no 
> way within xetex, that is -- you could of course ship the box to the output 
> file, then post-process that with a tool of some kind to determine the glyph 
> ID, and then re-run the job using that information as input. But that's a 
> terribly cumbersome way to get to where you're trying to go!)
>
> It might be nice to have a command that could "look inside" boxes like that 
> and tell you the glyph IDs but then you'll probably find yourself wanting 
> their positions, too and then what if the contents of the box are more 
> complex than just a series of glyphs? Figuring out a usable TeX-level 
> interface to this could become awfully complex...
Ah, I was afraid you're going to say that :)

I do like the way \XeTeXglyphmetrics works, because, as you could see in
my sample file I sent you offline, by typesetting two boxes, one with
the command =0 and another =1, I can get the \ht and \dp dimensions and
compare them, thus getting a reliable difference in "font height" and
"glyph-derived height", and -- which is very important -- I get the two
values separately (height and depth). And that does work on "any" box,
i.e. if I put some non-textual objects there, the results will be the
same, so what.

As you might imagine, my second goal would be to get the left
"sidebearing" and the right "sidebearing" (i.e. the differences between
the inked bounding box and the declared typesetting origin).
\XeTeXglyphbounds gives me that for a single glyph, but since there is
no way to determine which glyphs will be used after a typesetting
process, \XeTeXglyphbounds is only of theoretical value.

I think the usefulness of having just the two edge values (the "left"
and the "right" bounds) for a box would be sufficient for a large amount
of purposes. This could be used to do custom margin alignment and
perform any sort of corrections to the horizontal positioning of the
box. Just like in case of \XeTeXglyphmetrics, I don't really desperately
need to know WHICH glyph is "bumping up" the overall vertical height of
a box, when I use it vs. not use it. The mere ability to measure the
difference _per box_ is already very helpful.

So, ideally something like \XeTeXboxbounds would be great: work the same
way as \XeTeXglyphbounds but for a box (taking 1, 2, 3, 4 as parameter,
and a box). As I said, that would already be extremely useful in a
variety of cases, even though I wouldn't have access to individual glyph
IDs and position inside the box. Just the outer differences between the
box size and the rendered glyph stream size. It's much less common a
case that I need to know all the details of my glyph stream (and, as you
said, it's hard to report reliably the inner structure of a box if its
contents is complex). But a simple interface to report the difference
between the "inked" bounding box and the metrics reported using standard
means would be a huge helper.

I don't know how feasible this is, though.

Many thanks for your help so far!

Best,
Adam




--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Velthuis to Roman translit

2011-02-04 Thread Dominik Wujastyk
All explained on my blog, http://cikitsa.blogspot.com, especially this post:

   -
   http://cikitsa.blogspot.com/2010/07/how-do-i-install-romdev-mapping-for.html


Best,
Dominik

On 4 February 2011 14:39, Neal Delmonico  wrote:

> There's the problem.  I apparently don't have RomDev.map and tec installed.
>  Doesn't it come with TeXLive?  If not, how do I get it?
>
>
> On Fri, 04 Feb 2011 04:56:58 -0600, Dominik Wujastyk 
> wrote:
>
>  But I think there's another point.  You've gone through some trouble to
>> convert Velthuis to UTF8.  But if, in the \newfontfamily statement you
>> said
>> "Mapping=velthuis-sanskrit" then the Velthuis encoding itself can give
>> perfectly good Nagari output.
>>
>
> Yes. This is true.  I used this before and still do.  I wanted to see if I
> could get back to Devanagari from the transliterated files.  These texts are
> still under development.  Being able to produce either a Devanagari version
> or a transliterated version from one file would be grand.  I could continue
> to work in velthuis encoding and then when the text is where I want it run
> your script script on it and produce a Romanized version.  It is not a big
> hassle.  It would be nice to just have one file that with the change of one
> code produces either Devanagari or transliteration.
>
> Yes, sure, I get it.

Dominik


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Velthuis to Roman translit

2011-02-04 Thread Peter Dyballa


Am 04.02.2011 um 14:39 schrieb Neal Delmonico:

There's the problem.  I apparently don't have RomDev.map and tec  
installed.  Doesn't it come with TeXLive?


No.


 If not, how do I get it?



From the internet (via Google). The term somadeva is connected to it.  
Last autumn (in December?) it was discussed on the Mac OS X TeX list:


List Archive: http://tug.org/pipermail/macostex-archives/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex

I think it's available according to TDS to be directly installed in / 
usr/local/texlive/texmf-local.


--
Greetings

  Pete

Email is a wonderful thing for people whose role in life is to be on  
top of things. But not for me; my role is to be on the bottom of  
things. What I do takes long hours of studying and uninterruptible  
concentration.

– Donald Knuth




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Velthuis to Roman translit

2011-02-04 Thread Neal Delmonico
There's the problem.  I apparently don't have RomDev.map and tec  
installed.  Doesn't it come with TeXLive?  If not, how do I get it?


On Fri, 04 Feb 2011 04:56:58 -0600, Dominik Wujastyk   
wrote:



But I think there's another point.  You've gone through some trouble to
convert Velthuis to UTF8.  But if, in the \newfontfamily statement you  
said

"Mapping=velthuis-sanskrit" then the Velthuis encoding itself can give
perfectly good Nagari output.


Yes. This is true.  I used this before and still do.  I wanted to see if I  
could get back to Devanagari from the transliterated files.  These texts  
are still under development.  Being able to produce either a Devanagari  
version or a transliterated version from one file would be grand.  I could  
continue to work in velthuis encoding and then when the text is where I  
want it run your script script on it and produce a Romanized version.  It  
is not a big hassle.  It would be nice to just have one file that with the  
change of one code produces either Devanagari or transliteration.


Thanks for your help.

Best wishes,

Neal

Using Opera's revolutionary email client: http://www.opera.com/mail/


--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] \XeTeXglyphbounds question

2011-02-04 Thread Jonathan Kew
On 4 Feb 2011, at 05:41, Adam Twardoch (List) wrote:

> (Plain XeTeX, not XeLaTeX).
> 
> Imagine I use a font which uses contextual alternates such as:
> 
> 
> \font\samplefont = "Zapfino Extra LT Pro:+calt" at 72bp
> 
> \samplefont
> 
> \def \sampletext{finality}
> \XeTeXuseglyphmetrics=1
> 
> \setbox1 \hbox{\sampletext \/}
> 
> 
> So now, XeTeX has produced a box which has a series of glyph IDs. The
> left edge of the box is at the origin point of the "f" glyph. I want to
> add extra padding on the left through the use of
> 
> \XeTeXglyphbounds1
> 
> 
> I could use:
> \XeTeXcharglyph`f
> 
> but this only gives me the glyph ID of the *default* glyph for the "f"
> character. Yet since the font uses contextual alternates, I may end up
> having any alternate "f" there, depending on the contents of \sampletext
> 
> So: how do I find out which glyph ID is the first (or 2nd, or last, for
> that matter) in my box?

Unfortunately, I don't think there's currently any way to do that. (Well, no 
way within xetex, that is -- you could of course ship the box to the output 
file, then post-process that with a tool of some kind to determine the glyph 
ID, and then re-run the job using that information as input. But that's a 
terribly cumbersome way to get to where you're trying to go!)

It might be nice to have a command that could "look inside" boxes like that and 
tell you the glyph IDs but then you'll probably find yourself wanting their 
positions, too and then what if the contents of the box are more complex 
than just a series of glyphs? Figuring out a usable TeX-level interface to this 
could become awfully complex...

JK




--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] problem rendering unicode Devanagari dependent vowel signs and ligatures

2011-02-04 Thread Dominik Wujastyk
Ah, very interesting!
Dominik

On 3 February 2011 08:20, Leo Brouwer  wrote:

> I've run Richard's sample (with devamt.ttf, the IBM version of Devanagari
> MT---apparently not an exact equivalent, as it doesn't render "trya"
> correctly), and it appears to me that it's not the fonts, but the lack of*
>  *Script=Devanagari in the font options that's causing the difference.
> Using velthuis-sanskrit mapping *without *Script=Devanagari displays
> visarga & dependent vowels without the circle for *all *fonts I've tried.
> It also doesn't form conjuncts correctly, however. Strangely enough, leaving
> out the script option doesn't seem to make a difference when using Romdev
> mapping, or when inputting Devanagari directly.
>
> \documentclass{article}
>
>  \usepackage{fontspec}
>
> \usepackage{xltxtra}
>
> \usepackage{xunicode}
>
>
>  \newfontfamily{\DMTAFont}[Mapping=velthuis-sanskrit]{Devanagari MT for
> IBM}
>
> \newfontfamily{\DMTBFont}[Mapping=velthuis-sanskrit,
> Script=Devanagari]{Devanagari MT for IBM}
>
>  \newfontfamily{\NakulaAFont}[Mapping=velthuis-sanskrit]{Nakula}
>
> \newfontfamily{\NakulaBFont}[Mapping=velthuis-sanskrit,
> Script=Devanagari]{Nakula}
>
>
>  \begin{document}
>
>
>  Devanagari MT without Script=Devanagari: {\DMTAFont .h .m atrya
> \char"0903 \char"093E}
>
>
>  Devanagari MT: {\DMTBFont .h .m atrya \char"0903 \char"093E}
>
>
>  Nakula without Script=Devanagari: {\NakulaAFont .h .m atrya \char"0903
> \char"093E}
>
>
>  Nakula: {\NakulaBFont .h .m atrya \char"0903 \char"093E}
>
>
>  \end{document}
>
> Thank you for bringing this to my attention; for now, I'll just make some
> macros with velthuis mapping & script turned off for the characters I need.
>
>
> I wonder how much of this is XeTeX and how much of this is an issue of font
>> encoding and design, although I know very little about the internals of
>> either.
>
>
> Yes, I've wondered about this also. Most of the fonts that don't work in
> XeTex display correct conjuncts in word processors, web browsers, etc., so
> it does seem to be something specific about Xetex that's causing the fonts
> to malfunction.
>
> Sincerely,
>
> Leo Brouwer
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Velthuis to Roman translit

2011-02-04 Thread Dominik Wujastyk
This works for me (output attached):

 \documentclass[10pt,titlepage]{book}

\usepackage{xltxtra}

\usepackage{polyglossia}

\setmainfont{Charis SIL}

\defaultfontfeatures{Mapping=tex-text}

\newfontfamily\textsanskrit[Script=Devanagari,Mapping=RomDev]{Sahadeva}

\begin{document}

Hello world!

\textsanskrit{astyuttarasyāṃ diśi devatātmā\par himālayo nāma nagādhirājaḥ}

\end{document}


But I think there's another point.  You've gone through some trouble to
convert Velthuis to UTF8.  But if, in the \newfontfamily statement you said
"Mapping=velthuis-sanskrit" then the Velthuis encoding itself can give
perfectly good Nagari output.

E.g.,

\newfontfamily\textsanskrit[Script=Devanagari,Mapping=velthuis-sanskrit]{Sahadeva}

\begin{document}

Hello world!

\textsanskrit{astyuttarasyaa.m di"si devataatmaa\par himaalayo naama
nagaadhiraaja.h}

\end{document}


Best,
Dominik


kk.pdf
Description: Adobe PDF document


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] problem rendering unicode Devanagari dependent vowel signs and ligatures

2011-02-04 Thread Peter Dyballa


Am 04.02.2011 um 03:45 schrieb Richard Cobbe:

To me, it looks like the effects of Script=Devanagari are at least  
partly

font-dependent.



Exactly! Adding this option activates the font's particular support  
for this script. See the fontspec manual!


--
Greetings

  Pete

The most exciting phrase to hear in science, the one that heralds new  
discoveries, is not "Eureka!" (I found it!) but "That's funny..."

– Isaac Asimov




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] Velthuis to Roman translit

2011-02-04 Thread Peter Dyballa


Am 03.02.2011 um 18:58 schrieb Neal Delmonico:


What is involved in writing a XeTeX TEC file?



In the TECkit sources you can find the documentation and also samples.  
(I have them and can send you copies on private notice.)


--
Greetings

  Pete

"Klingon function calls do not have 'parameters' - they have  
'arguments' - and they ALWAYS WIN THEM."




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex