mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Avoid old non-standard API
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13629 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f4d7699d2c
commit
4933dbfd3b
2 changed files with 17 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-05-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Source/xlib/XGFont.m: ([-xCharStructForGlyph:]) use newer
|
||||
GSGFromUnicode() API.
|
||||
|
||||
2002-05-09 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Headers/gsc/GSGState.h: Add color and text ivars.
|
||||
|
|
|
@ -348,15 +348,22 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
|
||||
// glyph is an unicode char value
|
||||
// if the font has non-standard encoding we need to remap it.
|
||||
if ((mostCompatibleStringEncoding != NSASCIIStringEncoding) &&
|
||||
(mostCompatibleStringEncoding != NSISOLatin1StringEncoding) &&
|
||||
(mostCompatibleStringEncoding != NSUnicodeStringEncoding))
|
||||
if ((mostCompatibleStringEncoding != NSASCIIStringEncoding)
|
||||
&& (mostCompatibleStringEncoding != NSISOLatin1StringEncoding)
|
||||
&& (mostCompatibleStringEncoding != NSUnicodeStringEncoding))
|
||||
{
|
||||
// FIXME: This only works for 8-Bit characters
|
||||
index = encode_unitochar(glyph, mostCompatibleStringEncoding);
|
||||
unsigned int size = 1;
|
||||
unsigned char c = 0;
|
||||
unsigned char *dst = &c;
|
||||
|
||||
GSFromUnicode(&dst, &size, &glyph, 1, enc, 0, 0);
|
||||
index = c
|
||||
}
|
||||
else
|
||||
index = glyph;
|
||||
{
|
||||
index = glyph;
|
||||
}
|
||||
|
||||
if (min1 == 0 && max1 == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue