mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +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
8a6bb28712
commit
ff33fd939f
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>
|
2002-05-09 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Headers/gsc/GSGState.h: Add color and text ivars.
|
* Headers/gsc/GSGState.h: Add color and text ivars.
|
||||||
|
|
|
@ -348,15 +348,22 @@ static BOOL XGInitAtoms(Display *dpy)
|
||||||
|
|
||||||
// glyph is an unicode char value
|
// glyph is an unicode char value
|
||||||
// if the font has non-standard encoding we need to remap it.
|
// if the font has non-standard encoding we need to remap it.
|
||||||
if ((mostCompatibleStringEncoding != NSASCIIStringEncoding) &&
|
if ((mostCompatibleStringEncoding != NSASCIIStringEncoding)
|
||||||
(mostCompatibleStringEncoding != NSISOLatin1StringEncoding) &&
|
&& (mostCompatibleStringEncoding != NSISOLatin1StringEncoding)
|
||||||
(mostCompatibleStringEncoding != NSUnicodeStringEncoding))
|
&& (mostCompatibleStringEncoding != NSUnicodeStringEncoding))
|
||||||
{
|
{
|
||||||
// FIXME: This only works for 8-Bit characters
|
// 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
|
else
|
||||||
index = glyph;
|
{
|
||||||
|
index = glyph;
|
||||||
|
}
|
||||||
|
|
||||||
if (min1 == 0 && max1 == 0)
|
if (min1 == 0 && max1 == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue