Around 18 o'clock on Jul 9, Jungshik Shin wrote:

> >     a)      call setlocal (LC_ALL, "") myself?
> 
>   I'm afraid this can have an unexpected side effect, which could
> surprise/upset some application program developers.

Agreed; this choice was somewhat rhetorical in nature...

> >     b)      use $LANG or $LC_CTYPE?
>
>   If this road is taken, it has to be determined which env.
> variables have to be refered to in what order. AFAIK, SUS and POSIX say
> that it's implementation-dependent.

Too bad the POSIX spec is closed so I can't check.  I've decided to go 
ahead and do this and follow the glibc convention; that's based on the 
principle of least surprise -- it would be very surprising to users when 
the same font name generated different results in different applications.

If anyone knows of alternate conventions for other libraries, I'll go 
ahead and add them.  Given that "decent" apps will call setlocale, this is 
somewhat unecessary.

> This might well be the best course along with documenting that setlocale()
> should be called to make font matching/selection locale dependent or that
> better still is to explicitly provide lang info when invoking font
> selection APIs

I'm afraid relying on reasonable application behaviour doesn't generally 
lead to good results.  However, the best applications will provide 
language information in their font selections which makes this particular 
defaulting mechanism less critical.  Let's hope that other C libraries 
don't implement mystic semantics.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to