mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
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:
parent
5b9d37a647
commit
c768a703c1
2 changed files with 19 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue