Subject: RE: Enabling and testing surrogates
From: "John McConnell" <[email-masked]>
To: "Alan Wood" <[email-masked]>, "Unicode List" <[email-masked]>
Date: Tue, 30 Oct 2001 10:10:10 -0800

Windows XP has some modest improvements for surrogate support. The info may not be on MSDN yet, so here's a summary:

- there are just two optional language packs (one for East Asian and one for the rest). If either is installed, usp10.dll (Uniscribe) is installed and you'll get surrogate processing. You can still enable surrogate processing the old way if you don't want to install any of the optional language packs.
- We've got a limited form of font-linking in XP. It's driven by a few registry entries: 

     HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack\SurrogateFallback\Plane1
     HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack\SurrogateFallback\Plane2
     HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack\SurrogateFallback\Plane3
     Etc.

The value of each of these is the OpenType font that GDI will link to if it encounters a surrogate pair on the appropriate plane and the current font doesn't have the glyph. XP doesn't include any fonts with non-BMP glyphs yet, so the registry values are still empty by default.

The same font file may be used as the fallback for two or more planes. The fallback font must be an OpenType font with a cmap table with format 8, 10, or 12. If the Unicode Character does not exist in the fallback font specified by the registry, Uniscribe performs no further font-linking or fallback (i.e. the user sees the default glyph for the current font).
- NLS (CompareString etc.) has limited support for surrogates. In particular, CompareString and LCMapString will assign weights to the first two and last two planes.

What I've described will affect Win32 apps (e.g. Notepad). Behavior within an app or some system components may be different.

John

-----Original Message-----
From: Alan Wood [mailto:[email-masked]] 
Sent: Tuesday, October 30, 2001 6:56 AM
To: Unicode List
Subject: Enabling and testing surrogates

Carl Brown kindly provided a link with details of enabling surrogates, which has now moved to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicod
e_192r.asp

I don't have access to Windows 2000 or XP yet, but I have just added test pages for Old Italic, Gothic, Deseret, Byzantine Musical Symbols, Musical Symbols, Mathematical Alphanumeric Symbols, CJK Compatibility Ideographs Supplement and Tags to my Web site, starting at:

http://www.hclrss.demon.co.uk/unicode/old_italic.html

I would be very interested to know if these pages actually work, after surrogates have been enabled according to the instructions in the linked article.

Does anyone know if it is easier to enable surrogates in Windows XP?

Alan Wood
Documentation Writer / Web Master
Context Limited (http://www.context.co.uk/) mailto:[email-masked] http://www.alanwood.net/ (Unicode, special characters, pesticide names)

> -----Original Message-----
> From:	Carl W. Brown [SMTP:[email-masked]]
> Sent:	Wednesday, October 04, 2000 12:04 AM
> To:	Unicode List
> Subject:	RE: lag time in Unicode implementations in OS, etc?
> 
> James,
> 
> Look at 
> http://msdn.microsoft.com/library/psdk/winbase/unicode_192r.htm
> 
> It explains how to turn on surrogates for W2K and some of the Open 
> Type issues.
> 
> Carl
> 
> -----Original Message-----
> From: James Kass [mailto:[email-masked]]
> Sent: Tuesday, October 03, 2000 3:28 PM
> To: Unicode List
> Subject: Re: lag time in Unicode implementations in OS, etc?
> 
> Chris Pratley wrote (regarding surrogate support):
> 
> > There are a couple of reg keys that can do part of the enabling. I 
> > think
> the
> > Windows team will release a support pack of some kind once they've 
> > got
> the
> > support final (turning on the reg keys simply enables part of the
> support -
> > there are still fonts, IMEs, and sorting)
> > 
> 
> Microsoft Typography web site OpenType specifications
> offer no clue that I could find for building a Plane 1
> font.  The cmap page only goes through format 6.
> Should such a font just be built to the Apple
> specs for cmap format 12 or is there a spec at the
> Microsoft site that I just couldn't find?
> 
> Best regards,
> 
> James Kass.
>