Re: [XeTeX] Warning about no Hindi language in Devanagari script

2012-01-21 Thread Yves Codet
Hello,

It means what the message says, there are no Sanskrit or Hindi language tags in 
your font. The output is correct because you said Script=Devanagari, which is 
enough. You might want to modify your preamble like this:

\setmainfont{FreeSerif}
\newfontfamily{\sk}[Script=Devanagari]{FreeSerif}
\newfontfamily{\hi}[Script=Devanagari]{FreeSerif}

Best wishes,

Yves

Le 20 janv. 2012 à 23:05, Steve White a écrit :

 
 Hi,
 
 What does this mean?
 
 Package fontspec Warning:
Font Free Serif/ICU/ICU does not contain language 'Hindi' for
 script 'Devanagari'
 This warning occured on input line 7.
 
 The document starts with
 ===
 \documentclass[12pt]{book}
 \usepackage{fontspec}
 \usepackage{longtable}
 
 \setromanfont{FreeSerif}
 \newfontfamily{\sk}[Script=Devanagari,Language=Sanskrit]{FreeSerif}
 \newfontfamily{\hi}[Script=Devanagari,Language=Hindi]{FreeSerif}
 ...
 ===
 
 Both the Hindi and Sanskrit output of the file looks correct, though!
 
 
 --
 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] Warning about no Hindi language in Devanagari script

2012-01-21 Thread Steve White
Hi,

Thanks for the replies!

It looks to me as if we have a small bug in fontspec (or some library it calls).

To clarify: I'm presently working on the FreeSerif font.  It has for a
long time had (poor) support for Devanagari; very recently, it is
better (in SVN!).

The message doesn't make sense to me.  Both Sanskrit and Hindi use the
Devanagari script.  All of the Unicode range for Devanagari is now
supported by the font.  There are many OpenType tables relating to
Devanagari.

What exactly is fontspec looking for?

There is one table concerning Sanskrit.  As Hindi is
transformation-wise simpler than Sanskrit, it uses only the default
tables.  So there are no tables that specifically refer to Hindi.

But that is nothing peculiar to FreeSerif.  Many fonts meant for Hindi
contain only OpenType tables tagged for Devanagari (and among those,
most also

So, I tried adding a dummy table and subtable, marked deva{HIN }.
And the warning goes away.
It would seem that it complains when trying to render Hindi, if the
font doesn't have tables specifically labelled deva{HIN }.

What is the point of this warning?  Is it to inform the user that the
font can't have good support for a language, due to having no lookup
tables for it?  That might be useful information.  In the case of
these languages, it is indeed very poor to fail to perform certain
complex transformations.

However the current logic is wrong.  For a font meant to display
Hindi, it should be enough to have tables tagged for the Devanagari
script.

Cheers!

On Sat, Jan 21, 2012 at 11:50 AM, Peter Dyballa peter_dyba...@web.de wrote:

 Am 20.1.2012 um 23:05 schrieb Steve White:

 Package fontspec Warning:
    Font Free Serif/ICU/ICU does not contain language 'Hindi' for
 script 'Devanagari'

 Trying your example with both GNU FreeSerif and with Code2000 with my XeTeX 
 version, 3.1415926-2.3-0.9997.5 (TeX Live 2011), it gives with fontspec.sty 
 2011/09/18 v2.2a and fontspec-patches.sty 2011/09/18 v2.2a and 
 fontspec-xetex.sty 2011/09/18 v2.2a such warnings:

        *
        * fontspec warning: language-not-exist
        *
        * Language 'Sanskrit' not available for font 'Code2000' with script
        * 'Devanagari'.
        * 'Default' language used instead.
        *
        *
        * fontspec warning: language-not-exist
        *
        * Language 'Hindi' not available for font 'Code2000' with script 
 'Devanagari'.
        * 'Default' language used instead.
        *

 This can be interpreted as if there are no language specific differences in 
 font shaping when using the Devanagari script. Or they are not built-in to 
 these fonts... In the latter case maybe some native Indian font offers the 
 desired script and language support.

 --
 Greetings

  Pete

 To most people solutions mean finding the answers. But to chemists solutions
 are things that are still all mixed up.




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


Re: [XeTeX] Warning about no Hindi language in Devanagari script

2012-01-21 Thread Khaled Hosny
On Sat, Jan 21, 2012 at 12:27:37PM +0100, Steve White wrote:
 What is the point of this warning?  Is it to inform the user that the
 font can't have good support for a language, due to having no lookup
 tables for it?  That might be useful information.  In the case of
 these languages, it is indeed very poor to fail to perform certain
 complex transformations.

You explicitly asked for ‘Language=Hindi’ which is translated to
‘language=HIN’ in the low level font code, and since the font does not
have any lookups with that ‘language’ tag, fontspec is issuing a
warning. Remove the ‘Language=Hindi’ call if you just want the default
language of that script and the warning will go away.

Regards,
 Khaled


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


Re: [XeTeX] Warning about no Hindi language in Devanagari script

2012-01-21 Thread Steve White
Hi Khaled!

Agreed, this does make the warning go away, but not my complaint.

The warning still doesn't say what it should: the message reads

Package fontspec Warning:
Font Free Serif/ICU/ICU does not contain language 'Hindi' for
script 'Devanagari'

This font does in fact support the *language, and tables for the
script that effectively support the lanugage.  It just doesn't have
specifically-tagged feature tables for that language.  The message is
being triggered because *features* have been requested, which aren't
present.  (The purpose of the fontspec command also wasn't clear to
me--thanks for explaining!)

If the warning rather said something like

   Font  has no feature tables for language 'Hindi' for script 'Devanagari'

it would make the source of the complaint (as well as the function of
the fontspec command) cldar.

Cheers!

On 1/21/12, Khaled Hosny khaledho...@eglug.org wrote:
 On Sat, Jan 21, 2012 at 12:27:37PM +0100, Steve White wrote:
 What is the point of this warning?  Is it to inform the user that the
 font can't have good support for a language, due to having no lookup
 tables for it?  That might be useful information.  In the case of
 these languages, it is indeed very poor to fail to perform certain
 complex transformations.

 You explicitly asked for ‘Language=Hindi’ which is translated to
 ‘language=HIN’ in the low level font code, and since the font does not
 have any lookups with that ‘language’ tag, fontspec is issuing a
 warning. Remove the ‘Language=Hindi’ call if you just want the default
 language of that script and the warning will go away.

 Regards,
  Khaled


 --
 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] Warning about no Hindi language in Devanagari script

2012-01-21 Thread mskala
On Sat, 21 Jan 2012, Steve White wrote:
 There is one table concerning Sanskrit.  As Hindi is
 transformation-wise simpler than Sanskrit, it uses only the default
 tables.  So there are no tables that specifically refer to Hindi.

FWIW, I've noticed a similar problem with FontForge.  It has trouble
applying OpenType features to some code points if the language it thinks
uses those code points is not mentioned specifically in the tables, never
mind that there is a default entry saying the feature should apply.  I
noticed this with Korean, but it seems to be a general issue.
-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/


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


[XeTeX] Warning about no Hindi language in Devanagari script

2012-01-20 Thread Steve White
Hi,

What does this mean?

Package fontspec Warning:
Font Free Serif/ICU/ICU does not contain language 'Hindi' for
script 'Devanagari'
This warning occured on input line 7.

The document starts with
===
\documentclass[12pt]{book}
\usepackage{fontspec}
\usepackage{longtable}

\setromanfont{FreeSerif}
\newfontfamily{\sk}[Script=Devanagari,Language=Sanskrit]{FreeSerif}
\newfontfamily{\hi}[Script=Devanagari,Language=Hindi]{FreeSerif}
...
===

Both the Hindi and Sanskrit output of the file looks correct, though!


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