Re: [XeTeX] Auto Font and Language Package in XeTeX (Khaled Hosny)

2010-12-22 Thread Michiel Kamermans

On 12/21/2010 6:04 PM, Venkatesan. S.K. (TNQ) wrote:
Do unicode committee have a proof of concept application (like Amaya 
browser for W3  HTML) or a font?


They don't need a PoC application, as the algorithms are fully 
described. The problems usually occur when specific font features need 
to be applied in a specific order, and the font engine either lacks the 
capability to apply them in the right order, or the capability to apply 
them at all. Being Unicode and OpenType compliant (rather than just 
compatible) is a fiendishly complex job.


As for the font, the Unicode Consortium uses many different fonts, all 
contributed by numerous foundries and individuals (see 
http://unicode.org/charts/fonts.html)


It is possible create a font using all their PDFs but license will be 
problem, I suppose...


Rather! You are, in fact, expressly forbidden from extracting any font 
used in the Unicode specification PDF files.



Each and every OS and editors show different levels of compliance...


This is mostly because they all use different engines. Your OS will use 
Uniscribe, Core Text or (most likely) Pango depending on whether it's 
windows, mac or *nix, and individual applications may completely ignore 
these render engines and use their own layout management and glyph 
fetchers instead.


Depending on how much the developers feel they need to reinvent the 
wheel because the default engines available don't offer what they need, 
applications will be more or less Unicode and OpenType compatible (I'm 
not aware of any text engine that is fully compliant, but if there is 
one, I'd love to know about it!)


- Mike Pomax Kamermans
nihongoresources.com



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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-22 Thread Yves Codet
Hello Michiel.

Thanks a lot for this package.

There's a small typo in the documentation; if I understand well the paragraph 
4.3 should read \setTransitionsFor[3], not \setTransitions[3].

Without polyglossia (essai1.tex below) I got the expected result, but with 
polyglossia (essai2.tex) XeTeX seems to enter an infinite loop; the error 
message is:

./essai2.tex:15: TeX capacity exceeded, sorry [save size=5].
argument ...ex \...@gobble \let \glossary \...@gobble 
  
l.15 भ
वान्कः। \\
No pages of output.
Transcript written on essai2.log.

Regards,

Yves



essai1.tex
Description: Binary data




essai2.tex
Description: Binary data



Le 21 déc. 2010 à 17:53, Michiel Kamermans a écrit :

 
 Hi Yves (and everyone else)
 
 the ucharclasses package is now on CTAN 
 (http://tug.ctan.org/tex-archive/macros/xetex/latex/ucharclasses/), so if you 
 want to see if it breaks in combination with how you use polyglossia, let  me 
 know what the result is.
 
 - Mike Pomax Kamermans
 nihongoresources.com
 
 
 --
 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] Auto Font and Language Package in XeTeX

2010-12-21 Thread Venkatesan. S.K. (TNQ)
Hi,

I managed to download ucharclasses.zip from CTAN.
I will definitely try to use it for my MuLTiFlow project:
http://sourceforge.net/projects/multiflow/develop
Thanks Michiel Kamermans!!


Lua has another way I suppose, I like that cute little language!!
Thanks Khaled Hosny!!

I agree with Khaled Hosny that font switching and text directionality are
two different issues.
The difficult question is whether UTF-8 editors should switch direction by
sensing the UTF-8 characters?
I have had unpleasant surprises both with Tamil (left to right and complex
ligatures) and Arabic (right to left) in gedit.
(There must be a way to switch this off I suppose)
XeTeX allows you to switch on/off the language specific scripts, which is
nice.
I suppose there are other views on this from WYSIWYG people.
Browsers sense the characters and switches them,  and I think it is
hard-wired based on the UTF-8 character values and does not pick it up from
the font.
I suppose these are early days for unicode, especially for Indic, Hebrew and
Arabic.

Suki


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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-21 Thread Michiel Kamermans

Hi Yves (and everyone else)

the ucharclasses package is now on CTAN 
(http://tug.ctan.org/tex-archive/macros/xetex/latex/ucharclasses/), so 
if you want to see if it breaks in combination with how you use 
polyglossia, let  me know what the result is.


- Mike Pomax Kamermans
nihongoresources.com


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


Re: [XeTeX] Auto Font and Language Package in XeTeX (Khaled Hosny)

2010-12-21 Thread Venkatesan. S.K. (TNQ)
On Tue, Dec 21, 2010 at 05:15:13PM +0530, Venkatesan. S.K. (TNQ) wrote:
  I suppose these are early days for unicode, especially for Indic, Hebrew
 and
  Arabic.

 I'm not sure if I understand what you mean by early here, but Arabic
 have been part of Unicode since 1.1 (cr. 1993), bidi algorithm even
 predates Unicode.

 Regards,
  Khaled

 --
  Khaled Hosny
  Arabic localiser and member of Arabeyes.org team
  Free font developer


When Arabic and English and Tamil are mixed in UTF-8 I can demonstrate
interesting behaviors in gedit and other text editors. Many other text
editors just render them in byte order, like byte editors, which is fine...
It may not be early days for the Unicode specs, but the implementing
applications have been having finding it difficulty, not to mention that
there have been new characters and changes being constantly made in every
Unicode version, 5.1, 6.0, etc...The OS releases lag behind and where are
the bloody fonts that has implemented Unicode 6.0? It is a nightmare for
implementors and users.
Do unicode committee have a proof of concept application (like Amaya browser
for W3  HTML) or a font?
It is possible create a font using all their PDFs but license will be
problem, I suppose...
Each and every OS and editors show different levels of compliance...

Apart from all this, there are the users who are used to WYSIWYG paradigm
and get very confused when there are different outputs in XML editors and
the PDF output.
We have had interesting problems where book authors used Arabic/Hebrew in an
insensitive version of MS Word that doesn't switch right to left and they
want the output that way and when we open it an recent version of MS Word or
the other way around, we get very interesting emails and discussions. I
generally tell them please send me a PDF and tell me what is exactly you
want in the output, we will take care of the XML. Of course, if you use a
non-Middle-East version of InDesign then right to left will not work; I
suppose InDesign folks think that Arabic should not be used non-Middle-East
folks...

Suki


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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-20 Thread Michiel Kamermans
Alright, I finished the ucharclasses package at least to a functional 
degree, with the project page for it at 
http://projects.nihongoresources.com/xelatex/ucharclasses (it's been 
submitted to CTAN, so once it's in the listing it'll be nice and easy to 
grab).


If anyone has any improvement requests (either functionally or 
codewise), I'm all ears. Or eyes. whichever works best, really.


Incidentally, does anyone know whether there is a LuaTeX version of the 
XeTeXintercharclass behaviour that would let this package be rewritten 
for LuaTeX with minimal effort?


- Mike Pomax Kamermans
nihongoresources.com


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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-20 Thread Khaled Hosny
On Mon, Dec 20, 2010 at 12:59:45PM +0100, Paul Isambert wrote:
 Selon Arthur Reutenauer arthur.reutena...@normalesup.org:
 
   Incidentally, does anyone know whether there is a LuaTeX version of the
   XeTeXintercharclass behaviour that would let this package be rewritten
   for LuaTeX with minimal effort?
 
Paul Isambert has written code to that effect, but I'm not sure he has
  made it into a package yet.
 
 
 I haven't indeed. It's quite low on my priority list, all the more as 
 mimicking
 interchartoks isn't totally possible in LuaTeX, although the most significant
 part of the mechanism can be reproduced.
 
 Anyway judging from what I understand Michiel's package does, an
 interchartoks-like code in LuaTeX won't work, because it'll really be an
 ``inter-node'' mechanism, and (glyph) nodes already have their fonts attached 
 to
 them, whereas the package is supposed to change fonts.
 
 The solution would rather be: get the nodes as soon as possible, e.g. in the
 ligaturing callback, and set the font number for each node according to its
 unicode value. That means no such thing as \fontspec{A font} is usable here;
 instead, you must go low-level and grab the fonts by their numbers. Such 
 numbers
 can be retrieved from the control sequences passed to the \font primitive with
 Lua's font.id(name). An extension to fontspec would be infinitely simpler 
 than
 an independent package.

I long had that on my todo list, but I'm yet to figure out a proper user
interface for it; one needs to take care of different font styles,
optical sizes etc. e.g. English ARABIC {\it english ARABIC} should work
and get the Arabic text assigned the proper italic font and so on.

The code at lua end is quit trivial, once the script-font mapping is
defined which is actually the tricky part.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-20 Thread Michiel Kamermans



I long had that on my todo list, but I'm yet to figure out a proper user
interface for it; one needs to take care of different font styles,
optical sizes etc. e.g. English ARABIC {\it english ARABIC} should work
and get the Arabic text assigned the proper italic font and so on.

The code at lua end is quit trivial, once the script-font mapping is
defined which is actually the tricky part.
   


Hmm... that sounds much more narrow than what you can do with XeTeX's 
intercharclass behaviour, and much more like just font-switching. I 
would imagine that something like what XeTeX offers makes it much easier 
to say if arabic character from non arabic, RTL and font switch (and 
whatever else is requested by the user). But perhaps LuaTeX wants to do 
these two things separately, which would of course be equally fine, just 
requiring a different approach in terms of packageness


- Mike


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


Re: [XeTeX] Auto Font and Language Package in XeTeX

2010-12-13 Thread Michiel Kamermans

On 12/12/2010 9:57 PM, Venkatesan. S.K. (TNQ) wrote:

If you look at current generation browsers, they assign fonts by 
default to all language scripts by their unicode plane.
Say, Greek=Palatino Linotype etc. They also allow you to change the 
default font settings.


It would be a nice idea to build a default package in XeLaTeX that 
would use these fonts.


Alright, alright, I confess, I should just finish the damn 
ucharclasses package _


For the moment the dev version is here: 
http://projects.nihongoresources.com/downloadables/ucharclasses.tgz
documentation here: 
http://projects.nihongoresources.com/downloadables/ucharclasses.pdf


I still need to add in selective unicode block load options, and ideally 
follow up on Jonathan's suggestion from way back when, to add in script 
tags in addition to the current blind unicode blocks (although I 
suspect that would be more for a v2, since ambiguity is king when it 
comes to script).


I'm swamped with wrapping up my work before moving from Europe to 
Canada, Jan 1st, but I'll try to get it cleaned a little and CTANed over 
the weekend.


If anyone has a better package name for it before I sent it up to CTAN, 
feel free to pipe up and I'll change it to something more intuitive for 
users.


- Mike Pomax Kamermans
nihongoresources.com


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