Add (experimental) handling of utf16 to glyph generation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17033 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-06-25 22:35:34 +00:00
parent 5b9d37a647
commit c768a703c1
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2003-06-26 00:33 Alexander Malmberg <alexander@malmberg.org>
* Source/ftfont.m (-_generateGlyphsForRun:at:): Add (experimental)
handling of utf16 to glyph generation so planes beyond the BMP can
be used.
2003-06-20 Adam Fedor <fedor@gnu.org>
* Version 0.8.7

View file

@ -2757,7 +2757,7 @@ fb04 'ffl'
glyph_t *g;
unsigned int glyph_size;
unsigned int i,j;
unichar ch,ch2,ch3;
unsigned int ch,ch2,ch3;
FTFontInfo *fi=[run->font fontInfo];
FTC_CMapDescRec cmap;
@ -2839,9 +2839,20 @@ fb04 'ffl'
}
}
if (ch>=0xd800 && ch<=0xdfff)
{
if (ch >= 0xd800 && ch < 0xdc00 && ch2 >= 0xdc00 && ch2 <= 0xdfff)
{
ch = ((ch & 0x3ff) << 10) + (ch2 & 0x3ff) + 0x10000;
i++;
}
else
ch = 0xfffd;
}
g->g=FTC_CMapCache_Lookup(ftc_cmapcache, &cmap, ch) + 1;
if (g->g == 1)
if (g->g == 1 && ch<0x10000)
{
unichar *decomp;
decomp=uni_is_decomp(ch);