freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ft-devel] patch for Type1 Unicode cmap on Windows


From: Sergey Tolstov
Subject: RE: [ft-devel] patch for Type1 Unicode cmap on Windows
Date: Thu, 8 May 2008 06:43:17 -0700

You are right from the point of view of Unicode. However, Windows GDI
uses WGL4 for mapping.
http://www.microsoft.com/typography/otspec/WGL4.htm
And in the WGL4, the U+00A0 is assigned 'space' as a PostScipt name.
This is logical from the point of view of rendering to draw the nbspace
with the regular space, if the former name is not present in the font.

Sergey Tolstov 

> -----Original Message-----
> From: Graham Asher [mailto:address@hidden
> Sent: Thursday, May 08, 2008 1:27 AM
> To: Sergey Tolstov
> Cc: address@hidden
> Subject: RE: [ft-devel] patch for Type1 Unicode cmap on Windows
> 
> U+00A0 is not a space but a non-break space, so something is wrong
here
> surely?
> 
> Graham Asher
> 
> 
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden
> On
> Behalf Of Sergey Tolstov
> Sent: 08 May 2008 07:00
> To: address@hidden
> Subject: [ft-devel] patch for Type1 Unicode cmap on Windows
> 
> Hello,
> 
> Type 1 driver uses Adobe Glyph List to build the Unicode cmap.
> Windows GDI creates a little different mapping. For example, if there
> is
> 'periodcentered' glyph name in the Type 1 font, Windows maps 0x2219 to
> that glyph and freetype does not.
> I have run AGL 2.0 and WGL4 through a script and found that there are
> the following glyph names in WGL4, which are mapped to additional
> Unicode values:
> Delta 0x0394
> Omega 0x03A9
> fi    0xF001
> fl    0xF002
> fraction      0x2215
> hyphen        0x00AD
> macron        0x02C9
> mu    0x03BC
> periodcentered        0x2219
> space 0x00A0
> uni203E       0x203E
> 
> Out of these, the fl and fi are not mapped by Windows, and uni203E can
> be omitted. This leaves 8 WGL specific mappings.
> Delta: 0x0394
> Omega: 0x03A9
> fraction: 0x2215
> hyphen: 0x00AD
> macron: 0x02C9
> mu: 0x03BC
> periodcentered: 0x2219
> space: 0x00A0
> 
> I suggest you to consider a patch for the psmodule.c, which maps these
> glyph names on top of regular AGL mapping. The mapping is created if
> the
> glyph name is present in the font, and the Unicode value is not
> assigned
> by the AGL mapping. The patch is made on top of 2.3.5.
> During testing with a font, named Agate, 6 additional entries are
being
> created in the unicode cmap (for 2215, AD, 2C9, 3BC, 2219, A0). With
> the
> patch, freetype maps those unicodes in the same way as GDI. Those
> unicodes are mapped to 0 without the patch.
> 
> Thanks,
> Sergey Tolstov
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]