mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Preliminary implemetation for NSConvertGlyphsToPackedGlyphs().
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16616 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
294b552583
commit
1ef9efe907
1 changed files with 32 additions and 2 deletions
|
@ -1012,6 +1012,36 @@ int NSConvertGlyphsToPackedGlyphs(NSGlyph *glBuf,
|
|||
NSMultibyteGlyphPacking packing,
|
||||
char *packedGlyphs)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSGlyph g = glBuf[i];
|
||||
|
||||
switch (packing)
|
||||
{
|
||||
case NSOneByteGlyphPacking:
|
||||
packedGlyphs[j++] = (char)(g & 0xFF);
|
||||
break;
|
||||
case NSTwoByteGlyphPacking:
|
||||
packedGlyphs[j++] = (char)((g & 0xFF00) >> 8) ;
|
||||
packedGlyphs[j++] = (char)(g & 0xFF);
|
||||
break;
|
||||
case NSFourByteGlyphPacking:
|
||||
packedGlyphs[j++] = (char)((g & 0xFF000000) >> 24) ;
|
||||
packedGlyphs[j++] = (char)((g & 0xFF0000) >> 16);
|
||||
packedGlyphs[j++] = (char)((g & 0xFF00) >> 8) ;
|
||||
packedGlyphs[j++] = (char)(g & 0xFF);
|
||||
break;
|
||||
case NSJapaneseEUCGlyphPacking:
|
||||
case NSAsciiWithDoubleByteEUCGlyphPacking:
|
||||
default:
|
||||
// FIXME
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return j;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue